babel.js 2.9 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052470534705447055470564705747058470594706047061470624706347064470654706647067470684706947070470714707247073470744707547076470774707847079470804708147082470834708447085470864708747088470894709047091470924709347094470954709647097470984709947100471014710247103471044710547106471074710847109471104711147112471134711447115471164711747118471194712047121471224712347124471254712647127471284712947130471314713247133471344713547136471374713847139471404714147142471434714447145471464714747148471494715047151471524715347154471554715647157471584715947160471614716247163471644716547166471674716847169471704717147172471734717447175471764717747178471794718047181471824718347184471854718647187471884718947190471914719247193471944719547196471974719847199472004720147202472034720447205472064720747208472094721047211472124721347214472154721647217472184721947220472214722247223472244722547226472274722847229472304723147232472334723447235472364723747238472394724047241472424724347244472454724647247472484724947250472514725247253472544725547256472574725847259472604726147262472634726447265472664726747268472694727047271472724727347274472754727647277472784727947280472814728247283472844728547286472874728847289472904729147292472934729447295472964729747298472994730047301473024730347304473054730647307473084730947310473114731247313473144731547316473174731847319473204732147322473234732447325473264732747328473294733047331473324733347334473354733647337473384733947340473414734247343473444734547346473474734847349473504735147352473534735447355473564735747358473594736047361473624736347364473654736647367473684736947370473714737247373473744737547376473774737847379473804738147382473834738447385473864738747388473894739047391473924739347394473954739647397473984739947400474014740247403474044740547406474074740847409474104741147412474134741447415474164741747418474194742047421474224742347424474254742647427474284742947430474314743247433474344743547436474374743847439474404744147442474434744447445474464744747448474494745047451474524745347454474554745647457474584745947460474614746247463474644746547466474674746847469474704747147472474734747447475474764747747478474794748047481474824748347484474854748647487474884748947490474914749247493474944749547496474974749847499475004750147502475034750447505475064750747508475094751047511475124751347514475154751647517475184751947520475214752247523475244752547526475274752847529475304753147532475334753447535475364753747538475394754047541475424754347544475454754647547475484754947550475514755247553475544755547556475574755847559475604756147562475634756447565475664756747568475694757047571475724757347574475754757647577475784757947580475814758247583475844758547586475874758847589475904759147592475934759447595475964759747598475994760047601476024760347604476054760647607476084760947610476114761247613476144761547616476174761847619476204762147622476234762447625476264762747628476294763047631476324763347634476354763647637476384763947640476414764247643476444764547646476474764847649476504765147652476534765447655476564765747658476594766047661476624766347664476654766647667476684766947670476714767247673476744767547676476774767847679476804768147682476834768447685476864768747688476894769047691476924769347694476954769647697476984769947700477014770247703477044770547706477074770847709477104771147712477134771447715477164771747718477194772047721477224772347724477254772647727477284772947730477314773247733477344773547736477374773847739477404774147742477434774447745477464774747748477494775047751477524775347754477554775647757477584775947760477614776247763477644776547766477674776847769477704777147772477734777447775477764777747778477794778047781477824778347784477854778647787477884778947790477914779247793477944779547796477974779847799478004780147802478034780447805478064780747808478094781047811478124781347814478154781647817478184781947820478214782247823478244782547826478274782847829478304783147832478334783447835478364783747838478394784047841478424784347844478454784647847478484784947850478514785247853478544785547856478574785847859478604786147862478634786447865478664786747868478694787047871478724787347874478754787647877478784787947880478814788247883478844788547886478874788847889478904789147892478934789447895478964789747898478994790047901479024790347904479054790647907479084790947910479114791247913479144791547916479174791847919479204792147922479234792447925479264792747928479294793047931479324793347934479354793647937479384793947940479414794247943479444794547946479474794847949479504795147952479534795447955479564795747958479594796047961479624796347964479654796647967479684796947970479714797247973479744797547976479774797847979479804798147982479834798447985479864798747988479894799047991479924799347994479954799647997479984799948000480014800248003480044800548006480074800848009480104801148012480134801448015480164801748018480194802048021480224802348024480254802648027480284802948030480314803248033480344803548036480374803848039480404804148042480434804448045480464804748048480494805048051480524805348054480554805648057480584805948060480614806248063480644806548066480674806848069480704807148072480734807448075480764807748078480794808048081480824808348084480854808648087480884808948090480914809248093480944809548096480974809848099481004810148102481034810448105481064810748108481094811048111481124811348114481154811648117481184811948120481214812248123481244812548126481274812848129481304813148132481334813448135481364813748138481394814048141481424814348144481454814648147481484814948150481514815248153481544815548156481574815848159481604816148162481634816448165481664816748168481694817048171481724817348174481754817648177481784817948180481814818248183481844818548186481874818848189481904819148192481934819448195481964819748198481994820048201482024820348204482054820648207482084820948210482114821248213482144821548216482174821848219482204822148222482234822448225482264822748228482294823048231482324823348234482354823648237482384823948240482414824248243482444824548246482474824848249482504825148252482534825448255482564825748258482594826048261482624826348264482654826648267482684826948270482714827248273482744827548276482774827848279482804828148282482834828448285482864828748288482894829048291482924829348294482954829648297482984829948300483014830248303483044830548306483074830848309483104831148312483134831448315483164831748318483194832048321483224832348324483254832648327483284832948330483314833248333483344833548336483374833848339483404834148342483434834448345483464834748348483494835048351483524835348354483554835648357483584835948360483614836248363483644836548366483674836848369483704837148372483734837448375483764837748378483794838048381483824838348384483854838648387483884838948390483914839248393483944839548396483974839848399484004840148402484034840448405484064840748408484094841048411484124841348414484154841648417484184841948420484214842248423484244842548426484274842848429484304843148432484334843448435484364843748438484394844048441484424844348444484454844648447484484844948450484514845248453484544845548456484574845848459484604846148462484634846448465484664846748468484694847048471484724847348474484754847648477484784847948480484814848248483484844848548486484874848848489484904849148492484934849448495484964849748498484994850048501485024850348504485054850648507485084850948510485114851248513485144851548516485174851848519485204852148522485234852448525485264852748528485294853048531485324853348534485354853648537485384853948540485414854248543485444854548546485474854848549485504855148552485534855448555485564855748558485594856048561485624856348564485654856648567485684856948570485714857248573485744857548576485774857848579485804858148582485834858448585485864858748588485894859048591485924859348594485954859648597485984859948600486014860248603486044860548606486074860848609486104861148612486134861448615486164861748618486194862048621486224862348624486254862648627486284862948630486314863248633486344863548636486374863848639486404864148642486434864448645486464864748648486494865048651486524865348654486554865648657486584865948660486614866248663486644866548666486674866848669486704867148672486734867448675486764867748678486794868048681486824868348684486854868648687486884868948690486914869248693486944869548696486974869848699487004870148702487034870448705487064870748708487094871048711487124871348714487154871648717487184871948720487214872248723487244872548726487274872848729487304873148732487334873448735487364873748738487394874048741487424874348744487454874648747487484874948750487514875248753487544875548756487574875848759487604876148762487634876448765487664876748768487694877048771487724877348774487754877648777487784877948780487814878248783487844878548786487874878848789487904879148792487934879448795487964879748798487994880048801488024880348804488054880648807488084880948810488114881248813488144881548816488174881848819488204882148822488234882448825488264882748828488294883048831488324883348834488354883648837488384883948840488414884248843488444884548846488474884848849488504885148852488534885448855488564885748858488594886048861488624886348864488654886648867488684886948870488714887248873488744887548876488774887848879488804888148882488834888448885488864888748888488894889048891488924889348894488954889648897488984889948900489014890248903489044890548906489074890848909489104891148912489134891448915489164891748918489194892048921489224892348924489254892648927489284892948930489314893248933489344893548936489374893848939489404894148942489434894448945489464894748948489494895048951489524895348954489554895648957489584895948960489614896248963489644896548966489674896848969489704897148972489734897448975489764897748978489794898048981489824898348984489854898648987489884898948990489914899248993489944899548996489974899848999490004900149002490034900449005490064900749008490094901049011490124901349014490154901649017490184901949020490214902249023490244902549026490274902849029490304903149032490334903449035490364903749038490394904049041490424904349044490454904649047490484904949050490514905249053490544905549056490574905849059490604906149062490634906449065490664906749068490694907049071490724907349074490754907649077490784907949080490814908249083490844908549086490874908849089490904909149092490934909449095490964909749098490994910049101491024910349104491054910649107491084910949110491114911249113491144911549116491174911849119491204912149122491234912449125491264912749128491294913049131491324913349134491354913649137491384913949140491414914249143491444914549146491474914849149491504915149152491534915449155491564915749158491594916049161491624916349164491654916649167491684916949170491714917249173491744917549176491774917849179491804918149182491834918449185491864918749188491894919049191491924919349194491954919649197491984919949200492014920249203492044920549206492074920849209492104921149212492134921449215492164921749218492194922049221492224922349224492254922649227492284922949230492314923249233492344923549236492374923849239492404924149242492434924449245492464924749248492494925049251492524925349254492554925649257492584925949260492614926249263492644926549266492674926849269492704927149272492734927449275492764927749278492794928049281492824928349284492854928649287492884928949290492914929249293492944929549296492974929849299493004930149302493034930449305493064930749308493094931049311493124931349314493154931649317493184931949320493214932249323493244932549326493274932849329493304933149332493334933449335493364933749338493394934049341493424934349344493454934649347493484934949350493514935249353493544935549356493574935849359493604936149362493634936449365493664936749368493694937049371493724937349374493754937649377493784937949380493814938249383493844938549386493874938849389493904939149392493934939449395493964939749398493994940049401494024940349404494054940649407494084940949410494114941249413494144941549416494174941849419494204942149422494234942449425494264942749428494294943049431494324943349434494354943649437494384943949440494414944249443494444944549446494474944849449494504945149452494534945449455494564945749458494594946049461494624946349464494654946649467494684946949470494714947249473494744947549476494774947849479494804948149482494834948449485494864948749488494894949049491494924949349494494954949649497494984949949500495014950249503495044950549506495074950849509495104951149512495134951449515495164951749518495194952049521495224952349524495254952649527495284952949530495314953249533495344953549536495374953849539495404954149542495434954449545495464954749548495494955049551495524955349554495554955649557495584955949560495614956249563495644956549566495674956849569495704957149572495734957449575495764957749578495794958049581495824958349584495854958649587495884958949590495914959249593495944959549596495974959849599496004960149602496034960449605496064960749608496094961049611496124961349614496154961649617496184961949620496214962249623496244962549626496274962849629496304963149632496334963449635496364963749638496394964049641496424964349644496454964649647496484964949650496514965249653496544965549656496574965849659496604966149662496634966449665496664966749668496694967049671496724967349674496754967649677496784967949680496814968249683496844968549686496874968849689496904969149692496934969449695496964969749698496994970049701497024970349704497054970649707497084970949710497114971249713497144971549716497174971849719497204972149722497234972449725497264972749728497294973049731497324973349734497354973649737497384973949740497414974249743497444974549746497474974849749497504975149752497534975449755497564975749758497594976049761497624976349764497654976649767497684976949770497714977249773497744977549776497774977849779497804978149782497834978449785497864978749788497894979049791497924979349794497954979649797497984979949800498014980249803498044980549806498074980849809498104981149812498134981449815498164981749818498194982049821498224982349824498254982649827498284982949830498314983249833498344983549836498374983849839498404984149842498434984449845498464984749848498494985049851498524985349854498554985649857498584985949860498614986249863498644986549866498674986849869498704987149872498734987449875498764987749878498794988049881498824988349884498854988649887498884988949890498914989249893498944989549896498974989849899499004990149902499034990449905499064990749908499094991049911499124991349914499154991649917499184991949920499214992249923499244992549926499274992849929499304993149932499334993449935499364993749938499394994049941499424994349944499454994649947499484994949950499514995249953499544995549956499574995849959499604996149962499634996449965499664996749968499694997049971499724997349974499754997649977499784997949980499814998249983499844998549986499874998849989499904999149992499934999449995499964999749998499995000050001500025000350004500055000650007500085000950010500115001250013500145001550016500175001850019500205002150022500235002450025500265002750028500295003050031500325003350034500355003650037500385003950040500415004250043500445004550046500475004850049500505005150052500535005450055500565005750058500595006050061500625006350064500655006650067500685006950070500715007250073500745007550076500775007850079500805008150082500835008450085500865008750088500895009050091500925009350094500955009650097500985009950100501015010250103501045010550106501075010850109501105011150112501135011450115501165011750118501195012050121501225012350124501255012650127501285012950130501315013250133501345013550136501375013850139501405014150142501435014450145501465014750148501495015050151501525015350154501555015650157501585015950160501615016250163501645016550166501675016850169501705017150172501735017450175501765017750178501795018050181501825018350184501855018650187501885018950190501915019250193501945019550196501975019850199502005020150202502035020450205502065020750208502095021050211502125021350214502155021650217502185021950220502215022250223502245022550226502275022850229502305023150232502335023450235502365023750238502395024050241502425024350244502455024650247502485024950250502515025250253502545025550256502575025850259502605026150262502635026450265502665026750268502695027050271502725027350274502755027650277502785027950280502815028250283502845028550286502875028850289502905029150292502935029450295502965029750298502995030050301503025030350304503055030650307503085030950310503115031250313503145031550316503175031850319503205032150322503235032450325503265032750328503295033050331503325033350334503355033650337503385033950340503415034250343503445034550346503475034850349503505035150352503535035450355503565035750358503595036050361503625036350364503655036650367503685036950370503715037250373503745037550376503775037850379503805038150382503835038450385503865038750388503895039050391503925039350394503955039650397503985039950400504015040250403504045040550406504075040850409504105041150412504135041450415504165041750418504195042050421504225042350424504255042650427504285042950430504315043250433504345043550436504375043850439504405044150442504435044450445504465044750448504495045050451504525045350454504555045650457504585045950460504615046250463504645046550466504675046850469504705047150472504735047450475504765047750478504795048050481504825048350484504855048650487504885048950490504915049250493504945049550496504975049850499505005050150502505035050450505505065050750508505095051050511505125051350514505155051650517505185051950520505215052250523505245052550526505275052850529505305053150532505335053450535505365053750538505395054050541505425054350544505455054650547505485054950550505515055250553505545055550556505575055850559505605056150562505635056450565505665056750568505695057050571505725057350574505755057650577505785057950580505815058250583505845058550586505875058850589505905059150592505935059450595505965059750598505995060050601506025060350604506055060650607506085060950610506115061250613506145061550616506175061850619506205062150622506235062450625506265062750628506295063050631506325063350634506355063650637506385063950640506415064250643506445064550646506475064850649506505065150652506535065450655506565065750658506595066050661506625066350664506655066650667506685066950670506715067250673506745067550676506775067850679506805068150682506835068450685506865068750688506895069050691506925069350694506955069650697506985069950700507015070250703507045070550706507075070850709507105071150712507135071450715507165071750718507195072050721507225072350724507255072650727507285072950730507315073250733507345073550736507375073850739507405074150742507435074450745507465074750748507495075050751507525075350754507555075650757507585075950760507615076250763507645076550766507675076850769507705077150772507735077450775507765077750778507795078050781507825078350784507855078650787507885078950790507915079250793507945079550796507975079850799508005080150802508035080450805508065080750808508095081050811508125081350814508155081650817508185081950820508215082250823508245082550826508275082850829508305083150832508335083450835508365083750838508395084050841508425084350844508455084650847508485084950850508515085250853508545085550856508575085850859508605086150862508635086450865508665086750868508695087050871508725087350874508755087650877508785087950880508815088250883508845088550886508875088850889508905089150892508935089450895508965089750898508995090050901509025090350904509055090650907509085090950910509115091250913509145091550916509175091850919509205092150922509235092450925509265092750928509295093050931509325093350934509355093650937509385093950940509415094250943509445094550946509475094850949509505095150952509535095450955509565095750958509595096050961509625096350964509655096650967509685096950970509715097250973509745097550976509775097850979509805098150982509835098450985509865098750988509895099050991509925099350994509955099650997509985099951000510015100251003510045100551006510075100851009510105101151012510135101451015510165101751018510195102051021510225102351024510255102651027510285102951030510315103251033510345103551036510375103851039510405104151042510435104451045510465104751048510495105051051510525105351054510555105651057510585105951060510615106251063510645106551066510675106851069510705107151072510735107451075510765107751078510795108051081510825108351084510855108651087510885108951090510915109251093510945109551096510975109851099511005110151102511035110451105511065110751108511095111051111511125111351114511155111651117511185111951120511215112251123511245112551126511275112851129511305113151132511335113451135511365113751138511395114051141511425114351144511455114651147511485114951150511515115251153511545115551156511575115851159511605116151162511635116451165511665116751168511695117051171511725117351174511755117651177511785117951180511815118251183511845118551186511875118851189511905119151192511935119451195511965119751198511995120051201512025120351204512055120651207512085120951210512115121251213512145121551216512175121851219512205122151222512235122451225512265122751228512295123051231512325123351234512355123651237512385123951240512415124251243512445124551246512475124851249512505125151252512535125451255512565125751258512595126051261512625126351264512655126651267512685126951270512715127251273512745127551276512775127851279512805128151282512835128451285512865128751288512895129051291512925129351294512955129651297512985129951300513015130251303513045130551306513075130851309513105131151312513135131451315513165131751318513195132051321513225132351324513255132651327513285132951330513315133251333513345133551336513375133851339513405134151342513435134451345513465134751348513495135051351513525135351354513555135651357513585135951360513615136251363513645136551366513675136851369513705137151372513735137451375513765137751378513795138051381513825138351384513855138651387513885138951390513915139251393513945139551396513975139851399514005140151402514035140451405514065140751408514095141051411514125141351414514155141651417514185141951420514215142251423514245142551426514275142851429514305143151432514335143451435514365143751438514395144051441514425144351444514455144651447514485144951450514515145251453514545145551456514575145851459514605146151462514635146451465514665146751468514695147051471514725147351474514755147651477514785147951480514815148251483514845148551486514875148851489514905149151492514935149451495514965149751498514995150051501515025150351504515055150651507515085150951510515115151251513515145151551516515175151851519515205152151522515235152451525515265152751528515295153051531515325153351534515355153651537515385153951540515415154251543515445154551546515475154851549515505155151552515535155451555515565155751558515595156051561515625156351564515655156651567515685156951570515715157251573515745157551576515775157851579515805158151582515835158451585515865158751588515895159051591515925159351594515955159651597515985159951600516015160251603516045160551606516075160851609516105161151612516135161451615516165161751618516195162051621516225162351624516255162651627516285162951630516315163251633516345163551636516375163851639516405164151642516435164451645516465164751648516495165051651516525165351654516555165651657516585165951660516615166251663516645166551666516675166851669516705167151672516735167451675516765167751678516795168051681516825168351684516855168651687516885168951690516915169251693516945169551696516975169851699517005170151702517035170451705517065170751708517095171051711517125171351714517155171651717517185171951720517215172251723517245172551726517275172851729517305173151732517335173451735517365173751738517395174051741517425174351744517455174651747517485174951750517515175251753517545175551756517575175851759517605176151762517635176451765517665176751768517695177051771517725177351774517755177651777517785177951780517815178251783517845178551786517875178851789517905179151792517935179451795517965179751798517995180051801518025180351804518055180651807518085180951810518115181251813518145181551816518175181851819518205182151822518235182451825518265182751828518295183051831518325183351834518355183651837518385183951840518415184251843518445184551846518475184851849518505185151852518535185451855518565185751858518595186051861518625186351864518655186651867518685186951870518715187251873518745187551876518775187851879518805188151882518835188451885518865188751888518895189051891518925189351894518955189651897518985189951900519015190251903519045190551906519075190851909519105191151912519135191451915519165191751918519195192051921519225192351924519255192651927519285192951930519315193251933519345193551936519375193851939519405194151942519435194451945519465194751948519495195051951519525195351954519555195651957519585195951960519615196251963519645196551966519675196851969519705197151972519735197451975519765197751978519795198051981519825198351984519855198651987519885198951990519915199251993519945199551996519975199851999520005200152002520035200452005520065200752008520095201052011520125201352014520155201652017520185201952020520215202252023520245202552026520275202852029520305203152032520335203452035520365203752038520395204052041520425204352044520455204652047520485204952050520515205252053520545205552056520575205852059520605206152062520635206452065520665206752068520695207052071520725207352074520755207652077520785207952080520815208252083520845208552086520875208852089520905209152092520935209452095520965209752098520995210052101521025210352104521055210652107521085210952110521115211252113521145211552116521175211852119521205212152122521235212452125521265212752128521295213052131521325213352134521355213652137521385213952140521415214252143521445214552146521475214852149521505215152152521535215452155521565215752158521595216052161521625216352164521655216652167521685216952170521715217252173521745217552176521775217852179521805218152182521835218452185521865218752188521895219052191521925219352194521955219652197521985219952200522015220252203522045220552206522075220852209522105221152212522135221452215522165221752218522195222052221522225222352224522255222652227522285222952230522315223252233522345223552236522375223852239522405224152242522435224452245522465224752248522495225052251522525225352254522555225652257522585225952260522615226252263522645226552266522675226852269522705227152272522735227452275522765227752278522795228052281522825228352284522855228652287522885228952290522915229252293522945229552296522975229852299523005230152302523035230452305523065230752308523095231052311523125231352314523155231652317523185231952320523215232252323523245232552326523275232852329523305233152332523335233452335523365233752338523395234052341523425234352344523455234652347523485234952350523515235252353523545235552356523575235852359523605236152362523635236452365523665236752368523695237052371523725237352374523755237652377523785237952380523815238252383523845238552386523875238852389523905239152392523935239452395523965239752398523995240052401524025240352404524055240652407524085240952410524115241252413524145241552416524175241852419524205242152422524235242452425524265242752428524295243052431524325243352434524355243652437524385243952440524415244252443524445244552446524475244852449524505245152452524535245452455524565245752458524595246052461524625246352464524655246652467524685246952470524715247252473524745247552476524775247852479524805248152482524835248452485524865248752488524895249052491524925249352494524955249652497524985249952500525015250252503525045250552506525075250852509525105251152512525135251452515525165251752518525195252052521525225252352524525255252652527525285252952530525315253252533525345253552536525375253852539525405254152542525435254452545525465254752548525495255052551525525255352554525555255652557525585255952560525615256252563525645256552566525675256852569525705257152572525735257452575525765257752578525795258052581525825258352584525855258652587525885258952590525915259252593525945259552596525975259852599526005260152602526035260452605526065260752608526095261052611526125261352614526155261652617526185261952620526215262252623526245262552626526275262852629526305263152632526335263452635526365263752638526395264052641526425264352644526455264652647526485264952650526515265252653526545265552656526575265852659526605266152662526635266452665526665266752668526695267052671526725267352674526755267652677526785267952680526815268252683526845268552686526875268852689526905269152692526935269452695526965269752698526995270052701527025270352704527055270652707527085270952710527115271252713527145271552716527175271852719527205272152722527235272452725527265272752728527295273052731527325273352734527355273652737527385273952740527415274252743527445274552746527475274852749527505275152752527535275452755527565275752758527595276052761527625276352764527655276652767527685276952770527715277252773527745277552776527775277852779527805278152782527835278452785527865278752788527895279052791527925279352794527955279652797527985279952800528015280252803528045280552806528075280852809528105281152812528135281452815528165281752818528195282052821528225282352824528255282652827528285282952830528315283252833528345283552836528375283852839528405284152842528435284452845528465284752848528495285052851528525285352854528555285652857528585285952860528615286252863528645286552866528675286852869528705287152872528735287452875528765287752878528795288052881528825288352884528855288652887528885288952890528915289252893528945289552896528975289852899529005290152902529035290452905529065290752908529095291052911529125291352914529155291652917529185291952920529215292252923529245292552926529275292852929529305293152932529335293452935529365293752938529395294052941529425294352944529455294652947529485294952950529515295252953529545295552956529575295852959529605296152962529635296452965529665296752968529695297052971529725297352974529755297652977529785297952980529815298252983529845298552986529875298852989529905299152992529935299452995529965299752998529995300053001530025300353004530055300653007530085300953010530115301253013530145301553016530175301853019530205302153022530235302453025530265302753028530295303053031530325303353034530355303653037530385303953040530415304253043530445304553046530475304853049530505305153052530535305453055530565305753058530595306053061530625306353064530655306653067530685306953070530715307253073530745307553076530775307853079530805308153082530835308453085530865308753088530895309053091530925309353094530955309653097530985309953100531015310253103531045310553106531075310853109531105311153112531135311453115531165311753118531195312053121531225312353124531255312653127531285312953130531315313253133531345313553136531375313853139531405314153142531435314453145531465314753148531495315053151531525315353154531555315653157531585315953160531615316253163531645316553166531675316853169531705317153172531735317453175531765317753178531795318053181531825318353184531855318653187531885318953190531915319253193531945319553196531975319853199532005320153202532035320453205532065320753208532095321053211532125321353214532155321653217532185321953220532215322253223532245322553226532275322853229532305323153232532335323453235532365323753238532395324053241532425324353244532455324653247532485324953250532515325253253532545325553256532575325853259532605326153262532635326453265532665326753268532695327053271532725327353274532755327653277532785327953280532815328253283532845328553286532875328853289532905329153292532935329453295532965329753298532995330053301533025330353304533055330653307533085330953310533115331253313533145331553316533175331853319533205332153322533235332453325533265332753328533295333053331533325333353334533355333653337533385333953340533415334253343533445334553346533475334853349533505335153352533535335453355533565335753358533595336053361533625336353364533655336653367533685336953370533715337253373533745337553376533775337853379533805338153382533835338453385533865338753388533895339053391533925339353394533955339653397533985339953400534015340253403534045340553406534075340853409534105341153412534135341453415534165341753418534195342053421534225342353424534255342653427534285342953430534315343253433534345343553436534375343853439534405344153442534435344453445534465344753448534495345053451534525345353454534555345653457534585345953460534615346253463534645346553466534675346853469534705347153472534735347453475534765347753478534795348053481534825348353484534855348653487534885348953490534915349253493534945349553496534975349853499535005350153502535035350453505535065350753508535095351053511535125351353514535155351653517535185351953520535215352253523535245352553526535275352853529535305353153532535335353453535535365353753538535395354053541535425354353544535455354653547535485354953550535515355253553535545355553556535575355853559535605356153562535635356453565535665356753568535695357053571535725357353574535755357653577535785357953580535815358253583535845358553586535875358853589535905359153592535935359453595535965359753598535995360053601536025360353604536055360653607536085360953610536115361253613536145361553616536175361853619536205362153622536235362453625536265362753628536295363053631536325363353634536355363653637536385363953640536415364253643536445364553646536475364853649536505365153652536535365453655536565365753658536595366053661536625366353664536655366653667536685366953670536715367253673536745367553676536775367853679536805368153682536835368453685536865368753688536895369053691536925369353694536955369653697536985369953700537015370253703537045370553706537075370853709537105371153712537135371453715537165371753718537195372053721537225372353724537255372653727537285372953730537315373253733537345373553736537375373853739537405374153742537435374453745537465374753748537495375053751537525375353754537555375653757537585375953760537615376253763537645376553766537675376853769537705377153772537735377453775537765377753778537795378053781537825378353784537855378653787537885378953790537915379253793537945379553796537975379853799538005380153802538035380453805538065380753808538095381053811538125381353814538155381653817538185381953820538215382253823538245382553826538275382853829538305383153832538335383453835538365383753838538395384053841538425384353844538455384653847538485384953850538515385253853538545385553856538575385853859538605386153862538635386453865538665386753868538695387053871538725387353874538755387653877538785387953880538815388253883538845388553886538875388853889538905389153892538935389453895538965389753898538995390053901539025390353904539055390653907539085390953910539115391253913539145391553916539175391853919539205392153922539235392453925539265392753928539295393053931539325393353934539355393653937539385393953940539415394253943539445394553946539475394853949539505395153952539535395453955539565395753958539595396053961539625396353964539655396653967539685396953970539715397253973539745397553976539775397853979539805398153982539835398453985539865398753988539895399053991539925399353994539955399653997539985399954000540015400254003540045400554006540075400854009540105401154012540135401454015540165401754018540195402054021540225402354024540255402654027540285402954030540315403254033540345403554036540375403854039540405404154042540435404454045540465404754048540495405054051540525405354054540555405654057540585405954060540615406254063540645406554066540675406854069540705407154072540735407454075540765407754078540795408054081540825408354084540855408654087540885408954090540915409254093540945409554096540975409854099541005410154102541035410454105541065410754108541095411054111541125411354114541155411654117541185411954120541215412254123541245412554126541275412854129541305413154132541335413454135541365413754138541395414054141541425414354144541455414654147541485414954150541515415254153541545415554156541575415854159541605416154162541635416454165541665416754168541695417054171541725417354174541755417654177541785417954180541815418254183541845418554186541875418854189541905419154192541935419454195541965419754198541995420054201542025420354204542055420654207542085420954210542115421254213542145421554216542175421854219542205422154222542235422454225542265422754228542295423054231542325423354234542355423654237542385423954240542415424254243542445424554246542475424854249542505425154252542535425454255542565425754258542595426054261542625426354264542655426654267542685426954270542715427254273542745427554276542775427854279542805428154282542835428454285542865428754288542895429054291542925429354294542955429654297542985429954300543015430254303543045430554306543075430854309543105431154312543135431454315543165431754318543195432054321543225432354324543255432654327543285432954330543315433254333543345433554336543375433854339543405434154342543435434454345543465434754348543495435054351543525435354354543555435654357543585435954360543615436254363543645436554366543675436854369543705437154372543735437454375543765437754378543795438054381543825438354384543855438654387543885438954390543915439254393543945439554396543975439854399544005440154402544035440454405544065440754408544095441054411544125441354414544155441654417544185441954420544215442254423544245442554426544275442854429544305443154432544335443454435544365443754438544395444054441544425444354444544455444654447544485444954450544515445254453544545445554456544575445854459544605446154462544635446454465544665446754468544695447054471544725447354474544755447654477544785447954480544815448254483544845448554486544875448854489544905449154492544935449454495544965449754498544995450054501545025450354504545055450654507545085450954510545115451254513545145451554516545175451854519545205452154522545235452454525545265452754528545295453054531545325453354534545355453654537545385453954540545415454254543545445454554546545475454854549545505455154552545535455454555545565455754558545595456054561545625456354564545655456654567545685456954570545715457254573545745457554576545775457854579545805458154582545835458454585545865458754588545895459054591545925459354594545955459654597545985459954600546015460254603546045460554606546075460854609546105461154612546135461454615546165461754618546195462054621546225462354624546255462654627546285462954630546315463254633546345463554636546375463854639546405464154642546435464454645546465464754648546495465054651546525465354654546555465654657546585465954660546615466254663546645466554666546675466854669546705467154672546735467454675546765467754678546795468054681546825468354684546855468654687546885468954690546915469254693546945469554696546975469854699547005470154702547035470454705547065470754708547095471054711547125471354714547155471654717547185471954720547215472254723547245472554726547275472854729547305473154732547335473454735547365473754738547395474054741547425474354744547455474654747547485474954750547515475254753547545475554756547575475854759547605476154762547635476454765547665476754768547695477054771547725477354774547755477654777547785477954780547815478254783547845478554786547875478854789547905479154792547935479454795547965479754798547995480054801548025480354804548055480654807548085480954810548115481254813548145481554816548175481854819548205482154822548235482454825548265482754828548295483054831548325483354834548355483654837548385483954840548415484254843548445484554846548475484854849548505485154852548535485454855548565485754858548595486054861548625486354864548655486654867548685486954870548715487254873548745487554876548775487854879548805488154882548835488454885548865488754888548895489054891548925489354894548955489654897548985489954900549015490254903549045490554906549075490854909549105491154912549135491454915549165491754918549195492054921549225492354924549255492654927549285492954930549315493254933549345493554936549375493854939549405494154942549435494454945549465494754948549495495054951549525495354954549555495654957549585495954960549615496254963549645496554966549675496854969549705497154972549735497454975549765497754978549795498054981549825498354984549855498654987549885498954990549915499254993549945499554996549975499854999550005500155002550035500455005550065500755008550095501055011550125501355014550155501655017550185501955020550215502255023550245502555026550275502855029550305503155032550335503455035550365503755038550395504055041550425504355044550455504655047550485504955050550515505255053550545505555056550575505855059550605506155062550635506455065550665506755068550695507055071550725507355074550755507655077550785507955080550815508255083550845508555086550875508855089550905509155092550935509455095550965509755098550995510055101551025510355104551055510655107551085510955110551115511255113551145511555116551175511855119551205512155122551235512455125551265512755128551295513055131551325513355134551355513655137551385513955140551415514255143551445514555146551475514855149551505515155152551535515455155551565515755158551595516055161551625516355164551655516655167551685516955170551715517255173551745517555176551775517855179551805518155182551835518455185551865518755188551895519055191551925519355194551955519655197551985519955200552015520255203552045520555206552075520855209552105521155212552135521455215552165521755218552195522055221552225522355224552255522655227552285522955230552315523255233552345523555236552375523855239552405524155242552435524455245552465524755248552495525055251552525525355254552555525655257552585525955260552615526255263552645526555266552675526855269552705527155272552735527455275552765527755278552795528055281552825528355284552855528655287552885528955290552915529255293552945529555296552975529855299553005530155302553035530455305553065530755308553095531055311553125531355314553155531655317553185531955320553215532255323553245532555326553275532855329553305533155332553335533455335553365533755338553395534055341553425534355344553455534655347553485534955350553515535255353553545535555356553575535855359553605536155362553635536455365553665536755368553695537055371553725537355374553755537655377553785537955380553815538255383553845538555386553875538855389553905539155392553935539455395553965539755398553995540055401554025540355404554055540655407554085540955410554115541255413554145541555416554175541855419554205542155422554235542455425554265542755428554295543055431554325543355434554355543655437554385543955440554415544255443554445544555446554475544855449554505545155452554535545455455554565545755458554595546055461554625546355464554655546655467554685546955470554715547255473554745547555476554775547855479554805548155482554835548455485554865548755488554895549055491554925549355494554955549655497554985549955500555015550255503555045550555506555075550855509555105551155512555135551455515555165551755518555195552055521555225552355524555255552655527555285552955530555315553255533555345553555536555375553855539555405554155542555435554455545555465554755548555495555055551555525555355554555555555655557555585555955560555615556255563555645556555566555675556855569555705557155572555735557455575555765557755578555795558055581555825558355584555855558655587555885558955590555915559255593555945559555596555975559855599556005560155602556035560455605556065560755608556095561055611556125561355614556155561655617556185561955620556215562255623556245562555626556275562855629556305563155632556335563455635556365563755638556395564055641556425564355644556455564655647556485564955650556515565255653556545565555656556575565855659556605566155662556635566455665556665566755668556695567055671556725567355674556755567655677556785567955680556815568255683556845568555686556875568855689556905569155692556935569455695556965569755698556995570055701557025570355704557055570655707557085570955710557115571255713557145571555716557175571855719557205572155722557235572455725557265572755728557295573055731557325573355734557355573655737557385573955740557415574255743557445574555746557475574855749557505575155752557535575455755557565575755758557595576055761557625576355764557655576655767557685576955770557715577255773557745577555776557775577855779557805578155782557835578455785557865578755788557895579055791557925579355794557955579655797557985579955800558015580255803558045580555806558075580855809558105581155812558135581455815558165581755818558195582055821558225582355824558255582655827558285582955830558315583255833558345583555836558375583855839558405584155842558435584455845558465584755848558495585055851558525585355854558555585655857558585585955860558615586255863558645586555866558675586855869558705587155872558735587455875558765587755878558795588055881558825588355884558855588655887558885588955890558915589255893558945589555896558975589855899559005590155902559035590455905559065590755908559095591055911559125591355914559155591655917559185591955920559215592255923559245592555926559275592855929559305593155932559335593455935559365593755938559395594055941559425594355944559455594655947559485594955950559515595255953559545595555956559575595855959559605596155962559635596455965559665596755968559695597055971559725597355974559755597655977559785597955980559815598255983559845598555986559875598855989559905599155992559935599455995559965599755998559995600056001560025600356004560055600656007560085600956010560115601256013560145601556016560175601856019560205602156022560235602456025560265602756028560295603056031560325603356034560355603656037560385603956040560415604256043560445604556046560475604856049560505605156052560535605456055560565605756058560595606056061560625606356064560655606656067560685606956070560715607256073560745607556076560775607856079560805608156082560835608456085560865608756088560895609056091560925609356094560955609656097560985609956100561015610256103561045610556106561075610856109561105611156112561135611456115561165611756118561195612056121561225612356124561255612656127561285612956130561315613256133561345613556136561375613856139561405614156142561435614456145561465614756148561495615056151561525615356154561555615656157561585615956160561615616256163561645616556166561675616856169561705617156172561735617456175561765617756178561795618056181561825618356184561855618656187561885618956190561915619256193561945619556196561975619856199562005620156202562035620456205562065620756208562095621056211562125621356214562155621656217562185621956220562215622256223562245622556226562275622856229562305623156232562335623456235562365623756238562395624056241562425624356244562455624656247562485624956250562515625256253562545625556256562575625856259562605626156262562635626456265562665626756268562695627056271562725627356274562755627656277562785627956280562815628256283562845628556286562875628856289562905629156292562935629456295562965629756298562995630056301563025630356304563055630656307563085630956310563115631256313563145631556316563175631856319563205632156322563235632456325563265632756328563295633056331563325633356334563355633656337563385633956340563415634256343563445634556346563475634856349563505635156352563535635456355563565635756358563595636056361563625636356364563655636656367563685636956370563715637256373563745637556376563775637856379563805638156382563835638456385563865638756388563895639056391563925639356394563955639656397563985639956400564015640256403564045640556406564075640856409564105641156412564135641456415564165641756418564195642056421564225642356424564255642656427564285642956430564315643256433564345643556436564375643856439564405644156442564435644456445564465644756448564495645056451564525645356454564555645656457564585645956460564615646256463564645646556466564675646856469564705647156472564735647456475564765647756478564795648056481564825648356484564855648656487564885648956490564915649256493564945649556496564975649856499565005650156502565035650456505565065650756508565095651056511565125651356514565155651656517565185651956520565215652256523565245652556526565275652856529565305653156532565335653456535565365653756538565395654056541565425654356544565455654656547565485654956550565515655256553565545655556556565575655856559565605656156562565635656456565565665656756568565695657056571565725657356574565755657656577565785657956580565815658256583565845658556586565875658856589565905659156592565935659456595565965659756598565995660056601566025660356604566055660656607566085660956610566115661256613566145661556616566175661856619566205662156622566235662456625566265662756628566295663056631566325663356634566355663656637566385663956640566415664256643566445664556646566475664856649566505665156652566535665456655566565665756658566595666056661566625666356664566655666656667566685666956670566715667256673566745667556676566775667856679566805668156682566835668456685566865668756688566895669056691566925669356694566955669656697566985669956700567015670256703567045670556706567075670856709567105671156712567135671456715567165671756718567195672056721567225672356724567255672656727567285672956730567315673256733567345673556736567375673856739567405674156742567435674456745567465674756748567495675056751567525675356754567555675656757567585675956760567615676256763567645676556766567675676856769567705677156772567735677456775567765677756778567795678056781567825678356784567855678656787567885678956790567915679256793567945679556796567975679856799568005680156802568035680456805568065680756808568095681056811568125681356814568155681656817568185681956820568215682256823568245682556826568275682856829568305683156832568335683456835568365683756838568395684056841568425684356844568455684656847568485684956850568515685256853568545685556856568575685856859568605686156862568635686456865568665686756868568695687056871568725687356874568755687656877568785687956880568815688256883568845688556886568875688856889568905689156892568935689456895568965689756898568995690056901569025690356904569055690656907569085690956910569115691256913569145691556916569175691856919569205692156922569235692456925569265692756928569295693056931569325693356934569355693656937569385693956940569415694256943569445694556946569475694856949569505695156952569535695456955569565695756958569595696056961569625696356964569655696656967569685696956970569715697256973569745697556976569775697856979569805698156982569835698456985569865698756988569895699056991569925699356994569955699656997569985699957000570015700257003570045700557006570075700857009570105701157012570135701457015570165701757018570195702057021570225702357024570255702657027570285702957030570315703257033570345703557036570375703857039570405704157042570435704457045570465704757048570495705057051570525705357054570555705657057570585705957060570615706257063570645706557066570675706857069570705707157072570735707457075570765707757078570795708057081570825708357084570855708657087570885708957090570915709257093570945709557096570975709857099571005710157102571035710457105571065710757108571095711057111571125711357114571155711657117571185711957120571215712257123571245712557126571275712857129571305713157132571335713457135571365713757138571395714057141571425714357144571455714657147571485714957150571515715257153571545715557156571575715857159571605716157162571635716457165571665716757168571695717057171571725717357174571755717657177571785717957180571815718257183571845718557186571875718857189571905719157192571935719457195571965719757198571995720057201572025720357204572055720657207572085720957210572115721257213572145721557216572175721857219572205722157222572235722457225572265722757228572295723057231572325723357234572355723657237572385723957240572415724257243572445724557246572475724857249572505725157252572535725457255572565725757258572595726057261572625726357264572655726657267572685726957270572715727257273572745727557276572775727857279572805728157282572835728457285572865728757288572895729057291572925729357294572955729657297572985729957300573015730257303573045730557306573075730857309573105731157312573135731457315573165731757318573195732057321573225732357324573255732657327573285732957330573315733257333573345733557336573375733857339573405734157342573435734457345573465734757348573495735057351573525735357354573555735657357573585735957360573615736257363573645736557366573675736857369573705737157372573735737457375573765737757378573795738057381573825738357384573855738657387573885738957390573915739257393573945739557396573975739857399574005740157402574035740457405574065740757408574095741057411574125741357414574155741657417574185741957420574215742257423574245742557426574275742857429574305743157432574335743457435574365743757438574395744057441574425744357444574455744657447574485744957450574515745257453574545745557456574575745857459574605746157462574635746457465574665746757468574695747057471574725747357474574755747657477574785747957480574815748257483574845748557486574875748857489574905749157492574935749457495574965749757498574995750057501575025750357504575055750657507575085750957510575115751257513575145751557516575175751857519575205752157522575235752457525575265752757528575295753057531575325753357534575355753657537575385753957540575415754257543575445754557546575475754857549575505755157552575535755457555575565755757558575595756057561575625756357564575655756657567575685756957570575715757257573575745757557576575775757857579575805758157582575835758457585575865758757588575895759057591575925759357594575955759657597575985759957600576015760257603576045760557606576075760857609576105761157612576135761457615576165761757618576195762057621576225762357624576255762657627576285762957630576315763257633576345763557636576375763857639576405764157642576435764457645576465764757648576495765057651576525765357654576555765657657576585765957660576615766257663576645766557666576675766857669576705767157672576735767457675576765767757678576795768057681576825768357684576855768657687576885768957690576915769257693576945769557696576975769857699577005770157702577035770457705577065770757708577095771057711577125771357714577155771657717577185771957720577215772257723577245772557726577275772857729577305773157732577335773457735577365773757738577395774057741577425774357744577455774657747577485774957750577515775257753577545775557756577575775857759577605776157762577635776457765577665776757768577695777057771577725777357774577755777657777577785777957780577815778257783577845778557786577875778857789577905779157792577935779457795577965779757798577995780057801578025780357804578055780657807578085780957810578115781257813578145781557816578175781857819578205782157822578235782457825578265782757828578295783057831578325783357834578355783657837578385783957840578415784257843578445784557846578475784857849578505785157852578535785457855578565785757858578595786057861578625786357864578655786657867578685786957870578715787257873578745787557876578775787857879578805788157882578835788457885578865788757888578895789057891578925789357894578955789657897578985789957900579015790257903579045790557906579075790857909579105791157912579135791457915579165791757918579195792057921579225792357924579255792657927579285792957930579315793257933579345793557936579375793857939579405794157942579435794457945579465794757948579495795057951579525795357954579555795657957579585795957960579615796257963579645796557966579675796857969579705797157972579735797457975579765797757978579795798057981579825798357984579855798657987579885798957990579915799257993579945799557996579975799857999580005800158002580035800458005580065800758008580095801058011580125801358014580155801658017580185801958020580215802258023580245802558026580275802858029580305803158032580335803458035580365803758038580395804058041580425804358044580455804658047580485804958050580515805258053580545805558056580575805858059580605806158062580635806458065580665806758068580695807058071580725807358074580755807658077580785807958080580815808258083580845808558086580875808858089580905809158092580935809458095580965809758098580995810058101581025810358104581055810658107581085810958110581115811258113581145811558116581175811858119581205812158122581235812458125581265812758128581295813058131581325813358134581355813658137581385813958140581415814258143581445814558146581475814858149581505815158152581535815458155581565815758158581595816058161581625816358164581655816658167581685816958170581715817258173581745817558176581775817858179581805818158182581835818458185581865818758188581895819058191581925819358194581955819658197581985819958200582015820258203582045820558206582075820858209582105821158212582135821458215582165821758218582195822058221582225822358224582255822658227582285822958230582315823258233582345823558236582375823858239582405824158242582435824458245582465824758248582495825058251582525825358254582555825658257582585825958260582615826258263582645826558266582675826858269582705827158272582735827458275582765827758278582795828058281582825828358284582855828658287582885828958290582915829258293582945829558296582975829858299583005830158302583035830458305583065830758308583095831058311583125831358314583155831658317583185831958320583215832258323583245832558326583275832858329583305833158332583335833458335583365833758338583395834058341583425834358344583455834658347583485834958350583515835258353583545835558356583575835858359583605836158362583635836458365583665836758368583695837058371583725837358374583755837658377583785837958380583815838258383583845838558386583875838858389583905839158392583935839458395583965839758398583995840058401584025840358404584055840658407584085840958410584115841258413584145841558416584175841858419584205842158422584235842458425584265842758428584295843058431584325843358434584355843658437584385843958440584415844258443584445844558446584475844858449584505845158452584535845458455584565845758458584595846058461584625846358464584655846658467584685846958470584715847258473584745847558476584775847858479584805848158482584835848458485584865848758488584895849058491584925849358494584955849658497584985849958500585015850258503585045850558506585075850858509585105851158512585135851458515585165851758518585195852058521585225852358524585255852658527585285852958530585315853258533585345853558536585375853858539585405854158542585435854458545585465854758548585495855058551585525855358554585555855658557585585855958560585615856258563585645856558566585675856858569585705857158572585735857458575585765857758578585795858058581585825858358584585855858658587585885858958590585915859258593585945859558596585975859858599586005860158602586035860458605586065860758608586095861058611586125861358614586155861658617586185861958620586215862258623586245862558626586275862858629586305863158632586335863458635586365863758638586395864058641586425864358644586455864658647586485864958650586515865258653586545865558656586575865858659586605866158662586635866458665586665866758668586695867058671586725867358674586755867658677586785867958680586815868258683586845868558686586875868858689586905869158692586935869458695586965869758698586995870058701587025870358704587055870658707587085870958710587115871258713587145871558716587175871858719587205872158722587235872458725587265872758728587295873058731587325873358734587355873658737587385873958740587415874258743587445874558746587475874858749587505875158752587535875458755587565875758758587595876058761587625876358764587655876658767587685876958770587715877258773587745877558776587775877858779587805878158782587835878458785587865878758788587895879058791587925879358794587955879658797587985879958800588015880258803588045880558806588075880858809588105881158812588135881458815588165881758818588195882058821588225882358824588255882658827588285882958830588315883258833588345883558836588375883858839588405884158842588435884458845588465884758848588495885058851588525885358854588555885658857588585885958860588615886258863588645886558866588675886858869588705887158872588735887458875588765887758878588795888058881588825888358884588855888658887588885888958890588915889258893588945889558896588975889858899589005890158902589035890458905589065890758908589095891058911589125891358914589155891658917589185891958920589215892258923589245892558926589275892858929589305893158932589335893458935589365893758938589395894058941589425894358944589455894658947589485894958950589515895258953589545895558956589575895858959589605896158962589635896458965589665896758968589695897058971589725897358974589755897658977589785897958980589815898258983589845898558986589875898858989589905899158992589935899458995589965899758998589995900059001590025900359004590055900659007590085900959010590115901259013590145901559016590175901859019590205902159022590235902459025590265902759028590295903059031590325903359034590355903659037590385903959040590415904259043590445904559046590475904859049590505905159052590535905459055590565905759058590595906059061590625906359064590655906659067590685906959070590715907259073590745907559076590775907859079590805908159082590835908459085590865908759088590895909059091590925909359094590955909659097590985909959100591015910259103591045910559106591075910859109591105911159112591135911459115591165911759118591195912059121591225912359124591255912659127591285912959130591315913259133591345913559136591375913859139591405914159142591435914459145591465914759148591495915059151591525915359154591555915659157591585915959160591615916259163591645916559166591675916859169591705917159172591735917459175591765917759178591795918059181591825918359184591855918659187591885918959190591915919259193591945919559196591975919859199592005920159202592035920459205592065920759208592095921059211592125921359214592155921659217592185921959220592215922259223592245922559226592275922859229592305923159232592335923459235592365923759238592395924059241592425924359244592455924659247592485924959250592515925259253592545925559256592575925859259592605926159262592635926459265592665926759268592695927059271592725927359274592755927659277592785927959280592815928259283592845928559286592875928859289592905929159292592935929459295592965929759298592995930059301593025930359304593055930659307593085930959310593115931259313593145931559316593175931859319593205932159322593235932459325593265932759328593295933059331593325933359334593355933659337593385933959340593415934259343593445934559346593475934859349593505935159352593535935459355593565935759358593595936059361593625936359364593655936659367593685936959370593715937259373593745937559376593775937859379593805938159382593835938459385593865938759388593895939059391593925939359394593955939659397593985939959400594015940259403594045940559406594075940859409594105941159412594135941459415594165941759418594195942059421594225942359424594255942659427594285942959430594315943259433594345943559436594375943859439594405944159442594435944459445594465944759448594495945059451594525945359454594555945659457594585945959460594615946259463594645946559466594675946859469594705947159472594735947459475594765947759478594795948059481594825948359484594855948659487594885948959490594915949259493594945949559496594975949859499595005950159502595035950459505595065950759508595095951059511595125951359514595155951659517595185951959520595215952259523595245952559526595275952859529595305953159532595335953459535595365953759538595395954059541595425954359544595455954659547595485954959550595515955259553595545955559556595575955859559595605956159562595635956459565595665956759568595695957059571595725957359574595755957659577595785957959580595815958259583595845958559586595875958859589595905959159592595935959459595595965959759598595995960059601596025960359604596055960659607596085960959610596115961259613596145961559616596175961859619596205962159622596235962459625596265962759628596295963059631596325963359634596355963659637596385963959640596415964259643596445964559646596475964859649596505965159652596535965459655596565965759658596595966059661596625966359664596655966659667596685966959670596715967259673596745967559676596775967859679596805968159682596835968459685596865968759688596895969059691596925969359694596955969659697596985969959700597015970259703597045970559706597075970859709597105971159712597135971459715597165971759718597195972059721597225972359724597255972659727597285972959730597315973259733597345973559736597375973859739597405974159742597435974459745597465974759748597495975059751597525975359754597555975659757597585975959760597615976259763597645976559766597675976859769597705977159772597735977459775597765977759778597795978059781597825978359784597855978659787597885978959790597915979259793597945979559796597975979859799598005980159802598035980459805598065980759808598095981059811598125981359814598155981659817598185981959820598215982259823598245982559826598275982859829598305983159832598335983459835598365983759838598395984059841598425984359844598455984659847598485984959850598515985259853598545985559856598575985859859598605986159862598635986459865598665986759868598695987059871598725987359874598755987659877598785987959880598815988259883598845988559886598875988859889598905989159892598935989459895598965989759898598995990059901599025990359904599055990659907599085990959910599115991259913599145991559916599175991859919599205992159922599235992459925599265992759928599295993059931599325993359934599355993659937599385993959940599415994259943599445994559946599475994859949599505995159952599535995459955599565995759958599595996059961599625996359964599655996659967599685996959970599715997259973599745997559976599775997859979599805998159982599835998459985599865998759988599895999059991599925999359994599955999659997599985999960000600016000260003600046000560006600076000860009600106001160012600136001460015600166001760018600196002060021600226002360024600256002660027600286002960030600316003260033600346003560036600376003860039600406004160042600436004460045600466004760048600496005060051600526005360054600556005660057600586005960060600616006260063600646006560066600676006860069600706007160072600736007460075600766007760078600796008060081600826008360084600856008660087600886008960090600916009260093600946009560096600976009860099601006010160102601036010460105601066010760108601096011060111601126011360114601156011660117601186011960120601216012260123601246012560126601276012860129601306013160132601336013460135601366013760138601396014060141601426014360144601456014660147601486014960150601516015260153601546015560156601576015860159601606016160162601636016460165601666016760168601696017060171601726017360174601756017660177601786017960180601816018260183601846018560186601876018860189601906019160192601936019460195601966019760198601996020060201602026020360204602056020660207602086020960210602116021260213602146021560216602176021860219602206022160222602236022460225602266022760228602296023060231602326023360234602356023660237602386023960240602416024260243602446024560246602476024860249602506025160252602536025460255602566025760258602596026060261602626026360264602656026660267602686026960270602716027260273602746027560276602776027860279602806028160282602836028460285602866028760288602896029060291602926029360294602956029660297602986029960300603016030260303603046030560306603076030860309603106031160312603136031460315603166031760318603196032060321603226032360324603256032660327603286032960330603316033260333603346033560336603376033860339603406034160342603436034460345603466034760348603496035060351603526035360354603556035660357603586035960360603616036260363603646036560366603676036860369603706037160372603736037460375603766037760378603796038060381603826038360384603856038660387603886038960390603916039260393603946039560396603976039860399604006040160402604036040460405604066040760408604096041060411604126041360414604156041660417604186041960420604216042260423604246042560426604276042860429604306043160432604336043460435604366043760438604396044060441604426044360444604456044660447604486044960450604516045260453604546045560456604576045860459604606046160462604636046460465604666046760468604696047060471604726047360474604756047660477604786047960480604816048260483604846048560486604876048860489604906049160492604936049460495604966049760498604996050060501605026050360504605056050660507605086050960510605116051260513605146051560516605176051860519605206052160522605236052460525605266052760528605296053060531605326053360534605356053660537605386053960540605416054260543605446054560546605476054860549605506055160552605536055460555605566055760558605596056060561605626056360564605656056660567605686056960570605716057260573605746057560576605776057860579605806058160582605836058460585605866058760588605896059060591605926059360594605956059660597605986059960600606016060260603606046060560606606076060860609606106061160612606136061460615606166061760618606196062060621606226062360624606256062660627606286062960630606316063260633606346063560636606376063860639606406064160642606436064460645606466064760648606496065060651606526065360654606556065660657606586065960660606616066260663606646066560666606676066860669606706067160672606736067460675606766067760678606796068060681606826068360684606856068660687606886068960690606916069260693606946069560696606976069860699607006070160702607036070460705607066070760708607096071060711607126071360714607156071660717607186071960720607216072260723607246072560726607276072860729607306073160732607336073460735607366073760738607396074060741607426074360744607456074660747607486074960750607516075260753607546075560756607576075860759607606076160762607636076460765607666076760768607696077060771607726077360774607756077660777607786077960780607816078260783607846078560786607876078860789607906079160792607936079460795607966079760798607996080060801608026080360804608056080660807608086080960810608116081260813608146081560816608176081860819608206082160822608236082460825608266082760828608296083060831608326083360834608356083660837608386083960840608416084260843608446084560846608476084860849608506085160852608536085460855608566085760858608596086060861608626086360864608656086660867608686086960870608716087260873608746087560876608776087860879608806088160882608836088460885608866088760888608896089060891608926089360894608956089660897608986089960900609016090260903609046090560906609076090860909609106091160912609136091460915609166091760918609196092060921609226092360924609256092660927609286092960930609316093260933609346093560936609376093860939609406094160942609436094460945609466094760948609496095060951609526095360954609556095660957609586095960960609616096260963609646096560966609676096860969609706097160972609736097460975609766097760978609796098060981609826098360984609856098660987609886098960990609916099260993609946099560996609976099860999610006100161002610036100461005610066100761008610096101061011610126101361014610156101661017610186101961020610216102261023610246102561026610276102861029610306103161032610336103461035610366103761038610396104061041610426104361044610456104661047610486104961050610516105261053610546105561056610576105861059610606106161062610636106461065610666106761068610696107061071610726107361074610756107661077610786107961080610816108261083610846108561086610876108861089610906109161092610936109461095610966109761098610996110061101611026110361104611056110661107611086110961110611116111261113611146111561116611176111861119611206112161122611236112461125611266112761128611296113061131611326113361134611356113661137611386113961140611416114261143611446114561146611476114861149611506115161152611536115461155611566115761158611596116061161611626116361164611656116661167611686116961170611716117261173611746117561176611776117861179611806118161182611836118461185611866118761188611896119061191611926119361194611956119661197611986119961200612016120261203612046120561206612076120861209612106121161212612136121461215612166121761218612196122061221612226122361224612256122661227612286122961230612316123261233612346123561236612376123861239612406124161242612436124461245612466124761248612496125061251612526125361254612556125661257612586125961260612616126261263612646126561266612676126861269612706127161272612736127461275612766127761278612796128061281612826128361284612856128661287612886128961290612916129261293612946129561296612976129861299613006130161302613036130461305613066130761308613096131061311613126131361314613156131661317613186131961320613216132261323613246132561326613276132861329613306133161332613336133461335613366133761338613396134061341613426134361344613456134661347613486134961350613516135261353613546135561356613576135861359613606136161362613636136461365613666136761368613696137061371613726137361374613756137661377613786137961380613816138261383613846138561386613876138861389613906139161392613936139461395613966139761398613996140061401614026140361404614056140661407614086140961410614116141261413614146141561416614176141861419614206142161422614236142461425614266142761428614296143061431614326143361434614356143661437614386143961440614416144261443614446144561446614476144861449614506145161452614536145461455614566145761458614596146061461614626146361464614656146661467614686146961470614716147261473614746147561476614776147861479614806148161482614836148461485614866148761488614896149061491614926149361494614956149661497614986149961500615016150261503615046150561506615076150861509615106151161512615136151461515615166151761518615196152061521615226152361524615256152661527615286152961530615316153261533615346153561536615376153861539615406154161542615436154461545615466154761548615496155061551615526155361554615556155661557615586155961560615616156261563615646156561566615676156861569615706157161572615736157461575615766157761578615796158061581615826158361584615856158661587615886158961590615916159261593615946159561596615976159861599616006160161602616036160461605616066160761608616096161061611616126161361614616156161661617616186161961620616216162261623616246162561626616276162861629616306163161632616336163461635616366163761638616396164061641616426164361644616456164661647616486164961650616516165261653616546165561656616576165861659616606166161662616636166461665616666166761668616696167061671616726167361674616756167661677616786167961680616816168261683616846168561686616876168861689616906169161692616936169461695616966169761698616996170061701617026170361704617056170661707617086170961710617116171261713617146171561716617176171861719617206172161722617236172461725617266172761728617296173061731617326173361734617356173661737617386173961740617416174261743617446174561746617476174861749617506175161752617536175461755617566175761758617596176061761617626176361764617656176661767617686176961770617716177261773617746177561776617776177861779617806178161782617836178461785617866178761788617896179061791617926179361794617956179661797617986179961800618016180261803618046180561806618076180861809618106181161812618136181461815618166181761818618196182061821618226182361824618256182661827618286182961830618316183261833618346183561836618376183861839618406184161842618436184461845618466184761848618496185061851618526185361854618556185661857618586185961860618616186261863618646186561866618676186861869618706187161872618736187461875618766187761878618796188061881618826188361884618856188661887618886188961890618916189261893618946189561896618976189861899619006190161902619036190461905619066190761908619096191061911619126191361914619156191661917619186191961920619216192261923619246192561926619276192861929619306193161932619336193461935619366193761938619396194061941619426194361944619456194661947619486194961950619516195261953619546195561956619576195861959619606196161962619636196461965619666196761968619696197061971619726197361974619756197661977619786197961980619816198261983619846198561986619876198861989619906199161992619936199461995619966199761998619996200062001620026200362004620056200662007620086200962010620116201262013620146201562016620176201862019620206202162022620236202462025620266202762028620296203062031620326203362034620356203662037620386203962040620416204262043620446204562046620476204862049620506205162052620536205462055620566205762058620596206062061620626206362064620656206662067620686206962070620716207262073620746207562076620776207862079620806208162082620836208462085620866208762088620896209062091620926209362094620956209662097620986209962100621016210262103621046210562106621076210862109621106211162112621136211462115621166211762118621196212062121621226212362124621256212662127621286212962130621316213262133621346213562136621376213862139621406214162142621436214462145621466214762148621496215062151621526215362154621556215662157621586215962160621616216262163621646216562166621676216862169621706217162172621736217462175621766217762178621796218062181621826218362184621856218662187621886218962190621916219262193621946219562196621976219862199622006220162202622036220462205622066220762208622096221062211622126221362214622156221662217622186221962220622216222262223622246222562226622276222862229622306223162232622336223462235622366223762238622396224062241622426224362244622456224662247622486224962250622516225262253622546225562256622576225862259622606226162262622636226462265622666226762268622696227062271622726227362274622756227662277622786227962280622816228262283622846228562286622876228862289622906229162292622936229462295622966229762298622996230062301623026230362304623056230662307623086230962310623116231262313623146231562316623176231862319623206232162322623236232462325623266232762328623296233062331623326233362334623356233662337623386233962340623416234262343623446234562346623476234862349623506235162352623536235462355623566235762358623596236062361623626236362364623656236662367623686236962370623716237262373623746237562376623776237862379623806238162382623836238462385623866238762388623896239062391623926239362394623956239662397623986239962400624016240262403624046240562406624076240862409624106241162412624136241462415624166241762418624196242062421624226242362424624256242662427624286242962430624316243262433624346243562436624376243862439624406244162442624436244462445624466244762448624496245062451624526245362454624556245662457624586245962460624616246262463624646246562466624676246862469624706247162472624736247462475624766247762478624796248062481624826248362484624856248662487624886248962490624916249262493624946249562496624976249862499625006250162502625036250462505625066250762508625096251062511625126251362514625156251662517625186251962520625216252262523625246252562526625276252862529625306253162532625336253462535625366253762538625396254062541625426254362544625456254662547625486254962550625516255262553625546255562556625576255862559625606256162562625636256462565625666256762568625696257062571625726257362574625756257662577625786257962580625816258262583625846258562586625876258862589625906259162592625936259462595625966259762598625996260062601626026260362604626056260662607626086260962610626116261262613626146261562616626176261862619626206262162622626236262462625626266262762628626296263062631626326263362634626356263662637626386263962640626416264262643626446264562646626476264862649626506265162652626536265462655626566265762658626596266062661626626266362664626656266662667626686266962670626716267262673626746267562676626776267862679626806268162682626836268462685626866268762688626896269062691626926269362694626956269662697626986269962700627016270262703627046270562706627076270862709627106271162712627136271462715627166271762718627196272062721627226272362724627256272662727627286272962730627316273262733627346273562736627376273862739627406274162742627436274462745627466274762748627496275062751627526275362754627556275662757627586275962760627616276262763627646276562766627676276862769627706277162772627736277462775627766277762778627796278062781627826278362784627856278662787627886278962790627916279262793627946279562796627976279862799628006280162802628036280462805628066280762808628096281062811628126281362814628156281662817628186281962820628216282262823628246282562826628276282862829628306283162832628336283462835628366283762838628396284062841628426284362844628456284662847628486284962850628516285262853628546285562856628576285862859628606286162862628636286462865628666286762868628696287062871628726287362874628756287662877628786287962880628816288262883628846288562886628876288862889628906289162892628936289462895628966289762898628996290062901629026290362904629056290662907629086290962910629116291262913629146291562916629176291862919629206292162922629236292462925629266292762928629296293062931629326293362934629356293662937629386293962940629416294262943629446294562946629476294862949629506295162952629536295462955629566295762958629596296062961629626296362964629656296662967629686296962970629716297262973629746297562976629776297862979629806298162982629836298462985629866298762988629896299062991629926299362994629956299662997629986299963000630016300263003630046300563006630076300863009630106301163012630136301463015630166301763018630196302063021630226302363024630256302663027630286302963030630316303263033630346303563036630376303863039630406304163042630436304463045630466304763048630496305063051630526305363054630556305663057630586305963060630616306263063630646306563066630676306863069630706307163072630736307463075630766307763078630796308063081630826308363084630856308663087630886308963090630916309263093630946309563096630976309863099631006310163102631036310463105631066310763108631096311063111631126311363114631156311663117631186311963120631216312263123631246312563126631276312863129631306313163132631336313463135631366313763138631396314063141631426314363144631456314663147631486314963150631516315263153631546315563156631576315863159631606316163162631636316463165631666316763168631696317063171631726317363174631756317663177631786317963180631816318263183631846318563186631876318863189631906319163192631936319463195631966319763198631996320063201632026320363204632056320663207632086320963210632116321263213632146321563216632176321863219632206322163222632236322463225632266322763228632296323063231632326323363234632356323663237632386323963240632416324263243632446324563246632476324863249632506325163252632536325463255632566325763258632596326063261632626326363264632656326663267632686326963270632716327263273632746327563276632776327863279632806328163282632836328463285632866328763288632896329063291632926329363294632956329663297632986329963300633016330263303633046330563306633076330863309633106331163312633136331463315633166331763318633196332063321633226332363324633256332663327633286332963330633316333263333633346333563336633376333863339633406334163342633436334463345633466334763348633496335063351633526335363354633556335663357633586335963360633616336263363633646336563366633676336863369633706337163372633736337463375633766337763378633796338063381633826338363384633856338663387633886338963390633916339263393633946339563396633976339863399634006340163402634036340463405634066340763408634096341063411634126341363414634156341663417634186341963420634216342263423634246342563426634276342863429634306343163432634336343463435634366343763438634396344063441634426344363444634456344663447634486344963450634516345263453634546345563456634576345863459634606346163462634636346463465634666346763468634696347063471634726347363474634756347663477634786347963480634816348263483634846348563486634876348863489634906349163492634936349463495634966349763498634996350063501635026350363504635056350663507635086350963510635116351263513635146351563516635176351863519635206352163522635236352463525635266352763528635296353063531635326353363534635356353663537635386353963540635416354263543635446354563546635476354863549635506355163552635536355463555635566355763558635596356063561635626356363564635656356663567635686356963570635716357263573635746357563576635776357863579635806358163582635836358463585635866358763588635896359063591635926359363594635956359663597635986359963600636016360263603636046360563606636076360863609636106361163612636136361463615636166361763618636196362063621636226362363624636256362663627636286362963630636316363263633636346363563636636376363863639636406364163642636436364463645636466364763648636496365063651636526365363654636556365663657636586365963660636616366263663636646366563666636676366863669636706367163672636736367463675636766367763678636796368063681636826368363684636856368663687636886368963690636916369263693636946369563696636976369863699637006370163702637036370463705637066370763708637096371063711637126371363714637156371663717637186371963720637216372263723637246372563726637276372863729637306373163732637336373463735637366373763738637396374063741637426374363744637456374663747637486374963750637516375263753637546375563756637576375863759637606376163762637636376463765637666376763768637696377063771637726377363774637756377663777637786377963780637816378263783637846378563786637876378863789637906379163792637936379463795637966379763798637996380063801638026380363804638056380663807638086380963810638116381263813638146381563816638176381863819638206382163822638236382463825638266382763828638296383063831638326383363834638356383663837638386383963840638416384263843638446384563846638476384863849638506385163852638536385463855638566385763858638596386063861638626386363864638656386663867638686386963870638716387263873638746387563876638776387863879638806388163882638836388463885638866388763888638896389063891638926389363894638956389663897638986389963900639016390263903639046390563906639076390863909639106391163912639136391463915639166391763918639196392063921639226392363924639256392663927639286392963930639316393263933639346393563936639376393863939639406394163942639436394463945639466394763948639496395063951639526395363954639556395663957639586395963960639616396263963639646396563966639676396863969639706397163972639736397463975639766397763978639796398063981639826398363984639856398663987639886398963990639916399263993639946399563996639976399863999640006400164002640036400464005640066400764008640096401064011640126401364014640156401664017640186401964020640216402264023640246402564026640276402864029640306403164032640336403464035640366403764038640396404064041640426404364044640456404664047640486404964050640516405264053640546405564056640576405864059640606406164062640636406464065640666406764068640696407064071640726407364074640756407664077640786407964080640816408264083640846408564086640876408864089640906409164092640936409464095640966409764098640996410064101641026410364104641056410664107641086410964110641116411264113641146411564116641176411864119641206412164122641236412464125641266412764128641296413064131641326413364134641356413664137641386413964140641416414264143641446414564146641476414864149641506415164152641536415464155641566415764158641596416064161641626416364164641656416664167641686416964170641716417264173641746417564176641776417864179641806418164182641836418464185641866418764188641896419064191641926419364194641956419664197641986419964200642016420264203642046420564206642076420864209642106421164212642136421464215642166421764218642196422064221642226422364224642256422664227642286422964230642316423264233642346423564236642376423864239642406424164242642436424464245642466424764248642496425064251642526425364254642556425664257642586425964260642616426264263642646426564266642676426864269642706427164272642736427464275642766427764278642796428064281642826428364284642856428664287642886428964290642916429264293642946429564296642976429864299643006430164302643036430464305643066430764308643096431064311643126431364314643156431664317643186431964320643216432264323643246432564326643276432864329643306433164332643336433464335643366433764338643396434064341643426434364344643456434664347643486434964350643516435264353643546435564356643576435864359643606436164362643636436464365643666436764368643696437064371643726437364374643756437664377643786437964380643816438264383643846438564386643876438864389643906439164392643936439464395643966439764398643996440064401644026440364404644056440664407644086440964410644116441264413644146441564416644176441864419644206442164422644236442464425644266442764428644296443064431644326443364434644356443664437644386443964440644416444264443644446444564446644476444864449644506445164452644536445464455644566445764458644596446064461644626446364464644656446664467644686446964470644716447264473644746447564476644776447864479644806448164482644836448464485644866448764488644896449064491644926449364494644956449664497644986449964500645016450264503645046450564506645076450864509645106451164512645136451464515645166451764518645196452064521645226452364524645256452664527645286452964530645316453264533645346453564536645376453864539645406454164542645436454464545645466454764548645496455064551645526455364554645556455664557645586455964560645616456264563645646456564566645676456864569645706457164572645736457464575645766457764578645796458064581645826458364584645856458664587645886458964590645916459264593645946459564596645976459864599646006460164602646036460464605646066460764608646096461064611646126461364614646156461664617646186461964620646216462264623646246462564626646276462864629646306463164632646336463464635646366463764638646396464064641646426464364644646456464664647646486464964650646516465264653646546465564656646576465864659646606466164662646636466464665646666466764668646696467064671646726467364674646756467664677646786467964680646816468264683646846468564686646876468864689646906469164692646936469464695646966469764698646996470064701647026470364704647056470664707647086470964710647116471264713647146471564716647176471864719647206472164722647236472464725647266472764728647296473064731647326473364734647356473664737647386473964740647416474264743647446474564746647476474864749647506475164752647536475464755647566475764758647596476064761647626476364764647656476664767647686476964770647716477264773647746477564776647776477864779647806478164782647836478464785647866478764788647896479064791647926479364794647956479664797647986479964800648016480264803648046480564806648076480864809648106481164812648136481464815648166481764818648196482064821648226482364824648256482664827648286482964830648316483264833648346483564836648376483864839648406484164842648436484464845648466484764848648496485064851648526485364854648556485664857648586485964860648616486264863648646486564866648676486864869648706487164872648736487464875648766487764878648796488064881648826488364884648856488664887648886488964890648916489264893648946489564896648976489864899649006490164902649036490464905649066490764908649096491064911649126491364914649156491664917649186491964920649216492264923649246492564926649276492864929649306493164932649336493464935649366493764938649396494064941649426494364944649456494664947649486494964950649516495264953649546495564956649576495864959649606496164962649636496464965649666496764968649696497064971649726497364974649756497664977649786497964980649816498264983649846498564986649876498864989649906499164992649936499464995649966499764998649996500065001650026500365004650056500665007650086500965010650116501265013650146501565016650176501865019650206502165022650236502465025650266502765028650296503065031650326503365034650356503665037650386503965040650416504265043650446504565046650476504865049650506505165052650536505465055650566505765058650596506065061650626506365064650656506665067650686506965070650716507265073650746507565076650776507865079650806508165082650836508465085650866508765088650896509065091650926509365094650956509665097650986509965100651016510265103651046510565106651076510865109651106511165112651136511465115651166511765118651196512065121651226512365124651256512665127651286512965130651316513265133651346513565136651376513865139651406514165142651436514465145651466514765148651496515065151651526515365154651556515665157651586515965160651616516265163651646516565166651676516865169651706517165172651736517465175651766517765178651796518065181651826518365184651856518665187651886518965190651916519265193651946519565196651976519865199652006520165202652036520465205652066520765208652096521065211652126521365214652156521665217652186521965220652216522265223652246522565226652276522865229652306523165232652336523465235652366523765238652396524065241652426524365244652456524665247652486524965250652516525265253652546525565256652576525865259652606526165262652636526465265652666526765268652696527065271652726527365274652756527665277652786527965280652816528265283652846528565286652876528865289652906529165292652936529465295652966529765298652996530065301653026530365304653056530665307653086530965310653116531265313653146531565316653176531865319653206532165322653236532465325653266532765328653296533065331653326533365334653356533665337653386533965340653416534265343653446534565346653476534865349653506535165352653536535465355653566535765358653596536065361653626536365364653656536665367653686536965370653716537265373653746537565376653776537865379653806538165382653836538465385653866538765388653896539065391653926539365394653956539665397653986539965400654016540265403654046540565406654076540865409654106541165412654136541465415654166541765418654196542065421654226542365424654256542665427654286542965430654316543265433654346543565436654376543865439654406544165442654436544465445654466544765448654496545065451654526545365454654556545665457654586545965460654616546265463654646546565466654676546865469654706547165472654736547465475654766547765478654796548065481654826548365484654856548665487654886548965490654916549265493654946549565496654976549865499655006550165502655036550465505655066550765508655096551065511655126551365514655156551665517655186551965520655216552265523655246552565526655276552865529655306553165532655336553465535655366553765538655396554065541655426554365544655456554665547655486554965550655516555265553655546555565556655576555865559655606556165562655636556465565655666556765568655696557065571655726557365574655756557665577655786557965580655816558265583655846558565586655876558865589655906559165592655936559465595655966559765598655996560065601656026560365604656056560665607656086560965610656116561265613656146561565616656176561865619656206562165622656236562465625656266562765628656296563065631656326563365634656356563665637656386563965640656416564265643656446564565646656476564865649656506565165652656536565465655656566565765658656596566065661656626566365664656656566665667656686566965670656716567265673656746567565676656776567865679656806568165682656836568465685656866568765688656896569065691656926569365694656956569665697656986569965700657016570265703657046570565706657076570865709657106571165712657136571465715657166571765718657196572065721657226572365724657256572665727657286572965730657316573265733657346573565736657376573865739657406574165742657436574465745657466574765748657496575065751657526575365754657556575665757657586575965760657616576265763657646576565766657676576865769657706577165772657736577465775657766577765778657796578065781657826578365784657856578665787657886578965790657916579265793657946579565796657976579865799658006580165802658036580465805658066580765808658096581065811658126581365814658156581665817658186581965820658216582265823658246582565826658276582865829658306583165832658336583465835658366583765838658396584065841658426584365844658456584665847658486584965850658516585265853658546585565856658576585865859658606586165862658636586465865658666586765868658696587065871658726587365874658756587665877658786587965880658816588265883658846588565886658876588865889658906589165892658936589465895658966589765898658996590065901659026590365904659056590665907659086590965910659116591265913659146591565916659176591865919659206592165922659236592465925659266592765928659296593065931659326593365934659356593665937659386593965940659416594265943659446594565946659476594865949659506595165952659536595465955659566595765958659596596065961659626596365964659656596665967659686596965970659716597265973659746597565976659776597865979659806598165982659836598465985659866598765988659896599065991659926599365994659956599665997659986599966000660016600266003660046600566006660076600866009660106601166012660136601466015660166601766018660196602066021660226602366024660256602666027660286602966030660316603266033660346603566036660376603866039660406604166042660436604466045660466604766048660496605066051660526605366054660556605666057660586605966060660616606266063660646606566066660676606866069660706607166072660736607466075660766607766078660796608066081660826608366084660856608666087660886608966090660916609266093660946609566096660976609866099661006610166102661036610466105661066610766108661096611066111661126611366114661156611666117661186611966120661216612266123661246612566126661276612866129661306613166132661336613466135661366613766138661396614066141661426614366144661456614666147661486614966150661516615266153661546615566156661576615866159661606616166162661636616466165661666616766168661696617066171661726617366174661756617666177661786617966180661816618266183661846618566186661876618866189661906619166192661936619466195661966619766198661996620066201662026620366204662056620666207662086620966210662116621266213662146621566216662176621866219662206622166222662236622466225662266622766228662296623066231662326623366234662356623666237662386623966240662416624266243662446624566246662476624866249662506625166252662536625466255662566625766258662596626066261662626626366264662656626666267662686626966270662716627266273662746627566276662776627866279662806628166282662836628466285662866628766288662896629066291662926629366294662956629666297662986629966300663016630266303663046630566306663076630866309663106631166312663136631466315663166631766318663196632066321663226632366324663256632666327663286632966330663316633266333663346633566336663376633866339663406634166342663436634466345663466634766348663496635066351663526635366354663556635666357663586635966360663616636266363663646636566366663676636866369663706637166372663736637466375663766637766378663796638066381663826638366384663856638666387663886638966390663916639266393663946639566396663976639866399664006640166402664036640466405664066640766408664096641066411664126641366414664156641666417664186641966420664216642266423664246642566426664276642866429664306643166432664336643466435664366643766438664396644066441664426644366444664456644666447664486644966450664516645266453664546645566456664576645866459664606646166462664636646466465664666646766468664696647066471664726647366474664756647666477664786647966480664816648266483664846648566486664876648866489664906649166492664936649466495664966649766498664996650066501665026650366504665056650666507665086650966510665116651266513665146651566516665176651866519665206652166522665236652466525665266652766528665296653066531665326653366534665356653666537665386653966540665416654266543665446654566546665476654866549665506655166552665536655466555665566655766558665596656066561665626656366564665656656666567665686656966570665716657266573665746657566576665776657866579665806658166582665836658466585665866658766588665896659066591665926659366594665956659666597665986659966600666016660266603666046660566606666076660866609666106661166612666136661466615666166661766618666196662066621666226662366624666256662666627666286662966630666316663266633666346663566636666376663866639666406664166642666436664466645666466664766648666496665066651666526665366654666556665666657666586665966660666616666266663666646666566666666676666866669666706667166672666736667466675666766667766678666796668066681666826668366684666856668666687666886668966690666916669266693666946669566696666976669866699667006670166702667036670466705667066670766708667096671066711667126671366714667156671666717667186671966720667216672266723667246672566726667276672866729667306673166732667336673466735667366673766738667396674066741667426674366744667456674666747667486674966750667516675266753667546675566756667576675866759667606676166762667636676466765667666676766768667696677066771667726677366774667756677666777667786677966780667816678266783667846678566786667876678866789667906679166792667936679466795667966679766798667996680066801668026680366804668056680666807668086680966810668116681266813668146681566816668176681866819668206682166822668236682466825668266682766828668296683066831668326683366834668356683666837668386683966840668416684266843668446684566846668476684866849668506685166852668536685466855668566685766858668596686066861668626686366864668656686666867668686686966870668716687266873668746687566876668776687866879668806688166882668836688466885668866688766888668896689066891668926689366894668956689666897668986689966900669016690266903669046690566906669076690866909669106691166912669136691466915669166691766918669196692066921669226692366924669256692666927669286692966930669316693266933669346693566936669376693866939669406694166942669436694466945669466694766948669496695066951669526695366954669556695666957669586695966960669616696266963669646696566966669676696866969669706697166972669736697466975669766697766978669796698066981669826698366984669856698666987669886698966990669916699266993669946699566996669976699866999670006700167002670036700467005670066700767008670096701067011670126701367014670156701667017670186701967020670216702267023670246702567026670276702867029670306703167032670336703467035670366703767038670396704067041670426704367044670456704667047670486704967050670516705267053670546705567056670576705867059670606706167062670636706467065670666706767068670696707067071670726707367074670756707667077670786707967080670816708267083670846708567086670876708867089670906709167092670936709467095670966709767098670996710067101671026710367104671056710667107671086710967110671116711267113671146711567116671176711867119671206712167122671236712467125671266712767128671296713067131671326713367134671356713667137671386713967140671416714267143671446714567146671476714867149671506715167152671536715467155671566715767158671596716067161671626716367164671656716667167671686716967170671716717267173671746717567176671776717867179671806718167182671836718467185671866718767188671896719067191671926719367194671956719667197671986719967200672016720267203672046720567206672076720867209672106721167212672136721467215672166721767218672196722067221672226722367224672256722667227672286722967230672316723267233672346723567236672376723867239672406724167242672436724467245672466724767248672496725067251672526725367254672556725667257672586725967260672616726267263672646726567266672676726867269672706727167272672736727467275672766727767278672796728067281672826728367284672856728667287672886728967290672916729267293672946729567296672976729867299673006730167302673036730467305673066730767308673096731067311673126731367314673156731667317673186731967320673216732267323673246732567326673276732867329673306733167332673336733467335673366733767338673396734067341673426734367344673456734667347673486734967350673516735267353673546735567356673576735867359673606736167362673636736467365673666736767368673696737067371673726737367374673756737667377673786737967380673816738267383673846738567386673876738867389673906739167392673936739467395673966739767398673996740067401674026740367404674056740667407674086740967410674116741267413674146741567416674176741867419674206742167422674236742467425674266742767428674296743067431674326743367434674356743667437674386743967440674416744267443674446744567446674476744867449674506745167452674536745467455674566745767458674596746067461674626746367464674656746667467674686746967470674716747267473674746747567476674776747867479674806748167482674836748467485674866748767488674896749067491674926749367494674956749667497674986749967500675016750267503675046750567506675076750867509675106751167512675136751467515675166751767518675196752067521675226752367524675256752667527675286752967530675316753267533675346753567536675376753867539675406754167542675436754467545675466754767548675496755067551675526755367554675556755667557675586755967560675616756267563675646756567566675676756867569675706757167572675736757467575675766757767578675796758067581675826758367584675856758667587675886758967590675916759267593675946759567596675976759867599676006760167602676036760467605676066760767608676096761067611676126761367614676156761667617676186761967620676216762267623676246762567626676276762867629676306763167632676336763467635676366763767638676396764067641676426764367644676456764667647676486764967650676516765267653676546765567656676576765867659676606766167662676636766467665676666766767668676696767067671676726767367674676756767667677676786767967680676816768267683676846768567686676876768867689676906769167692676936769467695676966769767698676996770067701677026770367704677056770667707677086770967710677116771267713677146771567716677176771867719677206772167722677236772467725677266772767728677296773067731677326773367734677356773667737677386773967740677416774267743677446774567746677476774867749677506775167752677536775467755677566775767758677596776067761677626776367764677656776667767677686776967770677716777267773677746777567776677776777867779677806778167782677836778467785677866778767788677896779067791677926779367794677956779667797677986779967800678016780267803678046780567806678076780867809678106781167812678136781467815678166781767818678196782067821678226782367824678256782667827678286782967830678316783267833678346783567836678376783867839678406784167842678436784467845678466784767848678496785067851678526785367854678556785667857678586785967860678616786267863678646786567866678676786867869678706787167872678736787467875678766787767878678796788067881678826788367884678856788667887678886788967890678916789267893678946789567896678976789867899679006790167902679036790467905679066790767908679096791067911679126791367914679156791667917679186791967920679216792267923679246792567926679276792867929679306793167932679336793467935679366793767938679396794067941679426794367944679456794667947679486794967950679516795267953679546795567956679576795867959679606796167962679636796467965679666796767968679696797067971679726797367974679756797667977679786797967980679816798267983679846798567986679876798867989679906799167992679936799467995679966799767998679996800068001680026800368004680056800668007680086800968010680116801268013680146801568016680176801868019680206802168022680236802468025680266802768028680296803068031680326803368034680356803668037680386803968040680416804268043680446804568046680476804868049680506805168052680536805468055680566805768058680596806068061680626806368064680656806668067680686806968070680716807268073680746807568076680776807868079680806808168082680836808468085680866808768088680896809068091680926809368094680956809668097680986809968100681016810268103681046810568106681076810868109681106811168112681136811468115681166811768118681196812068121681226812368124681256812668127681286812968130681316813268133681346813568136681376813868139681406814168142681436814468145681466814768148681496815068151681526815368154681556815668157681586815968160681616816268163681646816568166681676816868169681706817168172681736817468175681766817768178681796818068181681826818368184681856818668187681886818968190681916819268193681946819568196681976819868199682006820168202682036820468205682066820768208682096821068211682126821368214682156821668217682186821968220682216822268223682246822568226682276822868229682306823168232682336823468235682366823768238682396824068241682426824368244682456824668247682486824968250682516825268253682546825568256682576825868259682606826168262682636826468265682666826768268682696827068271682726827368274682756827668277682786827968280682816828268283682846828568286682876828868289682906829168292682936829468295682966829768298682996830068301683026830368304683056830668307683086830968310683116831268313683146831568316683176831868319683206832168322683236832468325683266832768328683296833068331683326833368334683356833668337683386833968340683416834268343683446834568346683476834868349683506835168352683536835468355683566835768358683596836068361683626836368364683656836668367683686836968370683716837268373683746837568376683776837868379683806838168382683836838468385683866838768388683896839068391683926839368394683956839668397683986839968400684016840268403684046840568406684076840868409684106841168412684136841468415684166841768418684196842068421684226842368424684256842668427684286842968430684316843268433684346843568436684376843868439684406844168442684436844468445684466844768448684496845068451684526845368454684556845668457684586845968460684616846268463684646846568466684676846868469684706847168472684736847468475684766847768478684796848068481684826848368484684856848668487684886848968490684916849268493684946849568496684976849868499685006850168502685036850468505685066850768508685096851068511685126851368514685156851668517685186851968520685216852268523685246852568526685276852868529685306853168532685336853468535685366853768538685396854068541685426854368544685456854668547685486854968550685516855268553685546855568556685576855868559685606856168562685636856468565685666856768568685696857068571685726857368574685756857668577685786857968580685816858268583685846858568586685876858868589685906859168592685936859468595685966859768598685996860068601686026860368604686056860668607686086860968610686116861268613686146861568616686176861868619686206862168622686236862468625686266862768628686296863068631686326863368634686356863668637686386863968640686416864268643686446864568646686476864868649686506865168652686536865468655686566865768658686596866068661686626866368664686656866668667686686866968670686716867268673686746867568676686776867868679686806868168682686836868468685686866868768688686896869068691686926869368694686956869668697686986869968700687016870268703687046870568706687076870868709687106871168712687136871468715687166871768718687196872068721687226872368724687256872668727687286872968730687316873268733687346873568736687376873868739687406874168742687436874468745687466874768748687496875068751687526875368754687556875668757687586875968760687616876268763687646876568766687676876868769687706877168772687736877468775687766877768778687796878068781687826878368784687856878668787687886878968790687916879268793687946879568796687976879868799688006880168802688036880468805688066880768808688096881068811688126881368814688156881668817688186881968820688216882268823688246882568826688276882868829688306883168832688336883468835688366883768838688396884068841688426884368844688456884668847688486884968850688516885268853688546885568856688576885868859688606886168862688636886468865688666886768868688696887068871688726887368874688756887668877688786887968880688816888268883688846888568886688876888868889688906889168892688936889468895688966889768898688996890068901689026890368904689056890668907689086890968910689116891268913689146891568916689176891868919689206892168922689236892468925689266892768928689296893068931689326893368934689356893668937689386893968940689416894268943689446894568946689476894868949689506895168952689536895468955689566895768958689596896068961689626896368964689656896668967689686896968970689716897268973689746897568976689776897868979689806898168982689836898468985689866898768988689896899068991689926899368994689956899668997689986899969000690016900269003690046900569006690076900869009690106901169012690136901469015690166901769018690196902069021690226902369024690256902669027690286902969030690316903269033690346903569036690376903869039690406904169042690436904469045690466904769048690496905069051690526905369054690556905669057690586905969060690616906269063690646906569066690676906869069690706907169072690736907469075690766907769078690796908069081690826908369084690856908669087690886908969090690916909269093690946909569096690976909869099691006910169102691036910469105691066910769108691096911069111691126911369114691156911669117691186911969120691216912269123691246912569126691276912869129691306913169132691336913469135691366913769138691396914069141691426914369144691456914669147691486914969150691516915269153691546915569156691576915869159691606916169162691636916469165691666916769168691696917069171691726917369174691756917669177691786917969180691816918269183691846918569186691876918869189691906919169192691936919469195691966919769198691996920069201692026920369204692056920669207692086920969210692116921269213692146921569216692176921869219692206922169222692236922469225692266922769228692296923069231692326923369234692356923669237692386923969240692416924269243692446924569246692476924869249692506925169252692536925469255692566925769258692596926069261692626926369264692656926669267692686926969270692716927269273692746927569276692776927869279692806928169282692836928469285692866928769288692896929069291692926929369294692956929669297692986929969300693016930269303693046930569306693076930869309693106931169312693136931469315693166931769318693196932069321693226932369324693256932669327693286932969330693316933269333693346933569336693376933869339693406934169342693436934469345693466934769348693496935069351693526935369354693556935669357693586935969360693616936269363693646936569366693676936869369693706937169372693736937469375693766937769378693796938069381693826938369384693856938669387693886938969390693916939269393693946939569396693976939869399694006940169402694036940469405694066940769408694096941069411694126941369414694156941669417694186941969420694216942269423694246942569426694276942869429694306943169432694336943469435694366943769438694396944069441694426944369444694456944669447694486944969450694516945269453694546945569456694576945869459694606946169462694636946469465694666946769468694696947069471694726947369474694756947669477694786947969480694816948269483694846948569486694876948869489694906949169492694936949469495694966949769498694996950069501695026950369504695056950669507695086950969510695116951269513695146951569516695176951869519695206952169522695236952469525695266952769528695296953069531695326953369534695356953669537695386953969540695416954269543695446954569546695476954869549695506955169552695536955469555695566955769558695596956069561695626956369564695656956669567695686956969570695716957269573695746957569576695776957869579695806958169582695836958469585695866958769588695896959069591695926959369594695956959669597695986959969600696016960269603696046960569606696076960869609696106961169612696136961469615696166961769618696196962069621696226962369624696256962669627696286962969630696316963269633696346963569636696376963869639696406964169642696436964469645696466964769648696496965069651696526965369654696556965669657696586965969660696616966269663696646966569666696676966869669696706967169672696736967469675696766967769678696796968069681696826968369684696856968669687696886968969690696916969269693696946969569696696976969869699697006970169702697036970469705697066970769708697096971069711697126971369714697156971669717697186971969720697216972269723697246972569726697276972869729697306973169732697336973469735697366973769738697396974069741697426974369744697456974669747697486974969750697516975269753697546975569756697576975869759697606976169762697636976469765697666976769768697696977069771697726977369774697756977669777697786977969780697816978269783697846978569786697876978869789697906979169792697936979469795697966979769798697996980069801698026980369804698056980669807698086980969810698116981269813698146981569816698176981869819698206982169822698236982469825698266982769828698296983069831698326983369834698356983669837698386983969840698416984269843698446984569846698476984869849698506985169852698536985469855698566985769858698596986069861698626986369864698656986669867698686986969870698716987269873698746987569876698776987869879698806988169882698836988469885698866988769888698896989069891698926989369894698956989669897698986989969900699016990269903699046990569906699076990869909699106991169912699136991469915699166991769918699196992069921699226992369924699256992669927699286992969930699316993269933699346993569936699376993869939699406994169942699436994469945699466994769948699496995069951699526995369954699556995669957699586995969960699616996269963699646996569966699676996869969699706997169972699736997469975699766997769978699796998069981699826998369984699856998669987699886998969990699916999269993699946999569996699976999869999700007000170002700037000470005700067000770008700097001070011700127001370014700157001670017700187001970020700217002270023700247002570026700277002870029700307003170032700337003470035700367003770038700397004070041700427004370044700457004670047700487004970050700517005270053700547005570056700577005870059700607006170062700637006470065700667006770068700697007070071700727007370074700757007670077700787007970080700817008270083700847008570086700877008870089700907009170092700937009470095700967009770098700997010070101701027010370104701057010670107701087010970110701117011270113701147011570116701177011870119701207012170122701237012470125701267012770128701297013070131701327013370134701357013670137701387013970140701417014270143701447014570146701477014870149701507015170152701537015470155701567015770158701597016070161701627016370164701657016670167701687016970170701717017270173701747017570176701777017870179701807018170182701837018470185701867018770188701897019070191701927019370194701957019670197701987019970200702017020270203702047020570206702077020870209702107021170212702137021470215702167021770218702197022070221702227022370224702257022670227702287022970230702317023270233702347023570236702377023870239702407024170242702437024470245702467024770248702497025070251702527025370254702557025670257702587025970260702617026270263702647026570266702677026870269702707027170272702737027470275702767027770278702797028070281702827028370284702857028670287702887028970290702917029270293702947029570296702977029870299703007030170302703037030470305703067030770308703097031070311703127031370314703157031670317703187031970320703217032270323703247032570326703277032870329703307033170332703337033470335703367033770338703397034070341703427034370344703457034670347703487034970350703517035270353703547035570356703577035870359703607036170362703637036470365703667036770368703697037070371703727037370374703757037670377703787037970380703817038270383703847038570386703877038870389703907039170392703937039470395703967039770398703997040070401704027040370404704057040670407704087040970410704117041270413704147041570416704177041870419704207042170422704237042470425704267042770428704297043070431704327043370434704357043670437704387043970440704417044270443704447044570446704477044870449704507045170452704537045470455704567045770458704597046070461704627046370464704657046670467704687046970470704717047270473704747047570476704777047870479704807048170482704837048470485704867048770488704897049070491704927049370494704957049670497704987049970500705017050270503705047050570506705077050870509705107051170512705137051470515705167051770518705197052070521705227052370524705257052670527705287052970530705317053270533705347053570536705377053870539705407054170542705437054470545705467054770548705497055070551705527055370554705557055670557705587055970560705617056270563705647056570566705677056870569705707057170572705737057470575705767057770578705797058070581705827058370584705857058670587705887058970590705917059270593705947059570596705977059870599706007060170602706037060470605706067060770608706097061070611706127061370614706157061670617706187061970620706217062270623706247062570626706277062870629706307063170632706337063470635706367063770638706397064070641706427064370644706457064670647706487064970650706517065270653706547065570656706577065870659706607066170662706637066470665706667066770668706697067070671706727067370674706757067670677706787067970680706817068270683706847068570686706877068870689706907069170692706937069470695706967069770698706997070070701707027070370704707057070670707707087070970710707117071270713707147071570716707177071870719707207072170722707237072470725707267072770728707297073070731707327073370734707357073670737707387073970740707417074270743707447074570746707477074870749707507075170752707537075470755707567075770758707597076070761707627076370764707657076670767707687076970770707717077270773707747077570776707777077870779707807078170782707837078470785707867078770788707897079070791707927079370794707957079670797707987079970800708017080270803708047080570806708077080870809708107081170812708137081470815708167081770818708197082070821708227082370824708257082670827708287082970830708317083270833708347083570836708377083870839708407084170842708437084470845708467084770848708497085070851708527085370854708557085670857708587085970860708617086270863708647086570866708677086870869708707087170872708737087470875708767087770878708797088070881708827088370884708857088670887708887088970890708917089270893708947089570896708977089870899709007090170902709037090470905709067090770908709097091070911709127091370914709157091670917709187091970920709217092270923709247092570926709277092870929709307093170932709337093470935709367093770938709397094070941709427094370944709457094670947709487094970950709517095270953709547095570956709577095870959709607096170962709637096470965709667096770968709697097070971709727097370974709757097670977709787097970980709817098270983709847098570986709877098870989709907099170992709937099470995709967099770998709997100071001710027100371004710057100671007710087100971010710117101271013710147101571016710177101871019710207102171022710237102471025710267102771028710297103071031710327103371034710357103671037710387103971040710417104271043710447104571046710477104871049710507105171052710537105471055710567105771058710597106071061710627106371064710657106671067710687106971070710717107271073710747107571076710777107871079710807108171082710837108471085710867108771088710897109071091710927109371094710957109671097710987109971100711017110271103711047110571106711077110871109711107111171112711137111471115711167111771118711197112071121711227112371124711257112671127711287112971130711317113271133711347113571136711377113871139711407114171142711437114471145711467114771148711497115071151711527115371154711557115671157711587115971160711617116271163711647116571166711677116871169711707117171172711737117471175711767117771178711797118071181711827118371184711857118671187711887118971190711917119271193711947119571196711977119871199712007120171202712037120471205712067120771208712097121071211712127121371214712157121671217712187121971220712217122271223712247122571226712277122871229712307123171232712337123471235712367123771238712397124071241712427124371244712457124671247712487124971250712517125271253712547125571256712577125871259712607126171262712637126471265712667126771268712697127071271712727127371274712757127671277712787127971280712817128271283712847128571286712877128871289712907129171292712937129471295712967129771298712997130071301713027130371304713057130671307713087130971310713117131271313713147131571316713177131871319713207132171322713237132471325713267132771328713297133071331713327133371334713357133671337713387133971340713417134271343713447134571346713477134871349713507135171352713537135471355713567135771358713597136071361713627136371364713657136671367713687136971370713717137271373713747137571376713777137871379713807138171382713837138471385713867138771388713897139071391713927139371394713957139671397713987139971400714017140271403714047140571406714077140871409714107141171412714137141471415714167141771418714197142071421714227142371424714257142671427714287142971430714317143271433714347143571436714377143871439714407144171442714437144471445714467144771448714497145071451714527145371454714557145671457714587145971460714617146271463714647146571466714677146871469714707147171472714737147471475714767147771478714797148071481714827148371484714857148671487714887148971490714917149271493714947149571496714977149871499715007150171502715037150471505715067150771508715097151071511715127151371514715157151671517715187151971520715217152271523715247152571526715277152871529715307153171532715337153471535715367153771538715397154071541715427154371544715457154671547715487154971550715517155271553715547155571556715577155871559715607156171562715637156471565715667156771568715697157071571715727157371574715757157671577715787157971580715817158271583715847158571586715877158871589715907159171592715937159471595715967159771598715997160071601716027160371604716057160671607716087160971610716117161271613716147161571616716177161871619716207162171622716237162471625716267162771628716297163071631716327163371634716357163671637716387163971640716417164271643716447164571646716477164871649716507165171652716537165471655716567165771658716597166071661716627166371664716657166671667716687166971670716717167271673716747167571676716777167871679716807168171682716837168471685716867168771688716897169071691716927169371694716957169671697716987169971700717017170271703717047170571706717077170871709717107171171712717137171471715717167171771718717197172071721717227172371724717257172671727717287172971730717317173271733717347173571736717377173871739717407174171742717437174471745717467174771748717497175071751717527175371754717557175671757717587175971760717617176271763717647176571766717677176871769717707177171772717737177471775717767177771778717797178071781717827178371784717857178671787717887178971790717917179271793717947179571796717977179871799718007180171802718037180471805718067180771808718097181071811718127181371814718157181671817718187181971820718217182271823718247182571826718277182871829718307183171832718337183471835718367183771838718397184071841718427184371844718457184671847718487184971850718517185271853718547185571856718577185871859718607186171862718637186471865718667186771868718697187071871718727187371874718757187671877718787187971880718817188271883718847188571886718877188871889718907189171892718937189471895718967189771898718997190071901719027190371904719057190671907719087190971910719117191271913719147191571916719177191871919719207192171922719237192471925719267192771928719297193071931719327193371934719357193671937719387193971940719417194271943719447194571946719477194871949719507195171952719537195471955719567195771958719597196071961719627196371964719657196671967719687196971970719717197271973719747197571976719777197871979719807198171982719837198471985719867198771988719897199071991719927199371994719957199671997719987199972000720017200272003720047200572006720077200872009720107201172012720137201472015720167201772018720197202072021720227202372024720257202672027720287202972030720317203272033720347203572036720377203872039720407204172042720437204472045720467204772048720497205072051720527205372054720557205672057720587205972060720617206272063720647206572066720677206872069720707207172072720737207472075720767207772078720797208072081720827208372084720857208672087720887208972090720917209272093720947209572096720977209872099721007210172102721037210472105721067210772108721097211072111721127211372114721157211672117721187211972120721217212272123721247212572126721277212872129721307213172132721337213472135721367213772138721397214072141721427214372144721457214672147721487214972150721517215272153721547215572156721577215872159721607216172162721637216472165721667216772168721697217072171721727217372174721757217672177721787217972180721817218272183721847218572186721877218872189721907219172192721937219472195721967219772198721997220072201722027220372204722057220672207722087220972210722117221272213722147221572216722177221872219722207222172222722237222472225722267222772228722297223072231722327223372234722357223672237722387223972240722417224272243722447224572246722477224872249722507225172252722537225472255722567225772258722597226072261722627226372264722657226672267722687226972270722717227272273722747227572276722777227872279722807228172282722837228472285722867228772288722897229072291722927229372294722957229672297722987229972300723017230272303723047230572306723077230872309723107231172312723137231472315723167231772318723197232072321723227232372324723257232672327723287232972330723317233272333723347233572336723377233872339723407234172342723437234472345723467234772348723497235072351723527235372354723557235672357723587235972360723617236272363723647236572366723677236872369723707237172372723737237472375723767237772378723797238072381723827238372384723857238672387723887238972390723917239272393723947239572396723977239872399724007240172402724037240472405724067240772408724097241072411724127241372414724157241672417724187241972420724217242272423724247242572426724277242872429724307243172432724337243472435724367243772438724397244072441724427244372444724457244672447724487244972450724517245272453724547245572456724577245872459724607246172462724637246472465724667246772468724697247072471724727247372474724757247672477724787247972480724817248272483724847248572486724877248872489724907249172492724937249472495724967249772498724997250072501725027250372504725057250672507725087250972510725117251272513725147251572516725177251872519725207252172522725237252472525725267252772528725297253072531725327253372534725357253672537725387253972540725417254272543725447254572546725477254872549725507255172552725537255472555725567255772558725597256072561725627256372564725657256672567725687256972570725717257272573725747257572576725777257872579725807258172582725837258472585725867258772588725897259072591725927259372594725957259672597725987259972600726017260272603726047260572606726077260872609726107261172612726137261472615726167261772618726197262072621726227262372624726257262672627726287262972630726317263272633726347263572636726377263872639726407264172642726437264472645726467264772648726497265072651726527265372654726557265672657726587265972660726617266272663726647266572666726677266872669726707267172672726737267472675726767267772678726797268072681726827268372684726857268672687726887268972690726917269272693726947269572696726977269872699727007270172702727037270472705727067270772708727097271072711727127271372714727157271672717727187271972720727217272272723727247272572726727277272872729727307273172732727337273472735727367273772738727397274072741727427274372744727457274672747727487274972750727517275272753727547275572756727577275872759727607276172762727637276472765727667276772768727697277072771727727277372774727757277672777727787277972780727817278272783727847278572786727877278872789727907279172792727937279472795727967279772798727997280072801728027280372804728057280672807728087280972810728117281272813728147281572816728177281872819728207282172822728237282472825728267282772828728297283072831728327283372834728357283672837728387283972840728417284272843728447284572846728477284872849728507285172852728537285472855728567285772858728597286072861728627286372864728657286672867728687286972870728717287272873728747287572876728777287872879728807288172882728837288472885728867288772888728897289072891728927289372894728957289672897728987289972900729017290272903729047290572906729077290872909729107291172912729137291472915729167291772918729197292072921729227292372924729257292672927729287292972930729317293272933729347293572936729377293872939729407294172942729437294472945729467294772948729497295072951729527295372954729557295672957729587295972960729617296272963729647296572966729677296872969729707297172972729737297472975729767297772978729797298072981729827298372984729857298672987729887298972990729917299272993729947299572996729977299872999730007300173002730037300473005730067300773008730097301073011730127301373014730157301673017730187301973020730217302273023730247302573026730277302873029730307303173032730337303473035730367303773038730397304073041730427304373044730457304673047730487304973050730517305273053730547305573056730577305873059730607306173062730637306473065730667306773068730697307073071730727307373074730757307673077730787307973080730817308273083730847308573086730877308873089730907309173092730937309473095730967309773098730997310073101731027310373104731057310673107731087310973110731117311273113731147311573116731177311873119731207312173122731237312473125731267312773128731297313073131731327313373134731357313673137731387313973140731417314273143731447314573146731477314873149731507315173152731537315473155731567315773158731597316073161731627316373164731657316673167731687316973170731717317273173731747317573176731777317873179731807318173182731837318473185731867318773188731897319073191731927319373194731957319673197731987319973200732017320273203732047320573206732077320873209732107321173212732137321473215732167321773218732197322073221732227322373224732257322673227732287322973230732317323273233732347323573236732377323873239732407324173242732437324473245732467324773248732497325073251732527325373254732557325673257732587325973260732617326273263732647326573266732677326873269732707327173272732737327473275732767327773278732797328073281732827328373284732857328673287732887328973290732917329273293732947329573296732977329873299733007330173302733037330473305733067330773308733097331073311733127331373314733157331673317733187331973320733217332273323733247332573326733277332873329733307333173332733337333473335733367333773338733397334073341733427334373344733457334673347733487334973350733517335273353733547335573356733577335873359733607336173362733637336473365733667336773368733697337073371733727337373374733757337673377733787337973380733817338273383733847338573386733877338873389733907339173392733937339473395733967339773398733997340073401734027340373404734057340673407734087340973410734117341273413734147341573416734177341873419734207342173422734237342473425734267342773428734297343073431734327343373434734357343673437734387343973440734417344273443734447344573446734477344873449734507345173452734537345473455734567345773458734597346073461734627346373464734657346673467734687346973470734717347273473734747347573476734777347873479734807348173482734837348473485734867348773488734897349073491734927349373494734957349673497734987349973500735017350273503735047350573506735077350873509735107351173512735137351473515735167351773518735197352073521735227352373524735257352673527735287352973530735317353273533735347353573536735377353873539735407354173542735437354473545735467354773548735497355073551735527355373554735557355673557735587355973560735617356273563735647356573566735677356873569735707357173572735737357473575735767357773578735797358073581735827358373584735857358673587735887358973590735917359273593735947359573596735977359873599736007360173602736037360473605736067360773608736097361073611736127361373614736157361673617736187361973620736217362273623736247362573626736277362873629736307363173632736337363473635736367363773638736397364073641736427364373644736457364673647736487364973650736517365273653736547365573656736577365873659736607366173662736637366473665736667366773668736697367073671736727367373674736757367673677736787367973680736817368273683736847368573686736877368873689736907369173692736937369473695736967369773698736997370073701737027370373704737057370673707737087370973710737117371273713737147371573716737177371873719737207372173722737237372473725737267372773728737297373073731737327373373734737357373673737737387373973740737417374273743737447374573746737477374873749737507375173752737537375473755737567375773758737597376073761737627376373764737657376673767737687376973770737717377273773737747377573776737777377873779737807378173782737837378473785737867378773788737897379073791737927379373794737957379673797737987379973800738017380273803738047380573806738077380873809738107381173812738137381473815738167381773818738197382073821738227382373824738257382673827738287382973830738317383273833738347383573836738377383873839738407384173842738437384473845738467384773848738497385073851738527385373854738557385673857738587385973860738617386273863738647386573866738677386873869738707387173872738737387473875738767387773878738797388073881738827388373884738857388673887738887388973890738917389273893738947389573896738977389873899739007390173902739037390473905739067390773908739097391073911739127391373914739157391673917739187391973920739217392273923739247392573926739277392873929739307393173932739337393473935739367393773938739397394073941739427394373944739457394673947739487394973950739517395273953739547395573956739577395873959739607396173962739637396473965739667396773968739697397073971739727397373974739757397673977739787397973980739817398273983739847398573986739877398873989739907399173992739937399473995739967399773998739997400074001740027400374004740057400674007740087400974010740117401274013740147401574016740177401874019740207402174022740237402474025740267402774028740297403074031740327403374034740357403674037740387403974040740417404274043740447404574046740477404874049740507405174052740537405474055740567405774058740597406074061740627406374064740657406674067740687406974070740717407274073740747407574076740777407874079740807408174082740837408474085740867408774088740897409074091740927409374094740957409674097740987409974100741017410274103741047410574106741077410874109741107411174112741137411474115741167411774118741197412074121741227412374124741257412674127741287412974130741317413274133741347413574136741377413874139741407414174142741437414474145741467414774148741497415074151741527415374154741557415674157741587415974160741617416274163741647416574166741677416874169741707417174172741737417474175741767417774178741797418074181741827418374184741857418674187741887418974190741917419274193741947419574196741977419874199742007420174202742037420474205742067420774208742097421074211742127421374214742157421674217742187421974220742217422274223742247422574226742277422874229742307423174232742337423474235742367423774238742397424074241742427424374244742457424674247742487424974250742517425274253742547425574256742577425874259742607426174262742637426474265742667426774268742697427074271742727427374274742757427674277742787427974280742817428274283742847428574286742877428874289742907429174292742937429474295742967429774298742997430074301743027430374304743057430674307743087430974310743117431274313743147431574316743177431874319743207432174322743237432474325743267432774328743297433074331743327433374334743357433674337743387433974340743417434274343743447434574346743477434874349743507435174352743537435474355743567435774358743597436074361743627436374364743657436674367743687436974370743717437274373743747437574376743777437874379743807438174382743837438474385743867438774388743897439074391743927439374394743957439674397743987439974400744017440274403744047440574406744077440874409744107441174412744137441474415744167441774418744197442074421744227442374424744257442674427744287442974430744317443274433744347443574436744377443874439744407444174442744437444474445744467444774448744497445074451744527445374454744557445674457744587445974460744617446274463744647446574466744677446874469744707447174472744737447474475744767447774478744797448074481744827448374484744857448674487744887448974490744917449274493744947449574496744977449874499745007450174502745037450474505745067450774508745097451074511745127451374514745157451674517745187451974520745217452274523745247452574526745277452874529745307453174532745337453474535745367453774538745397454074541745427454374544745457454674547745487454974550745517455274553745547455574556745577455874559745607456174562745637456474565745667456774568745697457074571745727457374574745757457674577745787457974580745817458274583745847458574586745877458874589745907459174592745937459474595745967459774598745997460074601746027460374604746057460674607746087460974610746117461274613746147461574616746177461874619746207462174622746237462474625746267462774628746297463074631746327463374634746357463674637746387463974640746417464274643746447464574646746477464874649746507465174652746537465474655746567465774658746597466074661746627466374664746657466674667746687466974670746717467274673746747467574676746777467874679746807468174682746837468474685746867468774688746897469074691746927469374694746957469674697746987469974700747017470274703747047470574706747077470874709747107471174712747137471474715747167471774718747197472074721747227472374724747257472674727747287472974730747317473274733747347473574736747377473874739747407474174742747437474474745747467474774748747497475074751747527475374754747557475674757747587475974760747617476274763747647476574766747677476874769747707477174772747737477474775747767477774778747797478074781747827478374784747857478674787747887478974790747917479274793747947479574796747977479874799748007480174802748037480474805748067480774808748097481074811748127481374814748157481674817748187481974820748217482274823748247482574826748277482874829748307483174832748337483474835748367483774838748397484074841748427484374844748457484674847748487484974850748517485274853748547485574856748577485874859748607486174862748637486474865748667486774868748697487074871748727487374874748757487674877748787487974880748817488274883748847488574886748877488874889748907489174892748937489474895748967489774898748997490074901749027490374904749057490674907749087490974910749117491274913749147491574916749177491874919749207492174922749237492474925749267492774928749297493074931749327493374934749357493674937749387493974940749417494274943749447494574946749477494874949749507495174952749537495474955749567495774958749597496074961749627496374964749657496674967749687496974970749717497274973749747497574976749777497874979749807498174982749837498474985749867498774988749897499074991749927499374994749957499674997749987499975000750017500275003750047500575006750077500875009750107501175012750137501475015750167501775018750197502075021750227502375024750257502675027750287502975030750317503275033750347503575036750377503875039750407504175042750437504475045750467504775048750497505075051750527505375054750557505675057750587505975060750617506275063750647506575066750677506875069750707507175072750737507475075750767507775078750797508075081750827508375084750857508675087750887508975090750917509275093750947509575096750977509875099751007510175102751037510475105751067510775108751097511075111751127511375114751157511675117751187511975120751217512275123751247512575126751277512875129751307513175132751337513475135751367513775138751397514075141751427514375144751457514675147751487514975150751517515275153751547515575156751577515875159751607516175162751637516475165751667516775168751697517075171751727517375174751757517675177751787517975180751817518275183751847518575186751877518875189751907519175192751937519475195751967519775198751997520075201752027520375204752057520675207752087520975210752117521275213752147521575216752177521875219752207522175222752237522475225752267522775228752297523075231752327523375234752357523675237752387523975240752417524275243752447524575246752477524875249752507525175252752537525475255752567525775258752597526075261752627526375264752657526675267752687526975270752717527275273752747527575276752777527875279752807528175282752837528475285752867528775288752897529075291752927529375294752957529675297752987529975300753017530275303753047530575306753077530875309753107531175312753137531475315753167531775318753197532075321753227532375324753257532675327753287532975330753317533275333753347533575336753377533875339753407534175342753437534475345753467534775348753497535075351753527535375354753557535675357753587535975360753617536275363753647536575366753677536875369753707537175372753737537475375753767537775378753797538075381753827538375384753857538675387753887538975390753917539275393753947539575396753977539875399754007540175402754037540475405754067540775408754097541075411754127541375414754157541675417754187541975420754217542275423754247542575426754277542875429754307543175432754337543475435754367543775438754397544075441754427544375444754457544675447754487544975450754517545275453754547545575456754577545875459754607546175462754637546475465754667546775468754697547075471754727547375474754757547675477754787547975480754817548275483754847548575486754877548875489754907549175492754937549475495754967549775498754997550075501755027550375504755057550675507755087550975510755117551275513755147551575516755177551875519755207552175522755237552475525755267552775528755297553075531755327553375534755357553675537755387553975540755417554275543755447554575546755477554875549755507555175552755537555475555755567555775558755597556075561755627556375564755657556675567755687556975570755717557275573755747557575576755777557875579755807558175582755837558475585755867558775588755897559075591755927559375594755957559675597755987559975600756017560275603756047560575606756077560875609756107561175612756137561475615756167561775618756197562075621756227562375624756257562675627756287562975630756317563275633756347563575636756377563875639756407564175642756437564475645756467564775648756497565075651756527565375654756557565675657756587565975660756617566275663756647566575666756677566875669756707567175672756737567475675756767567775678756797568075681756827568375684756857568675687756887568975690756917569275693756947569575696756977569875699757007570175702757037570475705757067570775708757097571075711757127571375714757157571675717757187571975720757217572275723757247572575726757277572875729757307573175732757337573475735757367573775738757397574075741757427574375744757457574675747757487574975750757517575275753757547575575756757577575875759757607576175762757637576475765757667576775768757697577075771757727577375774757757577675777757787577975780757817578275783757847578575786757877578875789757907579175792757937579475795757967579775798757997580075801758027580375804758057580675807758087580975810758117581275813758147581575816758177581875819758207582175822758237582475825758267582775828758297583075831758327583375834758357583675837758387583975840758417584275843758447584575846758477584875849758507585175852758537585475855758567585775858758597586075861758627586375864758657586675867758687586975870758717587275873758747587575876758777587875879758807588175882758837588475885758867588775888758897589075891758927589375894758957589675897758987589975900759017590275903759047590575906759077590875909759107591175912759137591475915759167591775918759197592075921759227592375924759257592675927759287592975930759317593275933759347593575936759377593875939759407594175942759437594475945759467594775948759497595075951759527595375954759557595675957759587595975960759617596275963759647596575966759677596875969759707597175972759737597475975759767597775978759797598075981759827598375984759857598675987759887598975990759917599275993759947599575996759977599875999760007600176002760037600476005760067600776008760097601076011760127601376014760157601676017760187601976020760217602276023760247602576026760277602876029760307603176032760337603476035760367603776038760397604076041760427604376044760457604676047760487604976050760517605276053760547605576056760577605876059760607606176062760637606476065760667606776068760697607076071760727607376074760757607676077760787607976080760817608276083760847608576086760877608876089760907609176092760937609476095760967609776098760997610076101761027610376104761057610676107761087610976110761117611276113761147611576116761177611876119761207612176122761237612476125761267612776128761297613076131761327613376134761357613676137761387613976140761417614276143761447614576146761477614876149761507615176152761537615476155761567615776158761597616076161761627616376164761657616676167761687616976170761717617276173761747617576176761777617876179761807618176182761837618476185761867618776188761897619076191761927619376194761957619676197761987619976200762017620276203762047620576206762077620876209762107621176212762137621476215762167621776218762197622076221762227622376224762257622676227762287622976230762317623276233762347623576236762377623876239762407624176242762437624476245762467624776248762497625076251762527625376254762557625676257762587625976260762617626276263762647626576266762677626876269762707627176272762737627476275762767627776278762797628076281762827628376284762857628676287762887628976290762917629276293762947629576296762977629876299763007630176302763037630476305763067630776308763097631076311763127631376314763157631676317763187631976320763217632276323763247632576326763277632876329763307633176332763337633476335763367633776338763397634076341763427634376344763457634676347763487634976350763517635276353763547635576356763577635876359763607636176362763637636476365763667636776368763697637076371763727637376374763757637676377763787637976380763817638276383763847638576386763877638876389763907639176392763937639476395763967639776398763997640076401764027640376404764057640676407764087640976410764117641276413764147641576416764177641876419764207642176422764237642476425764267642776428764297643076431764327643376434764357643676437764387643976440764417644276443764447644576446764477644876449764507645176452764537645476455764567645776458764597646076461764627646376464764657646676467764687646976470764717647276473764747647576476764777647876479764807648176482764837648476485764867648776488764897649076491764927649376494764957649676497764987649976500765017650276503765047650576506765077650876509765107651176512765137651476515765167651776518765197652076521765227652376524765257652676527765287652976530765317653276533765347653576536765377653876539765407654176542765437654476545765467654776548765497655076551765527655376554765557655676557765587655976560765617656276563765647656576566765677656876569765707657176572765737657476575765767657776578765797658076581765827658376584765857658676587765887658976590765917659276593765947659576596765977659876599766007660176602766037660476605766067660776608766097661076611766127661376614766157661676617766187661976620766217662276623766247662576626766277662876629766307663176632766337663476635766367663776638766397664076641766427664376644766457664676647766487664976650766517665276653766547665576656766577665876659766607666176662766637666476665766667666776668766697667076671766727667376674766757667676677766787667976680766817668276683766847668576686766877668876689766907669176692766937669476695766967669776698766997670076701767027670376704767057670676707767087670976710767117671276713767147671576716767177671876719767207672176722767237672476725767267672776728767297673076731767327673376734767357673676737767387673976740767417674276743767447674576746767477674876749767507675176752767537675476755767567675776758767597676076761767627676376764767657676676767767687676976770767717677276773767747677576776767777677876779767807678176782767837678476785767867678776788767897679076791767927679376794767957679676797767987679976800768017680276803768047680576806768077680876809768107681176812768137681476815768167681776818768197682076821768227682376824768257682676827768287682976830768317683276833768347683576836768377683876839768407684176842768437684476845768467684776848768497685076851768527685376854768557685676857768587685976860768617686276863768647686576866768677686876869768707687176872768737687476875768767687776878768797688076881768827688376884768857688676887768887688976890768917689276893768947689576896768977689876899769007690176902769037690476905769067690776908769097691076911769127691376914769157691676917769187691976920769217692276923769247692576926769277692876929769307693176932769337693476935769367693776938769397694076941769427694376944769457694676947769487694976950769517695276953769547695576956769577695876959769607696176962769637696476965769667696776968769697697076971769727697376974769757697676977769787697976980769817698276983769847698576986769877698876989769907699176992769937699476995769967699776998769997700077001770027700377004770057700677007770087700977010770117701277013770147701577016770177701877019770207702177022770237702477025770267702777028770297703077031770327703377034770357703677037770387703977040770417704277043770447704577046770477704877049770507705177052770537705477055770567705777058770597706077061770627706377064770657706677067770687706977070770717707277073770747707577076770777707877079770807708177082770837708477085770867708777088770897709077091770927709377094770957709677097770987709977100771017710277103771047710577106771077710877109771107711177112771137711477115771167711777118771197712077121771227712377124771257712677127771287712977130771317713277133771347713577136771377713877139771407714177142771437714477145771467714777148771497715077151771527715377154771557715677157771587715977160771617716277163771647716577166771677716877169771707717177172771737717477175771767717777178771797718077181771827718377184771857718677187771887718977190771917719277193771947719577196771977719877199772007720177202772037720477205772067720777208772097721077211772127721377214772157721677217772187721977220772217722277223772247722577226772277722877229772307723177232772337723477235772367723777238772397724077241772427724377244772457724677247772487724977250772517725277253772547725577256772577725877259772607726177262772637726477265772667726777268772697727077271772727727377274772757727677277772787727977280772817728277283772847728577286772877728877289772907729177292772937729477295772967729777298772997730077301773027730377304773057730677307773087730977310773117731277313773147731577316773177731877319773207732177322773237732477325773267732777328773297733077331773327733377334773357733677337773387733977340773417734277343773447734577346773477734877349773507735177352773537735477355773567735777358773597736077361773627736377364773657736677367773687736977370773717737277373773747737577376773777737877379773807738177382773837738477385773867738777388773897739077391773927739377394773957739677397773987739977400774017740277403774047740577406774077740877409774107741177412774137741477415774167741777418774197742077421774227742377424774257742677427774287742977430774317743277433774347743577436774377743877439774407744177442774437744477445774467744777448774497745077451774527745377454774557745677457774587745977460774617746277463774647746577466774677746877469774707747177472774737747477475774767747777478774797748077481774827748377484774857748677487774887748977490774917749277493774947749577496774977749877499775007750177502775037750477505775067750777508775097751077511775127751377514775157751677517775187751977520775217752277523775247752577526775277752877529775307753177532775337753477535775367753777538775397754077541775427754377544775457754677547775487754977550775517755277553775547755577556775577755877559775607756177562775637756477565775667756777568775697757077571775727757377574775757757677577775787757977580775817758277583775847758577586775877758877589775907759177592775937759477595775967759777598775997760077601776027760377604776057760677607776087760977610776117761277613776147761577616776177761877619776207762177622776237762477625776267762777628776297763077631776327763377634776357763677637776387763977640776417764277643776447764577646776477764877649776507765177652776537765477655776567765777658776597766077661776627766377664776657766677667776687766977670776717767277673776747767577676776777767877679776807768177682776837768477685776867768777688776897769077691776927769377694776957769677697776987769977700777017770277703777047770577706777077770877709777107771177712777137771477715777167771777718777197772077721777227772377724777257772677727777287772977730777317773277733777347773577736777377773877739777407774177742777437774477745777467774777748777497775077751777527775377754777557775677757777587775977760777617776277763777647776577766777677776877769777707777177772777737777477775777767777777778777797778077781777827778377784777857778677787777887778977790777917779277793777947779577796777977779877799778007780177802778037780477805778067780777808778097781077811778127781377814778157781677817778187781977820778217782277823778247782577826778277782877829778307783177832778337783477835778367783777838778397784077841778427784377844778457784677847778487784977850778517785277853778547785577856778577785877859778607786177862778637786477865778667786777868778697787077871778727787377874778757787677877778787787977880778817788277883778847788577886778877788877889778907789177892778937789477895778967789777898778997790077901779027790377904779057790677907779087790977910779117791277913779147791577916779177791877919779207792177922779237792477925779267792777928779297793077931779327793377934779357793677937779387793977940779417794277943779447794577946779477794877949779507795177952779537795477955779567795777958779597796077961779627796377964779657796677967779687796977970779717797277973779747797577976779777797877979779807798177982779837798477985779867798777988779897799077991779927799377994779957799677997779987799978000780017800278003780047800578006780077800878009780107801178012780137801478015780167801778018780197802078021780227802378024780257802678027780287802978030780317803278033780347803578036780377803878039780407804178042780437804478045780467804778048780497805078051780527805378054780557805678057780587805978060780617806278063780647806578066780677806878069780707807178072780737807478075780767807778078780797808078081780827808378084780857808678087780887808978090780917809278093780947809578096780977809878099781007810178102781037810478105781067810778108781097811078111781127811378114781157811678117781187811978120781217812278123781247812578126781277812878129781307813178132781337813478135781367813778138781397814078141781427814378144781457814678147781487814978150781517815278153781547815578156781577815878159781607816178162781637816478165781667816778168781697817078171781727817378174781757817678177781787817978180781817818278183781847818578186781877818878189781907819178192781937819478195781967819778198781997820078201782027820378204782057820678207782087820978210782117821278213782147821578216782177821878219782207822178222782237822478225782267822778228782297823078231782327823378234782357823678237782387823978240782417824278243782447824578246782477824878249782507825178252782537825478255782567825778258782597826078261782627826378264782657826678267782687826978270782717827278273782747827578276782777827878279782807828178282782837828478285782867828778288782897829078291782927829378294782957829678297782987829978300783017830278303783047830578306783077830878309783107831178312783137831478315783167831778318783197832078321783227832378324783257832678327783287832978330783317833278333783347833578336783377833878339783407834178342783437834478345783467834778348783497835078351783527835378354783557835678357783587835978360783617836278363783647836578366783677836878369783707837178372783737837478375783767837778378783797838078381783827838378384783857838678387783887838978390783917839278393783947839578396783977839878399784007840178402784037840478405784067840778408784097841078411784127841378414784157841678417784187841978420784217842278423784247842578426784277842878429784307843178432784337843478435784367843778438784397844078441784427844378444784457844678447784487844978450784517845278453784547845578456784577845878459784607846178462784637846478465784667846778468784697847078471784727847378474784757847678477784787847978480784817848278483784847848578486784877848878489784907849178492784937849478495784967849778498784997850078501785027850378504785057850678507785087850978510785117851278513785147851578516785177851878519785207852178522785237852478525785267852778528785297853078531785327853378534785357853678537785387853978540785417854278543785447854578546785477854878549785507855178552785537855478555785567855778558785597856078561785627856378564785657856678567785687856978570785717857278573785747857578576785777857878579785807858178582785837858478585785867858778588785897859078591785927859378594785957859678597785987859978600786017860278603786047860578606786077860878609786107861178612786137861478615786167861778618786197862078621786227862378624786257862678627786287862978630786317863278633786347863578636786377863878639786407864178642786437864478645786467864778648786497865078651786527865378654786557865678657786587865978660786617866278663786647866578666786677866878669786707867178672786737867478675786767867778678786797868078681786827868378684786857868678687786887868978690786917869278693786947869578696786977869878699787007870178702787037870478705787067870778708787097871078711787127871378714787157871678717787187871978720787217872278723787247872578726787277872878729787307873178732787337873478735787367873778738787397874078741787427874378744787457874678747787487874978750787517875278753787547875578756787577875878759787607876178762787637876478765787667876778768787697877078771787727877378774787757877678777787787877978780787817878278783787847878578786787877878878789787907879178792787937879478795787967879778798787997880078801788027880378804788057880678807788087880978810788117881278813788147881578816788177881878819788207882178822788237882478825788267882778828788297883078831788327883378834788357883678837788387883978840788417884278843788447884578846788477884878849788507885178852788537885478855788567885778858788597886078861788627886378864788657886678867788687886978870788717887278873788747887578876788777887878879788807888178882788837888478885788867888778888788897889078891788927889378894788957889678897788987889978900789017890278903789047890578906789077890878909789107891178912789137891478915789167891778918789197892078921789227892378924789257892678927789287892978930789317893278933789347893578936789377893878939789407894178942789437894478945789467894778948789497895078951789527895378954789557895678957789587895978960789617896278963789647896578966789677896878969789707897178972789737897478975789767897778978789797898078981789827898378984789857898678987789887898978990789917899278993789947899578996789977899878999790007900179002790037900479005790067900779008790097901079011790127901379014790157901679017790187901979020790217902279023790247902579026790277902879029790307903179032790337903479035790367903779038790397904079041790427904379044790457904679047790487904979050790517905279053790547905579056790577905879059790607906179062790637906479065790667906779068790697907079071790727907379074790757907679077790787907979080790817908279083790847908579086790877908879089790907909179092790937909479095790967909779098790997910079101791027910379104791057910679107791087910979110791117911279113791147911579116791177911879119791207912179122791237912479125791267912779128791297913079131791327913379134791357913679137791387913979140791417914279143791447914579146791477914879149791507915179152791537915479155791567915779158791597916079161791627916379164791657916679167791687916979170791717917279173791747917579176791777917879179791807918179182791837918479185791867918779188791897919079191791927919379194791957919679197791987919979200792017920279203792047920579206792077920879209792107921179212792137921479215792167921779218792197922079221792227922379224792257922679227792287922979230792317923279233792347923579236792377923879239792407924179242792437924479245792467924779248792497925079251792527925379254792557925679257792587925979260792617926279263792647926579266792677926879269792707927179272792737927479275792767927779278792797928079281792827928379284792857928679287792887928979290792917929279293792947929579296792977929879299793007930179302793037930479305793067930779308793097931079311793127931379314793157931679317793187931979320793217932279323793247932579326793277932879329793307933179332793337933479335793367933779338793397934079341793427934379344793457934679347793487934979350793517935279353793547935579356793577935879359793607936179362793637936479365793667936779368793697937079371793727937379374793757937679377793787937979380793817938279383793847938579386793877938879389793907939179392793937939479395793967939779398793997940079401794027940379404794057940679407794087940979410794117941279413794147941579416794177941879419794207942179422794237942479425794267942779428794297943079431794327943379434794357943679437794387943979440794417944279443794447944579446794477944879449794507945179452794537945479455794567945779458794597946079461794627946379464794657946679467794687946979470794717947279473794747947579476794777947879479794807948179482794837948479485794867948779488794897949079491794927949379494794957949679497794987949979500795017950279503795047950579506795077950879509795107951179512795137951479515795167951779518795197952079521795227952379524795257952679527795287952979530795317953279533795347953579536795377953879539795407954179542795437954479545795467954779548795497955079551795527955379554795557955679557795587955979560795617956279563795647956579566795677956879569795707957179572795737957479575795767957779578795797958079581795827958379584795857958679587795887958979590795917959279593795947959579596795977959879599796007960179602796037960479605796067960779608796097961079611796127961379614796157961679617796187961979620796217962279623796247962579626796277962879629796307963179632796337963479635796367963779638796397964079641796427964379644796457964679647796487964979650796517965279653796547965579656796577965879659796607966179662796637966479665796667966779668796697967079671796727967379674796757967679677796787967979680796817968279683796847968579686796877968879689796907969179692796937969479695796967969779698796997970079701797027970379704797057970679707797087970979710797117971279713797147971579716797177971879719797207972179722797237972479725797267972779728797297973079731797327973379734797357973679737797387973979740797417974279743797447974579746797477974879749797507975179752797537975479755797567975779758797597976079761797627976379764797657976679767797687976979770797717977279773797747977579776797777977879779797807978179782797837978479785797867978779788797897979079791797927979379794797957979679797797987979979800798017980279803798047980579806798077980879809798107981179812798137981479815798167981779818798197982079821798227982379824798257982679827798287982979830798317983279833798347983579836798377983879839798407984179842798437984479845798467984779848798497985079851798527985379854798557985679857798587985979860798617986279863798647986579866798677986879869798707987179872798737987479875798767987779878798797988079881798827988379884798857988679887798887988979890798917989279893798947989579896798977989879899799007990179902799037990479905799067990779908799097991079911799127991379914799157991679917799187991979920799217992279923799247992579926799277992879929799307993179932799337993479935799367993779938799397994079941799427994379944799457994679947799487994979950799517995279953799547995579956799577995879959799607996179962799637996479965799667996779968799697997079971799727997379974799757997679977799787997979980799817998279983799847998579986799877998879989799907999179992799937999479995799967999779998799998000080001800028000380004800058000680007800088000980010800118001280013800148001580016800178001880019800208002180022800238002480025800268002780028800298003080031800328003380034800358003680037800388003980040800418004280043800448004580046800478004880049800508005180052800538005480055800568005780058800598006080061800628006380064800658006680067800688006980070800718007280073800748007580076800778007880079800808008180082800838008480085800868008780088800898009080091800928009380094800958009680097800988009980100801018010280103801048010580106801078010880109801108011180112801138011480115801168011780118801198012080121801228012380124801258012680127801288012980130801318013280133801348013580136801378013880139801408014180142801438014480145801468014780148801498015080151801528015380154801558015680157801588015980160801618016280163801648016580166801678016880169801708017180172801738017480175801768017780178801798018080181801828018380184801858018680187801888018980190801918019280193801948019580196801978019880199802008020180202802038020480205802068020780208802098021080211802128021380214802158021680217802188021980220802218022280223802248022580226802278022880229802308023180232802338023480235802368023780238802398024080241802428024380244802458024680247802488024980250802518025280253802548025580256802578025880259802608026180262802638026480265802668026780268802698027080271802728027380274802758027680277802788027980280802818028280283802848028580286802878028880289802908029180292802938029480295802968029780298802998030080301803028030380304803058030680307803088030980310803118031280313803148031580316803178031880319803208032180322803238032480325803268032780328803298033080331803328033380334803358033680337803388033980340803418034280343803448034580346803478034880349803508035180352803538035480355803568035780358803598036080361803628036380364803658036680367803688036980370803718037280373803748037580376803778037880379803808038180382803838038480385803868038780388803898039080391803928039380394803958039680397803988039980400804018040280403804048040580406804078040880409804108041180412804138041480415804168041780418804198042080421804228042380424804258042680427804288042980430804318043280433804348043580436804378043880439804408044180442804438044480445804468044780448804498045080451804528045380454804558045680457804588045980460804618046280463804648046580466804678046880469804708047180472804738047480475804768047780478804798048080481804828048380484804858048680487804888048980490804918049280493804948049580496804978049880499805008050180502805038050480505805068050780508805098051080511805128051380514805158051680517805188051980520805218052280523805248052580526805278052880529805308053180532805338053480535805368053780538805398054080541805428054380544805458054680547805488054980550805518055280553805548055580556805578055880559805608056180562805638056480565805668056780568805698057080571805728057380574805758057680577805788057980580805818058280583805848058580586805878058880589805908059180592805938059480595805968059780598805998060080601806028060380604806058060680607806088060980610806118061280613806148061580616806178061880619806208062180622806238062480625806268062780628806298063080631806328063380634806358063680637806388063980640806418064280643806448064580646806478064880649806508065180652806538065480655806568065780658806598066080661806628066380664806658066680667806688066980670806718067280673806748067580676806778067880679806808068180682806838068480685806868068780688806898069080691806928069380694806958069680697806988069980700807018070280703807048070580706807078070880709807108071180712807138071480715807168071780718807198072080721807228072380724807258072680727807288072980730807318073280733807348073580736807378073880739807408074180742807438074480745807468074780748807498075080751807528075380754807558075680757807588075980760807618076280763807648076580766807678076880769807708077180772807738077480775807768077780778807798078080781807828078380784807858078680787807888078980790807918079280793807948079580796807978079880799808008080180802808038080480805808068080780808808098081080811808128081380814808158081680817808188081980820808218082280823808248082580826808278082880829808308083180832808338083480835808368083780838808398084080841808428084380844808458084680847808488084980850808518085280853808548085580856808578085880859808608086180862808638086480865808668086780868808698087080871808728087380874808758087680877808788087980880808818088280883808848088580886808878088880889808908089180892808938089480895808968089780898808998090080901809028090380904809058090680907809088090980910809118091280913809148091580916809178091880919809208092180922809238092480925809268092780928809298093080931809328093380934809358093680937809388093980940809418094280943809448094580946809478094880949809508095180952809538095480955809568095780958809598096080961809628096380964809658096680967809688096980970809718097280973809748097580976809778097880979809808098180982809838098480985809868098780988809898099080991809928099380994809958099680997809988099981000810018100281003810048100581006810078100881009810108101181012810138101481015810168101781018810198102081021810228102381024810258102681027810288102981030810318103281033810348103581036810378103881039810408104181042810438104481045810468104781048810498105081051810528105381054810558105681057810588105981060810618106281063810648106581066810678106881069810708107181072810738107481075810768107781078810798108081081810828108381084810858108681087810888108981090810918109281093810948109581096810978109881099811008110181102811038110481105811068110781108811098111081111811128111381114811158111681117811188111981120811218112281123811248112581126811278112881129811308113181132811338113481135811368113781138811398114081141811428114381144811458114681147811488114981150811518115281153811548115581156811578115881159811608116181162811638116481165811668116781168811698117081171811728117381174811758117681177811788117981180811818118281183811848118581186811878118881189811908119181192811938119481195811968119781198811998120081201812028120381204812058120681207812088120981210812118121281213812148121581216812178121881219812208122181222812238122481225812268122781228812298123081231812328123381234812358123681237812388123981240812418124281243812448124581246812478124881249812508125181252812538125481255812568125781258812598126081261812628126381264812658126681267812688126981270812718127281273812748127581276812778127881279812808128181282812838128481285812868128781288812898129081291812928129381294812958129681297812988129981300813018130281303813048130581306813078130881309813108131181312813138131481315813168131781318813198132081321813228132381324813258132681327813288132981330813318133281333813348133581336813378133881339813408134181342813438134481345813468134781348813498135081351813528135381354813558135681357813588135981360813618136281363813648136581366813678136881369813708137181372813738137481375813768137781378813798138081381813828138381384813858138681387813888138981390813918139281393813948139581396813978139881399814008140181402814038140481405814068140781408814098141081411814128141381414814158141681417814188141981420814218142281423814248142581426814278142881429814308143181432814338143481435814368143781438814398144081441814428144381444814458144681447814488144981450814518145281453814548145581456814578145881459814608146181462814638146481465814668146781468814698147081471814728147381474814758147681477814788147981480814818148281483814848148581486814878148881489814908149181492814938149481495814968149781498814998150081501815028150381504815058150681507815088150981510815118151281513815148151581516815178151881519815208152181522815238152481525815268152781528815298153081531815328153381534815358153681537815388153981540815418154281543815448154581546815478154881549815508155181552815538155481555815568155781558815598156081561815628156381564815658156681567815688156981570815718157281573815748157581576815778157881579815808158181582815838158481585815868158781588815898159081591815928159381594815958159681597815988159981600816018160281603816048160581606816078160881609816108161181612816138161481615816168161781618816198162081621816228162381624816258162681627816288162981630816318163281633816348163581636816378163881639816408164181642816438164481645816468164781648816498165081651816528165381654816558165681657816588165981660816618166281663816648166581666816678166881669816708167181672816738167481675816768167781678816798168081681816828168381684816858168681687816888168981690816918169281693816948169581696816978169881699817008170181702817038170481705817068170781708817098171081711817128171381714817158171681717817188171981720817218172281723817248172581726817278172881729817308173181732817338173481735817368173781738817398174081741817428174381744817458174681747817488174981750817518175281753817548175581756817578175881759817608176181762817638176481765817668176781768817698177081771817728177381774817758177681777817788177981780817818178281783817848178581786817878178881789817908179181792817938179481795817968179781798817998180081801818028180381804818058180681807818088180981810818118181281813818148181581816818178181881819818208182181822818238182481825818268182781828818298183081831818328183381834818358183681837818388183981840818418184281843818448184581846818478184881849818508185181852818538185481855818568185781858818598186081861818628186381864818658186681867818688186981870818718187281873818748187581876818778187881879818808188181882818838188481885818868188781888818898189081891818928189381894818958189681897818988189981900819018190281903819048190581906819078190881909819108191181912819138191481915819168191781918819198192081921819228192381924819258192681927819288192981930819318193281933819348193581936819378193881939819408194181942819438194481945819468194781948819498195081951819528195381954819558195681957819588195981960819618196281963819648196581966819678196881969819708197181972819738197481975819768197781978819798198081981819828198381984819858198681987819888198981990819918199281993819948199581996819978199881999820008200182002820038200482005820068200782008820098201082011820128201382014820158201682017820188201982020820218202282023820248202582026820278202882029820308203182032820338203482035820368203782038820398204082041820428204382044820458204682047820488204982050820518205282053820548205582056820578205882059820608206182062820638206482065820668206782068820698207082071820728207382074820758207682077820788207982080820818208282083820848208582086820878208882089820908209182092820938209482095820968209782098820998210082101821028210382104821058210682107821088210982110821118211282113821148211582116821178211882119821208212182122821238212482125821268212782128821298213082131821328213382134821358213682137821388213982140821418214282143821448214582146821478214882149821508215182152821538215482155821568215782158821598216082161821628216382164821658216682167821688216982170821718217282173821748217582176821778217882179821808218182182821838218482185821868218782188821898219082191821928219382194821958219682197821988219982200822018220282203822048220582206822078220882209822108221182212822138221482215822168221782218822198222082221822228222382224822258222682227822288222982230822318223282233822348223582236822378223882239822408224182242822438224482245822468224782248822498225082251822528225382254822558225682257822588225982260822618226282263822648226582266822678226882269822708227182272822738227482275822768227782278822798228082281822828228382284822858228682287822888228982290822918229282293822948229582296822978229882299823008230182302823038230482305823068230782308823098231082311823128231382314823158231682317823188231982320823218232282323823248232582326823278232882329823308233182332823338233482335823368233782338823398234082341823428234382344823458234682347823488234982350823518235282353823548235582356823578235882359823608236182362823638236482365823668236782368823698237082371823728237382374823758237682377823788237982380823818238282383823848238582386823878238882389823908239182392823938239482395823968239782398823998240082401824028240382404824058240682407824088240982410824118241282413824148241582416824178241882419824208242182422824238242482425824268242782428824298243082431824328243382434824358243682437824388243982440824418244282443824448244582446824478244882449824508245182452824538245482455824568245782458824598246082461824628246382464824658246682467824688246982470824718247282473824748247582476824778247882479824808248182482824838248482485824868248782488824898249082491824928249382494824958249682497824988249982500825018250282503825048250582506825078250882509825108251182512825138251482515825168251782518825198252082521825228252382524825258252682527825288252982530825318253282533825348253582536825378253882539825408254182542825438254482545825468254782548825498255082551825528255382554825558255682557825588255982560825618256282563825648256582566825678256882569825708257182572825738257482575825768257782578825798258082581825828258382584825858258682587825888258982590825918259282593825948259582596825978259882599826008260182602826038260482605826068260782608826098261082611826128261382614826158261682617826188261982620826218262282623826248262582626826278262882629826308263182632826338263482635826368263782638826398264082641826428264382644826458264682647826488264982650826518265282653826548265582656826578265882659826608266182662826638266482665826668266782668826698267082671826728267382674826758267682677826788267982680826818268282683826848268582686826878268882689826908269182692826938269482695826968269782698826998270082701827028270382704827058270682707827088270982710827118271282713827148271582716827178271882719827208272182722827238272482725827268272782728827298273082731827328273382734827358273682737827388273982740827418274282743827448274582746827478274882749827508275182752827538275482755827568275782758827598276082761827628276382764827658276682767827688276982770827718277282773827748277582776827778277882779827808278182782827838278482785827868278782788827898279082791827928279382794827958279682797827988279982800828018280282803828048280582806828078280882809828108281182812828138281482815828168281782818828198282082821828228282382824828258282682827828288282982830828318283282833828348283582836828378283882839828408284182842828438284482845828468284782848828498285082851828528285382854828558285682857828588285982860828618286282863828648286582866828678286882869828708287182872828738287482875828768287782878828798288082881828828288382884828858288682887828888288982890828918289282893828948289582896828978289882899829008290182902829038290482905829068290782908829098291082911829128291382914829158291682917829188291982920829218292282923829248292582926829278292882929829308293182932829338293482935829368293782938829398294082941829428294382944829458294682947829488294982950829518295282953829548295582956829578295882959829608296182962829638296482965829668296782968829698297082971829728297382974829758297682977829788297982980829818298282983829848298582986829878298882989829908299182992829938299482995829968299782998829998300083001830028300383004830058300683007830088300983010830118301283013830148301583016830178301883019830208302183022830238302483025830268302783028830298303083031830328303383034830358303683037830388303983040830418304283043830448304583046830478304883049830508305183052830538305483055830568305783058830598306083061830628306383064830658306683067830688306983070830718307283073830748307583076830778307883079830808308183082830838308483085830868308783088830898309083091830928309383094830958309683097830988309983100831018310283103831048310583106831078310883109831108311183112831138311483115831168311783118831198312083121831228312383124831258312683127831288312983130831318313283133831348313583136831378313883139831408314183142831438314483145831468314783148831498315083151831528315383154831558315683157831588315983160831618316283163831648316583166831678316883169831708317183172831738317483175831768317783178831798318083181831828318383184831858318683187831888318983190831918319283193831948319583196831978319883199832008320183202832038320483205832068320783208832098321083211832128321383214832158321683217832188321983220832218322283223832248322583226832278322883229832308323183232832338323483235832368323783238832398324083241832428324383244832458324683247832488324983250832518325283253832548325583256832578325883259832608326183262832638326483265832668326783268832698327083271832728327383274832758327683277832788327983280832818328283283832848328583286832878328883289832908329183292832938329483295832968329783298832998330083301833028330383304833058330683307833088330983310833118331283313833148331583316833178331883319833208332183322833238332483325833268332783328833298333083331833328333383334833358333683337833388333983340833418334283343833448334583346833478334883349833508335183352833538335483355833568335783358833598336083361833628336383364833658336683367833688336983370833718337283373833748337583376833778337883379833808338183382833838338483385833868338783388833898339083391833928339383394833958339683397833988339983400834018340283403834048340583406834078340883409834108341183412834138341483415834168341783418834198342083421834228342383424834258342683427834288342983430834318343283433834348343583436834378343883439834408344183442834438344483445834468344783448834498345083451834528345383454834558345683457834588345983460834618346283463834648346583466834678346883469834708347183472834738347483475834768347783478834798348083481834828348383484834858348683487834888348983490834918349283493834948349583496834978349883499835008350183502835038350483505835068350783508835098351083511835128351383514835158351683517835188351983520835218352283523835248352583526835278352883529835308353183532835338353483535835368353783538835398354083541835428354383544835458354683547835488354983550835518355283553835548355583556835578355883559835608356183562835638356483565835668356783568835698357083571835728357383574835758357683577835788357983580835818358283583835848358583586835878358883589835908359183592835938359483595835968359783598835998360083601836028360383604836058360683607836088360983610836118361283613836148361583616836178361883619836208362183622836238362483625836268362783628836298363083631836328363383634836358363683637836388363983640836418364283643836448364583646836478364883649836508365183652836538365483655836568365783658836598366083661836628366383664836658366683667836688366983670836718367283673836748367583676836778367883679836808368183682836838368483685836868368783688836898369083691836928369383694836958369683697836988369983700837018370283703837048370583706837078370883709837108371183712837138371483715837168371783718837198372083721837228372383724837258372683727837288372983730837318373283733837348373583736837378373883739837408374183742837438374483745837468374783748837498375083751837528375383754837558375683757837588375983760837618376283763837648376583766837678376883769837708377183772837738377483775837768377783778837798378083781837828378383784837858378683787837888378983790837918379283793837948379583796837978379883799838008380183802838038380483805838068380783808838098381083811838128381383814838158381683817838188381983820838218382283823838248382583826838278382883829838308383183832838338383483835838368383783838838398384083841838428384383844838458384683847838488384983850838518385283853838548385583856838578385883859838608386183862838638386483865838668386783868838698387083871838728387383874838758387683877838788387983880838818388283883838848388583886838878388883889838908389183892838938389483895838968389783898838998390083901839028390383904839058390683907839088390983910839118391283913839148391583916839178391883919839208392183922839238392483925839268392783928839298393083931839328393383934839358393683937839388393983940839418394283943839448394583946839478394883949839508395183952839538395483955839568395783958839598396083961839628396383964839658396683967839688396983970839718397283973839748397583976839778397883979839808398183982839838398483985839868398783988839898399083991839928399383994839958399683997839988399984000840018400284003840048400584006840078400884009840108401184012840138401484015840168401784018840198402084021840228402384024840258402684027840288402984030840318403284033840348403584036840378403884039840408404184042840438404484045840468404784048840498405084051840528405384054840558405684057840588405984060840618406284063840648406584066840678406884069840708407184072840738407484075840768407784078840798408084081840828408384084840858408684087840888408984090840918409284093840948409584096840978409884099841008410184102841038410484105841068410784108841098411084111841128411384114841158411684117841188411984120841218412284123841248412584126841278412884129841308413184132841338413484135841368413784138841398414084141841428414384144841458414684147841488414984150841518415284153841548415584156841578415884159841608416184162841638416484165841668416784168841698417084171841728417384174841758417684177841788417984180841818418284183841848418584186841878418884189841908419184192841938419484195841968419784198841998420084201842028420384204842058420684207842088420984210842118421284213842148421584216842178421884219842208422184222842238422484225842268422784228842298423084231842328423384234842358423684237842388423984240842418424284243842448424584246842478424884249842508425184252842538425484255842568425784258842598426084261842628426384264842658426684267842688426984270842718427284273842748427584276842778427884279842808428184282842838428484285842868428784288842898429084291842928429384294842958429684297842988429984300843018430284303843048430584306843078430884309843108431184312843138431484315843168431784318843198432084321843228432384324843258432684327843288432984330843318433284333843348433584336843378433884339843408434184342843438434484345843468434784348843498435084351843528435384354843558435684357843588435984360843618436284363843648436584366843678436884369843708437184372843738437484375843768437784378843798438084381843828438384384843858438684387843888438984390843918439284393843948439584396843978439884399844008440184402844038440484405844068440784408844098441084411844128441384414844158441684417844188441984420844218442284423844248442584426844278442884429844308443184432844338443484435844368443784438844398444084441844428444384444844458444684447844488444984450844518445284453844548445584456844578445884459844608446184462844638446484465844668446784468844698447084471844728447384474844758447684477844788447984480844818448284483844848448584486844878448884489844908449184492844938449484495844968449784498844998450084501845028450384504845058450684507845088450984510845118451284513845148451584516845178451884519845208452184522845238452484525845268452784528845298453084531845328453384534845358453684537845388453984540845418454284543845448454584546845478454884549845508455184552845538455484555845568455784558845598456084561845628456384564845658456684567845688456984570845718457284573845748457584576845778457884579845808458184582845838458484585845868458784588845898459084591845928459384594845958459684597845988459984600846018460284603846048460584606846078460884609846108461184612846138461484615846168461784618846198462084621846228462384624846258462684627846288462984630846318463284633846348463584636846378463884639846408464184642846438464484645846468464784648846498465084651846528465384654846558465684657846588465984660846618466284663846648466584666846678466884669846708467184672846738467484675846768467784678846798468084681846828468384684846858468684687846888468984690846918469284693846948469584696846978469884699847008470184702847038470484705847068470784708847098471084711847128471384714847158471684717847188471984720847218472284723847248472584726847278472884729847308473184732847338473484735847368473784738847398474084741847428474384744847458474684747847488474984750847518475284753847548475584756847578475884759847608476184762847638476484765847668476784768847698477084771847728477384774847758477684777847788477984780847818478284783847848478584786847878478884789847908479184792847938479484795847968479784798847998480084801848028480384804848058480684807848088480984810848118481284813848148481584816848178481884819848208482184822848238482484825848268482784828848298483084831848328483384834848358483684837848388483984840848418484284843848448484584846848478484884849848508485184852848538485484855848568485784858848598486084861848628486384864848658486684867848688486984870848718487284873848748487584876848778487884879848808488184882848838488484885848868488784888848898489084891848928489384894848958489684897848988489984900849018490284903849048490584906849078490884909849108491184912849138491484915849168491784918849198492084921849228492384924849258492684927849288492984930849318493284933849348493584936849378493884939849408494184942849438494484945849468494784948849498495084951849528495384954849558495684957849588495984960849618496284963849648496584966849678496884969849708497184972849738497484975849768497784978849798498084981849828498384984849858498684987849888498984990849918499284993849948499584996849978499884999850008500185002850038500485005850068500785008850098501085011850128501385014850158501685017850188501985020850218502285023850248502585026850278502885029850308503185032850338503485035850368503785038850398504085041850428504385044850458504685047850488504985050850518505285053850548505585056850578505885059850608506185062850638506485065850668506785068850698507085071850728507385074850758507685077850788507985080850818508285083850848508585086850878508885089850908509185092850938509485095850968509785098850998510085101851028510385104851058510685107851088510985110851118511285113851148511585116851178511885119851208512185122851238512485125851268512785128851298513085131851328513385134851358513685137851388513985140851418514285143851448514585146851478514885149851508515185152851538515485155851568515785158851598516085161851628516385164851658516685167851688516985170851718517285173851748517585176851778517885179851808518185182851838518485185851868518785188851898519085191851928519385194851958519685197851988519985200852018520285203852048520585206852078520885209852108521185212852138521485215852168521785218852198522085221852228522385224852258522685227852288522985230852318523285233852348523585236852378523885239852408524185242852438524485245852468524785248852498525085251852528525385254852558525685257852588525985260852618526285263852648526585266852678526885269852708527185272852738527485275852768527785278852798528085281852828528385284852858528685287852888528985290852918529285293852948529585296852978529885299853008530185302853038530485305853068530785308853098531085311853128531385314853158531685317853188531985320853218532285323853248532585326853278532885329853308533185332853338533485335853368533785338853398534085341853428534385344853458534685347853488534985350853518535285353853548535585356853578535885359853608536185362853638536485365853668536785368853698537085371853728537385374853758537685377853788537985380853818538285383853848538585386853878538885389853908539185392853938539485395853968539785398853998540085401854028540385404854058540685407854088540985410854118541285413854148541585416854178541885419854208542185422854238542485425854268542785428854298543085431854328543385434854358543685437854388543985440854418544285443854448544585446854478544885449854508545185452854538545485455854568545785458854598546085461854628546385464854658546685467854688546985470854718547285473854748547585476854778547885479854808548185482854838548485485854868548785488854898549085491854928549385494854958549685497854988549985500855018550285503855048550585506855078550885509855108551185512855138551485515855168551785518855198552085521855228552385524855258552685527855288552985530855318553285533855348553585536855378553885539855408554185542855438554485545855468554785548855498555085551855528555385554855558555685557855588555985560855618556285563855648556585566855678556885569855708557185572855738557485575855768557785578855798558085581855828558385584855858558685587855888558985590855918559285593855948559585596855978559885599856008560185602856038560485605856068560785608856098561085611856128561385614856158561685617856188561985620856218562285623856248562585626856278562885629856308563185632856338563485635856368563785638856398564085641856428564385644856458564685647856488564985650856518565285653856548565585656856578565885659856608566185662856638566485665856668566785668856698567085671856728567385674856758567685677856788567985680856818568285683856848568585686856878568885689856908569185692856938569485695856968569785698856998570085701857028570385704857058570685707857088570985710857118571285713857148571585716857178571885719857208572185722857238572485725857268572785728857298573085731857328573385734857358573685737857388573985740857418574285743857448574585746857478574885749857508575185752857538575485755857568575785758857598576085761857628576385764857658576685767857688576985770857718577285773857748577585776857778577885779857808578185782857838578485785857868578785788857898579085791857928579385794857958579685797857988579985800858018580285803858048580585806858078580885809858108581185812858138581485815858168581785818858198582085821858228582385824858258582685827858288582985830858318583285833858348583585836858378583885839858408584185842858438584485845858468584785848858498585085851858528585385854858558585685857858588585985860858618586285863858648586585866858678586885869858708587185872858738587485875858768587785878858798588085881858828588385884858858588685887858888588985890858918589285893858948589585896858978589885899859008590185902859038590485905859068590785908859098591085911859128591385914859158591685917859188591985920859218592285923859248592585926859278592885929859308593185932859338593485935859368593785938859398594085941859428594385944859458594685947859488594985950859518595285953859548595585956859578595885959859608596185962859638596485965859668596785968859698597085971859728597385974859758597685977859788597985980859818598285983859848598585986859878598885989859908599185992859938599485995859968599785998859998600086001860028600386004860058600686007860088600986010860118601286013860148601586016860178601886019860208602186022860238602486025860268602786028860298603086031860328603386034860358603686037860388603986040860418604286043860448604586046860478604886049860508605186052860538605486055860568605786058860598606086061860628606386064860658606686067860688606986070860718607286073860748607586076860778607886079860808608186082860838608486085860868608786088860898609086091860928609386094860958609686097860988609986100861018610286103861048610586106861078610886109861108611186112861138611486115861168611786118861198612086121861228612386124861258612686127861288612986130861318613286133861348613586136861378613886139861408614186142861438614486145861468614786148861498615086151861528615386154861558615686157861588615986160861618616286163861648616586166861678616886169861708617186172861738617486175861768617786178861798618086181861828618386184861858618686187861888618986190861918619286193861948619586196861978619886199862008620186202862038620486205862068620786208862098621086211862128621386214862158621686217862188621986220862218622286223862248622586226862278622886229862308623186232862338623486235862368623786238862398624086241862428624386244862458624686247862488624986250862518625286253862548625586256862578625886259862608626186262862638626486265862668626786268862698627086271862728627386274862758627686277862788627986280862818628286283862848628586286862878628886289862908629186292862938629486295862968629786298862998630086301863028630386304863058630686307863088630986310863118631286313863148631586316863178631886319863208632186322863238632486325863268632786328863298633086331863328633386334863358633686337863388633986340863418634286343863448634586346863478634886349863508635186352863538635486355863568635786358863598636086361863628636386364863658636686367863688636986370863718637286373863748637586376863778637886379863808638186382863838638486385863868638786388863898639086391863928639386394863958639686397863988639986400864018640286403864048640586406864078640886409864108641186412864138641486415864168641786418864198642086421864228642386424864258642686427864288642986430864318643286433864348643586436864378643886439864408644186442864438644486445864468644786448864498645086451864528645386454864558645686457864588645986460864618646286463864648646586466864678646886469864708647186472864738647486475864768647786478864798648086481864828648386484864858648686487864888648986490864918649286493864948649586496864978649886499865008650186502865038650486505865068650786508865098651086511865128651386514865158651686517865188651986520865218652286523865248652586526865278652886529865308653186532865338653486535865368653786538865398654086541865428654386544865458654686547865488654986550865518655286553865548655586556865578655886559865608656186562865638656486565865668656786568865698657086571865728657386574865758657686577865788657986580865818658286583865848658586586865878658886589865908659186592865938659486595865968659786598865998660086601866028660386604866058660686607866088660986610866118661286613866148661586616866178661886619866208662186622866238662486625866268662786628866298663086631866328663386634866358663686637866388663986640866418664286643866448664586646866478664886649866508665186652866538665486655866568665786658866598666086661866628666386664866658666686667866688666986670866718667286673866748667586676866778667886679866808668186682866838668486685866868668786688866898669086691866928669386694866958669686697866988669986700867018670286703867048670586706867078670886709867108671186712867138671486715867168671786718867198672086721867228672386724867258672686727867288672986730867318673286733867348673586736867378673886739867408674186742867438674486745867468674786748867498675086751867528675386754867558675686757867588675986760867618676286763867648676586766867678676886769867708677186772867738677486775867768677786778867798678086781867828678386784867858678686787867888678986790867918679286793867948679586796867978679886799868008680186802868038680486805868068680786808868098681086811868128681386814868158681686817868188681986820868218682286823868248682586826868278682886829868308683186832868338683486835868368683786838868398684086841868428684386844868458684686847868488684986850868518685286853868548685586856868578685886859868608686186862868638686486865868668686786868868698687086871868728687386874868758687686877868788687986880868818688286883868848688586886868878688886889868908689186892868938689486895868968689786898868998690086901869028690386904869058690686907869088690986910869118691286913869148691586916869178691886919869208692186922869238692486925869268692786928869298693086931869328693386934869358693686937869388693986940869418694286943869448694586946869478694886949869508695186952869538695486955869568695786958869598696086961869628696386964869658696686967869688696986970869718697286973869748697586976869778697886979869808698186982869838698486985869868698786988869898699086991869928699386994869958699686997869988699987000870018700287003870048700587006870078700887009870108701187012870138701487015870168701787018870198702087021870228702387024870258702687027870288702987030870318703287033870348703587036870378703887039870408704187042870438704487045870468704787048870498705087051870528705387054870558705687057870588705987060870618706287063870648706587066870678706887069870708707187072870738707487075870768707787078870798708087081870828708387084870858708687087870888708987090870918709287093870948709587096870978709887099871008710187102871038710487105871068710787108871098711087111871128711387114871158711687117871188711987120871218712287123871248712587126871278712887129871308713187132871338713487135871368713787138871398714087141871428714387144871458714687147871488714987150871518715287153871548715587156871578715887159871608716187162871638716487165871668716787168871698717087171871728717387174871758717687177871788717987180871818718287183871848718587186871878718887189871908719187192871938719487195871968719787198871998720087201872028720387204872058720687207872088720987210872118721287213872148721587216872178721887219872208722187222872238722487225872268722787228872298723087231872328723387234872358723687237872388723987240872418724287243872448724587246872478724887249872508725187252872538725487255872568725787258872598726087261872628726387264872658726687267872688726987270872718727287273872748727587276872778727887279872808728187282872838728487285872868728787288872898729087291872928729387294872958729687297872988729987300873018730287303873048730587306873078730887309873108731187312873138731487315873168731787318873198732087321873228732387324873258732687327873288732987330873318733287333873348733587336873378733887339873408734187342873438734487345873468734787348873498735087351873528735387354873558735687357873588735987360873618736287363873648736587366873678736887369873708737187372873738737487375873768737787378873798738087381873828738387384873858738687387873888738987390873918739287393873948739587396873978739887399874008740187402874038740487405874068740787408874098741087411874128741387414874158741687417874188741987420874218742287423874248742587426874278742887429874308743187432874338743487435874368743787438874398744087441874428744387444874458744687447874488744987450874518745287453874548745587456874578745887459874608746187462874638746487465874668746787468874698747087471874728747387474874758747687477874788747987480874818748287483874848748587486874878748887489874908749187492874938749487495874968749787498874998750087501875028750387504875058750687507875088750987510875118751287513875148751587516875178751887519875208752187522875238752487525875268752787528875298753087531875328753387534875358753687537875388753987540875418754287543875448754587546875478754887549875508755187552875538755487555875568755787558875598756087561875628756387564875658756687567875688756987570875718757287573875748757587576875778757887579875808758187582875838758487585875868758787588875898759087591875928759387594875958759687597875988759987600876018760287603876048760587606876078760887609876108761187612876138761487615876168761787618876198762087621876228762387624876258762687627876288762987630876318763287633876348763587636876378763887639876408764187642876438764487645876468764787648876498765087651876528765387654876558765687657876588765987660876618766287663876648766587666876678766887669876708767187672876738767487675876768767787678876798768087681876828768387684876858768687687876888768987690876918769287693876948769587696876978769887699877008770187702877038770487705877068770787708877098771087711877128771387714877158771687717877188771987720877218772287723877248772587726877278772887729877308773187732877338773487735877368773787738877398774087741877428774387744877458774687747877488774987750877518775287753877548775587756877578775887759877608776187762877638776487765877668776787768877698777087771877728777387774877758777687777877788777987780877818778287783877848778587786877878778887789877908779187792877938779487795877968779787798877998780087801878028780387804878058780687807878088780987810878118781287813878148781587816878178781887819878208782187822878238782487825878268782787828878298783087831878328783387834878358783687837878388783987840878418784287843878448784587846878478784887849878508785187852878538785487855878568785787858878598786087861878628786387864878658786687867878688786987870878718787287873878748787587876878778787887879878808788187882878838788487885878868788787888878898789087891878928789387894878958789687897878988789987900879018790287903879048790587906879078790887909879108791187912879138791487915879168791787918879198792087921879228792387924879258792687927879288792987930879318793287933879348793587936879378793887939879408794187942879438794487945879468794787948879498795087951879528795387954879558795687957879588795987960879618796287963879648796587966879678796887969879708797187972879738797487975879768797787978879798798087981879828798387984879858798687987879888798987990879918799287993879948799587996879978799887999880008800188002880038800488005880068800788008880098801088011880128801388014880158801688017880188801988020880218802288023880248802588026880278802888029880308803188032880338803488035880368803788038880398804088041880428804388044880458804688047880488804988050880518805288053880548805588056880578805888059880608806188062880638806488065880668806788068880698807088071880728807388074880758807688077880788807988080880818808288083880848808588086880878808888089880908809188092880938809488095880968809788098880998810088101881028810388104881058810688107881088810988110881118811288113881148811588116881178811888119881208812188122881238812488125881268812788128881298813088131881328813388134881358813688137881388813988140881418814288143881448814588146881478814888149881508815188152881538815488155881568815788158881598816088161881628816388164881658816688167881688816988170881718817288173881748817588176881778817888179881808818188182881838818488185881868818788188881898819088191881928819388194881958819688197881988819988200882018820288203882048820588206882078820888209882108821188212882138821488215882168821788218882198822088221882228822388224882258822688227882288822988230882318823288233882348823588236882378823888239882408824188242882438824488245882468824788248882498825088251882528825388254882558825688257882588825988260882618826288263882648826588266882678826888269882708827188272882738827488275882768827788278882798828088281882828828388284882858828688287882888828988290882918829288293882948829588296882978829888299883008830188302883038830488305883068830788308883098831088311883128831388314883158831688317883188831988320883218832288323883248832588326883278832888329883308833188332883338833488335883368833788338883398834088341883428834388344883458834688347883488834988350883518835288353883548835588356883578835888359883608836188362883638836488365883668836788368883698837088371883728837388374883758837688377883788837988380883818838288383883848838588386883878838888389883908839188392883938839488395883968839788398883998840088401884028840388404884058840688407884088840988410884118841288413884148841588416884178841888419884208842188422884238842488425884268842788428884298843088431884328843388434884358843688437884388843988440884418844288443884448844588446884478844888449884508845188452884538845488455884568845788458884598846088461884628846388464884658846688467884688846988470884718847288473884748847588476884778847888479884808848188482884838848488485884868848788488884898849088491884928849388494884958849688497884988849988500885018850288503885048850588506885078850888509885108851188512885138851488515885168851788518885198852088521885228852388524885258852688527885288852988530885318853288533885348853588536885378853888539885408854188542885438854488545885468854788548885498855088551885528855388554885558855688557885588855988560885618856288563885648856588566885678856888569885708857188572885738857488575885768857788578885798858088581885828858388584885858858688587885888858988590885918859288593885948859588596885978859888599886008860188602886038860488605886068860788608886098861088611886128861388614886158861688617886188861988620886218862288623886248862588626886278862888629886308863188632886338863488635886368863788638886398864088641886428864388644886458864688647886488864988650886518865288653886548865588656886578865888659886608866188662886638866488665886668866788668886698867088671886728867388674886758867688677886788867988680886818868288683886848868588686886878868888689886908869188692886938869488695886968869788698886998870088701887028870388704887058870688707887088870988710887118871288713887148871588716887178871888719887208872188722887238872488725887268872788728887298873088731887328873388734887358873688737887388873988740887418874288743887448874588746887478874888749887508875188752887538875488755887568875788758887598876088761887628876388764887658876688767887688876988770887718877288773887748877588776887778877888779887808878188782887838878488785887868878788788887898879088791887928879388794887958879688797887988879988800888018880288803888048880588806888078880888809888108881188812888138881488815888168881788818888198882088821888228882388824888258882688827888288882988830888318883288833888348883588836888378883888839888408884188842888438884488845888468884788848888498885088851888528885388854888558885688857888588885988860888618886288863888648886588866888678886888869888708887188872888738887488875888768887788878888798888088881888828888388884888858888688887888888888988890888918889288893888948889588896888978889888899889008890188902889038890488905889068890788908889098891088911889128891388914889158891688917889188891988920889218892288923889248892588926889278892888929889308893188932889338893488935889368893788938889398894088941889428894388944889458894688947889488894988950889518895288953889548895588956889578895888959889608896188962889638896488965889668896788968889698897088971889728897388974889758897688977889788897988980889818898288983889848898588986889878898888989889908899188992889938899488995889968899788998889998900089001890028900389004890058900689007890088900989010890118901289013890148901589016890178901889019890208902189022890238902489025890268902789028890298903089031890328903389034890358903689037890388903989040890418904289043890448904589046890478904889049890508905189052890538905489055890568905789058890598906089061890628906389064890658906689067890688906989070890718907289073890748907589076890778907889079890808908189082890838908489085890868908789088890898909089091890928909389094890958909689097890988909989100891018910289103891048910589106891078910889109891108911189112891138911489115891168911789118891198912089121891228912389124891258912689127891288912989130891318913289133891348913589136891378913889139891408914189142891438914489145891468914789148891498915089151891528915389154891558915689157891588915989160891618916289163891648916589166891678916889169891708917189172891738917489175891768917789178891798918089181891828918389184891858918689187891888918989190891918919289193891948919589196891978919889199892008920189202892038920489205892068920789208892098921089211892128921389214892158921689217892188921989220892218922289223892248922589226892278922889229892308923189232892338923489235892368923789238892398924089241892428924389244892458924689247892488924989250892518925289253892548925589256892578925889259892608926189262892638926489265892668926789268892698927089271892728927389274892758927689277892788927989280892818928289283892848928589286892878928889289892908929189292892938929489295892968929789298892998930089301893028930389304893058930689307893088930989310893118931289313893148931589316893178931889319893208932189322893238932489325893268932789328893298933089331893328933389334893358933689337893388933989340893418934289343893448934589346893478934889349893508935189352893538935489355893568935789358893598936089361893628936389364893658936689367893688936989370893718937289373893748937589376893778937889379893808938189382893838938489385893868938789388893898939089391893928939389394893958939689397893988939989400894018940289403894048940589406894078940889409894108941189412894138941489415894168941789418894198942089421894228942389424894258942689427894288942989430894318943289433894348943589436894378943889439894408944189442894438944489445894468944789448894498945089451894528945389454894558945689457894588945989460894618946289463894648946589466894678946889469894708947189472894738947489475894768947789478894798948089481894828948389484894858948689487894888948989490894918949289493894948949589496894978949889499895008950189502895038950489505895068950789508895098951089511895128951389514895158951689517895188951989520895218952289523895248952589526895278952889529895308953189532895338953489535895368953789538895398954089541895428954389544895458954689547895488954989550895518955289553895548955589556895578955889559895608956189562895638956489565895668956789568895698957089571895728957389574895758957689577895788957989580895818958289583895848958589586895878958889589895908959189592895938959489595895968959789598895998960089601896028960389604896058960689607896088960989610896118961289613896148961589616896178961889619896208962189622896238962489625896268962789628896298963089631896328963389634896358963689637896388963989640896418964289643896448964589646896478964889649896508965189652896538965489655896568965789658896598966089661896628966389664896658966689667896688966989670896718967289673896748967589676896778967889679896808968189682896838968489685896868968789688896898969089691896928969389694896958969689697896988969989700897018970289703897048970589706897078970889709897108971189712897138971489715897168971789718897198972089721897228972389724897258972689727897288972989730897318973289733897348973589736897378973889739897408974189742897438974489745897468974789748897498975089751897528975389754897558975689757897588975989760897618976289763897648976589766897678976889769897708977189772897738977489775897768977789778897798978089781897828978389784897858978689787897888978989790897918979289793897948979589796897978979889799898008980189802898038980489805898068980789808898098981089811898128981389814898158981689817898188981989820898218982289823898248982589826898278982889829898308983189832898338983489835898368983789838898398984089841898428984389844898458984689847898488984989850898518985289853898548985589856898578985889859898608986189862898638986489865898668986789868898698987089871898728987389874898758987689877898788987989880898818988289883898848988589886898878988889889898908989189892898938989489895898968989789898898998990089901899028990389904899058990689907899088990989910899118991289913899148991589916899178991889919899208992189922899238992489925899268992789928899298993089931899328993389934899358993689937899388993989940899418994289943899448994589946899478994889949899508995189952899538995489955899568995789958899598996089961899628996389964899658996689967899688996989970899718997289973899748997589976899778997889979899808998189982899838998489985899868998789988899898999089991899928999389994899958999689997899988999990000900019000290003900049000590006900079000890009900109001190012900139001490015900169001790018900199002090021900229002390024900259002690027900289002990030900319003290033900349003590036900379003890039900409004190042900439004490045900469004790048900499005090051900529005390054900559005690057900589005990060900619006290063900649006590066900679006890069900709007190072900739007490075900769007790078900799008090081900829008390084900859008690087900889008990090900919009290093900949009590096900979009890099901009010190102901039010490105901069010790108901099011090111901129011390114901159011690117901189011990120901219012290123901249012590126901279012890129901309013190132901339013490135901369013790138901399014090141901429014390144901459014690147901489014990150901519015290153901549015590156901579015890159901609016190162901639016490165901669016790168901699017090171901729017390174901759017690177901789017990180901819018290183901849018590186901879018890189901909019190192901939019490195901969019790198901999020090201902029020390204902059020690207902089020990210902119021290213902149021590216902179021890219902209022190222902239022490225902269022790228902299023090231902329023390234902359023690237902389023990240902419024290243902449024590246902479024890249902509025190252902539025490255902569025790258902599026090261902629026390264902659026690267902689026990270902719027290273902749027590276902779027890279902809028190282902839028490285902869028790288902899029090291902929029390294902959029690297902989029990300903019030290303903049030590306903079030890309903109031190312903139031490315903169031790318903199032090321903229032390324903259032690327903289032990330903319033290333903349033590336903379033890339903409034190342903439034490345903469034790348903499035090351903529035390354903559035690357903589035990360903619036290363903649036590366903679036890369903709037190372903739037490375903769037790378903799038090381903829038390384903859038690387903889038990390903919039290393903949039590396903979039890399904009040190402904039040490405904069040790408904099041090411904129041390414904159041690417904189041990420904219042290423904249042590426904279042890429904309043190432904339043490435904369043790438904399044090441904429044390444904459044690447904489044990450904519045290453904549045590456904579045890459904609046190462904639046490465904669046790468904699047090471904729047390474904759047690477904789047990480904819048290483904849048590486904879048890489904909049190492904939049490495904969049790498904999050090501905029050390504905059050690507905089050990510905119051290513905149051590516905179051890519905209052190522905239052490525905269052790528905299053090531905329053390534905359053690537905389053990540905419054290543905449054590546905479054890549905509055190552905539055490555905569055790558905599056090561905629056390564905659056690567905689056990570905719057290573905749057590576905779057890579905809058190582905839058490585905869058790588905899059090591905929059390594905959059690597905989059990600906019060290603906049060590606906079060890609906109061190612906139061490615906169061790618906199062090621906229062390624906259062690627906289062990630906319063290633906349063590636906379063890639906409064190642906439064490645906469064790648906499065090651906529065390654906559065690657906589065990660906619066290663906649066590666906679066890669906709067190672906739067490675906769067790678906799068090681906829068390684906859068690687906889068990690906919069290693906949069590696906979069890699907009070190702907039070490705907069070790708907099071090711907129071390714907159071690717907189071990720907219072290723907249072590726907279072890729907309073190732907339073490735907369073790738907399074090741907429074390744907459074690747907489074990750907519075290753907549075590756907579075890759907609076190762907639076490765907669076790768907699077090771907729077390774907759077690777907789077990780907819078290783907849078590786907879078890789907909079190792907939079490795907969079790798907999080090801908029080390804908059080690807908089080990810908119081290813908149081590816908179081890819908209082190822908239082490825908269082790828908299083090831908329083390834908359083690837908389083990840908419084290843908449084590846908479084890849908509085190852908539085490855908569085790858908599086090861908629086390864908659086690867908689086990870908719087290873908749087590876908779087890879908809088190882908839088490885908869088790888908899089090891908929089390894908959089690897908989089990900909019090290903909049090590906909079090890909909109091190912909139091490915909169091790918909199092090921909229092390924909259092690927909289092990930909319093290933909349093590936909379093890939909409094190942909439094490945909469094790948909499095090951909529095390954909559095690957909589095990960909619096290963909649096590966909679096890969909709097190972909739097490975909769097790978909799098090981909829098390984909859098690987909889098990990909919099290993909949099590996909979099890999910009100191002910039100491005910069100791008910099101091011910129101391014910159101691017910189101991020910219102291023910249102591026910279102891029910309103191032910339103491035910369103791038910399104091041910429104391044910459104691047910489104991050910519105291053910549105591056910579105891059910609106191062910639106491065910669106791068910699107091071910729107391074910759107691077910789107991080910819108291083910849108591086910879108891089910909109191092910939109491095910969109791098910999110091101911029110391104911059110691107911089110991110911119111291113911149111591116911179111891119911209112191122911239112491125911269112791128911299113091131911329113391134911359113691137911389113991140911419114291143911449114591146911479114891149911509115191152911539115491155911569115791158911599116091161911629116391164911659116691167911689116991170911719117291173911749117591176911779117891179911809118191182911839118491185911869118791188911899119091191911929119391194911959119691197911989119991200912019120291203912049120591206912079120891209912109121191212912139121491215912169121791218912199122091221912229122391224912259122691227912289122991230912319123291233912349123591236912379123891239912409124191242912439124491245912469124791248912499125091251912529125391254912559125691257912589125991260912619126291263912649126591266912679126891269912709127191272912739127491275912769127791278912799128091281912829128391284912859128691287912889128991290912919129291293912949129591296912979129891299913009130191302913039130491305913069130791308913099131091311913129131391314913159131691317913189131991320913219132291323913249132591326913279132891329913309133191332913339133491335913369133791338913399134091341913429134391344913459134691347913489134991350913519135291353913549135591356913579135891359913609136191362913639136491365913669136791368913699137091371913729137391374913759137691377913789137991380913819138291383913849138591386913879138891389913909139191392913939139491395913969139791398913999140091401914029140391404914059140691407914089140991410914119141291413914149141591416914179141891419914209142191422914239142491425914269142791428914299143091431914329143391434914359143691437914389143991440914419144291443914449144591446914479144891449914509145191452914539145491455914569145791458914599146091461914629146391464914659146691467914689146991470914719147291473914749147591476914779147891479914809148191482914839148491485914869148791488914899149091491914929149391494914959149691497914989149991500915019150291503915049150591506915079150891509915109151191512915139151491515915169151791518915199152091521915229152391524915259152691527915289152991530915319153291533915349153591536915379153891539915409154191542915439154491545915469154791548915499155091551915529155391554915559155691557915589155991560915619156291563915649156591566915679156891569915709157191572915739157491575915769157791578915799158091581915829158391584915859158691587915889158991590915919159291593915949159591596915979159891599916009160191602916039160491605916069160791608916099161091611916129161391614916159161691617916189161991620916219162291623916249162591626916279162891629916309163191632916339163491635916369163791638916399164091641916429164391644916459164691647916489164991650916519165291653916549165591656916579165891659916609166191662916639166491665916669166791668916699167091671916729167391674916759167691677916789167991680916819168291683916849168591686916879168891689916909169191692916939169491695916969169791698916999170091701917029170391704917059170691707917089170991710917119171291713917149171591716917179171891719917209172191722917239172491725917269172791728917299173091731917329173391734917359173691737917389173991740917419174291743917449174591746917479174891749917509175191752917539175491755917569175791758917599176091761917629176391764917659176691767917689176991770917719177291773917749177591776917779177891779917809178191782917839178491785917869178791788917899179091791917929179391794917959179691797917989179991800918019180291803918049180591806918079180891809918109181191812918139181491815918169181791818918199182091821918229182391824918259182691827918289182991830918319183291833918349183591836918379183891839918409184191842918439184491845918469184791848918499185091851918529185391854918559185691857918589185991860918619186291863918649186591866918679186891869918709187191872918739187491875918769187791878918799188091881918829188391884918859188691887918889188991890918919189291893918949189591896918979189891899919009190191902919039190491905919069190791908919099191091911919129191391914919159191691917919189191991920919219192291923919249192591926919279192891929919309193191932919339193491935919369193791938919399194091941919429194391944919459194691947919489194991950919519195291953919549195591956919579195891959919609196191962919639196491965919669196791968919699197091971919729197391974919759197691977919789197991980919819198291983919849198591986919879198891989919909199191992919939199491995919969199791998919999200092001920029200392004920059200692007920089200992010920119201292013920149201592016920179201892019920209202192022920239202492025920269202792028920299203092031920329203392034920359203692037920389203992040920419204292043920449204592046920479204892049920509205192052920539205492055920569205792058920599206092061920629206392064920659206692067920689206992070920719207292073920749207592076920779207892079920809208192082920839208492085920869208792088920899209092091920929209392094920959209692097920989209992100921019210292103921049210592106921079210892109921109211192112921139211492115921169211792118921199212092121921229212392124921259212692127921289212992130921319213292133921349213592136921379213892139921409214192142921439214492145921469214792148921499215092151921529215392154921559215692157921589215992160921619216292163921649216592166921679216892169921709217192172921739217492175921769217792178921799218092181921829218392184921859218692187921889218992190921919219292193921949219592196921979219892199922009220192202922039220492205922069220792208922099221092211922129221392214922159221692217922189221992220922219222292223922249222592226922279222892229922309223192232922339223492235922369223792238922399224092241922429224392244922459224692247922489224992250922519225292253922549225592256922579225892259922609226192262922639226492265922669226792268922699227092271922729227392274922759227692277922789227992280922819228292283922849228592286922879228892289922909229192292922939229492295922969229792298922999230092301923029230392304923059230692307923089230992310923119231292313923149231592316923179231892319923209232192322923239232492325923269232792328923299233092331923329233392334923359233692337923389233992340923419234292343923449234592346923479234892349923509235192352923539235492355923569235792358923599236092361923629236392364923659236692367923689236992370923719237292373923749237592376923779237892379923809238192382923839238492385923869238792388923899239092391923929239392394923959239692397923989239992400924019240292403924049240592406924079240892409924109241192412924139241492415924169241792418924199242092421924229242392424924259242692427924289242992430924319243292433924349243592436924379243892439924409244192442924439244492445924469244792448924499245092451924529245392454924559245692457924589245992460924619246292463924649246592466924679246892469924709247192472924739247492475924769247792478924799248092481924829248392484924859248692487924889248992490924919249292493924949249592496924979249892499925009250192502925039250492505925069250792508925099251092511925129251392514925159251692517925189251992520925219252292523925249252592526925279252892529925309253192532925339253492535925369253792538925399254092541925429254392544925459254692547925489254992550925519255292553925549255592556925579255892559925609256192562925639256492565925669256792568925699257092571925729257392574925759257692577925789257992580925819258292583925849258592586925879258892589925909259192592925939259492595925969259792598925999260092601926029260392604926059260692607926089260992610926119261292613926149261592616926179261892619926209262192622926239262492625926269262792628926299263092631926329263392634926359263692637926389263992640926419264292643926449264592646926479264892649926509265192652926539265492655926569265792658926599266092661926629266392664926659266692667926689266992670926719267292673926749267592676926779267892679926809268192682926839268492685926869268792688926899269092691926929269392694926959269692697926989269992700927019270292703927049270592706927079270892709927109271192712927139271492715927169271792718927199272092721927229272392724927259272692727927289272992730927319273292733927349273592736927379273892739927409274192742927439274492745927469274792748927499275092751927529275392754927559275692757927589275992760927619276292763927649276592766927679276892769927709277192772927739277492775927769277792778927799278092781927829278392784927859278692787927889278992790927919279292793927949279592796927979279892799928009280192802928039280492805928069280792808928099281092811928129281392814928159281692817928189281992820928219282292823928249282592826928279282892829928309283192832928339283492835928369283792838928399284092841928429284392844928459284692847928489284992850928519285292853928549285592856928579285892859928609286192862928639286492865928669286792868928699287092871928729287392874928759287692877928789287992880928819288292883928849288592886928879288892889928909289192892928939289492895928969289792898928999290092901929029290392904929059290692907929089290992910929119291292913929149291592916929179291892919929209292192922929239292492925929269292792928929299293092931929329293392934929359293692937929389293992940929419294292943929449294592946929479294892949929509295192952929539295492955929569295792958929599296092961929629296392964929659296692967929689296992970929719297292973929749297592976929779297892979929809298192982929839298492985929869298792988929899299092991929929299392994929959299692997929989299993000930019300293003930049300593006930079300893009930109301193012930139301493015930169301793018930199302093021930229302393024930259302693027930289302993030930319303293033930349303593036930379303893039930409304193042930439304493045930469304793048930499305093051930529305393054930559305693057930589305993060930619306293063930649306593066930679306893069930709307193072930739307493075930769307793078930799308093081930829308393084930859308693087930889308993090930919309293093930949309593096930979309893099931009310193102931039310493105931069310793108931099311093111931129311393114931159311693117931189311993120931219312293123931249312593126931279312893129931309313193132931339313493135931369313793138931399314093141931429314393144931459314693147931489314993150931519315293153931549315593156931579315893159931609316193162931639316493165931669316793168931699317093171931729317393174931759317693177931789317993180931819318293183931849318593186931879318893189931909319193192931939319493195931969319793198931999320093201932029320393204932059320693207932089320993210932119321293213932149321593216932179321893219932209322193222932239322493225932269322793228932299323093231932329323393234932359323693237932389323993240932419324293243932449324593246932479324893249932509325193252932539325493255932569325793258932599326093261932629326393264932659326693267932689326993270932719327293273932749327593276932779327893279932809328193282932839328493285932869328793288932899329093291932929329393294932959329693297932989329993300933019330293303933049330593306933079330893309933109331193312933139331493315933169331793318933199332093321933229332393324933259332693327933289332993330933319333293333933349333593336933379333893339933409334193342933439334493345933469334793348933499335093351933529335393354933559335693357933589335993360933619336293363933649336593366933679336893369933709337193372933739337493375933769337793378933799338093381933829338393384933859338693387933889338993390933919339293393933949339593396933979339893399934009340193402934039340493405934069340793408934099341093411934129341393414934159341693417934189341993420934219342293423934249342593426934279342893429934309343193432934339343493435934369343793438934399344093441934429344393444934459344693447934489344993450934519345293453934549345593456934579345893459934609346193462934639346493465934669346793468934699347093471934729347393474934759347693477934789347993480934819348293483934849348593486934879348893489934909349193492934939349493495934969349793498934999350093501935029350393504935059350693507935089350993510935119351293513935149351593516935179351893519935209352193522935239352493525935269352793528935299353093531935329353393534935359353693537935389353993540935419354293543935449354593546935479354893549935509355193552935539355493555935569355793558935599356093561935629356393564935659356693567935689356993570935719357293573935749357593576935779357893579935809358193582935839358493585935869358793588935899359093591935929359393594935959359693597935989359993600936019360293603936049360593606936079360893609936109361193612936139361493615936169361793618936199362093621936229362393624936259362693627936289362993630936319363293633936349363593636936379363893639936409364193642936439364493645936469364793648936499365093651936529365393654936559365693657936589365993660936619366293663936649366593666936679366893669936709367193672936739367493675936769367793678936799368093681936829368393684936859368693687936889368993690936919369293693936949369593696936979369893699937009370193702937039370493705937069370793708937099371093711937129371393714937159371693717937189371993720937219372293723937249372593726937279372893729937309373193732937339373493735937369373793738937399374093741937429374393744937459374693747937489374993750937519375293753937549375593756937579375893759937609376193762937639376493765937669376793768937699377093771937729377393774937759377693777937789377993780937819378293783937849378593786937879378893789937909379193792937939379493795937969379793798937999380093801938029380393804938059380693807938089380993810938119381293813938149381593816938179381893819938209382193822938239382493825938269382793828938299383093831938329383393834938359383693837938389383993840938419384293843938449384593846938479384893849938509385193852938539385493855938569385793858938599386093861938629386393864938659386693867938689386993870938719387293873938749387593876938779387893879938809388193882938839388493885938869388793888938899389093891938929389393894938959389693897938989389993900939019390293903939049390593906939079390893909939109391193912939139391493915939169391793918939199392093921939229392393924939259392693927939289392993930939319393293933939349393593936939379393893939939409394193942939439394493945939469394793948939499395093951939529395393954939559395693957939589395993960939619396293963939649396593966939679396893969939709397193972939739397493975939769397793978939799398093981939829398393984939859398693987939889398993990939919399293993939949399593996939979399893999940009400194002940039400494005940069400794008940099401094011940129401394014940159401694017940189401994020940219402294023940249402594026940279402894029940309403194032940339403494035940369403794038940399404094041940429404394044940459404694047940489404994050940519405294053940549405594056940579405894059940609406194062940639406494065940669406794068940699407094071940729407394074940759407694077940789407994080940819408294083940849408594086940879408894089940909409194092940939409494095940969409794098940999410094101941029410394104941059410694107941089410994110941119411294113941149411594116941179411894119941209412194122941239412494125941269412794128941299413094131941329413394134941359413694137941389413994140941419414294143941449414594146941479414894149941509415194152941539415494155941569415794158941599416094161941629416394164941659416694167941689416994170941719417294173941749417594176941779417894179941809418194182941839418494185941869418794188941899419094191941929419394194941959419694197941989419994200942019420294203942049420594206942079420894209942109421194212942139421494215942169421794218942199422094221942229422394224942259422694227942289422994230942319423294233942349423594236942379423894239942409424194242942439424494245942469424794248942499425094251942529425394254942559425694257942589425994260942619426294263942649426594266942679426894269942709427194272942739427494275942769427794278942799428094281942829428394284942859428694287942889428994290942919429294293942949429594296942979429894299943009430194302943039430494305943069430794308943099431094311943129431394314943159431694317943189431994320943219432294323943249432594326943279432894329943309433194332943339433494335943369433794338943399434094341943429434394344943459434694347943489434994350943519435294353943549435594356943579435894359943609436194362943639436494365943669436794368943699437094371943729437394374943759437694377943789437994380943819438294383943849438594386943879438894389943909439194392943939439494395943969439794398943999440094401944029440394404944059440694407944089440994410944119441294413944149441594416944179441894419944209442194422944239442494425944269442794428944299443094431944329443394434944359443694437944389443994440944419444294443944449444594446944479444894449944509445194452944539445494455944569445794458944599446094461944629446394464944659446694467944689446994470944719447294473944749447594476944779447894479944809448194482944839448494485944869448794488944899449094491944929449394494944959449694497944989449994500945019450294503945049450594506945079450894509945109451194512945139451494515945169451794518945199452094521945229452394524945259452694527945289452994530945319453294533945349453594536945379453894539945409454194542945439454494545945469454794548945499455094551945529455394554945559455694557945589455994560945619456294563945649456594566945679456894569945709457194572945739457494575945769457794578945799458094581945829458394584945859458694587945889458994590945919459294593945949459594596945979459894599946009460194602946039460494605946069460794608946099461094611946129461394614946159461694617946189461994620946219462294623946249462594626946279462894629946309463194632946339463494635946369463794638946399464094641946429464394644946459464694647946489464994650946519465294653946549465594656946579465894659946609466194662946639466494665946669466794668946699467094671946729467394674946759467694677946789467994680946819468294683946849468594686946879468894689946909469194692946939469494695946969469794698946999470094701947029470394704947059470694707947089470994710947119471294713947149471594716947179471894719947209472194722947239472494725947269472794728947299473094731947329473394734947359473694737947389473994740947419474294743947449474594746947479474894749947509475194752947539475494755947569475794758947599476094761947629476394764947659476694767947689476994770947719477294773947749477594776947779477894779947809478194782947839478494785947869478794788947899479094791947929479394794947959479694797947989479994800948019480294803948049480594806948079480894809948109481194812948139481494815948169481794818948199482094821948229482394824948259482694827948289482994830948319483294833948349483594836948379483894839948409484194842948439484494845948469484794848948499485094851948529485394854948559485694857948589485994860948619486294863948649486594866948679486894869948709487194872948739487494875948769487794878948799488094881948829488394884948859488694887948889488994890948919489294893948949489594896948979489894899949009490194902949039490494905949069490794908949099491094911949129491394914949159491694917949189491994920949219492294923949249492594926949279492894929949309493194932949339493494935949369493794938949399494094941949429494394944949459494694947949489494994950949519495294953949549495594956949579495894959949609496194962949639496494965949669496794968949699497094971949729497394974949759497694977949789497994980949819498294983949849498594986949879498894989949909499194992949939499494995949969499794998949999500095001950029500395004950059500695007950089500995010950119501295013950149501595016950179501895019950209502195022950239502495025950269502795028950299503095031950329503395034950359503695037950389503995040950419504295043950449504595046950479504895049950509505195052950539505495055950569505795058950599506095061950629506395064950659506695067950689506995070950719507295073950749507595076950779507895079950809508195082950839508495085950869508795088950899509095091950929509395094950959509695097950989509995100951019510295103951049510595106951079510895109951109511195112951139511495115951169511795118951199512095121951229512395124951259512695127951289512995130951319513295133951349513595136951379513895139951409514195142951439514495145951469514795148951499515095151951529515395154951559515695157951589515995160951619516295163951649516595166951679516895169951709517195172951739517495175951769517795178951799518095181951829518395184951859518695187951889518995190951919519295193951949519595196951979519895199952009520195202952039520495205952069520795208952099521095211952129521395214952159521695217952189521995220952219522295223952249522595226952279522895229952309523195232952339523495235952369523795238952399524095241952429524395244952459524695247952489524995250952519525295253952549525595256952579525895259952609526195262952639526495265952669526795268952699527095271952729527395274952759527695277952789527995280952819528295283952849528595286952879528895289952909529195292952939529495295952969529795298952999530095301953029530395304953059530695307953089530995310953119531295313953149531595316953179531895319953209532195322953239532495325953269532795328953299533095331953329533395334953359533695337953389533995340953419534295343953449534595346953479534895349953509535195352953539535495355953569535795358953599536095361953629536395364953659536695367953689536995370953719537295373953749537595376953779537895379953809538195382953839538495385953869538795388953899539095391953929539395394953959539695397953989539995400954019540295403954049540595406954079540895409954109541195412954139541495415954169541795418954199542095421954229542395424954259542695427954289542995430954319543295433954349543595436954379543895439954409544195442954439544495445954469544795448954499545095451954529545395454954559545695457954589545995460954619546295463954649546595466954679546895469954709547195472954739547495475954769547795478954799548095481954829548395484954859548695487954889548995490954919549295493954949549595496954979549895499955009550195502955039550495505955069550795508955099551095511955129551395514955159551695517955189551995520955219552295523955249552595526955279552895529955309553195532955339553495535955369553795538955399554095541955429554395544955459554695547955489554995550955519555295553955549555595556955579555895559955609556195562955639556495565955669556795568955699557095571955729557395574955759557695577955789557995580955819558295583955849558595586955879558895589955909559195592955939559495595955969559795598955999560095601956029560395604956059560695607956089560995610956119561295613956149561595616956179561895619956209562195622956239562495625956269562795628956299563095631956329563395634956359563695637956389563995640956419564295643956449564595646956479564895649956509565195652956539565495655956569565795658956599566095661956629566395664956659566695667956689566995670956719567295673956749567595676956779567895679956809568195682956839568495685956869568795688956899569095691956929569395694956959569695697956989569995700957019570295703957049570595706957079570895709957109571195712957139571495715957169571795718957199572095721957229572395724957259572695727957289572995730957319573295733957349573595736957379573895739957409574195742957439574495745957469574795748957499575095751957529575395754957559575695757957589575995760957619576295763957649576595766957679576895769957709577195772957739577495775957769577795778957799578095781957829578395784957859578695787957889578995790957919579295793957949579595796957979579895799958009580195802958039580495805958069580795808958099581095811958129581395814958159581695817958189581995820958219582295823958249582595826958279582895829958309583195832958339583495835958369583795838958399584095841958429584395844958459584695847958489584995850958519585295853958549585595856958579585895859958609586195862958639586495865958669586795868958699587095871958729587395874958759587695877958789587995880958819588295883958849588595886958879588895889958909589195892958939589495895958969589795898958999590095901959029590395904959059590695907959089590995910959119591295913959149591595916959179591895919959209592195922959239592495925959269592795928959299593095931959329593395934959359593695937959389593995940959419594295943959449594595946959479594895949959509595195952959539595495955959569595795958959599596095961959629596395964959659596695967959689596995970959719597295973959749597595976959779597895979959809598195982959839598495985959869598795988959899599095991959929599395994959959599695997959989599996000960019600296003960049600596006960079600896009960109601196012960139601496015960169601796018960199602096021960229602396024960259602696027960289602996030960319603296033960349603596036960379603896039960409604196042960439604496045960469604796048960499605096051960529605396054960559605696057960589605996060960619606296063960649606596066960679606896069960709607196072960739607496075960769607796078960799608096081960829608396084960859608696087960889608996090960919609296093960949609596096960979609896099961009610196102961039610496105961069610796108961099611096111961129611396114961159611696117961189611996120961219612296123961249612596126961279612896129961309613196132961339613496135961369613796138961399614096141961429614396144961459614696147961489614996150961519615296153961549615596156961579615896159961609616196162961639616496165961669616796168961699617096171961729617396174961759617696177961789617996180961819618296183961849618596186961879618896189961909619196192961939619496195961969619796198961999620096201962029620396204962059620696207962089620996210962119621296213962149621596216962179621896219962209622196222962239622496225962269622796228962299623096231962329623396234962359623696237962389623996240962419624296243962449624596246962479624896249962509625196252962539625496255962569625796258962599626096261962629626396264962659626696267962689626996270962719627296273962749627596276962779627896279962809628196282962839628496285962869628796288962899629096291962929629396294962959629696297962989629996300963019630296303963049630596306963079630896309963109631196312963139631496315963169631796318963199632096321963229632396324963259632696327963289632996330963319633296333963349633596336963379633896339963409634196342963439634496345963469634796348963499635096351963529635396354963559635696357963589635996360963619636296363963649636596366963679636896369963709637196372963739637496375963769637796378963799638096381963829638396384963859638696387963889638996390963919639296393963949639596396963979639896399964009640196402964039640496405964069640796408964099641096411964129641396414964159641696417964189641996420964219642296423964249642596426964279642896429964309643196432964339643496435964369643796438964399644096441964429644396444964459644696447964489644996450964519645296453964549645596456964579645896459964609646196462964639646496465964669646796468964699647096471964729647396474964759647696477964789647996480964819648296483964849648596486964879648896489964909649196492964939649496495964969649796498964999650096501965029650396504965059650696507965089650996510965119651296513965149651596516965179651896519965209652196522965239652496525965269652796528965299653096531965329653396534965359653696537965389653996540965419654296543965449654596546965479654896549965509655196552965539655496555965569655796558965599656096561965629656396564965659656696567965689656996570965719657296573965749657596576965779657896579965809658196582965839658496585965869658796588965899659096591965929659396594965959659696597965989659996600966019660296603966049660596606966079660896609966109661196612966139661496615966169661796618966199662096621966229662396624966259662696627966289662996630966319663296633966349663596636966379663896639966409664196642966439664496645966469664796648966499665096651966529665396654966559665696657966589665996660966619666296663966649666596666966679666896669966709667196672966739667496675966769667796678966799668096681966829668396684966859668696687966889668996690966919669296693966949669596696966979669896699967009670196702967039670496705967069670796708967099671096711967129671396714967159671696717967189671996720967219672296723967249672596726967279672896729967309673196732967339673496735967369673796738967399674096741967429674396744967459674696747967489674996750967519675296753967549675596756967579675896759967609676196762967639676496765967669676796768967699677096771967729677396774967759677696777967789677996780967819678296783967849678596786967879678896789967909679196792967939679496795967969679796798967999680096801968029680396804968059680696807968089680996810968119681296813968149681596816968179681896819968209682196822968239682496825968269682796828968299683096831968329683396834968359683696837968389683996840968419684296843968449684596846968479684896849968509685196852968539685496855968569685796858968599686096861968629686396864968659686696867968689686996870968719687296873968749687596876968779687896879968809688196882968839688496885968869688796888968899689096891968929689396894968959689696897968989689996900969019690296903969049690596906969079690896909969109691196912969139691496915969169691796918969199692096921969229692396924969259692696927969289692996930969319693296933969349693596936969379693896939969409694196942969439694496945969469694796948969499695096951969529695396954969559695696957969589695996960969619696296963969649696596966969679696896969969709697196972969739697496975969769697796978969799698096981969829698396984969859698696987969889698996990969919699296993969949699596996969979699896999970009700197002970039700497005970069700797008970099701097011970129701397014970159701697017970189701997020970219702297023970249702597026970279702897029970309703197032970339703497035970369703797038970399704097041970429704397044970459704697047970489704997050970519705297053970549705597056970579705897059970609706197062970639706497065970669706797068970699707097071970729707397074970759707697077970789707997080970819708297083970849708597086970879708897089970909709197092970939709497095970969709797098970999710097101971029710397104971059710697107971089710997110971119711297113971149711597116971179711897119971209712197122971239712497125971269712797128971299713097131971329713397134971359713697137971389713997140971419714297143971449714597146971479714897149971509715197152971539715497155971569715797158971599716097161971629716397164971659716697167971689716997170971719717297173971749717597176971779717897179971809718197182971839718497185971869718797188971899719097191971929719397194971959719697197971989719997200972019720297203972049720597206972079720897209972109721197212972139721497215972169721797218972199722097221972229722397224972259722697227972289722997230972319723297233972349723597236972379723897239972409724197242972439724497245972469724797248972499725097251972529725397254972559725697257972589725997260972619726297263972649726597266972679726897269972709727197272972739727497275972769727797278972799728097281972829728397284972859728697287972889728997290972919729297293972949729597296972979729897299973009730197302973039730497305973069730797308973099731097311973129731397314973159731697317973189731997320973219732297323973249732597326973279732897329973309733197332973339733497335973369733797338973399734097341973429734397344973459734697347973489734997350973519735297353973549735597356973579735897359973609736197362973639736497365973669736797368973699737097371973729737397374973759737697377973789737997380973819738297383973849738597386973879738897389973909739197392973939739497395973969739797398973999740097401974029740397404974059740697407974089740997410974119741297413974149741597416974179741897419974209742197422974239742497425974269742797428974299743097431974329743397434974359743697437974389743997440974419744297443974449744597446974479744897449974509745197452974539745497455974569745797458974599746097461974629746397464974659746697467974689746997470974719747297473974749747597476974779747897479974809748197482974839748497485974869748797488974899749097491974929749397494974959749697497974989749997500975019750297503975049750597506975079750897509975109751197512975139751497515975169751797518975199752097521975229752397524975259752697527975289752997530975319753297533975349753597536975379753897539975409754197542975439754497545975469754797548975499755097551975529755397554975559755697557975589755997560975619756297563975649756597566975679756897569975709757197572975739757497575975769757797578975799758097581975829758397584975859758697587975889758997590975919759297593975949759597596975979759897599976009760197602976039760497605976069760797608976099761097611976129761397614976159761697617976189761997620976219762297623976249762597626976279762897629976309763197632976339763497635976369763797638976399764097641976429764397644976459764697647976489764997650976519765297653976549765597656976579765897659976609766197662976639766497665976669766797668976699767097671976729767397674976759767697677976789767997680976819768297683976849768597686976879768897689976909769197692976939769497695976969769797698976999770097701977029770397704977059770697707977089770997710977119771297713977149771597716977179771897719977209772197722977239772497725977269772797728977299773097731977329773397734977359773697737977389773997740977419774297743977449774597746977479774897749977509775197752977539775497755977569775797758977599776097761977629776397764977659776697767977689776997770977719777297773977749777597776977779777897779977809778197782977839778497785977869778797788977899779097791977929779397794977959779697797977989779997800978019780297803978049780597806978079780897809978109781197812978139781497815978169781797818978199782097821978229782397824978259782697827978289782997830978319783297833978349783597836978379783897839978409784197842978439784497845978469784797848978499785097851978529785397854978559785697857978589785997860978619786297863978649786597866978679786897869978709787197872978739787497875978769787797878978799788097881978829788397884978859788697887978889788997890978919789297893978949789597896978979789897899979009790197902979039790497905979069790797908979099791097911979129791397914979159791697917979189791997920979219792297923979249792597926979279792897929979309793197932979339793497935979369793797938979399794097941979429794397944979459794697947979489794997950979519795297953979549795597956979579795897959979609796197962979639796497965979669796797968979699797097971979729797397974979759797697977979789797997980979819798297983979849798597986979879798897989979909799197992979939799497995979969799797998979999800098001980029800398004980059800698007980089800998010980119801298013980149801598016980179801898019980209802198022980239802498025980269802798028980299803098031980329803398034980359803698037980389803998040980419804298043980449804598046980479804898049980509805198052980539805498055980569805798058980599806098061980629806398064980659806698067980689806998070980719807298073980749807598076980779807898079980809808198082980839808498085980869808798088980899809098091980929809398094980959809698097980989809998100981019810298103981049810598106981079810898109981109811198112981139811498115981169811798118981199812098121981229812398124981259812698127981289812998130981319813298133981349813598136981379813898139981409814198142981439814498145981469814798148981499815098151981529815398154981559815698157981589815998160981619816298163981649816598166981679816898169981709817198172981739817498175981769817798178981799818098181981829818398184981859818698187981889818998190981919819298193981949819598196981979819898199982009820198202982039820498205982069820798208982099821098211982129821398214982159821698217982189821998220982219822298223982249822598226982279822898229982309823198232982339823498235982369823798238982399824098241982429824398244982459824698247982489824998250982519825298253982549825598256982579825898259982609826198262982639826498265982669826798268982699827098271982729827398274982759827698277982789827998280982819828298283982849828598286982879828898289982909829198292982939829498295982969829798298982999830098301983029830398304983059830698307983089830998310983119831298313983149831598316983179831898319983209832198322983239832498325983269832798328983299833098331983329833398334983359833698337983389833998340983419834298343983449834598346983479834898349983509835198352983539835498355983569835798358983599836098361983629836398364983659836698367983689836998370983719837298373983749837598376983779837898379983809838198382983839838498385983869838798388983899839098391983929839398394983959839698397983989839998400984019840298403984049840598406984079840898409984109841198412984139841498415984169841798418984199842098421984229842398424984259842698427984289842998430984319843298433984349843598436984379843898439984409844198442984439844498445984469844798448984499845098451984529845398454984559845698457984589845998460984619846298463984649846598466984679846898469984709847198472984739847498475984769847798478984799848098481984829848398484984859848698487984889848998490984919849298493984949849598496984979849898499985009850198502985039850498505985069850798508985099851098511985129851398514985159851698517985189851998520985219852298523985249852598526985279852898529985309853198532985339853498535985369853798538985399854098541985429854398544985459854698547985489854998550985519855298553985549855598556985579855898559985609856198562985639856498565985669856798568985699857098571985729857398574985759857698577985789857998580985819858298583985849858598586985879858898589985909859198592985939859498595985969859798598985999860098601986029860398604986059860698607986089860998610986119861298613986149861598616986179861898619986209862198622986239862498625986269862798628986299863098631986329863398634986359863698637986389863998640986419864298643986449864598646986479864898649986509865198652986539865498655986569865798658986599866098661986629866398664986659866698667986689866998670986719867298673986749867598676986779867898679986809868198682986839868498685986869868798688986899869098691986929869398694986959869698697986989869998700987019870298703987049870598706987079870898709987109871198712987139871498715987169871798718987199872098721987229872398724987259872698727987289872998730987319873298733987349873598736987379873898739987409874198742987439874498745987469874798748987499875098751987529875398754987559875698757987589875998760987619876298763987649876598766987679876898769987709877198772987739877498775987769877798778987799878098781987829878398784987859878698787987889878998790987919879298793987949879598796987979879898799988009880198802988039880498805988069880798808988099881098811988129881398814988159881698817988189881998820988219882298823988249882598826988279882898829988309883198832988339883498835988369883798838988399884098841988429884398844988459884698847988489884998850988519885298853988549885598856988579885898859988609886198862988639886498865988669886798868988699887098871988729887398874988759887698877988789887998880988819888298883988849888598886988879888898889988909889198892988939889498895988969889798898988999890098901989029890398904989059890698907989089890998910989119891298913989149891598916989179891898919989209892198922989239892498925989269892798928989299893098931989329893398934989359893698937989389893998940989419894298943989449894598946989479894898949989509895198952989539895498955989569895798958989599896098961989629896398964989659896698967989689896998970989719897298973989749897598976989779897898979989809898198982989839898498985989869898798988989899899098991989929899398994989959899698997989989899999000990019900299003990049900599006990079900899009990109901199012990139901499015990169901799018990199902099021990229902399024990259902699027990289902999030990319903299033990349903599036990379903899039990409904199042990439904499045990469904799048990499905099051990529905399054990559905699057990589905999060990619906299063990649906599066990679906899069990709907199072990739907499075990769907799078990799908099081990829908399084990859908699087990889908999090990919909299093990949909599096990979909899099991009910199102991039910499105991069910799108991099911099111991129911399114991159911699117991189911999120991219912299123991249912599126991279912899129991309913199132991339913499135991369913799138991399914099141991429914399144991459914699147991489914999150991519915299153991549915599156991579915899159991609916199162991639916499165991669916799168991699917099171991729917399174991759917699177991789917999180991819918299183991849918599186991879918899189991909919199192991939919499195991969919799198991999920099201992029920399204992059920699207992089920999210992119921299213992149921599216992179921899219992209922199222992239922499225992269922799228992299923099231992329923399234992359923699237992389923999240992419924299243992449924599246992479924899249992509925199252992539925499255992569925799258992599926099261992629926399264992659926699267992689926999270992719927299273992749927599276992779927899279992809928199282992839928499285992869928799288992899929099291992929929399294992959929699297992989929999300993019930299303993049930599306993079930899309993109931199312993139931499315993169931799318993199932099321993229932399324993259932699327993289932999330993319933299333993349933599336993379933899339993409934199342993439934499345993469934799348993499935099351993529935399354993559935699357993589935999360993619936299363993649936599366993679936899369993709937199372993739937499375993769937799378993799938099381993829938399384993859938699387993889938999390993919939299393993949939599396993979939899399994009940199402994039940499405994069940799408994099941099411994129941399414994159941699417994189941999420994219942299423994249942599426994279942899429994309943199432994339943499435994369943799438994399944099441994429944399444994459944699447994489944999450994519945299453994549945599456994579945899459994609946199462994639946499465994669946799468994699947099471994729947399474994759947699477994789947999480994819948299483994849948599486994879948899489994909949199492994939949499495994969949799498994999950099501995029950399504995059950699507995089950999510995119951299513995149951599516995179951899519995209952199522995239952499525995269952799528995299953099531995329953399534995359953699537995389953999540995419954299543995449954599546995479954899549995509955199552995539955499555995569955799558995599956099561995629956399564995659956699567995689956999570995719957299573995749957599576995779957899579995809958199582995839958499585995869958799588995899959099591995929959399594995959959699597995989959999600996019960299603996049960599606996079960899609996109961199612996139961499615996169961799618996199962099621996229962399624996259962699627996289962999630996319963299633996349963599636996379963899639996409964199642996439964499645996469964799648996499965099651996529965399654996559965699657996589965999660996619966299663996649966599666996679966899669996709967199672996739967499675996769967799678996799968099681996829968399684996859968699687996889968999690996919969299693996949969599696996979969899699997009970199702997039970499705997069970799708997099971099711997129971399714997159971699717997189971999720997219972299723997249972599726997279972899729997309973199732997339973499735997369973799738997399974099741997429974399744997459974699747997489974999750997519975299753997549975599756997579975899759997609976199762997639976499765997669976799768997699977099771997729977399774997759977699777997789977999780997819978299783997849978599786997879978899789997909979199792997939979499795997969979799798997999980099801998029980399804998059980699807998089980999810998119981299813998149981599816998179981899819998209982199822998239982499825998269982799828998299983099831998329983399834998359983699837998389983999840998419984299843998449984599846998479984899849998509985199852998539985499855998569985799858998599986099861998629986399864998659986699867998689986999870998719987299873998749987599876998779987899879998809988199882998839988499885998869988799888998899989099891998929989399894998959989699897998989989999900999019990299903999049990599906999079990899909999109991199912999139991499915999169991799918999199992099921999229992399924999259992699927999289992999930999319993299933999349993599936999379993899939999409994199942999439994499945999469994799948999499995099951999529995399954999559995699957999589995999960999619996299963999649996599966999679996899969999709997199972999739997499975999769997799978999799998099981999829998399984999859998699987999889998999990999919999299993999949999599996999979999899999100000100001100002100003100004100005100006100007100008100009100010100011100012100013100014100015100016100017100018100019100020100021100022100023100024100025100026100027100028100029100030100031100032100033100034100035100036100037100038100039100040100041100042100043100044100045100046100047100048100049100050100051100052100053100054100055100056100057100058100059100060100061100062100063100064100065100066100067100068100069100070100071100072100073100074100075100076100077100078100079100080100081100082100083100084100085100086100087100088100089100090100091100092100093100094100095100096100097100098100099100100100101100102100103100104100105100106100107100108100109100110100111100112100113100114100115100116100117100118100119100120100121100122100123100124100125100126100127100128100129100130100131100132100133100134100135100136100137100138100139100140100141100142100143100144100145100146100147100148100149100150100151100152100153100154100155100156100157100158100159100160100161100162100163100164100165100166100167100168100169100170100171100172100173100174100175100176100177100178100179100180100181100182100183100184100185100186100187100188100189100190100191100192100193100194100195100196100197100198100199100200100201100202100203100204100205100206100207100208100209100210100211100212100213100214100215100216100217100218100219100220100221100222100223100224100225100226100227100228100229100230100231100232100233100234100235100236100237100238100239100240100241100242100243100244100245100246100247100248100249100250100251100252100253100254100255100256100257100258100259100260100261100262100263100264100265100266100267100268100269100270100271100272100273100274100275100276100277100278100279100280100281100282100283100284100285100286100287100288100289100290100291100292100293100294100295100296100297100298100299100300100301100302100303100304100305100306100307100308100309100310100311100312100313100314100315100316100317100318100319100320100321100322100323100324100325100326100327100328100329100330100331100332100333100334100335100336100337100338100339100340100341100342100343100344100345100346100347100348100349100350100351100352100353100354100355100356100357100358100359100360100361100362100363100364100365100366100367100368100369100370100371100372100373100374100375100376100377100378100379100380100381100382100383100384100385100386100387100388100389100390100391100392100393100394100395100396100397100398100399100400100401100402100403100404100405100406100407100408100409100410100411100412100413100414100415100416100417100418100419100420100421100422100423100424100425100426100427100428100429100430100431100432100433100434100435100436100437100438100439100440100441100442100443100444100445100446100447100448100449100450100451100452100453100454100455100456100457100458100459100460100461100462100463100464100465100466100467100468100469100470100471100472100473100474100475100476100477100478100479100480100481100482100483100484100485100486100487100488100489100490100491100492100493100494100495100496100497100498100499100500100501100502100503100504100505100506100507100508100509100510100511100512100513100514100515100516100517100518100519100520100521100522100523100524100525100526100527100528100529100530100531100532100533100534100535100536100537100538100539100540100541100542100543100544100545100546100547100548100549100550100551100552100553100554100555100556100557100558100559100560100561100562100563100564100565100566100567100568100569100570100571100572100573100574100575100576100577100578100579100580100581100582100583100584
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
  3. typeof define === 'function' && define.amd ? define(['exports'], factory) :
  4. (global = global || self, factory(global.Babel = {}));
  5. }(this, (function (exports) { 'use strict';
  6. var context = /*#__PURE__*/Object.freeze({
  7. __proto__: null,
  8. get types () { return t; },
  9. get DEFAULT_EXTENSIONS () { return DEFAULT_EXTENSIONS; },
  10. get OptionManager () { return OptionManager; },
  11. get Plugin () { return Plugin$1; },
  12. get File () { return File$2; },
  13. get buildExternalHelpers () { return babelBuildExternalHelpers; },
  14. get resolvePlugin () { return resolvePlugin; },
  15. get resolvePreset () { return resolvePreset; },
  16. get version () { return version$1; },
  17. get getEnv () { return getEnv; },
  18. get tokTypes () { return types; },
  19. get traverse () { return traverse$1; },
  20. get template () { return template; },
  21. get createConfigItem () { return createConfigItem; },
  22. get loadPartialConfig () { return loadPartialConfig$1; },
  23. get loadPartialConfigSync () { return loadPartialConfigSync; },
  24. get loadPartialConfigAsync () { return loadPartialConfigAsync; },
  25. get loadOptions () { return loadOptions; },
  26. get loadOptionsSync () { return loadOptionsSync; },
  27. get loadOptionsAsync () { return loadOptionsAsync; },
  28. get transform () { return transform; },
  29. get transformSync () { return transformSync; },
  30. get transformAsync () { return transformAsync; },
  31. get transformFile () { return transformFile$1; },
  32. get transformFileSync () { return transformFileSync; },
  33. get transformFileAsync () { return transformFileAsync; },
  34. get transformFromAst () { return transformFromAst; },
  35. get transformFromAstSync () { return transformFromAstSync; },
  36. get transformFromAstAsync () { return transformFromAstAsync; },
  37. get parse () { return parse$3; },
  38. get parseSync () { return parseSync; },
  39. get parseAsync () { return parseAsync; }
  40. });
  41. function _defineProperties(target, props) {
  42. for (var i = 0; i < props.length; i++) {
  43. var descriptor = props[i];
  44. descriptor.enumerable = descriptor.enumerable || false;
  45. descriptor.configurable = true;
  46. if ("value" in descriptor) descriptor.writable = true;
  47. Object.defineProperty(target, descriptor.key, descriptor);
  48. }
  49. }
  50. function _createClass(Constructor, protoProps, staticProps) {
  51. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  52. if (staticProps) _defineProperties(Constructor, staticProps);
  53. return Constructor;
  54. }
  55. function _inheritsLoose(subClass, superClass) {
  56. subClass.prototype = Object.create(superClass.prototype);
  57. subClass.prototype.constructor = subClass;
  58. subClass.__proto__ = superClass;
  59. }
  60. function _objectWithoutPropertiesLoose(source, excluded) {
  61. if (source == null) return {};
  62. var target = {};
  63. var sourceKeys = Object.keys(source);
  64. var key, i;
  65. for (i = 0; i < sourceKeys.length; i++) {
  66. key = sourceKeys[i];
  67. if (excluded.indexOf(key) >= 0) continue;
  68. target[key] = source[key];
  69. }
  70. return target;
  71. }
  72. function _assertThisInitialized(self) {
  73. if (self === void 0) {
  74. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  75. }
  76. return self;
  77. }
  78. function _taggedTemplateLiteralLoose(strings, raw) {
  79. if (!raw) {
  80. raw = strings.slice(0);
  81. }
  82. strings.raw = raw;
  83. return strings;
  84. }
  85. function shallowEqual(actual, expected) {
  86. var keys = Object.keys(expected);
  87. for (var _i = 0, _arr = keys; _i < _arr.length; _i++) {
  88. var key = _arr[_i];
  89. if (actual[key] !== expected[key]) {
  90. return false;
  91. }
  92. }
  93. return true;
  94. }
  95. function isArrayExpression(node, opts) {
  96. if (!node) return false;
  97. var nodeType = node.type;
  98. if (nodeType === "ArrayExpression") {
  99. if (typeof opts === "undefined") {
  100. return true;
  101. } else {
  102. return shallowEqual(node, opts);
  103. }
  104. }
  105. return false;
  106. }
  107. function isAssignmentExpression(node, opts) {
  108. if (!node) return false;
  109. var nodeType = node.type;
  110. if (nodeType === "AssignmentExpression") {
  111. if (typeof opts === "undefined") {
  112. return true;
  113. } else {
  114. return shallowEqual(node, opts);
  115. }
  116. }
  117. return false;
  118. }
  119. function isBinaryExpression(node, opts) {
  120. if (!node) return false;
  121. var nodeType = node.type;
  122. if (nodeType === "BinaryExpression") {
  123. if (typeof opts === "undefined") {
  124. return true;
  125. } else {
  126. return shallowEqual(node, opts);
  127. }
  128. }
  129. return false;
  130. }
  131. function isInterpreterDirective(node, opts) {
  132. if (!node) return false;
  133. var nodeType = node.type;
  134. if (nodeType === "InterpreterDirective") {
  135. if (typeof opts === "undefined") {
  136. return true;
  137. } else {
  138. return shallowEqual(node, opts);
  139. }
  140. }
  141. return false;
  142. }
  143. function isDirective(node, opts) {
  144. if (!node) return false;
  145. var nodeType = node.type;
  146. if (nodeType === "Directive") {
  147. if (typeof opts === "undefined") {
  148. return true;
  149. } else {
  150. return shallowEqual(node, opts);
  151. }
  152. }
  153. return false;
  154. }
  155. function isDirectiveLiteral(node, opts) {
  156. if (!node) return false;
  157. var nodeType = node.type;
  158. if (nodeType === "DirectiveLiteral") {
  159. if (typeof opts === "undefined") {
  160. return true;
  161. } else {
  162. return shallowEqual(node, opts);
  163. }
  164. }
  165. return false;
  166. }
  167. function isBlockStatement(node, opts) {
  168. if (!node) return false;
  169. var nodeType = node.type;
  170. if (nodeType === "BlockStatement") {
  171. if (typeof opts === "undefined") {
  172. return true;
  173. } else {
  174. return shallowEqual(node, opts);
  175. }
  176. }
  177. return false;
  178. }
  179. function isBreakStatement(node, opts) {
  180. if (!node) return false;
  181. var nodeType = node.type;
  182. if (nodeType === "BreakStatement") {
  183. if (typeof opts === "undefined") {
  184. return true;
  185. } else {
  186. return shallowEqual(node, opts);
  187. }
  188. }
  189. return false;
  190. }
  191. function isCallExpression(node, opts) {
  192. if (!node) return false;
  193. var nodeType = node.type;
  194. if (nodeType === "CallExpression") {
  195. if (typeof opts === "undefined") {
  196. return true;
  197. } else {
  198. return shallowEqual(node, opts);
  199. }
  200. }
  201. return false;
  202. }
  203. function isCatchClause(node, opts) {
  204. if (!node) return false;
  205. var nodeType = node.type;
  206. if (nodeType === "CatchClause") {
  207. if (typeof opts === "undefined") {
  208. return true;
  209. } else {
  210. return shallowEqual(node, opts);
  211. }
  212. }
  213. return false;
  214. }
  215. function isConditionalExpression(node, opts) {
  216. if (!node) return false;
  217. var nodeType = node.type;
  218. if (nodeType === "ConditionalExpression") {
  219. if (typeof opts === "undefined") {
  220. return true;
  221. } else {
  222. return shallowEqual(node, opts);
  223. }
  224. }
  225. return false;
  226. }
  227. function isContinueStatement(node, opts) {
  228. if (!node) return false;
  229. var nodeType = node.type;
  230. if (nodeType === "ContinueStatement") {
  231. if (typeof opts === "undefined") {
  232. return true;
  233. } else {
  234. return shallowEqual(node, opts);
  235. }
  236. }
  237. return false;
  238. }
  239. function isDebuggerStatement(node, opts) {
  240. if (!node) return false;
  241. var nodeType = node.type;
  242. if (nodeType === "DebuggerStatement") {
  243. if (typeof opts === "undefined") {
  244. return true;
  245. } else {
  246. return shallowEqual(node, opts);
  247. }
  248. }
  249. return false;
  250. }
  251. function isDoWhileStatement(node, opts) {
  252. if (!node) return false;
  253. var nodeType = node.type;
  254. if (nodeType === "DoWhileStatement") {
  255. if (typeof opts === "undefined") {
  256. return true;
  257. } else {
  258. return shallowEqual(node, opts);
  259. }
  260. }
  261. return false;
  262. }
  263. function isEmptyStatement(node, opts) {
  264. if (!node) return false;
  265. var nodeType = node.type;
  266. if (nodeType === "EmptyStatement") {
  267. if (typeof opts === "undefined") {
  268. return true;
  269. } else {
  270. return shallowEqual(node, opts);
  271. }
  272. }
  273. return false;
  274. }
  275. function isExpressionStatement(node, opts) {
  276. if (!node) return false;
  277. var nodeType = node.type;
  278. if (nodeType === "ExpressionStatement") {
  279. if (typeof opts === "undefined") {
  280. return true;
  281. } else {
  282. return shallowEqual(node, opts);
  283. }
  284. }
  285. return false;
  286. }
  287. function isFile(node, opts) {
  288. if (!node) return false;
  289. var nodeType = node.type;
  290. if (nodeType === "File") {
  291. if (typeof opts === "undefined") {
  292. return true;
  293. } else {
  294. return shallowEqual(node, opts);
  295. }
  296. }
  297. return false;
  298. }
  299. function isForInStatement(node, opts) {
  300. if (!node) return false;
  301. var nodeType = node.type;
  302. if (nodeType === "ForInStatement") {
  303. if (typeof opts === "undefined") {
  304. return true;
  305. } else {
  306. return shallowEqual(node, opts);
  307. }
  308. }
  309. return false;
  310. }
  311. function isForStatement(node, opts) {
  312. if (!node) return false;
  313. var nodeType = node.type;
  314. if (nodeType === "ForStatement") {
  315. if (typeof opts === "undefined") {
  316. return true;
  317. } else {
  318. return shallowEqual(node, opts);
  319. }
  320. }
  321. return false;
  322. }
  323. function isFunctionDeclaration(node, opts) {
  324. if (!node) return false;
  325. var nodeType = node.type;
  326. if (nodeType === "FunctionDeclaration") {
  327. if (typeof opts === "undefined") {
  328. return true;
  329. } else {
  330. return shallowEqual(node, opts);
  331. }
  332. }
  333. return false;
  334. }
  335. function isFunctionExpression(node, opts) {
  336. if (!node) return false;
  337. var nodeType = node.type;
  338. if (nodeType === "FunctionExpression") {
  339. if (typeof opts === "undefined") {
  340. return true;
  341. } else {
  342. return shallowEqual(node, opts);
  343. }
  344. }
  345. return false;
  346. }
  347. function isIdentifier(node, opts) {
  348. if (!node) return false;
  349. var nodeType = node.type;
  350. if (nodeType === "Identifier") {
  351. if (typeof opts === "undefined") {
  352. return true;
  353. } else {
  354. return shallowEqual(node, opts);
  355. }
  356. }
  357. return false;
  358. }
  359. function isIfStatement(node, opts) {
  360. if (!node) return false;
  361. var nodeType = node.type;
  362. if (nodeType === "IfStatement") {
  363. if (typeof opts === "undefined") {
  364. return true;
  365. } else {
  366. return shallowEqual(node, opts);
  367. }
  368. }
  369. return false;
  370. }
  371. function isLabeledStatement(node, opts) {
  372. if (!node) return false;
  373. var nodeType = node.type;
  374. if (nodeType === "LabeledStatement") {
  375. if (typeof opts === "undefined") {
  376. return true;
  377. } else {
  378. return shallowEqual(node, opts);
  379. }
  380. }
  381. return false;
  382. }
  383. function isStringLiteral(node, opts) {
  384. if (!node) return false;
  385. var nodeType = node.type;
  386. if (nodeType === "StringLiteral") {
  387. if (typeof opts === "undefined") {
  388. return true;
  389. } else {
  390. return shallowEqual(node, opts);
  391. }
  392. }
  393. return false;
  394. }
  395. function isNumericLiteral(node, opts) {
  396. if (!node) return false;
  397. var nodeType = node.type;
  398. if (nodeType === "NumericLiteral") {
  399. if (typeof opts === "undefined") {
  400. return true;
  401. } else {
  402. return shallowEqual(node, opts);
  403. }
  404. }
  405. return false;
  406. }
  407. function isNullLiteral(node, opts) {
  408. if (!node) return false;
  409. var nodeType = node.type;
  410. if (nodeType === "NullLiteral") {
  411. if (typeof opts === "undefined") {
  412. return true;
  413. } else {
  414. return shallowEqual(node, opts);
  415. }
  416. }
  417. return false;
  418. }
  419. function isBooleanLiteral(node, opts) {
  420. if (!node) return false;
  421. var nodeType = node.type;
  422. if (nodeType === "BooleanLiteral") {
  423. if (typeof opts === "undefined") {
  424. return true;
  425. } else {
  426. return shallowEqual(node, opts);
  427. }
  428. }
  429. return false;
  430. }
  431. function isRegExpLiteral(node, opts) {
  432. if (!node) return false;
  433. var nodeType = node.type;
  434. if (nodeType === "RegExpLiteral") {
  435. if (typeof opts === "undefined") {
  436. return true;
  437. } else {
  438. return shallowEqual(node, opts);
  439. }
  440. }
  441. return false;
  442. }
  443. function isLogicalExpression(node, opts) {
  444. if (!node) return false;
  445. var nodeType = node.type;
  446. if (nodeType === "LogicalExpression") {
  447. if (typeof opts === "undefined") {
  448. return true;
  449. } else {
  450. return shallowEqual(node, opts);
  451. }
  452. }
  453. return false;
  454. }
  455. function isMemberExpression(node, opts) {
  456. if (!node) return false;
  457. var nodeType = node.type;
  458. if (nodeType === "MemberExpression") {
  459. if (typeof opts === "undefined") {
  460. return true;
  461. } else {
  462. return shallowEqual(node, opts);
  463. }
  464. }
  465. return false;
  466. }
  467. function isNewExpression(node, opts) {
  468. if (!node) return false;
  469. var nodeType = node.type;
  470. if (nodeType === "NewExpression") {
  471. if (typeof opts === "undefined") {
  472. return true;
  473. } else {
  474. return shallowEqual(node, opts);
  475. }
  476. }
  477. return false;
  478. }
  479. function isProgram(node, opts) {
  480. if (!node) return false;
  481. var nodeType = node.type;
  482. if (nodeType === "Program") {
  483. if (typeof opts === "undefined") {
  484. return true;
  485. } else {
  486. return shallowEqual(node, opts);
  487. }
  488. }
  489. return false;
  490. }
  491. function isObjectExpression(node, opts) {
  492. if (!node) return false;
  493. var nodeType = node.type;
  494. if (nodeType === "ObjectExpression") {
  495. if (typeof opts === "undefined") {
  496. return true;
  497. } else {
  498. return shallowEqual(node, opts);
  499. }
  500. }
  501. return false;
  502. }
  503. function isObjectMethod(node, opts) {
  504. if (!node) return false;
  505. var nodeType = node.type;
  506. if (nodeType === "ObjectMethod") {
  507. if (typeof opts === "undefined") {
  508. return true;
  509. } else {
  510. return shallowEqual(node, opts);
  511. }
  512. }
  513. return false;
  514. }
  515. function isObjectProperty(node, opts) {
  516. if (!node) return false;
  517. var nodeType = node.type;
  518. if (nodeType === "ObjectProperty") {
  519. if (typeof opts === "undefined") {
  520. return true;
  521. } else {
  522. return shallowEqual(node, opts);
  523. }
  524. }
  525. return false;
  526. }
  527. function isRestElement(node, opts) {
  528. if (!node) return false;
  529. var nodeType = node.type;
  530. if (nodeType === "RestElement") {
  531. if (typeof opts === "undefined") {
  532. return true;
  533. } else {
  534. return shallowEqual(node, opts);
  535. }
  536. }
  537. return false;
  538. }
  539. function isReturnStatement(node, opts) {
  540. if (!node) return false;
  541. var nodeType = node.type;
  542. if (nodeType === "ReturnStatement") {
  543. if (typeof opts === "undefined") {
  544. return true;
  545. } else {
  546. return shallowEqual(node, opts);
  547. }
  548. }
  549. return false;
  550. }
  551. function isSequenceExpression(node, opts) {
  552. if (!node) return false;
  553. var nodeType = node.type;
  554. if (nodeType === "SequenceExpression") {
  555. if (typeof opts === "undefined") {
  556. return true;
  557. } else {
  558. return shallowEqual(node, opts);
  559. }
  560. }
  561. return false;
  562. }
  563. function isParenthesizedExpression(node, opts) {
  564. if (!node) return false;
  565. var nodeType = node.type;
  566. if (nodeType === "ParenthesizedExpression") {
  567. if (typeof opts === "undefined") {
  568. return true;
  569. } else {
  570. return shallowEqual(node, opts);
  571. }
  572. }
  573. return false;
  574. }
  575. function isSwitchCase(node, opts) {
  576. if (!node) return false;
  577. var nodeType = node.type;
  578. if (nodeType === "SwitchCase") {
  579. if (typeof opts === "undefined") {
  580. return true;
  581. } else {
  582. return shallowEqual(node, opts);
  583. }
  584. }
  585. return false;
  586. }
  587. function isSwitchStatement(node, opts) {
  588. if (!node) return false;
  589. var nodeType = node.type;
  590. if (nodeType === "SwitchStatement") {
  591. if (typeof opts === "undefined") {
  592. return true;
  593. } else {
  594. return shallowEqual(node, opts);
  595. }
  596. }
  597. return false;
  598. }
  599. function isThisExpression(node, opts) {
  600. if (!node) return false;
  601. var nodeType = node.type;
  602. if (nodeType === "ThisExpression") {
  603. if (typeof opts === "undefined") {
  604. return true;
  605. } else {
  606. return shallowEqual(node, opts);
  607. }
  608. }
  609. return false;
  610. }
  611. function isThrowStatement(node, opts) {
  612. if (!node) return false;
  613. var nodeType = node.type;
  614. if (nodeType === "ThrowStatement") {
  615. if (typeof opts === "undefined") {
  616. return true;
  617. } else {
  618. return shallowEqual(node, opts);
  619. }
  620. }
  621. return false;
  622. }
  623. function isTryStatement(node, opts) {
  624. if (!node) return false;
  625. var nodeType = node.type;
  626. if (nodeType === "TryStatement") {
  627. if (typeof opts === "undefined") {
  628. return true;
  629. } else {
  630. return shallowEqual(node, opts);
  631. }
  632. }
  633. return false;
  634. }
  635. function isUnaryExpression(node, opts) {
  636. if (!node) return false;
  637. var nodeType = node.type;
  638. if (nodeType === "UnaryExpression") {
  639. if (typeof opts === "undefined") {
  640. return true;
  641. } else {
  642. return shallowEqual(node, opts);
  643. }
  644. }
  645. return false;
  646. }
  647. function isUpdateExpression(node, opts) {
  648. if (!node) return false;
  649. var nodeType = node.type;
  650. if (nodeType === "UpdateExpression") {
  651. if (typeof opts === "undefined") {
  652. return true;
  653. } else {
  654. return shallowEqual(node, opts);
  655. }
  656. }
  657. return false;
  658. }
  659. function isVariableDeclaration(node, opts) {
  660. if (!node) return false;
  661. var nodeType = node.type;
  662. if (nodeType === "VariableDeclaration") {
  663. if (typeof opts === "undefined") {
  664. return true;
  665. } else {
  666. return shallowEqual(node, opts);
  667. }
  668. }
  669. return false;
  670. }
  671. function isVariableDeclarator(node, opts) {
  672. if (!node) return false;
  673. var nodeType = node.type;
  674. if (nodeType === "VariableDeclarator") {
  675. if (typeof opts === "undefined") {
  676. return true;
  677. } else {
  678. return shallowEqual(node, opts);
  679. }
  680. }
  681. return false;
  682. }
  683. function isWhileStatement(node, opts) {
  684. if (!node) return false;
  685. var nodeType = node.type;
  686. if (nodeType === "WhileStatement") {
  687. if (typeof opts === "undefined") {
  688. return true;
  689. } else {
  690. return shallowEqual(node, opts);
  691. }
  692. }
  693. return false;
  694. }
  695. function isWithStatement(node, opts) {
  696. if (!node) return false;
  697. var nodeType = node.type;
  698. if (nodeType === "WithStatement") {
  699. if (typeof opts === "undefined") {
  700. return true;
  701. } else {
  702. return shallowEqual(node, opts);
  703. }
  704. }
  705. return false;
  706. }
  707. function isAssignmentPattern(node, opts) {
  708. if (!node) return false;
  709. var nodeType = node.type;
  710. if (nodeType === "AssignmentPattern") {
  711. if (typeof opts === "undefined") {
  712. return true;
  713. } else {
  714. return shallowEqual(node, opts);
  715. }
  716. }
  717. return false;
  718. }
  719. function isArrayPattern(node, opts) {
  720. if (!node) return false;
  721. var nodeType = node.type;
  722. if (nodeType === "ArrayPattern") {
  723. if (typeof opts === "undefined") {
  724. return true;
  725. } else {
  726. return shallowEqual(node, opts);
  727. }
  728. }
  729. return false;
  730. }
  731. function isArrowFunctionExpression(node, opts) {
  732. if (!node) return false;
  733. var nodeType = node.type;
  734. if (nodeType === "ArrowFunctionExpression") {
  735. if (typeof opts === "undefined") {
  736. return true;
  737. } else {
  738. return shallowEqual(node, opts);
  739. }
  740. }
  741. return false;
  742. }
  743. function isClassBody(node, opts) {
  744. if (!node) return false;
  745. var nodeType = node.type;
  746. if (nodeType === "ClassBody") {
  747. if (typeof opts === "undefined") {
  748. return true;
  749. } else {
  750. return shallowEqual(node, opts);
  751. }
  752. }
  753. return false;
  754. }
  755. function isClassExpression(node, opts) {
  756. if (!node) return false;
  757. var nodeType = node.type;
  758. if (nodeType === "ClassExpression") {
  759. if (typeof opts === "undefined") {
  760. return true;
  761. } else {
  762. return shallowEqual(node, opts);
  763. }
  764. }
  765. return false;
  766. }
  767. function isClassDeclaration(node, opts) {
  768. if (!node) return false;
  769. var nodeType = node.type;
  770. if (nodeType === "ClassDeclaration") {
  771. if (typeof opts === "undefined") {
  772. return true;
  773. } else {
  774. return shallowEqual(node, opts);
  775. }
  776. }
  777. return false;
  778. }
  779. function isExportAllDeclaration(node, opts) {
  780. if (!node) return false;
  781. var nodeType = node.type;
  782. if (nodeType === "ExportAllDeclaration") {
  783. if (typeof opts === "undefined") {
  784. return true;
  785. } else {
  786. return shallowEqual(node, opts);
  787. }
  788. }
  789. return false;
  790. }
  791. function isExportDefaultDeclaration(node, opts) {
  792. if (!node) return false;
  793. var nodeType = node.type;
  794. if (nodeType === "ExportDefaultDeclaration") {
  795. if (typeof opts === "undefined") {
  796. return true;
  797. } else {
  798. return shallowEqual(node, opts);
  799. }
  800. }
  801. return false;
  802. }
  803. function isExportNamedDeclaration(node, opts) {
  804. if (!node) return false;
  805. var nodeType = node.type;
  806. if (nodeType === "ExportNamedDeclaration") {
  807. if (typeof opts === "undefined") {
  808. return true;
  809. } else {
  810. return shallowEqual(node, opts);
  811. }
  812. }
  813. return false;
  814. }
  815. function isExportSpecifier(node, opts) {
  816. if (!node) return false;
  817. var nodeType = node.type;
  818. if (nodeType === "ExportSpecifier") {
  819. if (typeof opts === "undefined") {
  820. return true;
  821. } else {
  822. return shallowEqual(node, opts);
  823. }
  824. }
  825. return false;
  826. }
  827. function isForOfStatement(node, opts) {
  828. if (!node) return false;
  829. var nodeType = node.type;
  830. if (nodeType === "ForOfStatement") {
  831. if (typeof opts === "undefined") {
  832. return true;
  833. } else {
  834. return shallowEqual(node, opts);
  835. }
  836. }
  837. return false;
  838. }
  839. function isImportDeclaration(node, opts) {
  840. if (!node) return false;
  841. var nodeType = node.type;
  842. if (nodeType === "ImportDeclaration") {
  843. if (typeof opts === "undefined") {
  844. return true;
  845. } else {
  846. return shallowEqual(node, opts);
  847. }
  848. }
  849. return false;
  850. }
  851. function isImportDefaultSpecifier(node, opts) {
  852. if (!node) return false;
  853. var nodeType = node.type;
  854. if (nodeType === "ImportDefaultSpecifier") {
  855. if (typeof opts === "undefined") {
  856. return true;
  857. } else {
  858. return shallowEqual(node, opts);
  859. }
  860. }
  861. return false;
  862. }
  863. function isImportNamespaceSpecifier(node, opts) {
  864. if (!node) return false;
  865. var nodeType = node.type;
  866. if (nodeType === "ImportNamespaceSpecifier") {
  867. if (typeof opts === "undefined") {
  868. return true;
  869. } else {
  870. return shallowEqual(node, opts);
  871. }
  872. }
  873. return false;
  874. }
  875. function isImportSpecifier(node, opts) {
  876. if (!node) return false;
  877. var nodeType = node.type;
  878. if (nodeType === "ImportSpecifier") {
  879. if (typeof opts === "undefined") {
  880. return true;
  881. } else {
  882. return shallowEqual(node, opts);
  883. }
  884. }
  885. return false;
  886. }
  887. function isMetaProperty(node, opts) {
  888. if (!node) return false;
  889. var nodeType = node.type;
  890. if (nodeType === "MetaProperty") {
  891. if (typeof opts === "undefined") {
  892. return true;
  893. } else {
  894. return shallowEqual(node, opts);
  895. }
  896. }
  897. return false;
  898. }
  899. function isClassMethod(node, opts) {
  900. if (!node) return false;
  901. var nodeType = node.type;
  902. if (nodeType === "ClassMethod") {
  903. if (typeof opts === "undefined") {
  904. return true;
  905. } else {
  906. return shallowEqual(node, opts);
  907. }
  908. }
  909. return false;
  910. }
  911. function isObjectPattern(node, opts) {
  912. if (!node) return false;
  913. var nodeType = node.type;
  914. if (nodeType === "ObjectPattern") {
  915. if (typeof opts === "undefined") {
  916. return true;
  917. } else {
  918. return shallowEqual(node, opts);
  919. }
  920. }
  921. return false;
  922. }
  923. function isSpreadElement(node, opts) {
  924. if (!node) return false;
  925. var nodeType = node.type;
  926. if (nodeType === "SpreadElement") {
  927. if (typeof opts === "undefined") {
  928. return true;
  929. } else {
  930. return shallowEqual(node, opts);
  931. }
  932. }
  933. return false;
  934. }
  935. function isSuper(node, opts) {
  936. if (!node) return false;
  937. var nodeType = node.type;
  938. if (nodeType === "Super") {
  939. if (typeof opts === "undefined") {
  940. return true;
  941. } else {
  942. return shallowEqual(node, opts);
  943. }
  944. }
  945. return false;
  946. }
  947. function isTaggedTemplateExpression(node, opts) {
  948. if (!node) return false;
  949. var nodeType = node.type;
  950. if (nodeType === "TaggedTemplateExpression") {
  951. if (typeof opts === "undefined") {
  952. return true;
  953. } else {
  954. return shallowEqual(node, opts);
  955. }
  956. }
  957. return false;
  958. }
  959. function isTemplateElement(node, opts) {
  960. if (!node) return false;
  961. var nodeType = node.type;
  962. if (nodeType === "TemplateElement") {
  963. if (typeof opts === "undefined") {
  964. return true;
  965. } else {
  966. return shallowEqual(node, opts);
  967. }
  968. }
  969. return false;
  970. }
  971. function isTemplateLiteral(node, opts) {
  972. if (!node) return false;
  973. var nodeType = node.type;
  974. if (nodeType === "TemplateLiteral") {
  975. if (typeof opts === "undefined") {
  976. return true;
  977. } else {
  978. return shallowEqual(node, opts);
  979. }
  980. }
  981. return false;
  982. }
  983. function isYieldExpression(node, opts) {
  984. if (!node) return false;
  985. var nodeType = node.type;
  986. if (nodeType === "YieldExpression") {
  987. if (typeof opts === "undefined") {
  988. return true;
  989. } else {
  990. return shallowEqual(node, opts);
  991. }
  992. }
  993. return false;
  994. }
  995. function isAnyTypeAnnotation(node, opts) {
  996. if (!node) return false;
  997. var nodeType = node.type;
  998. if (nodeType === "AnyTypeAnnotation") {
  999. if (typeof opts === "undefined") {
  1000. return true;
  1001. } else {
  1002. return shallowEqual(node, opts);
  1003. }
  1004. }
  1005. return false;
  1006. }
  1007. function isArrayTypeAnnotation(node, opts) {
  1008. if (!node) return false;
  1009. var nodeType = node.type;
  1010. if (nodeType === "ArrayTypeAnnotation") {
  1011. if (typeof opts === "undefined") {
  1012. return true;
  1013. } else {
  1014. return shallowEqual(node, opts);
  1015. }
  1016. }
  1017. return false;
  1018. }
  1019. function isBooleanTypeAnnotation(node, opts) {
  1020. if (!node) return false;
  1021. var nodeType = node.type;
  1022. if (nodeType === "BooleanTypeAnnotation") {
  1023. if (typeof opts === "undefined") {
  1024. return true;
  1025. } else {
  1026. return shallowEqual(node, opts);
  1027. }
  1028. }
  1029. return false;
  1030. }
  1031. function isBooleanLiteralTypeAnnotation(node, opts) {
  1032. if (!node) return false;
  1033. var nodeType = node.type;
  1034. if (nodeType === "BooleanLiteralTypeAnnotation") {
  1035. if (typeof opts === "undefined") {
  1036. return true;
  1037. } else {
  1038. return shallowEqual(node, opts);
  1039. }
  1040. }
  1041. return false;
  1042. }
  1043. function isNullLiteralTypeAnnotation(node, opts) {
  1044. if (!node) return false;
  1045. var nodeType = node.type;
  1046. if (nodeType === "NullLiteralTypeAnnotation") {
  1047. if (typeof opts === "undefined") {
  1048. return true;
  1049. } else {
  1050. return shallowEqual(node, opts);
  1051. }
  1052. }
  1053. return false;
  1054. }
  1055. function isClassImplements(node, opts) {
  1056. if (!node) return false;
  1057. var nodeType = node.type;
  1058. if (nodeType === "ClassImplements") {
  1059. if (typeof opts === "undefined") {
  1060. return true;
  1061. } else {
  1062. return shallowEqual(node, opts);
  1063. }
  1064. }
  1065. return false;
  1066. }
  1067. function isDeclareClass(node, opts) {
  1068. if (!node) return false;
  1069. var nodeType = node.type;
  1070. if (nodeType === "DeclareClass") {
  1071. if (typeof opts === "undefined") {
  1072. return true;
  1073. } else {
  1074. return shallowEqual(node, opts);
  1075. }
  1076. }
  1077. return false;
  1078. }
  1079. function isDeclareFunction(node, opts) {
  1080. if (!node) return false;
  1081. var nodeType = node.type;
  1082. if (nodeType === "DeclareFunction") {
  1083. if (typeof opts === "undefined") {
  1084. return true;
  1085. } else {
  1086. return shallowEqual(node, opts);
  1087. }
  1088. }
  1089. return false;
  1090. }
  1091. function isDeclareInterface(node, opts) {
  1092. if (!node) return false;
  1093. var nodeType = node.type;
  1094. if (nodeType === "DeclareInterface") {
  1095. if (typeof opts === "undefined") {
  1096. return true;
  1097. } else {
  1098. return shallowEqual(node, opts);
  1099. }
  1100. }
  1101. return false;
  1102. }
  1103. function isDeclareModule(node, opts) {
  1104. if (!node) return false;
  1105. var nodeType = node.type;
  1106. if (nodeType === "DeclareModule") {
  1107. if (typeof opts === "undefined") {
  1108. return true;
  1109. } else {
  1110. return shallowEqual(node, opts);
  1111. }
  1112. }
  1113. return false;
  1114. }
  1115. function isDeclareModuleExports(node, opts) {
  1116. if (!node) return false;
  1117. var nodeType = node.type;
  1118. if (nodeType === "DeclareModuleExports") {
  1119. if (typeof opts === "undefined") {
  1120. return true;
  1121. } else {
  1122. return shallowEqual(node, opts);
  1123. }
  1124. }
  1125. return false;
  1126. }
  1127. function isDeclareTypeAlias(node, opts) {
  1128. if (!node) return false;
  1129. var nodeType = node.type;
  1130. if (nodeType === "DeclareTypeAlias") {
  1131. if (typeof opts === "undefined") {
  1132. return true;
  1133. } else {
  1134. return shallowEqual(node, opts);
  1135. }
  1136. }
  1137. return false;
  1138. }
  1139. function isDeclareOpaqueType(node, opts) {
  1140. if (!node) return false;
  1141. var nodeType = node.type;
  1142. if (nodeType === "DeclareOpaqueType") {
  1143. if (typeof opts === "undefined") {
  1144. return true;
  1145. } else {
  1146. return shallowEqual(node, opts);
  1147. }
  1148. }
  1149. return false;
  1150. }
  1151. function isDeclareVariable(node, opts) {
  1152. if (!node) return false;
  1153. var nodeType = node.type;
  1154. if (nodeType === "DeclareVariable") {
  1155. if (typeof opts === "undefined") {
  1156. return true;
  1157. } else {
  1158. return shallowEqual(node, opts);
  1159. }
  1160. }
  1161. return false;
  1162. }
  1163. function isDeclareExportDeclaration(node, opts) {
  1164. if (!node) return false;
  1165. var nodeType = node.type;
  1166. if (nodeType === "DeclareExportDeclaration") {
  1167. if (typeof opts === "undefined") {
  1168. return true;
  1169. } else {
  1170. return shallowEqual(node, opts);
  1171. }
  1172. }
  1173. return false;
  1174. }
  1175. function isDeclareExportAllDeclaration(node, opts) {
  1176. if (!node) return false;
  1177. var nodeType = node.type;
  1178. if (nodeType === "DeclareExportAllDeclaration") {
  1179. if (typeof opts === "undefined") {
  1180. return true;
  1181. } else {
  1182. return shallowEqual(node, opts);
  1183. }
  1184. }
  1185. return false;
  1186. }
  1187. function isDeclaredPredicate(node, opts) {
  1188. if (!node) return false;
  1189. var nodeType = node.type;
  1190. if (nodeType === "DeclaredPredicate") {
  1191. if (typeof opts === "undefined") {
  1192. return true;
  1193. } else {
  1194. return shallowEqual(node, opts);
  1195. }
  1196. }
  1197. return false;
  1198. }
  1199. function isExistsTypeAnnotation(node, opts) {
  1200. if (!node) return false;
  1201. var nodeType = node.type;
  1202. if (nodeType === "ExistsTypeAnnotation") {
  1203. if (typeof opts === "undefined") {
  1204. return true;
  1205. } else {
  1206. return shallowEqual(node, opts);
  1207. }
  1208. }
  1209. return false;
  1210. }
  1211. function isFunctionTypeAnnotation(node, opts) {
  1212. if (!node) return false;
  1213. var nodeType = node.type;
  1214. if (nodeType === "FunctionTypeAnnotation") {
  1215. if (typeof opts === "undefined") {
  1216. return true;
  1217. } else {
  1218. return shallowEqual(node, opts);
  1219. }
  1220. }
  1221. return false;
  1222. }
  1223. function isFunctionTypeParam(node, opts) {
  1224. if (!node) return false;
  1225. var nodeType = node.type;
  1226. if (nodeType === "FunctionTypeParam") {
  1227. if (typeof opts === "undefined") {
  1228. return true;
  1229. } else {
  1230. return shallowEqual(node, opts);
  1231. }
  1232. }
  1233. return false;
  1234. }
  1235. function isGenericTypeAnnotation(node, opts) {
  1236. if (!node) return false;
  1237. var nodeType = node.type;
  1238. if (nodeType === "GenericTypeAnnotation") {
  1239. if (typeof opts === "undefined") {
  1240. return true;
  1241. } else {
  1242. return shallowEqual(node, opts);
  1243. }
  1244. }
  1245. return false;
  1246. }
  1247. function isInferredPredicate(node, opts) {
  1248. if (!node) return false;
  1249. var nodeType = node.type;
  1250. if (nodeType === "InferredPredicate") {
  1251. if (typeof opts === "undefined") {
  1252. return true;
  1253. } else {
  1254. return shallowEqual(node, opts);
  1255. }
  1256. }
  1257. return false;
  1258. }
  1259. function isInterfaceExtends(node, opts) {
  1260. if (!node) return false;
  1261. var nodeType = node.type;
  1262. if (nodeType === "InterfaceExtends") {
  1263. if (typeof opts === "undefined") {
  1264. return true;
  1265. } else {
  1266. return shallowEqual(node, opts);
  1267. }
  1268. }
  1269. return false;
  1270. }
  1271. function isInterfaceDeclaration(node, opts) {
  1272. if (!node) return false;
  1273. var nodeType = node.type;
  1274. if (nodeType === "InterfaceDeclaration") {
  1275. if (typeof opts === "undefined") {
  1276. return true;
  1277. } else {
  1278. return shallowEqual(node, opts);
  1279. }
  1280. }
  1281. return false;
  1282. }
  1283. function isInterfaceTypeAnnotation(node, opts) {
  1284. if (!node) return false;
  1285. var nodeType = node.type;
  1286. if (nodeType === "InterfaceTypeAnnotation") {
  1287. if (typeof opts === "undefined") {
  1288. return true;
  1289. } else {
  1290. return shallowEqual(node, opts);
  1291. }
  1292. }
  1293. return false;
  1294. }
  1295. function isIntersectionTypeAnnotation(node, opts) {
  1296. if (!node) return false;
  1297. var nodeType = node.type;
  1298. if (nodeType === "IntersectionTypeAnnotation") {
  1299. if (typeof opts === "undefined") {
  1300. return true;
  1301. } else {
  1302. return shallowEqual(node, opts);
  1303. }
  1304. }
  1305. return false;
  1306. }
  1307. function isMixedTypeAnnotation(node, opts) {
  1308. if (!node) return false;
  1309. var nodeType = node.type;
  1310. if (nodeType === "MixedTypeAnnotation") {
  1311. if (typeof opts === "undefined") {
  1312. return true;
  1313. } else {
  1314. return shallowEqual(node, opts);
  1315. }
  1316. }
  1317. return false;
  1318. }
  1319. function isEmptyTypeAnnotation(node, opts) {
  1320. if (!node) return false;
  1321. var nodeType = node.type;
  1322. if (nodeType === "EmptyTypeAnnotation") {
  1323. if (typeof opts === "undefined") {
  1324. return true;
  1325. } else {
  1326. return shallowEqual(node, opts);
  1327. }
  1328. }
  1329. return false;
  1330. }
  1331. function isNullableTypeAnnotation(node, opts) {
  1332. if (!node) return false;
  1333. var nodeType = node.type;
  1334. if (nodeType === "NullableTypeAnnotation") {
  1335. if (typeof opts === "undefined") {
  1336. return true;
  1337. } else {
  1338. return shallowEqual(node, opts);
  1339. }
  1340. }
  1341. return false;
  1342. }
  1343. function isNumberLiteralTypeAnnotation(node, opts) {
  1344. if (!node) return false;
  1345. var nodeType = node.type;
  1346. if (nodeType === "NumberLiteralTypeAnnotation") {
  1347. if (typeof opts === "undefined") {
  1348. return true;
  1349. } else {
  1350. return shallowEqual(node, opts);
  1351. }
  1352. }
  1353. return false;
  1354. }
  1355. function isNumberTypeAnnotation(node, opts) {
  1356. if (!node) return false;
  1357. var nodeType = node.type;
  1358. if (nodeType === "NumberTypeAnnotation") {
  1359. if (typeof opts === "undefined") {
  1360. return true;
  1361. } else {
  1362. return shallowEqual(node, opts);
  1363. }
  1364. }
  1365. return false;
  1366. }
  1367. function isObjectTypeAnnotation(node, opts) {
  1368. if (!node) return false;
  1369. var nodeType = node.type;
  1370. if (nodeType === "ObjectTypeAnnotation") {
  1371. if (typeof opts === "undefined") {
  1372. return true;
  1373. } else {
  1374. return shallowEqual(node, opts);
  1375. }
  1376. }
  1377. return false;
  1378. }
  1379. function isObjectTypeInternalSlot(node, opts) {
  1380. if (!node) return false;
  1381. var nodeType = node.type;
  1382. if (nodeType === "ObjectTypeInternalSlot") {
  1383. if (typeof opts === "undefined") {
  1384. return true;
  1385. } else {
  1386. return shallowEqual(node, opts);
  1387. }
  1388. }
  1389. return false;
  1390. }
  1391. function isObjectTypeCallProperty(node, opts) {
  1392. if (!node) return false;
  1393. var nodeType = node.type;
  1394. if (nodeType === "ObjectTypeCallProperty") {
  1395. if (typeof opts === "undefined") {
  1396. return true;
  1397. } else {
  1398. return shallowEqual(node, opts);
  1399. }
  1400. }
  1401. return false;
  1402. }
  1403. function isObjectTypeIndexer(node, opts) {
  1404. if (!node) return false;
  1405. var nodeType = node.type;
  1406. if (nodeType === "ObjectTypeIndexer") {
  1407. if (typeof opts === "undefined") {
  1408. return true;
  1409. } else {
  1410. return shallowEqual(node, opts);
  1411. }
  1412. }
  1413. return false;
  1414. }
  1415. function isObjectTypeProperty(node, opts) {
  1416. if (!node) return false;
  1417. var nodeType = node.type;
  1418. if (nodeType === "ObjectTypeProperty") {
  1419. if (typeof opts === "undefined") {
  1420. return true;
  1421. } else {
  1422. return shallowEqual(node, opts);
  1423. }
  1424. }
  1425. return false;
  1426. }
  1427. function isObjectTypeSpreadProperty(node, opts) {
  1428. if (!node) return false;
  1429. var nodeType = node.type;
  1430. if (nodeType === "ObjectTypeSpreadProperty") {
  1431. if (typeof opts === "undefined") {
  1432. return true;
  1433. } else {
  1434. return shallowEqual(node, opts);
  1435. }
  1436. }
  1437. return false;
  1438. }
  1439. function isOpaqueType(node, opts) {
  1440. if (!node) return false;
  1441. var nodeType = node.type;
  1442. if (nodeType === "OpaqueType") {
  1443. if (typeof opts === "undefined") {
  1444. return true;
  1445. } else {
  1446. return shallowEqual(node, opts);
  1447. }
  1448. }
  1449. return false;
  1450. }
  1451. function isQualifiedTypeIdentifier(node, opts) {
  1452. if (!node) return false;
  1453. var nodeType = node.type;
  1454. if (nodeType === "QualifiedTypeIdentifier") {
  1455. if (typeof opts === "undefined") {
  1456. return true;
  1457. } else {
  1458. return shallowEqual(node, opts);
  1459. }
  1460. }
  1461. return false;
  1462. }
  1463. function isStringLiteralTypeAnnotation(node, opts) {
  1464. if (!node) return false;
  1465. var nodeType = node.type;
  1466. if (nodeType === "StringLiteralTypeAnnotation") {
  1467. if (typeof opts === "undefined") {
  1468. return true;
  1469. } else {
  1470. return shallowEqual(node, opts);
  1471. }
  1472. }
  1473. return false;
  1474. }
  1475. function isStringTypeAnnotation(node, opts) {
  1476. if (!node) return false;
  1477. var nodeType = node.type;
  1478. if (nodeType === "StringTypeAnnotation") {
  1479. if (typeof opts === "undefined") {
  1480. return true;
  1481. } else {
  1482. return shallowEqual(node, opts);
  1483. }
  1484. }
  1485. return false;
  1486. }
  1487. function isThisTypeAnnotation(node, opts) {
  1488. if (!node) return false;
  1489. var nodeType = node.type;
  1490. if (nodeType === "ThisTypeAnnotation") {
  1491. if (typeof opts === "undefined") {
  1492. return true;
  1493. } else {
  1494. return shallowEqual(node, opts);
  1495. }
  1496. }
  1497. return false;
  1498. }
  1499. function isTupleTypeAnnotation(node, opts) {
  1500. if (!node) return false;
  1501. var nodeType = node.type;
  1502. if (nodeType === "TupleTypeAnnotation") {
  1503. if (typeof opts === "undefined") {
  1504. return true;
  1505. } else {
  1506. return shallowEqual(node, opts);
  1507. }
  1508. }
  1509. return false;
  1510. }
  1511. function isTypeofTypeAnnotation(node, opts) {
  1512. if (!node) return false;
  1513. var nodeType = node.type;
  1514. if (nodeType === "TypeofTypeAnnotation") {
  1515. if (typeof opts === "undefined") {
  1516. return true;
  1517. } else {
  1518. return shallowEqual(node, opts);
  1519. }
  1520. }
  1521. return false;
  1522. }
  1523. function isTypeAlias(node, opts) {
  1524. if (!node) return false;
  1525. var nodeType = node.type;
  1526. if (nodeType === "TypeAlias") {
  1527. if (typeof opts === "undefined") {
  1528. return true;
  1529. } else {
  1530. return shallowEqual(node, opts);
  1531. }
  1532. }
  1533. return false;
  1534. }
  1535. function isTypeAnnotation(node, opts) {
  1536. if (!node) return false;
  1537. var nodeType = node.type;
  1538. if (nodeType === "TypeAnnotation") {
  1539. if (typeof opts === "undefined") {
  1540. return true;
  1541. } else {
  1542. return shallowEqual(node, opts);
  1543. }
  1544. }
  1545. return false;
  1546. }
  1547. function isTypeCastExpression(node, opts) {
  1548. if (!node) return false;
  1549. var nodeType = node.type;
  1550. if (nodeType === "TypeCastExpression") {
  1551. if (typeof opts === "undefined") {
  1552. return true;
  1553. } else {
  1554. return shallowEqual(node, opts);
  1555. }
  1556. }
  1557. return false;
  1558. }
  1559. function isTypeParameter(node, opts) {
  1560. if (!node) return false;
  1561. var nodeType = node.type;
  1562. if (nodeType === "TypeParameter") {
  1563. if (typeof opts === "undefined") {
  1564. return true;
  1565. } else {
  1566. return shallowEqual(node, opts);
  1567. }
  1568. }
  1569. return false;
  1570. }
  1571. function isTypeParameterDeclaration(node, opts) {
  1572. if (!node) return false;
  1573. var nodeType = node.type;
  1574. if (nodeType === "TypeParameterDeclaration") {
  1575. if (typeof opts === "undefined") {
  1576. return true;
  1577. } else {
  1578. return shallowEqual(node, opts);
  1579. }
  1580. }
  1581. return false;
  1582. }
  1583. function isTypeParameterInstantiation(node, opts) {
  1584. if (!node) return false;
  1585. var nodeType = node.type;
  1586. if (nodeType === "TypeParameterInstantiation") {
  1587. if (typeof opts === "undefined") {
  1588. return true;
  1589. } else {
  1590. return shallowEqual(node, opts);
  1591. }
  1592. }
  1593. return false;
  1594. }
  1595. function isUnionTypeAnnotation(node, opts) {
  1596. if (!node) return false;
  1597. var nodeType = node.type;
  1598. if (nodeType === "UnionTypeAnnotation") {
  1599. if (typeof opts === "undefined") {
  1600. return true;
  1601. } else {
  1602. return shallowEqual(node, opts);
  1603. }
  1604. }
  1605. return false;
  1606. }
  1607. function isVariance(node, opts) {
  1608. if (!node) return false;
  1609. var nodeType = node.type;
  1610. if (nodeType === "Variance") {
  1611. if (typeof opts === "undefined") {
  1612. return true;
  1613. } else {
  1614. return shallowEqual(node, opts);
  1615. }
  1616. }
  1617. return false;
  1618. }
  1619. function isVoidTypeAnnotation(node, opts) {
  1620. if (!node) return false;
  1621. var nodeType = node.type;
  1622. if (nodeType === "VoidTypeAnnotation") {
  1623. if (typeof opts === "undefined") {
  1624. return true;
  1625. } else {
  1626. return shallowEqual(node, opts);
  1627. }
  1628. }
  1629. return false;
  1630. }
  1631. function isEnumDeclaration(node, opts) {
  1632. if (!node) return false;
  1633. var nodeType = node.type;
  1634. if (nodeType === "EnumDeclaration") {
  1635. if (typeof opts === "undefined") {
  1636. return true;
  1637. } else {
  1638. return shallowEqual(node, opts);
  1639. }
  1640. }
  1641. return false;
  1642. }
  1643. function isEnumBooleanBody(node, opts) {
  1644. if (!node) return false;
  1645. var nodeType = node.type;
  1646. if (nodeType === "EnumBooleanBody") {
  1647. if (typeof opts === "undefined") {
  1648. return true;
  1649. } else {
  1650. return shallowEqual(node, opts);
  1651. }
  1652. }
  1653. return false;
  1654. }
  1655. function isEnumNumberBody(node, opts) {
  1656. if (!node) return false;
  1657. var nodeType = node.type;
  1658. if (nodeType === "EnumNumberBody") {
  1659. if (typeof opts === "undefined") {
  1660. return true;
  1661. } else {
  1662. return shallowEqual(node, opts);
  1663. }
  1664. }
  1665. return false;
  1666. }
  1667. function isEnumStringBody(node, opts) {
  1668. if (!node) return false;
  1669. var nodeType = node.type;
  1670. if (nodeType === "EnumStringBody") {
  1671. if (typeof opts === "undefined") {
  1672. return true;
  1673. } else {
  1674. return shallowEqual(node, opts);
  1675. }
  1676. }
  1677. return false;
  1678. }
  1679. function isEnumSymbolBody(node, opts) {
  1680. if (!node) return false;
  1681. var nodeType = node.type;
  1682. if (nodeType === "EnumSymbolBody") {
  1683. if (typeof opts === "undefined") {
  1684. return true;
  1685. } else {
  1686. return shallowEqual(node, opts);
  1687. }
  1688. }
  1689. return false;
  1690. }
  1691. function isEnumBooleanMember(node, opts) {
  1692. if (!node) return false;
  1693. var nodeType = node.type;
  1694. if (nodeType === "EnumBooleanMember") {
  1695. if (typeof opts === "undefined") {
  1696. return true;
  1697. } else {
  1698. return shallowEqual(node, opts);
  1699. }
  1700. }
  1701. return false;
  1702. }
  1703. function isEnumNumberMember(node, opts) {
  1704. if (!node) return false;
  1705. var nodeType = node.type;
  1706. if (nodeType === "EnumNumberMember") {
  1707. if (typeof opts === "undefined") {
  1708. return true;
  1709. } else {
  1710. return shallowEqual(node, opts);
  1711. }
  1712. }
  1713. return false;
  1714. }
  1715. function isEnumStringMember(node, opts) {
  1716. if (!node) return false;
  1717. var nodeType = node.type;
  1718. if (nodeType === "EnumStringMember") {
  1719. if (typeof opts === "undefined") {
  1720. return true;
  1721. } else {
  1722. return shallowEqual(node, opts);
  1723. }
  1724. }
  1725. return false;
  1726. }
  1727. function isEnumDefaultedMember(node, opts) {
  1728. if (!node) return false;
  1729. var nodeType = node.type;
  1730. if (nodeType === "EnumDefaultedMember") {
  1731. if (typeof opts === "undefined") {
  1732. return true;
  1733. } else {
  1734. return shallowEqual(node, opts);
  1735. }
  1736. }
  1737. return false;
  1738. }
  1739. function isJSXAttribute(node, opts) {
  1740. if (!node) return false;
  1741. var nodeType = node.type;
  1742. if (nodeType === "JSXAttribute") {
  1743. if (typeof opts === "undefined") {
  1744. return true;
  1745. } else {
  1746. return shallowEqual(node, opts);
  1747. }
  1748. }
  1749. return false;
  1750. }
  1751. function isJSXClosingElement(node, opts) {
  1752. if (!node) return false;
  1753. var nodeType = node.type;
  1754. if (nodeType === "JSXClosingElement") {
  1755. if (typeof opts === "undefined") {
  1756. return true;
  1757. } else {
  1758. return shallowEqual(node, opts);
  1759. }
  1760. }
  1761. return false;
  1762. }
  1763. function isJSXElement(node, opts) {
  1764. if (!node) return false;
  1765. var nodeType = node.type;
  1766. if (nodeType === "JSXElement") {
  1767. if (typeof opts === "undefined") {
  1768. return true;
  1769. } else {
  1770. return shallowEqual(node, opts);
  1771. }
  1772. }
  1773. return false;
  1774. }
  1775. function isJSXEmptyExpression(node, opts) {
  1776. if (!node) return false;
  1777. var nodeType = node.type;
  1778. if (nodeType === "JSXEmptyExpression") {
  1779. if (typeof opts === "undefined") {
  1780. return true;
  1781. } else {
  1782. return shallowEqual(node, opts);
  1783. }
  1784. }
  1785. return false;
  1786. }
  1787. function isJSXExpressionContainer(node, opts) {
  1788. if (!node) return false;
  1789. var nodeType = node.type;
  1790. if (nodeType === "JSXExpressionContainer") {
  1791. if (typeof opts === "undefined") {
  1792. return true;
  1793. } else {
  1794. return shallowEqual(node, opts);
  1795. }
  1796. }
  1797. return false;
  1798. }
  1799. function isJSXSpreadChild(node, opts) {
  1800. if (!node) return false;
  1801. var nodeType = node.type;
  1802. if (nodeType === "JSXSpreadChild") {
  1803. if (typeof opts === "undefined") {
  1804. return true;
  1805. } else {
  1806. return shallowEqual(node, opts);
  1807. }
  1808. }
  1809. return false;
  1810. }
  1811. function isJSXIdentifier(node, opts) {
  1812. if (!node) return false;
  1813. var nodeType = node.type;
  1814. if (nodeType === "JSXIdentifier") {
  1815. if (typeof opts === "undefined") {
  1816. return true;
  1817. } else {
  1818. return shallowEqual(node, opts);
  1819. }
  1820. }
  1821. return false;
  1822. }
  1823. function isJSXMemberExpression(node, opts) {
  1824. if (!node) return false;
  1825. var nodeType = node.type;
  1826. if (nodeType === "JSXMemberExpression") {
  1827. if (typeof opts === "undefined") {
  1828. return true;
  1829. } else {
  1830. return shallowEqual(node, opts);
  1831. }
  1832. }
  1833. return false;
  1834. }
  1835. function isJSXNamespacedName(node, opts) {
  1836. if (!node) return false;
  1837. var nodeType = node.type;
  1838. if (nodeType === "JSXNamespacedName") {
  1839. if (typeof opts === "undefined") {
  1840. return true;
  1841. } else {
  1842. return shallowEqual(node, opts);
  1843. }
  1844. }
  1845. return false;
  1846. }
  1847. function isJSXOpeningElement(node, opts) {
  1848. if (!node) return false;
  1849. var nodeType = node.type;
  1850. if (nodeType === "JSXOpeningElement") {
  1851. if (typeof opts === "undefined") {
  1852. return true;
  1853. } else {
  1854. return shallowEqual(node, opts);
  1855. }
  1856. }
  1857. return false;
  1858. }
  1859. function isJSXSpreadAttribute(node, opts) {
  1860. if (!node) return false;
  1861. var nodeType = node.type;
  1862. if (nodeType === "JSXSpreadAttribute") {
  1863. if (typeof opts === "undefined") {
  1864. return true;
  1865. } else {
  1866. return shallowEqual(node, opts);
  1867. }
  1868. }
  1869. return false;
  1870. }
  1871. function isJSXText(node, opts) {
  1872. if (!node) return false;
  1873. var nodeType = node.type;
  1874. if (nodeType === "JSXText") {
  1875. if (typeof opts === "undefined") {
  1876. return true;
  1877. } else {
  1878. return shallowEqual(node, opts);
  1879. }
  1880. }
  1881. return false;
  1882. }
  1883. function isJSXFragment(node, opts) {
  1884. if (!node) return false;
  1885. var nodeType = node.type;
  1886. if (nodeType === "JSXFragment") {
  1887. if (typeof opts === "undefined") {
  1888. return true;
  1889. } else {
  1890. return shallowEqual(node, opts);
  1891. }
  1892. }
  1893. return false;
  1894. }
  1895. function isJSXOpeningFragment(node, opts) {
  1896. if (!node) return false;
  1897. var nodeType = node.type;
  1898. if (nodeType === "JSXOpeningFragment") {
  1899. if (typeof opts === "undefined") {
  1900. return true;
  1901. } else {
  1902. return shallowEqual(node, opts);
  1903. }
  1904. }
  1905. return false;
  1906. }
  1907. function isJSXClosingFragment(node, opts) {
  1908. if (!node) return false;
  1909. var nodeType = node.type;
  1910. if (nodeType === "JSXClosingFragment") {
  1911. if (typeof opts === "undefined") {
  1912. return true;
  1913. } else {
  1914. return shallowEqual(node, opts);
  1915. }
  1916. }
  1917. return false;
  1918. }
  1919. function isNoop(node, opts) {
  1920. if (!node) return false;
  1921. var nodeType = node.type;
  1922. if (nodeType === "Noop") {
  1923. if (typeof opts === "undefined") {
  1924. return true;
  1925. } else {
  1926. return shallowEqual(node, opts);
  1927. }
  1928. }
  1929. return false;
  1930. }
  1931. function isPlaceholder(node, opts) {
  1932. if (!node) return false;
  1933. var nodeType = node.type;
  1934. if (nodeType === "Placeholder") {
  1935. if (typeof opts === "undefined") {
  1936. return true;
  1937. } else {
  1938. return shallowEqual(node, opts);
  1939. }
  1940. }
  1941. return false;
  1942. }
  1943. function isV8IntrinsicIdentifier(node, opts) {
  1944. if (!node) return false;
  1945. var nodeType = node.type;
  1946. if (nodeType === "V8IntrinsicIdentifier") {
  1947. if (typeof opts === "undefined") {
  1948. return true;
  1949. } else {
  1950. return shallowEqual(node, opts);
  1951. }
  1952. }
  1953. return false;
  1954. }
  1955. function isArgumentPlaceholder(node, opts) {
  1956. if (!node) return false;
  1957. var nodeType = node.type;
  1958. if (nodeType === "ArgumentPlaceholder") {
  1959. if (typeof opts === "undefined") {
  1960. return true;
  1961. } else {
  1962. return shallowEqual(node, opts);
  1963. }
  1964. }
  1965. return false;
  1966. }
  1967. function isAwaitExpression(node, opts) {
  1968. if (!node) return false;
  1969. var nodeType = node.type;
  1970. if (nodeType === "AwaitExpression") {
  1971. if (typeof opts === "undefined") {
  1972. return true;
  1973. } else {
  1974. return shallowEqual(node, opts);
  1975. }
  1976. }
  1977. return false;
  1978. }
  1979. function isBindExpression(node, opts) {
  1980. if (!node) return false;
  1981. var nodeType = node.type;
  1982. if (nodeType === "BindExpression") {
  1983. if (typeof opts === "undefined") {
  1984. return true;
  1985. } else {
  1986. return shallowEqual(node, opts);
  1987. }
  1988. }
  1989. return false;
  1990. }
  1991. function isClassProperty(node, opts) {
  1992. if (!node) return false;
  1993. var nodeType = node.type;
  1994. if (nodeType === "ClassProperty") {
  1995. if (typeof opts === "undefined") {
  1996. return true;
  1997. } else {
  1998. return shallowEqual(node, opts);
  1999. }
  2000. }
  2001. return false;
  2002. }
  2003. function isOptionalMemberExpression(node, opts) {
  2004. if (!node) return false;
  2005. var nodeType = node.type;
  2006. if (nodeType === "OptionalMemberExpression") {
  2007. if (typeof opts === "undefined") {
  2008. return true;
  2009. } else {
  2010. return shallowEqual(node, opts);
  2011. }
  2012. }
  2013. return false;
  2014. }
  2015. function isPipelineTopicExpression(node, opts) {
  2016. if (!node) return false;
  2017. var nodeType = node.type;
  2018. if (nodeType === "PipelineTopicExpression") {
  2019. if (typeof opts === "undefined") {
  2020. return true;
  2021. } else {
  2022. return shallowEqual(node, opts);
  2023. }
  2024. }
  2025. return false;
  2026. }
  2027. function isPipelineBareFunction(node, opts) {
  2028. if (!node) return false;
  2029. var nodeType = node.type;
  2030. if (nodeType === "PipelineBareFunction") {
  2031. if (typeof opts === "undefined") {
  2032. return true;
  2033. } else {
  2034. return shallowEqual(node, opts);
  2035. }
  2036. }
  2037. return false;
  2038. }
  2039. function isPipelinePrimaryTopicReference(node, opts) {
  2040. if (!node) return false;
  2041. var nodeType = node.type;
  2042. if (nodeType === "PipelinePrimaryTopicReference") {
  2043. if (typeof opts === "undefined") {
  2044. return true;
  2045. } else {
  2046. return shallowEqual(node, opts);
  2047. }
  2048. }
  2049. return false;
  2050. }
  2051. function isOptionalCallExpression(node, opts) {
  2052. if (!node) return false;
  2053. var nodeType = node.type;
  2054. if (nodeType === "OptionalCallExpression") {
  2055. if (typeof opts === "undefined") {
  2056. return true;
  2057. } else {
  2058. return shallowEqual(node, opts);
  2059. }
  2060. }
  2061. return false;
  2062. }
  2063. function isClassPrivateProperty(node, opts) {
  2064. if (!node) return false;
  2065. var nodeType = node.type;
  2066. if (nodeType === "ClassPrivateProperty") {
  2067. if (typeof opts === "undefined") {
  2068. return true;
  2069. } else {
  2070. return shallowEqual(node, opts);
  2071. }
  2072. }
  2073. return false;
  2074. }
  2075. function isClassPrivateMethod(node, opts) {
  2076. if (!node) return false;
  2077. var nodeType = node.type;
  2078. if (nodeType === "ClassPrivateMethod") {
  2079. if (typeof opts === "undefined") {
  2080. return true;
  2081. } else {
  2082. return shallowEqual(node, opts);
  2083. }
  2084. }
  2085. return false;
  2086. }
  2087. function isImport(node, opts) {
  2088. if (!node) return false;
  2089. var nodeType = node.type;
  2090. if (nodeType === "Import") {
  2091. if (typeof opts === "undefined") {
  2092. return true;
  2093. } else {
  2094. return shallowEqual(node, opts);
  2095. }
  2096. }
  2097. return false;
  2098. }
  2099. function isDecorator(node, opts) {
  2100. if (!node) return false;
  2101. var nodeType = node.type;
  2102. if (nodeType === "Decorator") {
  2103. if (typeof opts === "undefined") {
  2104. return true;
  2105. } else {
  2106. return shallowEqual(node, opts);
  2107. }
  2108. }
  2109. return false;
  2110. }
  2111. function isDoExpression(node, opts) {
  2112. if (!node) return false;
  2113. var nodeType = node.type;
  2114. if (nodeType === "DoExpression") {
  2115. if (typeof opts === "undefined") {
  2116. return true;
  2117. } else {
  2118. return shallowEqual(node, opts);
  2119. }
  2120. }
  2121. return false;
  2122. }
  2123. function isExportDefaultSpecifier(node, opts) {
  2124. if (!node) return false;
  2125. var nodeType = node.type;
  2126. if (nodeType === "ExportDefaultSpecifier") {
  2127. if (typeof opts === "undefined") {
  2128. return true;
  2129. } else {
  2130. return shallowEqual(node, opts);
  2131. }
  2132. }
  2133. return false;
  2134. }
  2135. function isExportNamespaceSpecifier(node, opts) {
  2136. if (!node) return false;
  2137. var nodeType = node.type;
  2138. if (nodeType === "ExportNamespaceSpecifier") {
  2139. if (typeof opts === "undefined") {
  2140. return true;
  2141. } else {
  2142. return shallowEqual(node, opts);
  2143. }
  2144. }
  2145. return false;
  2146. }
  2147. function isPrivateName(node, opts) {
  2148. if (!node) return false;
  2149. var nodeType = node.type;
  2150. if (nodeType === "PrivateName") {
  2151. if (typeof opts === "undefined") {
  2152. return true;
  2153. } else {
  2154. return shallowEqual(node, opts);
  2155. }
  2156. }
  2157. return false;
  2158. }
  2159. function isBigIntLiteral(node, opts) {
  2160. if (!node) return false;
  2161. var nodeType = node.type;
  2162. if (nodeType === "BigIntLiteral") {
  2163. if (typeof opts === "undefined") {
  2164. return true;
  2165. } else {
  2166. return shallowEqual(node, opts);
  2167. }
  2168. }
  2169. return false;
  2170. }
  2171. function isTSParameterProperty(node, opts) {
  2172. if (!node) return false;
  2173. var nodeType = node.type;
  2174. if (nodeType === "TSParameterProperty") {
  2175. if (typeof opts === "undefined") {
  2176. return true;
  2177. } else {
  2178. return shallowEqual(node, opts);
  2179. }
  2180. }
  2181. return false;
  2182. }
  2183. function isTSDeclareFunction(node, opts) {
  2184. if (!node) return false;
  2185. var nodeType = node.type;
  2186. if (nodeType === "TSDeclareFunction") {
  2187. if (typeof opts === "undefined") {
  2188. return true;
  2189. } else {
  2190. return shallowEqual(node, opts);
  2191. }
  2192. }
  2193. return false;
  2194. }
  2195. function isTSDeclareMethod(node, opts) {
  2196. if (!node) return false;
  2197. var nodeType = node.type;
  2198. if (nodeType === "TSDeclareMethod") {
  2199. if (typeof opts === "undefined") {
  2200. return true;
  2201. } else {
  2202. return shallowEqual(node, opts);
  2203. }
  2204. }
  2205. return false;
  2206. }
  2207. function isTSQualifiedName(node, opts) {
  2208. if (!node) return false;
  2209. var nodeType = node.type;
  2210. if (nodeType === "TSQualifiedName") {
  2211. if (typeof opts === "undefined") {
  2212. return true;
  2213. } else {
  2214. return shallowEqual(node, opts);
  2215. }
  2216. }
  2217. return false;
  2218. }
  2219. function isTSCallSignatureDeclaration(node, opts) {
  2220. if (!node) return false;
  2221. var nodeType = node.type;
  2222. if (nodeType === "TSCallSignatureDeclaration") {
  2223. if (typeof opts === "undefined") {
  2224. return true;
  2225. } else {
  2226. return shallowEqual(node, opts);
  2227. }
  2228. }
  2229. return false;
  2230. }
  2231. function isTSConstructSignatureDeclaration(node, opts) {
  2232. if (!node) return false;
  2233. var nodeType = node.type;
  2234. if (nodeType === "TSConstructSignatureDeclaration") {
  2235. if (typeof opts === "undefined") {
  2236. return true;
  2237. } else {
  2238. return shallowEqual(node, opts);
  2239. }
  2240. }
  2241. return false;
  2242. }
  2243. function isTSPropertySignature(node, opts) {
  2244. if (!node) return false;
  2245. var nodeType = node.type;
  2246. if (nodeType === "TSPropertySignature") {
  2247. if (typeof opts === "undefined") {
  2248. return true;
  2249. } else {
  2250. return shallowEqual(node, opts);
  2251. }
  2252. }
  2253. return false;
  2254. }
  2255. function isTSMethodSignature(node, opts) {
  2256. if (!node) return false;
  2257. var nodeType = node.type;
  2258. if (nodeType === "TSMethodSignature") {
  2259. if (typeof opts === "undefined") {
  2260. return true;
  2261. } else {
  2262. return shallowEqual(node, opts);
  2263. }
  2264. }
  2265. return false;
  2266. }
  2267. function isTSIndexSignature(node, opts) {
  2268. if (!node) return false;
  2269. var nodeType = node.type;
  2270. if (nodeType === "TSIndexSignature") {
  2271. if (typeof opts === "undefined") {
  2272. return true;
  2273. } else {
  2274. return shallowEqual(node, opts);
  2275. }
  2276. }
  2277. return false;
  2278. }
  2279. function isTSAnyKeyword(node, opts) {
  2280. if (!node) return false;
  2281. var nodeType = node.type;
  2282. if (nodeType === "TSAnyKeyword") {
  2283. if (typeof opts === "undefined") {
  2284. return true;
  2285. } else {
  2286. return shallowEqual(node, opts);
  2287. }
  2288. }
  2289. return false;
  2290. }
  2291. function isTSBooleanKeyword(node, opts) {
  2292. if (!node) return false;
  2293. var nodeType = node.type;
  2294. if (nodeType === "TSBooleanKeyword") {
  2295. if (typeof opts === "undefined") {
  2296. return true;
  2297. } else {
  2298. return shallowEqual(node, opts);
  2299. }
  2300. }
  2301. return false;
  2302. }
  2303. function isTSBigIntKeyword(node, opts) {
  2304. if (!node) return false;
  2305. var nodeType = node.type;
  2306. if (nodeType === "TSBigIntKeyword") {
  2307. if (typeof opts === "undefined") {
  2308. return true;
  2309. } else {
  2310. return shallowEqual(node, opts);
  2311. }
  2312. }
  2313. return false;
  2314. }
  2315. function isTSNeverKeyword(node, opts) {
  2316. if (!node) return false;
  2317. var nodeType = node.type;
  2318. if (nodeType === "TSNeverKeyword") {
  2319. if (typeof opts === "undefined") {
  2320. return true;
  2321. } else {
  2322. return shallowEqual(node, opts);
  2323. }
  2324. }
  2325. return false;
  2326. }
  2327. function isTSNullKeyword(node, opts) {
  2328. if (!node) return false;
  2329. var nodeType = node.type;
  2330. if (nodeType === "TSNullKeyword") {
  2331. if (typeof opts === "undefined") {
  2332. return true;
  2333. } else {
  2334. return shallowEqual(node, opts);
  2335. }
  2336. }
  2337. return false;
  2338. }
  2339. function isTSNumberKeyword(node, opts) {
  2340. if (!node) return false;
  2341. var nodeType = node.type;
  2342. if (nodeType === "TSNumberKeyword") {
  2343. if (typeof opts === "undefined") {
  2344. return true;
  2345. } else {
  2346. return shallowEqual(node, opts);
  2347. }
  2348. }
  2349. return false;
  2350. }
  2351. function isTSObjectKeyword(node, opts) {
  2352. if (!node) return false;
  2353. var nodeType = node.type;
  2354. if (nodeType === "TSObjectKeyword") {
  2355. if (typeof opts === "undefined") {
  2356. return true;
  2357. } else {
  2358. return shallowEqual(node, opts);
  2359. }
  2360. }
  2361. return false;
  2362. }
  2363. function isTSStringKeyword(node, opts) {
  2364. if (!node) return false;
  2365. var nodeType = node.type;
  2366. if (nodeType === "TSStringKeyword") {
  2367. if (typeof opts === "undefined") {
  2368. return true;
  2369. } else {
  2370. return shallowEqual(node, opts);
  2371. }
  2372. }
  2373. return false;
  2374. }
  2375. function isTSSymbolKeyword(node, opts) {
  2376. if (!node) return false;
  2377. var nodeType = node.type;
  2378. if (nodeType === "TSSymbolKeyword") {
  2379. if (typeof opts === "undefined") {
  2380. return true;
  2381. } else {
  2382. return shallowEqual(node, opts);
  2383. }
  2384. }
  2385. return false;
  2386. }
  2387. function isTSUndefinedKeyword(node, opts) {
  2388. if (!node) return false;
  2389. var nodeType = node.type;
  2390. if (nodeType === "TSUndefinedKeyword") {
  2391. if (typeof opts === "undefined") {
  2392. return true;
  2393. } else {
  2394. return shallowEqual(node, opts);
  2395. }
  2396. }
  2397. return false;
  2398. }
  2399. function isTSUnknownKeyword(node, opts) {
  2400. if (!node) return false;
  2401. var nodeType = node.type;
  2402. if (nodeType === "TSUnknownKeyword") {
  2403. if (typeof opts === "undefined") {
  2404. return true;
  2405. } else {
  2406. return shallowEqual(node, opts);
  2407. }
  2408. }
  2409. return false;
  2410. }
  2411. function isTSVoidKeyword(node, opts) {
  2412. if (!node) return false;
  2413. var nodeType = node.type;
  2414. if (nodeType === "TSVoidKeyword") {
  2415. if (typeof opts === "undefined") {
  2416. return true;
  2417. } else {
  2418. return shallowEqual(node, opts);
  2419. }
  2420. }
  2421. return false;
  2422. }
  2423. function isTSThisType(node, opts) {
  2424. if (!node) return false;
  2425. var nodeType = node.type;
  2426. if (nodeType === "TSThisType") {
  2427. if (typeof opts === "undefined") {
  2428. return true;
  2429. } else {
  2430. return shallowEqual(node, opts);
  2431. }
  2432. }
  2433. return false;
  2434. }
  2435. function isTSFunctionType(node, opts) {
  2436. if (!node) return false;
  2437. var nodeType = node.type;
  2438. if (nodeType === "TSFunctionType") {
  2439. if (typeof opts === "undefined") {
  2440. return true;
  2441. } else {
  2442. return shallowEqual(node, opts);
  2443. }
  2444. }
  2445. return false;
  2446. }
  2447. function isTSConstructorType(node, opts) {
  2448. if (!node) return false;
  2449. var nodeType = node.type;
  2450. if (nodeType === "TSConstructorType") {
  2451. if (typeof opts === "undefined") {
  2452. return true;
  2453. } else {
  2454. return shallowEqual(node, opts);
  2455. }
  2456. }
  2457. return false;
  2458. }
  2459. function isTSTypeReference(node, opts) {
  2460. if (!node) return false;
  2461. var nodeType = node.type;
  2462. if (nodeType === "TSTypeReference") {
  2463. if (typeof opts === "undefined") {
  2464. return true;
  2465. } else {
  2466. return shallowEqual(node, opts);
  2467. }
  2468. }
  2469. return false;
  2470. }
  2471. function isTSTypePredicate(node, opts) {
  2472. if (!node) return false;
  2473. var nodeType = node.type;
  2474. if (nodeType === "TSTypePredicate") {
  2475. if (typeof opts === "undefined") {
  2476. return true;
  2477. } else {
  2478. return shallowEqual(node, opts);
  2479. }
  2480. }
  2481. return false;
  2482. }
  2483. function isTSTypeQuery(node, opts) {
  2484. if (!node) return false;
  2485. var nodeType = node.type;
  2486. if (nodeType === "TSTypeQuery") {
  2487. if (typeof opts === "undefined") {
  2488. return true;
  2489. } else {
  2490. return shallowEqual(node, opts);
  2491. }
  2492. }
  2493. return false;
  2494. }
  2495. function isTSTypeLiteral(node, opts) {
  2496. if (!node) return false;
  2497. var nodeType = node.type;
  2498. if (nodeType === "TSTypeLiteral") {
  2499. if (typeof opts === "undefined") {
  2500. return true;
  2501. } else {
  2502. return shallowEqual(node, opts);
  2503. }
  2504. }
  2505. return false;
  2506. }
  2507. function isTSArrayType(node, opts) {
  2508. if (!node) return false;
  2509. var nodeType = node.type;
  2510. if (nodeType === "TSArrayType") {
  2511. if (typeof opts === "undefined") {
  2512. return true;
  2513. } else {
  2514. return shallowEqual(node, opts);
  2515. }
  2516. }
  2517. return false;
  2518. }
  2519. function isTSTupleType(node, opts) {
  2520. if (!node) return false;
  2521. var nodeType = node.type;
  2522. if (nodeType === "TSTupleType") {
  2523. if (typeof opts === "undefined") {
  2524. return true;
  2525. } else {
  2526. return shallowEqual(node, opts);
  2527. }
  2528. }
  2529. return false;
  2530. }
  2531. function isTSOptionalType(node, opts) {
  2532. if (!node) return false;
  2533. var nodeType = node.type;
  2534. if (nodeType === "TSOptionalType") {
  2535. if (typeof opts === "undefined") {
  2536. return true;
  2537. } else {
  2538. return shallowEqual(node, opts);
  2539. }
  2540. }
  2541. return false;
  2542. }
  2543. function isTSRestType(node, opts) {
  2544. if (!node) return false;
  2545. var nodeType = node.type;
  2546. if (nodeType === "TSRestType") {
  2547. if (typeof opts === "undefined") {
  2548. return true;
  2549. } else {
  2550. return shallowEqual(node, opts);
  2551. }
  2552. }
  2553. return false;
  2554. }
  2555. function isTSUnionType(node, opts) {
  2556. if (!node) return false;
  2557. var nodeType = node.type;
  2558. if (nodeType === "TSUnionType") {
  2559. if (typeof opts === "undefined") {
  2560. return true;
  2561. } else {
  2562. return shallowEqual(node, opts);
  2563. }
  2564. }
  2565. return false;
  2566. }
  2567. function isTSIntersectionType(node, opts) {
  2568. if (!node) return false;
  2569. var nodeType = node.type;
  2570. if (nodeType === "TSIntersectionType") {
  2571. if (typeof opts === "undefined") {
  2572. return true;
  2573. } else {
  2574. return shallowEqual(node, opts);
  2575. }
  2576. }
  2577. return false;
  2578. }
  2579. function isTSConditionalType(node, opts) {
  2580. if (!node) return false;
  2581. var nodeType = node.type;
  2582. if (nodeType === "TSConditionalType") {
  2583. if (typeof opts === "undefined") {
  2584. return true;
  2585. } else {
  2586. return shallowEqual(node, opts);
  2587. }
  2588. }
  2589. return false;
  2590. }
  2591. function isTSInferType(node, opts) {
  2592. if (!node) return false;
  2593. var nodeType = node.type;
  2594. if (nodeType === "TSInferType") {
  2595. if (typeof opts === "undefined") {
  2596. return true;
  2597. } else {
  2598. return shallowEqual(node, opts);
  2599. }
  2600. }
  2601. return false;
  2602. }
  2603. function isTSParenthesizedType(node, opts) {
  2604. if (!node) return false;
  2605. var nodeType = node.type;
  2606. if (nodeType === "TSParenthesizedType") {
  2607. if (typeof opts === "undefined") {
  2608. return true;
  2609. } else {
  2610. return shallowEqual(node, opts);
  2611. }
  2612. }
  2613. return false;
  2614. }
  2615. function isTSTypeOperator(node, opts) {
  2616. if (!node) return false;
  2617. var nodeType = node.type;
  2618. if (nodeType === "TSTypeOperator") {
  2619. if (typeof opts === "undefined") {
  2620. return true;
  2621. } else {
  2622. return shallowEqual(node, opts);
  2623. }
  2624. }
  2625. return false;
  2626. }
  2627. function isTSIndexedAccessType(node, opts) {
  2628. if (!node) return false;
  2629. var nodeType = node.type;
  2630. if (nodeType === "TSIndexedAccessType") {
  2631. if (typeof opts === "undefined") {
  2632. return true;
  2633. } else {
  2634. return shallowEqual(node, opts);
  2635. }
  2636. }
  2637. return false;
  2638. }
  2639. function isTSMappedType(node, opts) {
  2640. if (!node) return false;
  2641. var nodeType = node.type;
  2642. if (nodeType === "TSMappedType") {
  2643. if (typeof opts === "undefined") {
  2644. return true;
  2645. } else {
  2646. return shallowEqual(node, opts);
  2647. }
  2648. }
  2649. return false;
  2650. }
  2651. function isTSLiteralType(node, opts) {
  2652. if (!node) return false;
  2653. var nodeType = node.type;
  2654. if (nodeType === "TSLiteralType") {
  2655. if (typeof opts === "undefined") {
  2656. return true;
  2657. } else {
  2658. return shallowEqual(node, opts);
  2659. }
  2660. }
  2661. return false;
  2662. }
  2663. function isTSExpressionWithTypeArguments(node, opts) {
  2664. if (!node) return false;
  2665. var nodeType = node.type;
  2666. if (nodeType === "TSExpressionWithTypeArguments") {
  2667. if (typeof opts === "undefined") {
  2668. return true;
  2669. } else {
  2670. return shallowEqual(node, opts);
  2671. }
  2672. }
  2673. return false;
  2674. }
  2675. function isTSInterfaceDeclaration(node, opts) {
  2676. if (!node) return false;
  2677. var nodeType = node.type;
  2678. if (nodeType === "TSInterfaceDeclaration") {
  2679. if (typeof opts === "undefined") {
  2680. return true;
  2681. } else {
  2682. return shallowEqual(node, opts);
  2683. }
  2684. }
  2685. return false;
  2686. }
  2687. function isTSInterfaceBody(node, opts) {
  2688. if (!node) return false;
  2689. var nodeType = node.type;
  2690. if (nodeType === "TSInterfaceBody") {
  2691. if (typeof opts === "undefined") {
  2692. return true;
  2693. } else {
  2694. return shallowEqual(node, opts);
  2695. }
  2696. }
  2697. return false;
  2698. }
  2699. function isTSTypeAliasDeclaration(node, opts) {
  2700. if (!node) return false;
  2701. var nodeType = node.type;
  2702. if (nodeType === "TSTypeAliasDeclaration") {
  2703. if (typeof opts === "undefined") {
  2704. return true;
  2705. } else {
  2706. return shallowEqual(node, opts);
  2707. }
  2708. }
  2709. return false;
  2710. }
  2711. function isTSAsExpression(node, opts) {
  2712. if (!node) return false;
  2713. var nodeType = node.type;
  2714. if (nodeType === "TSAsExpression") {
  2715. if (typeof opts === "undefined") {
  2716. return true;
  2717. } else {
  2718. return shallowEqual(node, opts);
  2719. }
  2720. }
  2721. return false;
  2722. }
  2723. function isTSTypeAssertion(node, opts) {
  2724. if (!node) return false;
  2725. var nodeType = node.type;
  2726. if (nodeType === "TSTypeAssertion") {
  2727. if (typeof opts === "undefined") {
  2728. return true;
  2729. } else {
  2730. return shallowEqual(node, opts);
  2731. }
  2732. }
  2733. return false;
  2734. }
  2735. function isTSEnumDeclaration(node, opts) {
  2736. if (!node) return false;
  2737. var nodeType = node.type;
  2738. if (nodeType === "TSEnumDeclaration") {
  2739. if (typeof opts === "undefined") {
  2740. return true;
  2741. } else {
  2742. return shallowEqual(node, opts);
  2743. }
  2744. }
  2745. return false;
  2746. }
  2747. function isTSEnumMember(node, opts) {
  2748. if (!node) return false;
  2749. var nodeType = node.type;
  2750. if (nodeType === "TSEnumMember") {
  2751. if (typeof opts === "undefined") {
  2752. return true;
  2753. } else {
  2754. return shallowEqual(node, opts);
  2755. }
  2756. }
  2757. return false;
  2758. }
  2759. function isTSModuleDeclaration(node, opts) {
  2760. if (!node) return false;
  2761. var nodeType = node.type;
  2762. if (nodeType === "TSModuleDeclaration") {
  2763. if (typeof opts === "undefined") {
  2764. return true;
  2765. } else {
  2766. return shallowEqual(node, opts);
  2767. }
  2768. }
  2769. return false;
  2770. }
  2771. function isTSModuleBlock(node, opts) {
  2772. if (!node) return false;
  2773. var nodeType = node.type;
  2774. if (nodeType === "TSModuleBlock") {
  2775. if (typeof opts === "undefined") {
  2776. return true;
  2777. } else {
  2778. return shallowEqual(node, opts);
  2779. }
  2780. }
  2781. return false;
  2782. }
  2783. function isTSImportType(node, opts) {
  2784. if (!node) return false;
  2785. var nodeType = node.type;
  2786. if (nodeType === "TSImportType") {
  2787. if (typeof opts === "undefined") {
  2788. return true;
  2789. } else {
  2790. return shallowEqual(node, opts);
  2791. }
  2792. }
  2793. return false;
  2794. }
  2795. function isTSImportEqualsDeclaration(node, opts) {
  2796. if (!node) return false;
  2797. var nodeType = node.type;
  2798. if (nodeType === "TSImportEqualsDeclaration") {
  2799. if (typeof opts === "undefined") {
  2800. return true;
  2801. } else {
  2802. return shallowEqual(node, opts);
  2803. }
  2804. }
  2805. return false;
  2806. }
  2807. function isTSExternalModuleReference(node, opts) {
  2808. if (!node) return false;
  2809. var nodeType = node.type;
  2810. if (nodeType === "TSExternalModuleReference") {
  2811. if (typeof opts === "undefined") {
  2812. return true;
  2813. } else {
  2814. return shallowEqual(node, opts);
  2815. }
  2816. }
  2817. return false;
  2818. }
  2819. function isTSNonNullExpression(node, opts) {
  2820. if (!node) return false;
  2821. var nodeType = node.type;
  2822. if (nodeType === "TSNonNullExpression") {
  2823. if (typeof opts === "undefined") {
  2824. return true;
  2825. } else {
  2826. return shallowEqual(node, opts);
  2827. }
  2828. }
  2829. return false;
  2830. }
  2831. function isTSExportAssignment(node, opts) {
  2832. if (!node) return false;
  2833. var nodeType = node.type;
  2834. if (nodeType === "TSExportAssignment") {
  2835. if (typeof opts === "undefined") {
  2836. return true;
  2837. } else {
  2838. return shallowEqual(node, opts);
  2839. }
  2840. }
  2841. return false;
  2842. }
  2843. function isTSNamespaceExportDeclaration(node, opts) {
  2844. if (!node) return false;
  2845. var nodeType = node.type;
  2846. if (nodeType === "TSNamespaceExportDeclaration") {
  2847. if (typeof opts === "undefined") {
  2848. return true;
  2849. } else {
  2850. return shallowEqual(node, opts);
  2851. }
  2852. }
  2853. return false;
  2854. }
  2855. function isTSTypeAnnotation(node, opts) {
  2856. if (!node) return false;
  2857. var nodeType = node.type;
  2858. if (nodeType === "TSTypeAnnotation") {
  2859. if (typeof opts === "undefined") {
  2860. return true;
  2861. } else {
  2862. return shallowEqual(node, opts);
  2863. }
  2864. }
  2865. return false;
  2866. }
  2867. function isTSTypeParameterInstantiation(node, opts) {
  2868. if (!node) return false;
  2869. var nodeType = node.type;
  2870. if (nodeType === "TSTypeParameterInstantiation") {
  2871. if (typeof opts === "undefined") {
  2872. return true;
  2873. } else {
  2874. return shallowEqual(node, opts);
  2875. }
  2876. }
  2877. return false;
  2878. }
  2879. function isTSTypeParameterDeclaration(node, opts) {
  2880. if (!node) return false;
  2881. var nodeType = node.type;
  2882. if (nodeType === "TSTypeParameterDeclaration") {
  2883. if (typeof opts === "undefined") {
  2884. return true;
  2885. } else {
  2886. return shallowEqual(node, opts);
  2887. }
  2888. }
  2889. return false;
  2890. }
  2891. function isTSTypeParameter(node, opts) {
  2892. if (!node) return false;
  2893. var nodeType = node.type;
  2894. if (nodeType === "TSTypeParameter") {
  2895. if (typeof opts === "undefined") {
  2896. return true;
  2897. } else {
  2898. return shallowEqual(node, opts);
  2899. }
  2900. }
  2901. return false;
  2902. }
  2903. function isExpression(node, opts) {
  2904. if (!node) return false;
  2905. var nodeType = node.type;
  2906. if (nodeType === "Expression" || "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 || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "AwaitExpression" === nodeType || "BindExpression" === nodeType || "OptionalMemberExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "OptionalCallExpression" === nodeType || "Import" === nodeType || "DoExpression" === nodeType || "BigIntLiteral" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) {
  2907. if (typeof opts === "undefined") {
  2908. return true;
  2909. } else {
  2910. return shallowEqual(node, opts);
  2911. }
  2912. }
  2913. return false;
  2914. }
  2915. function isBinary(node, opts) {
  2916. if (!node) return false;
  2917. var nodeType = node.type;
  2918. if (nodeType === "Binary" || "BinaryExpression" === nodeType || "LogicalExpression" === nodeType) {
  2919. if (typeof opts === "undefined") {
  2920. return true;
  2921. } else {
  2922. return shallowEqual(node, opts);
  2923. }
  2924. }
  2925. return false;
  2926. }
  2927. function isScopable(node, opts) {
  2928. if (!node) return false;
  2929. var nodeType = node.type;
  2930. if (nodeType === "Scopable" || "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 || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  2931. if (typeof opts === "undefined") {
  2932. return true;
  2933. } else {
  2934. return shallowEqual(node, opts);
  2935. }
  2936. }
  2937. return false;
  2938. }
  2939. function isBlockParent(node, opts) {
  2940. if (!node) return false;
  2941. var nodeType = node.type;
  2942. if (nodeType === "BlockParent" || "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 || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  2943. if (typeof opts === "undefined") {
  2944. return true;
  2945. } else {
  2946. return shallowEqual(node, opts);
  2947. }
  2948. }
  2949. return false;
  2950. }
  2951. function isBlock(node, opts) {
  2952. if (!node) return false;
  2953. var nodeType = node.type;
  2954. if (nodeType === "Block" || "BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  2955. if (typeof opts === "undefined") {
  2956. return true;
  2957. } else {
  2958. return shallowEqual(node, opts);
  2959. }
  2960. }
  2961. return false;
  2962. }
  2963. function isStatement(node, opts) {
  2964. if (!node) return false;
  2965. var nodeType = node.type;
  2966. if (nodeType === "Statement" || "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 || "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)) {
  2967. if (typeof opts === "undefined") {
  2968. return true;
  2969. } else {
  2970. return shallowEqual(node, opts);
  2971. }
  2972. }
  2973. return false;
  2974. }
  2975. function isTerminatorless(node, opts) {
  2976. if (!node) return false;
  2977. var nodeType = node.type;
  2978. if (nodeType === "Terminatorless" || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) {
  2979. if (typeof opts === "undefined") {
  2980. return true;
  2981. } else {
  2982. return shallowEqual(node, opts);
  2983. }
  2984. }
  2985. return false;
  2986. }
  2987. function isCompletionStatement(node, opts) {
  2988. if (!node) return false;
  2989. var nodeType = node.type;
  2990. if (nodeType === "CompletionStatement" || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) {
  2991. if (typeof opts === "undefined") {
  2992. return true;
  2993. } else {
  2994. return shallowEqual(node, opts);
  2995. }
  2996. }
  2997. return false;
  2998. }
  2999. function isConditional(node, opts) {
  3000. if (!node) return false;
  3001. var nodeType = node.type;
  3002. if (nodeType === "Conditional" || "ConditionalExpression" === nodeType || "IfStatement" === nodeType) {
  3003. if (typeof opts === "undefined") {
  3004. return true;
  3005. } else {
  3006. return shallowEqual(node, opts);
  3007. }
  3008. }
  3009. return false;
  3010. }
  3011. function isLoop(node, opts) {
  3012. if (!node) return false;
  3013. var nodeType = node.type;
  3014. if (nodeType === "Loop" || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) {
  3015. if (typeof opts === "undefined") {
  3016. return true;
  3017. } else {
  3018. return shallowEqual(node, opts);
  3019. }
  3020. }
  3021. return false;
  3022. }
  3023. function isWhile(node, opts) {
  3024. if (!node) return false;
  3025. var nodeType = node.type;
  3026. if (nodeType === "While" || "DoWhileStatement" === nodeType || "WhileStatement" === nodeType) {
  3027. if (typeof opts === "undefined") {
  3028. return true;
  3029. } else {
  3030. return shallowEqual(node, opts);
  3031. }
  3032. }
  3033. return false;
  3034. }
  3035. function isExpressionWrapper(node, opts) {
  3036. if (!node) return false;
  3037. var nodeType = node.type;
  3038. if (nodeType === "ExpressionWrapper" || "ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) {
  3039. if (typeof opts === "undefined") {
  3040. return true;
  3041. } else {
  3042. return shallowEqual(node, opts);
  3043. }
  3044. }
  3045. return false;
  3046. }
  3047. function isFor(node, opts) {
  3048. if (!node) return false;
  3049. var nodeType = node.type;
  3050. if (nodeType === "For" || "ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) {
  3051. if (typeof opts === "undefined") {
  3052. return true;
  3053. } else {
  3054. return shallowEqual(node, opts);
  3055. }
  3056. }
  3057. return false;
  3058. }
  3059. function isForXStatement(node, opts) {
  3060. if (!node) return false;
  3061. var nodeType = node.type;
  3062. if (nodeType === "ForXStatement" || "ForInStatement" === nodeType || "ForOfStatement" === nodeType) {
  3063. if (typeof opts === "undefined") {
  3064. return true;
  3065. } else {
  3066. return shallowEqual(node, opts);
  3067. }
  3068. }
  3069. return false;
  3070. }
  3071. function isFunction(node, opts) {
  3072. if (!node) return false;
  3073. var nodeType = node.type;
  3074. if (nodeType === "Function" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  3075. if (typeof opts === "undefined") {
  3076. return true;
  3077. } else {
  3078. return shallowEqual(node, opts);
  3079. }
  3080. }
  3081. return false;
  3082. }
  3083. function isFunctionParent(node, opts) {
  3084. if (!node) return false;
  3085. var nodeType = node.type;
  3086. if (nodeType === "FunctionParent" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  3087. if (typeof opts === "undefined") {
  3088. return true;
  3089. } else {
  3090. return shallowEqual(node, opts);
  3091. }
  3092. }
  3093. return false;
  3094. }
  3095. function isPureish(node, opts) {
  3096. if (!node) return false;
  3097. var nodeType = node.type;
  3098. if (nodeType === "Pureish" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "BigIntLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  3099. if (typeof opts === "undefined") {
  3100. return true;
  3101. } else {
  3102. return shallowEqual(node, opts);
  3103. }
  3104. }
  3105. return false;
  3106. }
  3107. function isDeclaration(node, opts) {
  3108. if (!node) return false;
  3109. var nodeType = node.type;
  3110. if (nodeType === "Declaration" || "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) {
  3111. if (typeof opts === "undefined") {
  3112. return true;
  3113. } else {
  3114. return shallowEqual(node, opts);
  3115. }
  3116. }
  3117. return false;
  3118. }
  3119. function isPatternLike(node, opts) {
  3120. if (!node) return false;
  3121. var nodeType = node.type;
  3122. if (nodeType === "PatternLike" || "Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  3123. if (typeof opts === "undefined") {
  3124. return true;
  3125. } else {
  3126. return shallowEqual(node, opts);
  3127. }
  3128. }
  3129. return false;
  3130. }
  3131. function isLVal(node, opts) {
  3132. if (!node) return false;
  3133. var nodeType = node.type;
  3134. if (nodeType === "LVal" || "Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  3135. if (typeof opts === "undefined") {
  3136. return true;
  3137. } else {
  3138. return shallowEqual(node, opts);
  3139. }
  3140. }
  3141. return false;
  3142. }
  3143. function isTSEntityName(node, opts) {
  3144. if (!node) return false;
  3145. var nodeType = node.type;
  3146. if (nodeType === "TSEntityName" || "Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) {
  3147. if (typeof opts === "undefined") {
  3148. return true;
  3149. } else {
  3150. return shallowEqual(node, opts);
  3151. }
  3152. }
  3153. return false;
  3154. }
  3155. function isLiteral(node, opts) {
  3156. if (!node) return false;
  3157. var nodeType = node.type;
  3158. if (nodeType === "Literal" || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  3159. if (typeof opts === "undefined") {
  3160. return true;
  3161. } else {
  3162. return shallowEqual(node, opts);
  3163. }
  3164. }
  3165. return false;
  3166. }
  3167. function isUserWhitespacable(node, opts) {
  3168. if (!node) return false;
  3169. var nodeType = node.type;
  3170. if (nodeType === "UserWhitespacable" || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) {
  3171. if (typeof opts === "undefined") {
  3172. return true;
  3173. } else {
  3174. return shallowEqual(node, opts);
  3175. }
  3176. }
  3177. return false;
  3178. }
  3179. function isMethod(node, opts) {
  3180. if (!node) return false;
  3181. var nodeType = node.type;
  3182. if (nodeType === "Method" || "ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  3183. if (typeof opts === "undefined") {
  3184. return true;
  3185. } else {
  3186. return shallowEqual(node, opts);
  3187. }
  3188. }
  3189. return false;
  3190. }
  3191. function isObjectMember(node, opts) {
  3192. if (!node) return false;
  3193. var nodeType = node.type;
  3194. if (nodeType === "ObjectMember" || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType) {
  3195. if (typeof opts === "undefined") {
  3196. return true;
  3197. } else {
  3198. return shallowEqual(node, opts);
  3199. }
  3200. }
  3201. return false;
  3202. }
  3203. function isProperty(node, opts) {
  3204. if (!node) return false;
  3205. var nodeType = node.type;
  3206. if (nodeType === "Property" || "ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) {
  3207. if (typeof opts === "undefined") {
  3208. return true;
  3209. } else {
  3210. return shallowEqual(node, opts);
  3211. }
  3212. }
  3213. return false;
  3214. }
  3215. function isUnaryLike(node, opts) {
  3216. if (!node) return false;
  3217. var nodeType = node.type;
  3218. if (nodeType === "UnaryLike" || "UnaryExpression" === nodeType || "SpreadElement" === nodeType) {
  3219. if (typeof opts === "undefined") {
  3220. return true;
  3221. } else {
  3222. return shallowEqual(node, opts);
  3223. }
  3224. }
  3225. return false;
  3226. }
  3227. function isPattern(node, opts) {
  3228. if (!node) return false;
  3229. var nodeType = node.type;
  3230. if (nodeType === "Pattern" || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) {
  3231. if (typeof opts === "undefined") {
  3232. return true;
  3233. } else {
  3234. return shallowEqual(node, opts);
  3235. }
  3236. }
  3237. return false;
  3238. }
  3239. function isClass(node, opts) {
  3240. if (!node) return false;
  3241. var nodeType = node.type;
  3242. if (nodeType === "Class" || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType) {
  3243. if (typeof opts === "undefined") {
  3244. return true;
  3245. } else {
  3246. return shallowEqual(node, opts);
  3247. }
  3248. }
  3249. return false;
  3250. }
  3251. function isModuleDeclaration(node, opts) {
  3252. if (!node) return false;
  3253. var nodeType = node.type;
  3254. if (nodeType === "ModuleDeclaration" || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) {
  3255. if (typeof opts === "undefined") {
  3256. return true;
  3257. } else {
  3258. return shallowEqual(node, opts);
  3259. }
  3260. }
  3261. return false;
  3262. }
  3263. function isExportDeclaration(node, opts) {
  3264. if (!node) return false;
  3265. var nodeType = node.type;
  3266. if (nodeType === "ExportDeclaration" || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) {
  3267. if (typeof opts === "undefined") {
  3268. return true;
  3269. } else {
  3270. return shallowEqual(node, opts);
  3271. }
  3272. }
  3273. return false;
  3274. }
  3275. function isModuleSpecifier(node, opts) {
  3276. if (!node) return false;
  3277. var nodeType = node.type;
  3278. if (nodeType === "ModuleSpecifier" || "ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType) {
  3279. if (typeof opts === "undefined") {
  3280. return true;
  3281. } else {
  3282. return shallowEqual(node, opts);
  3283. }
  3284. }
  3285. return false;
  3286. }
  3287. function isFlow(node, opts) {
  3288. if (!node) return false;
  3289. var nodeType = node.type;
  3290. if (nodeType === "Flow" || "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 || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType) {
  3291. if (typeof opts === "undefined") {
  3292. return true;
  3293. } else {
  3294. return shallowEqual(node, opts);
  3295. }
  3296. }
  3297. return false;
  3298. }
  3299. function isFlowType(node, opts) {
  3300. if (!node) return false;
  3301. var nodeType = node.type;
  3302. if (nodeType === "FlowType" || "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 || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
  3303. if (typeof opts === "undefined") {
  3304. return true;
  3305. } else {
  3306. return shallowEqual(node, opts);
  3307. }
  3308. }
  3309. return false;
  3310. }
  3311. function isFlowBaseAnnotation(node, opts) {
  3312. if (!node) return false;
  3313. var nodeType = node.type;
  3314. if (nodeType === "FlowBaseAnnotation" || "AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
  3315. if (typeof opts === "undefined") {
  3316. return true;
  3317. } else {
  3318. return shallowEqual(node, opts);
  3319. }
  3320. }
  3321. return false;
  3322. }
  3323. function isFlowDeclaration(node, opts) {
  3324. if (!node) return false;
  3325. var nodeType = node.type;
  3326. if (nodeType === "FlowDeclaration" || "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) {
  3327. if (typeof opts === "undefined") {
  3328. return true;
  3329. } else {
  3330. return shallowEqual(node, opts);
  3331. }
  3332. }
  3333. return false;
  3334. }
  3335. function isFlowPredicate(node, opts) {
  3336. if (!node) return false;
  3337. var nodeType = node.type;
  3338. if (nodeType === "FlowPredicate" || "DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) {
  3339. if (typeof opts === "undefined") {
  3340. return true;
  3341. } else {
  3342. return shallowEqual(node, opts);
  3343. }
  3344. }
  3345. return false;
  3346. }
  3347. function isEnumBody(node, opts) {
  3348. if (!node) return false;
  3349. var nodeType = node.type;
  3350. if (nodeType === "EnumBody" || "EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) {
  3351. if (typeof opts === "undefined") {
  3352. return true;
  3353. } else {
  3354. return shallowEqual(node, opts);
  3355. }
  3356. }
  3357. return false;
  3358. }
  3359. function isEnumMember(node, opts) {
  3360. if (!node) return false;
  3361. var nodeType = node.type;
  3362. if (nodeType === "EnumMember" || "EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) {
  3363. if (typeof opts === "undefined") {
  3364. return true;
  3365. } else {
  3366. return shallowEqual(node, opts);
  3367. }
  3368. }
  3369. return false;
  3370. }
  3371. function isJSX(node, opts) {
  3372. if (!node) return false;
  3373. var nodeType = node.type;
  3374. if (nodeType === "JSX" || "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) {
  3375. if (typeof opts === "undefined") {
  3376. return true;
  3377. } else {
  3378. return shallowEqual(node, opts);
  3379. }
  3380. }
  3381. return false;
  3382. }
  3383. function isPrivate(node, opts) {
  3384. if (!node) return false;
  3385. var nodeType = node.type;
  3386. if (nodeType === "Private" || "ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) {
  3387. if (typeof opts === "undefined") {
  3388. return true;
  3389. } else {
  3390. return shallowEqual(node, opts);
  3391. }
  3392. }
  3393. return false;
  3394. }
  3395. function isTSTypeElement(node, opts) {
  3396. if (!node) return false;
  3397. var nodeType = node.type;
  3398. if (nodeType === "TSTypeElement" || "TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) {
  3399. if (typeof opts === "undefined") {
  3400. return true;
  3401. } else {
  3402. return shallowEqual(node, opts);
  3403. }
  3404. }
  3405. return false;
  3406. }
  3407. function isTSType(node, opts) {
  3408. if (!node) return false;
  3409. var nodeType = node.type;
  3410. if (nodeType === "TSType" || "TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === 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) {
  3411. if (typeof opts === "undefined") {
  3412. return true;
  3413. } else {
  3414. return shallowEqual(node, opts);
  3415. }
  3416. }
  3417. return false;
  3418. }
  3419. function isNumberLiteral(node, opts) {
  3420. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  3421. if (!node) return false;
  3422. var nodeType = node.type;
  3423. if (nodeType === "NumberLiteral") {
  3424. if (typeof opts === "undefined") {
  3425. return true;
  3426. } else {
  3427. return shallowEqual(node, opts);
  3428. }
  3429. }
  3430. return false;
  3431. }
  3432. function isRegexLiteral(node, opts) {
  3433. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  3434. if (!node) return false;
  3435. var nodeType = node.type;
  3436. if (nodeType === "RegexLiteral") {
  3437. if (typeof opts === "undefined") {
  3438. return true;
  3439. } else {
  3440. return shallowEqual(node, opts);
  3441. }
  3442. }
  3443. return false;
  3444. }
  3445. function isRestProperty(node, opts) {
  3446. console.trace("The node type RestProperty has been renamed to RestElement");
  3447. if (!node) return false;
  3448. var nodeType = node.type;
  3449. if (nodeType === "RestProperty") {
  3450. if (typeof opts === "undefined") {
  3451. return true;
  3452. } else {
  3453. return shallowEqual(node, opts);
  3454. }
  3455. }
  3456. return false;
  3457. }
  3458. function isSpreadProperty(node, opts) {
  3459. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  3460. if (!node) return false;
  3461. var nodeType = node.type;
  3462. if (nodeType === "SpreadProperty") {
  3463. if (typeof opts === "undefined") {
  3464. return true;
  3465. } else {
  3466. return shallowEqual(node, opts);
  3467. }
  3468. }
  3469. return false;
  3470. }
  3471. function matchesPattern(member, match, allowPartial) {
  3472. if (!isMemberExpression(member)) return false;
  3473. var parts = Array.isArray(match) ? match : match.split(".");
  3474. var nodes = [];
  3475. var node;
  3476. for (node = member; isMemberExpression(node); node = node.object) {
  3477. nodes.push(node.property);
  3478. }
  3479. nodes.push(node);
  3480. if (nodes.length < parts.length) return false;
  3481. if (!allowPartial && nodes.length > parts.length) return false;
  3482. for (var i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {
  3483. var _node = nodes[j];
  3484. var value = void 0;
  3485. if (isIdentifier(_node)) {
  3486. value = _node.name;
  3487. } else if (isStringLiteral(_node)) {
  3488. value = _node.value;
  3489. } else {
  3490. return false;
  3491. }
  3492. if (parts[i] !== value) return false;
  3493. }
  3494. return true;
  3495. }
  3496. function buildMatchMemberExpression(match, allowPartial) {
  3497. var parts = match.split(".");
  3498. return function (member) {
  3499. return matchesPattern(member, parts, allowPartial);
  3500. };
  3501. }
  3502. var isReactComponent = buildMatchMemberExpression("React.Component");
  3503. function isCompatTag(tagName) {
  3504. return !!tagName && /^[a-z]/.test(tagName);
  3505. }
  3506. function listCacheClear() {
  3507. this.__data__ = [];
  3508. this.size = 0;
  3509. }
  3510. var _listCacheClear = listCacheClear;
  3511. function eq(value, other) {
  3512. return value === other || value !== value && other !== other;
  3513. }
  3514. var eq_1 = eq;
  3515. function assocIndexOf(array, key) {
  3516. var length = array.length;
  3517. while (length--) {
  3518. if (eq_1(array[length][0], key)) {
  3519. return length;
  3520. }
  3521. }
  3522. return -1;
  3523. }
  3524. var _assocIndexOf = assocIndexOf;
  3525. var arrayProto = Array.prototype;
  3526. var splice = arrayProto.splice;
  3527. function listCacheDelete(key) {
  3528. var data = this.__data__,
  3529. index = _assocIndexOf(data, key);
  3530. if (index < 0) {
  3531. return false;
  3532. }
  3533. var lastIndex = data.length - 1;
  3534. if (index == lastIndex) {
  3535. data.pop();
  3536. } else {
  3537. splice.call(data, index, 1);
  3538. }
  3539. --this.size;
  3540. return true;
  3541. }
  3542. var _listCacheDelete = listCacheDelete;
  3543. function listCacheGet(key) {
  3544. var data = this.__data__,
  3545. index = _assocIndexOf(data, key);
  3546. return index < 0 ? undefined : data[index][1];
  3547. }
  3548. var _listCacheGet = listCacheGet;
  3549. function listCacheHas(key) {
  3550. return _assocIndexOf(this.__data__, key) > -1;
  3551. }
  3552. var _listCacheHas = listCacheHas;
  3553. function listCacheSet(key, value) {
  3554. var data = this.__data__,
  3555. index = _assocIndexOf(data, key);
  3556. if (index < 0) {
  3557. ++this.size;
  3558. data.push([key, value]);
  3559. } else {
  3560. data[index][1] = value;
  3561. }
  3562. return this;
  3563. }
  3564. var _listCacheSet = listCacheSet;
  3565. function ListCache(entries) {
  3566. var index = -1,
  3567. length = entries == null ? 0 : entries.length;
  3568. this.clear();
  3569. while (++index < length) {
  3570. var entry = entries[index];
  3571. this.set(entry[0], entry[1]);
  3572. }
  3573. }
  3574. ListCache.prototype.clear = _listCacheClear;
  3575. ListCache.prototype['delete'] = _listCacheDelete;
  3576. ListCache.prototype.get = _listCacheGet;
  3577. ListCache.prototype.has = _listCacheHas;
  3578. ListCache.prototype.set = _listCacheSet;
  3579. var _ListCache = ListCache;
  3580. function stackClear() {
  3581. this.__data__ = new _ListCache();
  3582. this.size = 0;
  3583. }
  3584. var _stackClear = stackClear;
  3585. function stackDelete(key) {
  3586. var data = this.__data__,
  3587. result = data['delete'](key);
  3588. this.size = data.size;
  3589. return result;
  3590. }
  3591. var _stackDelete = stackDelete;
  3592. function stackGet(key) {
  3593. return this.__data__.get(key);
  3594. }
  3595. var _stackGet = stackGet;
  3596. function stackHas(key) {
  3597. return this.__data__.has(key);
  3598. }
  3599. var _stackHas = stackHas;
  3600. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  3601. function commonjsRequire () {
  3602. throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');
  3603. }
  3604. function unwrapExports (x) {
  3605. return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
  3606. }
  3607. function createCommonjsModule(fn, module) {
  3608. return module = { exports: {} }, fn(module, module.exports), module.exports;
  3609. }
  3610. function getCjsExportFromNamespace (n) {
  3611. return n && n['default'] || n;
  3612. }
  3613. var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
  3614. var _freeGlobal = freeGlobal;
  3615. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  3616. var root = _freeGlobal || freeSelf || Function('return this')();
  3617. var _root = root;
  3618. var Symbol$1 = _root.Symbol;
  3619. var _Symbol = Symbol$1;
  3620. var objectProto = Object.prototype;
  3621. var hasOwnProperty = objectProto.hasOwnProperty;
  3622. var nativeObjectToString = objectProto.toString;
  3623. var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
  3624. function getRawTag(value) {
  3625. var isOwn = hasOwnProperty.call(value, symToStringTag),
  3626. tag = value[symToStringTag];
  3627. try {
  3628. value[symToStringTag] = undefined;
  3629. var unmasked = true;
  3630. } catch (e) {}
  3631. var result = nativeObjectToString.call(value);
  3632. if (unmasked) {
  3633. if (isOwn) {
  3634. value[symToStringTag] = tag;
  3635. } else {
  3636. delete value[symToStringTag];
  3637. }
  3638. }
  3639. return result;
  3640. }
  3641. var _getRawTag = getRawTag;
  3642. var objectProto$1 = Object.prototype;
  3643. var nativeObjectToString$1 = objectProto$1.toString;
  3644. function objectToString(value) {
  3645. return nativeObjectToString$1.call(value);
  3646. }
  3647. var _objectToString = objectToString;
  3648. var nullTag = '[object Null]',
  3649. undefinedTag = '[object Undefined]';
  3650. var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
  3651. function baseGetTag(value) {
  3652. if (value == null) {
  3653. return value === undefined ? undefinedTag : nullTag;
  3654. }
  3655. return symToStringTag$1 && symToStringTag$1 in Object(value) ? _getRawTag(value) : _objectToString(value);
  3656. }
  3657. var _baseGetTag = baseGetTag;
  3658. function isObject(value) {
  3659. var type = typeof value;
  3660. return value != null && (type == 'object' || type == 'function');
  3661. }
  3662. var isObject_1 = isObject;
  3663. var asyncTag = '[object AsyncFunction]',
  3664. funcTag = '[object Function]',
  3665. genTag = '[object GeneratorFunction]',
  3666. proxyTag = '[object Proxy]';
  3667. function isFunction$1(value) {
  3668. if (!isObject_1(value)) {
  3669. return false;
  3670. }
  3671. var tag = _baseGetTag(value);
  3672. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  3673. }
  3674. var isFunction_1 = isFunction$1;
  3675. var coreJsData = _root['__core-js_shared__'];
  3676. var _coreJsData = coreJsData;
  3677. var maskSrcKey = function () {
  3678. var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
  3679. return uid ? 'Symbol(src)_1.' + uid : '';
  3680. }();
  3681. function isMasked(func) {
  3682. return !!maskSrcKey && maskSrcKey in func;
  3683. }
  3684. var _isMasked = isMasked;
  3685. var funcProto = Function.prototype;
  3686. var funcToString = funcProto.toString;
  3687. function toSource(func) {
  3688. if (func != null) {
  3689. try {
  3690. return funcToString.call(func);
  3691. } catch (e) {}
  3692. try {
  3693. return func + '';
  3694. } catch (e) {}
  3695. }
  3696. return '';
  3697. }
  3698. var _toSource = toSource;
  3699. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  3700. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  3701. var funcProto$1 = Function.prototype,
  3702. objectProto$2 = Object.prototype;
  3703. var funcToString$1 = funcProto$1.toString;
  3704. var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
  3705. var reIsNative = RegExp('^' + funcToString$1.call(hasOwnProperty$1).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
  3706. function baseIsNative(value) {
  3707. if (!isObject_1(value) || _isMasked(value)) {
  3708. return false;
  3709. }
  3710. var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
  3711. return pattern.test(_toSource(value));
  3712. }
  3713. var _baseIsNative = baseIsNative;
  3714. function getValue(object, key) {
  3715. return object == null ? undefined : object[key];
  3716. }
  3717. var _getValue = getValue;
  3718. function getNative(object, key) {
  3719. var value = _getValue(object, key);
  3720. return _baseIsNative(value) ? value : undefined;
  3721. }
  3722. var _getNative = getNative;
  3723. var Map$1 = _getNative(_root, 'Map');
  3724. var _Map = Map$1;
  3725. var nativeCreate = _getNative(Object, 'create');
  3726. var _nativeCreate = nativeCreate;
  3727. function hashClear() {
  3728. this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
  3729. this.size = 0;
  3730. }
  3731. var _hashClear = hashClear;
  3732. function hashDelete(key) {
  3733. var result = this.has(key) && delete this.__data__[key];
  3734. this.size -= result ? 1 : 0;
  3735. return result;
  3736. }
  3737. var _hashDelete = hashDelete;
  3738. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  3739. var objectProto$3 = Object.prototype;
  3740. var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
  3741. function hashGet(key) {
  3742. var data = this.__data__;
  3743. if (_nativeCreate) {
  3744. var result = data[key];
  3745. return result === HASH_UNDEFINED ? undefined : result;
  3746. }
  3747. return hasOwnProperty$2.call(data, key) ? data[key] : undefined;
  3748. }
  3749. var _hashGet = hashGet;
  3750. var objectProto$4 = Object.prototype;
  3751. var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
  3752. function hashHas(key) {
  3753. var data = this.__data__;
  3754. return _nativeCreate ? data[key] !== undefined : hasOwnProperty$3.call(data, key);
  3755. }
  3756. var _hashHas = hashHas;
  3757. var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
  3758. function hashSet(key, value) {
  3759. var data = this.__data__;
  3760. this.size += this.has(key) ? 0 : 1;
  3761. data[key] = _nativeCreate && value === undefined ? HASH_UNDEFINED$1 : value;
  3762. return this;
  3763. }
  3764. var _hashSet = hashSet;
  3765. function Hash(entries) {
  3766. var index = -1,
  3767. length = entries == null ? 0 : entries.length;
  3768. this.clear();
  3769. while (++index < length) {
  3770. var entry = entries[index];
  3771. this.set(entry[0], entry[1]);
  3772. }
  3773. }
  3774. Hash.prototype.clear = _hashClear;
  3775. Hash.prototype['delete'] = _hashDelete;
  3776. Hash.prototype.get = _hashGet;
  3777. Hash.prototype.has = _hashHas;
  3778. Hash.prototype.set = _hashSet;
  3779. var _Hash = Hash;
  3780. function mapCacheClear() {
  3781. this.size = 0;
  3782. this.__data__ = {
  3783. 'hash': new _Hash(),
  3784. 'map': new (_Map || _ListCache)(),
  3785. 'string': new _Hash()
  3786. };
  3787. }
  3788. var _mapCacheClear = mapCacheClear;
  3789. function isKeyable(value) {
  3790. var type = typeof value;
  3791. return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
  3792. }
  3793. var _isKeyable = isKeyable;
  3794. function getMapData(map, key) {
  3795. var data = map.__data__;
  3796. return _isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
  3797. }
  3798. var _getMapData = getMapData;
  3799. function mapCacheDelete(key) {
  3800. var result = _getMapData(this, key)['delete'](key);
  3801. this.size -= result ? 1 : 0;
  3802. return result;
  3803. }
  3804. var _mapCacheDelete = mapCacheDelete;
  3805. function mapCacheGet(key) {
  3806. return _getMapData(this, key).get(key);
  3807. }
  3808. var _mapCacheGet = mapCacheGet;
  3809. function mapCacheHas(key) {
  3810. return _getMapData(this, key).has(key);
  3811. }
  3812. var _mapCacheHas = mapCacheHas;
  3813. function mapCacheSet(key, value) {
  3814. var data = _getMapData(this, key),
  3815. size = data.size;
  3816. data.set(key, value);
  3817. this.size += data.size == size ? 0 : 1;
  3818. return this;
  3819. }
  3820. var _mapCacheSet = mapCacheSet;
  3821. function MapCache(entries) {
  3822. var index = -1,
  3823. length = entries == null ? 0 : entries.length;
  3824. this.clear();
  3825. while (++index < length) {
  3826. var entry = entries[index];
  3827. this.set(entry[0], entry[1]);
  3828. }
  3829. }
  3830. MapCache.prototype.clear = _mapCacheClear;
  3831. MapCache.prototype['delete'] = _mapCacheDelete;
  3832. MapCache.prototype.get = _mapCacheGet;
  3833. MapCache.prototype.has = _mapCacheHas;
  3834. MapCache.prototype.set = _mapCacheSet;
  3835. var _MapCache = MapCache;
  3836. var LARGE_ARRAY_SIZE = 200;
  3837. function stackSet(key, value) {
  3838. var data = this.__data__;
  3839. if (data instanceof _ListCache) {
  3840. var pairs = data.__data__;
  3841. if (!_Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
  3842. pairs.push([key, value]);
  3843. this.size = ++data.size;
  3844. return this;
  3845. }
  3846. data = this.__data__ = new _MapCache(pairs);
  3847. }
  3848. data.set(key, value);
  3849. this.size = data.size;
  3850. return this;
  3851. }
  3852. var _stackSet = stackSet;
  3853. function Stack(entries) {
  3854. var data = this.__data__ = new _ListCache(entries);
  3855. this.size = data.size;
  3856. }
  3857. Stack.prototype.clear = _stackClear;
  3858. Stack.prototype['delete'] = _stackDelete;
  3859. Stack.prototype.get = _stackGet;
  3860. Stack.prototype.has = _stackHas;
  3861. Stack.prototype.set = _stackSet;
  3862. var _Stack = Stack;
  3863. function arrayEach(array, iteratee) {
  3864. var index = -1,
  3865. length = array == null ? 0 : array.length;
  3866. while (++index < length) {
  3867. if (iteratee(array[index], index, array) === false) {
  3868. break;
  3869. }
  3870. }
  3871. return array;
  3872. }
  3873. var _arrayEach = arrayEach;
  3874. var defineProperty = function () {
  3875. try {
  3876. var func = _getNative(Object, 'defineProperty');
  3877. func({}, '', {});
  3878. return func;
  3879. } catch (e) {}
  3880. }();
  3881. var _defineProperty = defineProperty;
  3882. function baseAssignValue(object, key, value) {
  3883. if (key == '__proto__' && _defineProperty) {
  3884. _defineProperty(object, key, {
  3885. 'configurable': true,
  3886. 'enumerable': true,
  3887. 'value': value,
  3888. 'writable': true
  3889. });
  3890. } else {
  3891. object[key] = value;
  3892. }
  3893. }
  3894. var _baseAssignValue = baseAssignValue;
  3895. var objectProto$5 = Object.prototype;
  3896. var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
  3897. function assignValue(object, key, value) {
  3898. var objValue = object[key];
  3899. if (!(hasOwnProperty$4.call(object, key) && eq_1(objValue, value)) || value === undefined && !(key in object)) {
  3900. _baseAssignValue(object, key, value);
  3901. }
  3902. }
  3903. var _assignValue = assignValue;
  3904. function copyObject(source, props, object, customizer) {
  3905. var isNew = !object;
  3906. object || (object = {});
  3907. var index = -1,
  3908. length = props.length;
  3909. while (++index < length) {
  3910. var key = props[index];
  3911. var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined;
  3912. if (newValue === undefined) {
  3913. newValue = source[key];
  3914. }
  3915. if (isNew) {
  3916. _baseAssignValue(object, key, newValue);
  3917. } else {
  3918. _assignValue(object, key, newValue);
  3919. }
  3920. }
  3921. return object;
  3922. }
  3923. var _copyObject = copyObject;
  3924. function baseTimes(n, iteratee) {
  3925. var index = -1,
  3926. result = Array(n);
  3927. while (++index < n) {
  3928. result[index] = iteratee(index);
  3929. }
  3930. return result;
  3931. }
  3932. var _baseTimes = baseTimes;
  3933. function isObjectLike(value) {
  3934. return value != null && typeof value == 'object';
  3935. }
  3936. var isObjectLike_1 = isObjectLike;
  3937. var argsTag = '[object Arguments]';
  3938. function baseIsArguments(value) {
  3939. return isObjectLike_1(value) && _baseGetTag(value) == argsTag;
  3940. }
  3941. var _baseIsArguments = baseIsArguments;
  3942. var objectProto$6 = Object.prototype;
  3943. var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
  3944. var propertyIsEnumerable = objectProto$6.propertyIsEnumerable;
  3945. var isArguments = _baseIsArguments(function () {
  3946. return arguments;
  3947. }()) ? _baseIsArguments : function (value) {
  3948. return isObjectLike_1(value) && hasOwnProperty$5.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
  3949. };
  3950. var isArguments_1 = isArguments;
  3951. var isArray = Array.isArray;
  3952. var isArray_1 = isArray;
  3953. function stubFalse() {
  3954. return false;
  3955. }
  3956. var stubFalse_1 = stubFalse;
  3957. var isBuffer_1 = createCommonjsModule(function (module, exports) {
  3958. var freeExports = exports && !exports.nodeType && exports;
  3959. var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
  3960. var moduleExports = freeModule && freeModule.exports === freeExports;
  3961. var Buffer = moduleExports ? _root.Buffer : undefined;
  3962. var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
  3963. var isBuffer = nativeIsBuffer || stubFalse_1;
  3964. module.exports = isBuffer;
  3965. });
  3966. var MAX_SAFE_INTEGER = 9007199254740991;
  3967. var reIsUint = /^(?:0|[1-9]\d*)$/;
  3968. function isIndex(value, length) {
  3969. var type = typeof value;
  3970. length = length == null ? MAX_SAFE_INTEGER : length;
  3971. return !!length && (type == 'number' || type != 'symbol' && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
  3972. }
  3973. var _isIndex = isIndex;
  3974. var MAX_SAFE_INTEGER$1 = 9007199254740991;
  3975. function isLength(value) {
  3976. return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$1;
  3977. }
  3978. var isLength_1 = isLength;
  3979. var argsTag$1 = '[object Arguments]',
  3980. arrayTag = '[object Array]',
  3981. boolTag = '[object Boolean]',
  3982. dateTag = '[object Date]',
  3983. errorTag = '[object Error]',
  3984. funcTag$1 = '[object Function]',
  3985. mapTag = '[object Map]',
  3986. numberTag = '[object Number]',
  3987. objectTag = '[object Object]',
  3988. regexpTag = '[object RegExp]',
  3989. setTag = '[object Set]',
  3990. stringTag = '[object String]',
  3991. weakMapTag = '[object WeakMap]';
  3992. var arrayBufferTag = '[object ArrayBuffer]',
  3993. dataViewTag = '[object DataView]',
  3994. float32Tag = '[object Float32Array]',
  3995. float64Tag = '[object Float64Array]',
  3996. int8Tag = '[object Int8Array]',
  3997. int16Tag = '[object Int16Array]',
  3998. int32Tag = '[object Int32Array]',
  3999. uint8Tag = '[object Uint8Array]',
  4000. uint8ClampedTag = '[object Uint8ClampedArray]',
  4001. uint16Tag = '[object Uint16Array]',
  4002. uint32Tag = '[object Uint32Array]';
  4003. var typedArrayTags = {};
  4004. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
  4005. typedArrayTags[argsTag$1] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag$1] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
  4006. function baseIsTypedArray(value) {
  4007. return isObjectLike_1(value) && isLength_1(value.length) && !!typedArrayTags[_baseGetTag(value)];
  4008. }
  4009. var _baseIsTypedArray = baseIsTypedArray;
  4010. function baseUnary(func) {
  4011. return function (value) {
  4012. return func(value);
  4013. };
  4014. }
  4015. var _baseUnary = baseUnary;
  4016. var _nodeUtil = createCommonjsModule(function (module, exports) {
  4017. var freeExports = exports && !exports.nodeType && exports;
  4018. var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
  4019. var moduleExports = freeModule && freeModule.exports === freeExports;
  4020. var freeProcess = moduleExports && _freeGlobal.process;
  4021. var nodeUtil = function () {
  4022. try {
  4023. var types = freeModule && freeModule.require && freeModule.require('util').types;
  4024. if (types) {
  4025. return types;
  4026. }
  4027. return freeProcess && freeProcess.binding && freeProcess.binding('util');
  4028. } catch (e) {}
  4029. }();
  4030. module.exports = nodeUtil;
  4031. });
  4032. var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray;
  4033. var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray;
  4034. var isTypedArray_1 = isTypedArray;
  4035. var objectProto$7 = Object.prototype;
  4036. var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
  4037. function arrayLikeKeys(value, inherited) {
  4038. var isArr = isArray_1(value),
  4039. isArg = !isArr && isArguments_1(value),
  4040. isBuff = !isArr && !isArg && isBuffer_1(value),
  4041. isType = !isArr && !isArg && !isBuff && isTypedArray_1(value),
  4042. skipIndexes = isArr || isArg || isBuff || isType,
  4043. result = skipIndexes ? _baseTimes(value.length, String) : [],
  4044. length = result.length;
  4045. for (var key in value) {
  4046. if ((inherited || hasOwnProperty$6.call(value, key)) && !(skipIndexes && (key == 'length' || isBuff && (key == 'offset' || key == 'parent') || isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || _isIndex(key, length)))) {
  4047. result.push(key);
  4048. }
  4049. }
  4050. return result;
  4051. }
  4052. var _arrayLikeKeys = arrayLikeKeys;
  4053. var objectProto$8 = Object.prototype;
  4054. function isPrototype(value) {
  4055. var Ctor = value && value.constructor,
  4056. proto = typeof Ctor == 'function' && Ctor.prototype || objectProto$8;
  4057. return value === proto;
  4058. }
  4059. var _isPrototype = isPrototype;
  4060. function overArg(func, transform) {
  4061. return function (arg) {
  4062. return func(transform(arg));
  4063. };
  4064. }
  4065. var _overArg = overArg;
  4066. var nativeKeys = _overArg(Object.keys, Object);
  4067. var _nativeKeys = nativeKeys;
  4068. var objectProto$9 = Object.prototype;
  4069. var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
  4070. function baseKeys(object) {
  4071. if (!_isPrototype(object)) {
  4072. return _nativeKeys(object);
  4073. }
  4074. var result = [];
  4075. for (var key in Object(object)) {
  4076. if (hasOwnProperty$7.call(object, key) && key != 'constructor') {
  4077. result.push(key);
  4078. }
  4079. }
  4080. return result;
  4081. }
  4082. var _baseKeys = baseKeys;
  4083. function isArrayLike(value) {
  4084. return value != null && isLength_1(value.length) && !isFunction_1(value);
  4085. }
  4086. var isArrayLike_1 = isArrayLike;
  4087. function keys(object) {
  4088. return isArrayLike_1(object) ? _arrayLikeKeys(object) : _baseKeys(object);
  4089. }
  4090. var keys_1 = keys;
  4091. function baseAssign(object, source) {
  4092. return object && _copyObject(source, keys_1(source), object);
  4093. }
  4094. var _baseAssign = baseAssign;
  4095. function nativeKeysIn(object) {
  4096. var result = [];
  4097. if (object != null) {
  4098. for (var key in Object(object)) {
  4099. result.push(key);
  4100. }
  4101. }
  4102. return result;
  4103. }
  4104. var _nativeKeysIn = nativeKeysIn;
  4105. var objectProto$a = Object.prototype;
  4106. var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
  4107. function baseKeysIn(object) {
  4108. if (!isObject_1(object)) {
  4109. return _nativeKeysIn(object);
  4110. }
  4111. var isProto = _isPrototype(object),
  4112. result = [];
  4113. for (var key in object) {
  4114. if (!(key == 'constructor' && (isProto || !hasOwnProperty$8.call(object, key)))) {
  4115. result.push(key);
  4116. }
  4117. }
  4118. return result;
  4119. }
  4120. var _baseKeysIn = baseKeysIn;
  4121. function keysIn$1(object) {
  4122. return isArrayLike_1(object) ? _arrayLikeKeys(object, true) : _baseKeysIn(object);
  4123. }
  4124. var keysIn_1 = keysIn$1;
  4125. function baseAssignIn(object, source) {
  4126. return object && _copyObject(source, keysIn_1(source), object);
  4127. }
  4128. var _baseAssignIn = baseAssignIn;
  4129. var _cloneBuffer = createCommonjsModule(function (module, exports) {
  4130. var freeExports = exports && !exports.nodeType && exports;
  4131. var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
  4132. var moduleExports = freeModule && freeModule.exports === freeExports;
  4133. var Buffer = moduleExports ? _root.Buffer : undefined,
  4134. allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
  4135. function cloneBuffer(buffer, isDeep) {
  4136. if (isDeep) {
  4137. return buffer.slice();
  4138. }
  4139. var length = buffer.length,
  4140. result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
  4141. buffer.copy(result);
  4142. return result;
  4143. }
  4144. module.exports = cloneBuffer;
  4145. });
  4146. function copyArray(source, array) {
  4147. var index = -1,
  4148. length = source.length;
  4149. array || (array = Array(length));
  4150. while (++index < length) {
  4151. array[index] = source[index];
  4152. }
  4153. return array;
  4154. }
  4155. var _copyArray = copyArray;
  4156. function arrayFilter(array, predicate) {
  4157. var index = -1,
  4158. length = array == null ? 0 : array.length,
  4159. resIndex = 0,
  4160. result = [];
  4161. while (++index < length) {
  4162. var value = array[index];
  4163. if (predicate(value, index, array)) {
  4164. result[resIndex++] = value;
  4165. }
  4166. }
  4167. return result;
  4168. }
  4169. var _arrayFilter = arrayFilter;
  4170. function stubArray() {
  4171. return [];
  4172. }
  4173. var stubArray_1 = stubArray;
  4174. var objectProto$b = Object.prototype;
  4175. var propertyIsEnumerable$1 = objectProto$b.propertyIsEnumerable;
  4176. var nativeGetSymbols = Object.getOwnPropertySymbols;
  4177. var getSymbols = !nativeGetSymbols ? stubArray_1 : function (object) {
  4178. if (object == null) {
  4179. return [];
  4180. }
  4181. object = Object(object);
  4182. return _arrayFilter(nativeGetSymbols(object), function (symbol) {
  4183. return propertyIsEnumerable$1.call(object, symbol);
  4184. });
  4185. };
  4186. var _getSymbols = getSymbols;
  4187. function copySymbols(source, object) {
  4188. return _copyObject(source, _getSymbols(source), object);
  4189. }
  4190. var _copySymbols = copySymbols;
  4191. function arrayPush(array, values) {
  4192. var index = -1,
  4193. length = values.length,
  4194. offset = array.length;
  4195. while (++index < length) {
  4196. array[offset + index] = values[index];
  4197. }
  4198. return array;
  4199. }
  4200. var _arrayPush = arrayPush;
  4201. var getPrototype = _overArg(Object.getPrototypeOf, Object);
  4202. var _getPrototype = getPrototype;
  4203. var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
  4204. var getSymbolsIn = !nativeGetSymbols$1 ? stubArray_1 : function (object) {
  4205. var result = [];
  4206. while (object) {
  4207. _arrayPush(result, _getSymbols(object));
  4208. object = _getPrototype(object);
  4209. }
  4210. return result;
  4211. };
  4212. var _getSymbolsIn = getSymbolsIn;
  4213. function copySymbolsIn(source, object) {
  4214. return _copyObject(source, _getSymbolsIn(source), object);
  4215. }
  4216. var _copySymbolsIn = copySymbolsIn;
  4217. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  4218. var result = keysFunc(object);
  4219. return isArray_1(object) ? result : _arrayPush(result, symbolsFunc(object));
  4220. }
  4221. var _baseGetAllKeys = baseGetAllKeys;
  4222. function getAllKeys(object) {
  4223. return _baseGetAllKeys(object, keys_1, _getSymbols);
  4224. }
  4225. var _getAllKeys = getAllKeys;
  4226. function getAllKeysIn(object) {
  4227. return _baseGetAllKeys(object, keysIn_1, _getSymbolsIn);
  4228. }
  4229. var _getAllKeysIn = getAllKeysIn;
  4230. var DataView$1 = _getNative(_root, 'DataView');
  4231. var _DataView = DataView$1;
  4232. var Promise$1 = _getNative(_root, 'Promise');
  4233. var _Promise = Promise$1;
  4234. var Set$1 = _getNative(_root, 'Set');
  4235. var _Set = Set$1;
  4236. var WeakMap$1 = _getNative(_root, 'WeakMap');
  4237. var _WeakMap = WeakMap$1;
  4238. var mapTag$1 = '[object Map]',
  4239. objectTag$1 = '[object Object]',
  4240. promiseTag = '[object Promise]',
  4241. setTag$1 = '[object Set]',
  4242. weakMapTag$1 = '[object WeakMap]';
  4243. var dataViewTag$1 = '[object DataView]';
  4244. var dataViewCtorString = _toSource(_DataView),
  4245. mapCtorString = _toSource(_Map),
  4246. promiseCtorString = _toSource(_Promise),
  4247. setCtorString = _toSource(_Set),
  4248. weakMapCtorString = _toSource(_WeakMap);
  4249. var getTag = _baseGetTag;
  4250. if (_DataView && getTag(new _DataView(new ArrayBuffer(1))) != dataViewTag$1 || _Map && getTag(new _Map()) != mapTag$1 || _Promise && getTag(_Promise.resolve()) != promiseTag || _Set && getTag(new _Set()) != setTag$1 || _WeakMap && getTag(new _WeakMap()) != weakMapTag$1) {
  4251. getTag = function getTag(value) {
  4252. var result = _baseGetTag(value),
  4253. Ctor = result == objectTag$1 ? value.constructor : undefined,
  4254. ctorString = Ctor ? _toSource(Ctor) : '';
  4255. if (ctorString) {
  4256. switch (ctorString) {
  4257. case dataViewCtorString:
  4258. return dataViewTag$1;
  4259. case mapCtorString:
  4260. return mapTag$1;
  4261. case promiseCtorString:
  4262. return promiseTag;
  4263. case setCtorString:
  4264. return setTag$1;
  4265. case weakMapCtorString:
  4266. return weakMapTag$1;
  4267. }
  4268. }
  4269. return result;
  4270. };
  4271. }
  4272. var _getTag = getTag;
  4273. var objectProto$c = Object.prototype;
  4274. var hasOwnProperty$9 = objectProto$c.hasOwnProperty;
  4275. function initCloneArray(array) {
  4276. var length = array.length,
  4277. result = new array.constructor(length);
  4278. if (length && typeof array[0] == 'string' && hasOwnProperty$9.call(array, 'index')) {
  4279. result.index = array.index;
  4280. result.input = array.input;
  4281. }
  4282. return result;
  4283. }
  4284. var _initCloneArray = initCloneArray;
  4285. var Uint8Array$1 = _root.Uint8Array;
  4286. var _Uint8Array = Uint8Array$1;
  4287. function cloneArrayBuffer(arrayBuffer) {
  4288. var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  4289. new _Uint8Array(result).set(new _Uint8Array(arrayBuffer));
  4290. return result;
  4291. }
  4292. var _cloneArrayBuffer = cloneArrayBuffer;
  4293. function cloneDataView(dataView, isDeep) {
  4294. var buffer = isDeep ? _cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  4295. return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
  4296. }
  4297. var _cloneDataView = cloneDataView;
  4298. var reFlags = /\w*$/;
  4299. function cloneRegExp(regexp) {
  4300. var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  4301. result.lastIndex = regexp.lastIndex;
  4302. return result;
  4303. }
  4304. var _cloneRegExp = cloneRegExp;
  4305. var symbolProto = _Symbol ? _Symbol.prototype : undefined,
  4306. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
  4307. function cloneSymbol(symbol) {
  4308. return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
  4309. }
  4310. var _cloneSymbol = cloneSymbol;
  4311. function cloneTypedArray(typedArray, isDeep) {
  4312. var buffer = isDeep ? _cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  4313. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  4314. }
  4315. var _cloneTypedArray = cloneTypedArray;
  4316. var boolTag$1 = '[object Boolean]',
  4317. dateTag$1 = '[object Date]',
  4318. mapTag$2 = '[object Map]',
  4319. numberTag$1 = '[object Number]',
  4320. regexpTag$1 = '[object RegExp]',
  4321. setTag$2 = '[object Set]',
  4322. stringTag$1 = '[object String]',
  4323. symbolTag = '[object Symbol]';
  4324. var arrayBufferTag$1 = '[object ArrayBuffer]',
  4325. dataViewTag$2 = '[object DataView]',
  4326. float32Tag$1 = '[object Float32Array]',
  4327. float64Tag$1 = '[object Float64Array]',
  4328. int8Tag$1 = '[object Int8Array]',
  4329. int16Tag$1 = '[object Int16Array]',
  4330. int32Tag$1 = '[object Int32Array]',
  4331. uint8Tag$1 = '[object Uint8Array]',
  4332. uint8ClampedTag$1 = '[object Uint8ClampedArray]',
  4333. uint16Tag$1 = '[object Uint16Array]',
  4334. uint32Tag$1 = '[object Uint32Array]';
  4335. function initCloneByTag(object, tag, isDeep) {
  4336. var Ctor = object.constructor;
  4337. switch (tag) {
  4338. case arrayBufferTag$1:
  4339. return _cloneArrayBuffer(object);
  4340. case boolTag$1:
  4341. case dateTag$1:
  4342. return new Ctor(+object);
  4343. case dataViewTag$2:
  4344. return _cloneDataView(object, isDeep);
  4345. case float32Tag$1:
  4346. case float64Tag$1:
  4347. case int8Tag$1:
  4348. case int16Tag$1:
  4349. case int32Tag$1:
  4350. case uint8Tag$1:
  4351. case uint8ClampedTag$1:
  4352. case uint16Tag$1:
  4353. case uint32Tag$1:
  4354. return _cloneTypedArray(object, isDeep);
  4355. case mapTag$2:
  4356. return new Ctor();
  4357. case numberTag$1:
  4358. case stringTag$1:
  4359. return new Ctor(object);
  4360. case regexpTag$1:
  4361. return _cloneRegExp(object);
  4362. case setTag$2:
  4363. return new Ctor();
  4364. case symbolTag:
  4365. return _cloneSymbol(object);
  4366. }
  4367. }
  4368. var _initCloneByTag = initCloneByTag;
  4369. var objectCreate = Object.create;
  4370. var baseCreate = function () {
  4371. function object() {}
  4372. return function (proto) {
  4373. if (!isObject_1(proto)) {
  4374. return {};
  4375. }
  4376. if (objectCreate) {
  4377. return objectCreate(proto);
  4378. }
  4379. object.prototype = proto;
  4380. var result = new object();
  4381. object.prototype = undefined;
  4382. return result;
  4383. };
  4384. }();
  4385. var _baseCreate = baseCreate;
  4386. function initCloneObject(object) {
  4387. return typeof object.constructor == 'function' && !_isPrototype(object) ? _baseCreate(_getPrototype(object)) : {};
  4388. }
  4389. var _initCloneObject = initCloneObject;
  4390. var mapTag$3 = '[object Map]';
  4391. function baseIsMap(value) {
  4392. return isObjectLike_1(value) && _getTag(value) == mapTag$3;
  4393. }
  4394. var _baseIsMap = baseIsMap;
  4395. var nodeIsMap = _nodeUtil && _nodeUtil.isMap;
  4396. var isMap = nodeIsMap ? _baseUnary(nodeIsMap) : _baseIsMap;
  4397. var isMap_1 = isMap;
  4398. var setTag$3 = '[object Set]';
  4399. function baseIsSet(value) {
  4400. return isObjectLike_1(value) && _getTag(value) == setTag$3;
  4401. }
  4402. var _baseIsSet = baseIsSet;
  4403. var nodeIsSet = _nodeUtil && _nodeUtil.isSet;
  4404. var isSet = nodeIsSet ? _baseUnary(nodeIsSet) : _baseIsSet;
  4405. var isSet_1 = isSet;
  4406. var CLONE_DEEP_FLAG = 1,
  4407. CLONE_FLAT_FLAG = 2,
  4408. CLONE_SYMBOLS_FLAG = 4;
  4409. var argsTag$2 = '[object Arguments]',
  4410. arrayTag$1 = '[object Array]',
  4411. boolTag$2 = '[object Boolean]',
  4412. dateTag$2 = '[object Date]',
  4413. errorTag$1 = '[object Error]',
  4414. funcTag$2 = '[object Function]',
  4415. genTag$1 = '[object GeneratorFunction]',
  4416. mapTag$4 = '[object Map]',
  4417. numberTag$2 = '[object Number]',
  4418. objectTag$2 = '[object Object]',
  4419. regexpTag$2 = '[object RegExp]',
  4420. setTag$4 = '[object Set]',
  4421. stringTag$2 = '[object String]',
  4422. symbolTag$1 = '[object Symbol]',
  4423. weakMapTag$2 = '[object WeakMap]';
  4424. var arrayBufferTag$2 = '[object ArrayBuffer]',
  4425. dataViewTag$3 = '[object DataView]',
  4426. float32Tag$2 = '[object Float32Array]',
  4427. float64Tag$2 = '[object Float64Array]',
  4428. int8Tag$2 = '[object Int8Array]',
  4429. int16Tag$2 = '[object Int16Array]',
  4430. int32Tag$2 = '[object Int32Array]',
  4431. uint8Tag$2 = '[object Uint8Array]',
  4432. uint8ClampedTag$2 = '[object Uint8ClampedArray]',
  4433. uint16Tag$2 = '[object Uint16Array]',
  4434. uint32Tag$2 = '[object Uint32Array]';
  4435. var cloneableTags = {};
  4436. cloneableTags[argsTag$2] = cloneableTags[arrayTag$1] = cloneableTags[arrayBufferTag$2] = cloneableTags[dataViewTag$3] = cloneableTags[boolTag$2] = cloneableTags[dateTag$2] = cloneableTags[float32Tag$2] = cloneableTags[float64Tag$2] = cloneableTags[int8Tag$2] = cloneableTags[int16Tag$2] = cloneableTags[int32Tag$2] = cloneableTags[mapTag$4] = cloneableTags[numberTag$2] = cloneableTags[objectTag$2] = cloneableTags[regexpTag$2] = cloneableTags[setTag$4] = cloneableTags[stringTag$2] = cloneableTags[symbolTag$1] = cloneableTags[uint8Tag$2] = cloneableTags[uint8ClampedTag$2] = cloneableTags[uint16Tag$2] = cloneableTags[uint32Tag$2] = true;
  4437. cloneableTags[errorTag$1] = cloneableTags[funcTag$2] = cloneableTags[weakMapTag$2] = false;
  4438. function baseClone(value, bitmask, customizer, key, object, stack) {
  4439. var result,
  4440. isDeep = bitmask & CLONE_DEEP_FLAG,
  4441. isFlat = bitmask & CLONE_FLAT_FLAG,
  4442. isFull = bitmask & CLONE_SYMBOLS_FLAG;
  4443. if (customizer) {
  4444. result = object ? customizer(value, key, object, stack) : customizer(value);
  4445. }
  4446. if (result !== undefined) {
  4447. return result;
  4448. }
  4449. if (!isObject_1(value)) {
  4450. return value;
  4451. }
  4452. var isArr = isArray_1(value);
  4453. if (isArr) {
  4454. result = _initCloneArray(value);
  4455. if (!isDeep) {
  4456. return _copyArray(value, result);
  4457. }
  4458. } else {
  4459. var tag = _getTag(value),
  4460. isFunc = tag == funcTag$2 || tag == genTag$1;
  4461. if (isBuffer_1(value)) {
  4462. return _cloneBuffer(value, isDeep);
  4463. }
  4464. if (tag == objectTag$2 || tag == argsTag$2 || isFunc && !object) {
  4465. result = isFlat || isFunc ? {} : _initCloneObject(value);
  4466. if (!isDeep) {
  4467. return isFlat ? _copySymbolsIn(value, _baseAssignIn(result, value)) : _copySymbols(value, _baseAssign(result, value));
  4468. }
  4469. } else {
  4470. if (!cloneableTags[tag]) {
  4471. return object ? value : {};
  4472. }
  4473. result = _initCloneByTag(value, tag, isDeep);
  4474. }
  4475. }
  4476. stack || (stack = new _Stack());
  4477. var stacked = stack.get(value);
  4478. if (stacked) {
  4479. return stacked;
  4480. }
  4481. stack.set(value, result);
  4482. if (isSet_1(value)) {
  4483. value.forEach(function (subValue) {
  4484. result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
  4485. });
  4486. } else if (isMap_1(value)) {
  4487. value.forEach(function (subValue, key) {
  4488. result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
  4489. });
  4490. }
  4491. var keysFunc = isFull ? isFlat ? _getAllKeysIn : _getAllKeys : isFlat ? keysIn : keys_1;
  4492. var props = isArr ? undefined : keysFunc(value);
  4493. _arrayEach(props || value, function (subValue, key) {
  4494. if (props) {
  4495. key = subValue;
  4496. subValue = value[key];
  4497. }
  4498. _assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
  4499. });
  4500. return result;
  4501. }
  4502. var _baseClone = baseClone;
  4503. var CLONE_SYMBOLS_FLAG$1 = 4;
  4504. function clone(value) {
  4505. return _baseClone(value, CLONE_SYMBOLS_FLAG$1);
  4506. }
  4507. var clone_1 = clone;
  4508. var fastProto = null;
  4509. function FastObject(o) {
  4510. if (fastProto !== null && typeof fastProto.property) {
  4511. var result = fastProto;
  4512. fastProto = FastObject.prototype = null;
  4513. return result;
  4514. }
  4515. fastProto = FastObject.prototype = o == null ? Object.create(null) : o;
  4516. return new FastObject();
  4517. }
  4518. FastObject();
  4519. var toFastProperties = function toFastproperties(o) {
  4520. return FastObject(o);
  4521. };
  4522. var global$1 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};
  4523. function defaultSetTimout() {
  4524. throw new Error('setTimeout has not been defined');
  4525. }
  4526. function defaultClearTimeout() {
  4527. throw new Error('clearTimeout has not been defined');
  4528. }
  4529. var cachedSetTimeout = defaultSetTimout;
  4530. var cachedClearTimeout = defaultClearTimeout;
  4531. if (typeof global$1.setTimeout === 'function') {
  4532. cachedSetTimeout = setTimeout;
  4533. }
  4534. if (typeof global$1.clearTimeout === 'function') {
  4535. cachedClearTimeout = clearTimeout;
  4536. }
  4537. function runTimeout(fun) {
  4538. if (cachedSetTimeout === setTimeout) {
  4539. return setTimeout(fun, 0);
  4540. }
  4541. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  4542. cachedSetTimeout = setTimeout;
  4543. return setTimeout(fun, 0);
  4544. }
  4545. try {
  4546. return cachedSetTimeout(fun, 0);
  4547. } catch (e) {
  4548. try {
  4549. return cachedSetTimeout.call(null, fun, 0);
  4550. } catch (e) {
  4551. return cachedSetTimeout.call(this, fun, 0);
  4552. }
  4553. }
  4554. }
  4555. function runClearTimeout(marker) {
  4556. if (cachedClearTimeout === clearTimeout) {
  4557. return clearTimeout(marker);
  4558. }
  4559. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  4560. cachedClearTimeout = clearTimeout;
  4561. return clearTimeout(marker);
  4562. }
  4563. try {
  4564. return cachedClearTimeout(marker);
  4565. } catch (e) {
  4566. try {
  4567. return cachedClearTimeout.call(null, marker);
  4568. } catch (e) {
  4569. return cachedClearTimeout.call(this, marker);
  4570. }
  4571. }
  4572. }
  4573. var queue = [];
  4574. var draining = false;
  4575. var currentQueue;
  4576. var queueIndex = -1;
  4577. function cleanUpNextTick() {
  4578. if (!draining || !currentQueue) {
  4579. return;
  4580. }
  4581. draining = false;
  4582. if (currentQueue.length) {
  4583. queue = currentQueue.concat(queue);
  4584. } else {
  4585. queueIndex = -1;
  4586. }
  4587. if (queue.length) {
  4588. drainQueue();
  4589. }
  4590. }
  4591. function drainQueue() {
  4592. if (draining) {
  4593. return;
  4594. }
  4595. var timeout = runTimeout(cleanUpNextTick);
  4596. draining = true;
  4597. var len = queue.length;
  4598. while (len) {
  4599. currentQueue = queue;
  4600. queue = [];
  4601. while (++queueIndex < len) {
  4602. if (currentQueue) {
  4603. currentQueue[queueIndex].run();
  4604. }
  4605. }
  4606. queueIndex = -1;
  4607. len = queue.length;
  4608. }
  4609. currentQueue = null;
  4610. draining = false;
  4611. runClearTimeout(timeout);
  4612. }
  4613. function nextTick(fun) {
  4614. var args = new Array(arguments.length - 1);
  4615. if (arguments.length > 1) {
  4616. for (var i = 1; i < arguments.length; i++) {
  4617. args[i - 1] = arguments[i];
  4618. }
  4619. }
  4620. queue.push(new Item(fun, args));
  4621. if (queue.length === 1 && !draining) {
  4622. runTimeout(drainQueue);
  4623. }
  4624. }
  4625. function Item(fun, array) {
  4626. this.fun = fun;
  4627. this.array = array;
  4628. }
  4629. Item.prototype.run = function () {
  4630. this.fun.apply(null, this.array);
  4631. };
  4632. var title = 'browser';
  4633. var platform = 'browser';
  4634. var browser = true;
  4635. var env = {};
  4636. var argv = [];
  4637. var version = '';
  4638. var versions = {};
  4639. var release = {};
  4640. var config = {};
  4641. function noop() {}
  4642. var on = noop;
  4643. var addListener = noop;
  4644. var once = noop;
  4645. var off = noop;
  4646. var removeListener = noop;
  4647. var removeAllListeners = noop;
  4648. var emit = noop;
  4649. function binding(name) {
  4650. throw new Error('process.binding is not supported');
  4651. }
  4652. function cwd() {
  4653. return '/';
  4654. }
  4655. function chdir(dir) {
  4656. throw new Error('process.chdir is not supported');
  4657. }
  4658. function umask() {
  4659. return 0;
  4660. }
  4661. var performance = global$1.performance || {};
  4662. var performanceNow = performance.now || performance.mozNow || performance.msNow || performance.oNow || performance.webkitNow || function () {
  4663. return new Date().getTime();
  4664. };
  4665. function hrtime(previousTimestamp) {
  4666. var clocktime = performanceNow.call(performance) * 1e-3;
  4667. var seconds = Math.floor(clocktime);
  4668. var nanoseconds = Math.floor(clocktime % 1 * 1e9);
  4669. if (previousTimestamp) {
  4670. seconds = seconds - previousTimestamp[0];
  4671. nanoseconds = nanoseconds - previousTimestamp[1];
  4672. if (nanoseconds < 0) {
  4673. seconds--;
  4674. nanoseconds += 1e9;
  4675. }
  4676. }
  4677. return [seconds, nanoseconds];
  4678. }
  4679. var startTime = new Date();
  4680. function uptime() {
  4681. var currentTime = new Date();
  4682. var dif = currentTime - startTime;
  4683. return dif / 1000;
  4684. }
  4685. var process = {
  4686. nextTick: nextTick,
  4687. title: title,
  4688. browser: browser,
  4689. env: env,
  4690. argv: argv,
  4691. version: version,
  4692. versions: versions,
  4693. on: on,
  4694. addListener: addListener,
  4695. once: once,
  4696. off: off,
  4697. removeListener: removeListener,
  4698. removeAllListeners: removeAllListeners,
  4699. emit: emit,
  4700. binding: binding,
  4701. cwd: cwd,
  4702. chdir: chdir,
  4703. umask: umask,
  4704. hrtime: hrtime,
  4705. platform: platform,
  4706. release: release,
  4707. config: config,
  4708. uptime: uptime
  4709. };
  4710. var ast = createCommonjsModule(function (module) {
  4711. (function () {
  4712. function isExpression(node) {
  4713. if (node == null) {
  4714. return false;
  4715. }
  4716. switch (node.type) {
  4717. case 'ArrayExpression':
  4718. case 'AssignmentExpression':
  4719. case 'BinaryExpression':
  4720. case 'CallExpression':
  4721. case 'ConditionalExpression':
  4722. case 'FunctionExpression':
  4723. case 'Identifier':
  4724. case 'Literal':
  4725. case 'LogicalExpression':
  4726. case 'MemberExpression':
  4727. case 'NewExpression':
  4728. case 'ObjectExpression':
  4729. case 'SequenceExpression':
  4730. case 'ThisExpression':
  4731. case 'UnaryExpression':
  4732. case 'UpdateExpression':
  4733. return true;
  4734. }
  4735. return false;
  4736. }
  4737. function isIterationStatement(node) {
  4738. if (node == null) {
  4739. return false;
  4740. }
  4741. switch (node.type) {
  4742. case 'DoWhileStatement':
  4743. case 'ForInStatement':
  4744. case 'ForStatement':
  4745. case 'WhileStatement':
  4746. return true;
  4747. }
  4748. return false;
  4749. }
  4750. function isStatement(node) {
  4751. if (node == null) {
  4752. return false;
  4753. }
  4754. switch (node.type) {
  4755. case 'BlockStatement':
  4756. case 'BreakStatement':
  4757. case 'ContinueStatement':
  4758. case 'DebuggerStatement':
  4759. case 'DoWhileStatement':
  4760. case 'EmptyStatement':
  4761. case 'ExpressionStatement':
  4762. case 'ForInStatement':
  4763. case 'ForStatement':
  4764. case 'IfStatement':
  4765. case 'LabeledStatement':
  4766. case 'ReturnStatement':
  4767. case 'SwitchStatement':
  4768. case 'ThrowStatement':
  4769. case 'TryStatement':
  4770. case 'VariableDeclaration':
  4771. case 'WhileStatement':
  4772. case 'WithStatement':
  4773. return true;
  4774. }
  4775. return false;
  4776. }
  4777. function isSourceElement(node) {
  4778. return isStatement(node) || node != null && node.type === 'FunctionDeclaration';
  4779. }
  4780. function trailingStatement(node) {
  4781. switch (node.type) {
  4782. case 'IfStatement':
  4783. if (node.alternate != null) {
  4784. return node.alternate;
  4785. }
  4786. return node.consequent;
  4787. case 'LabeledStatement':
  4788. case 'ForStatement':
  4789. case 'ForInStatement':
  4790. case 'WhileStatement':
  4791. case 'WithStatement':
  4792. return node.body;
  4793. }
  4794. return null;
  4795. }
  4796. function isProblematicIfStatement(node) {
  4797. var current;
  4798. if (node.type !== 'IfStatement') {
  4799. return false;
  4800. }
  4801. if (node.alternate == null) {
  4802. return false;
  4803. }
  4804. current = node.consequent;
  4805. do {
  4806. if (current.type === 'IfStatement') {
  4807. if (current.alternate == null) {
  4808. return true;
  4809. }
  4810. }
  4811. current = trailingStatement(current);
  4812. } while (current);
  4813. return false;
  4814. }
  4815. module.exports = {
  4816. isExpression: isExpression,
  4817. isStatement: isStatement,
  4818. isIterationStatement: isIterationStatement,
  4819. isSourceElement: isSourceElement,
  4820. isProblematicIfStatement: isProblematicIfStatement,
  4821. trailingStatement: trailingStatement
  4822. };
  4823. })();
  4824. });
  4825. var ast_1 = ast.isExpression;
  4826. var ast_2 = ast.isStatement;
  4827. var ast_3 = ast.isIterationStatement;
  4828. var ast_4 = ast.isSourceElement;
  4829. var ast_5 = ast.isProblematicIfStatement;
  4830. var ast_6 = ast.trailingStatement;
  4831. var code = createCommonjsModule(function (module) {
  4832. (function () {
  4833. var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch;
  4834. ES5Regex = {
  4835. NonAsciiIdentifierStart: /[\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\u0561-\u0587\u05D0-\u05EA\u05F0-\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\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\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-\u1877\u1880-\u1884\u1887-\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\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\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\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\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]/,
  4836. NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\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\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\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\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-\u0C03\u0C05-\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\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\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\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\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\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-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\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\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\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-\uAB65\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]/
  4837. };
  4838. ES6Regex = {
  4839. NonAsciiIdentifierStart: /[\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\u0561-\u0587\u05D0-\u05EA\u05F0-\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\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\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-\u1877\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\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-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\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\uDF30-\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-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\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-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\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]|\uD87E[\uDC00-\uDE1D]/,
  4840. NonAsciiIdentifierPart: /[\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\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\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\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\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\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-\u0C03\u0C05-\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\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\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\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\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-\u1877\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\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\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-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\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-\uAB65\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\uDF30-\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-\uDE33\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]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\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\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\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[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\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]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\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]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/
  4841. };
  4842. function isDecimalDigit(ch) {
  4843. return 0x30 <= ch && ch <= 0x39;
  4844. }
  4845. function isHexDigit(ch) {
  4846. return 0x30 <= ch && ch <= 0x39 || 0x61 <= ch && ch <= 0x66 || 0x41 <= ch && ch <= 0x46;
  4847. }
  4848. function isOctalDigit(ch) {
  4849. return ch >= 0x30 && ch <= 0x37;
  4850. }
  4851. NON_ASCII_WHITESPACES = [0x1680, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF];
  4852. function isWhiteSpace(ch) {
  4853. return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 || ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0;
  4854. }
  4855. function isLineTerminator(ch) {
  4856. return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029;
  4857. }
  4858. function fromCodePoint(cp) {
  4859. if (cp <= 0xFFFF) {
  4860. return String.fromCharCode(cp);
  4861. }
  4862. var cu1 = String.fromCharCode(Math.floor((cp - 0x10000) / 0x400) + 0xD800);
  4863. var cu2 = String.fromCharCode((cp - 0x10000) % 0x400 + 0xDC00);
  4864. return cu1 + cu2;
  4865. }
  4866. IDENTIFIER_START = new Array(0x80);
  4867. for (ch = 0; ch < 0x80; ++ch) {
  4868. IDENTIFIER_START[ch] = ch >= 0x61 && ch <= 0x7A || ch >= 0x41 && ch <= 0x5A || ch === 0x24 || ch === 0x5F;
  4869. }
  4870. IDENTIFIER_PART = new Array(0x80);
  4871. for (ch = 0; ch < 0x80; ++ch) {
  4872. IDENTIFIER_PART[ch] = ch >= 0x61 && ch <= 0x7A || ch >= 0x41 && ch <= 0x5A || ch >= 0x30 && ch <= 0x39 || ch === 0x24 || ch === 0x5F;
  4873. }
  4874. function isIdentifierStartES5(ch) {
  4875. return ch < 0x80 ? IDENTIFIER_START[ch] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
  4876. }
  4877. function isIdentifierPartES5(ch) {
  4878. return ch < 0x80 ? IDENTIFIER_PART[ch] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
  4879. }
  4880. function isIdentifierStartES6(ch) {
  4881. return ch < 0x80 ? IDENTIFIER_START[ch] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
  4882. }
  4883. function isIdentifierPartES6(ch) {
  4884. return ch < 0x80 ? IDENTIFIER_PART[ch] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
  4885. }
  4886. module.exports = {
  4887. isDecimalDigit: isDecimalDigit,
  4888. isHexDigit: isHexDigit,
  4889. isOctalDigit: isOctalDigit,
  4890. isWhiteSpace: isWhiteSpace,
  4891. isLineTerminator: isLineTerminator,
  4892. isIdentifierStartES5: isIdentifierStartES5,
  4893. isIdentifierPartES5: isIdentifierPartES5,
  4894. isIdentifierStartES6: isIdentifierStartES6,
  4895. isIdentifierPartES6: isIdentifierPartES6
  4896. };
  4897. })();
  4898. });
  4899. var code_1 = code.isDecimalDigit;
  4900. var code_2 = code.isHexDigit;
  4901. var code_3 = code.isOctalDigit;
  4902. var code_4 = code.isWhiteSpace;
  4903. var code_5 = code.isLineTerminator;
  4904. var code_6 = code.isIdentifierStartES5;
  4905. var code_7 = code.isIdentifierPartES5;
  4906. var code_8 = code.isIdentifierStartES6;
  4907. var code_9 = code.isIdentifierPartES6;
  4908. var keyword = createCommonjsModule(function (module) {
  4909. (function () {
  4910. var code$1 = code;
  4911. function isStrictModeReservedWordES6(id) {
  4912. switch (id) {
  4913. case 'implements':
  4914. case 'interface':
  4915. case 'package':
  4916. case 'private':
  4917. case 'protected':
  4918. case 'public':
  4919. case 'static':
  4920. case 'let':
  4921. return true;
  4922. default:
  4923. return false;
  4924. }
  4925. }
  4926. function isKeywordES5(id, strict) {
  4927. if (!strict && id === 'yield') {
  4928. return false;
  4929. }
  4930. return isKeywordES6(id, strict);
  4931. }
  4932. function isKeywordES6(id, strict) {
  4933. if (strict && isStrictModeReservedWordES6(id)) {
  4934. return true;
  4935. }
  4936. switch (id.length) {
  4937. case 2:
  4938. return id === 'if' || id === 'in' || id === 'do';
  4939. case 3:
  4940. return id === 'var' || id === 'for' || id === 'new' || id === 'try';
  4941. case 4:
  4942. return id === 'this' || id === 'else' || id === 'case' || id === 'void' || id === 'with' || id === 'enum';
  4943. case 5:
  4944. return id === 'while' || id === 'break' || id === 'catch' || id === 'throw' || id === 'const' || id === 'yield' || id === 'class' || id === 'super';
  4945. case 6:
  4946. return id === 'return' || id === 'typeof' || id === 'delete' || id === 'switch' || id === 'export' || id === 'import';
  4947. case 7:
  4948. return id === 'default' || id === 'finally' || id === 'extends';
  4949. case 8:
  4950. return id === 'function' || id === 'continue' || id === 'debugger';
  4951. case 10:
  4952. return id === 'instanceof';
  4953. default:
  4954. return false;
  4955. }
  4956. }
  4957. function isReservedWordES5(id, strict) {
  4958. return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict);
  4959. }
  4960. function isReservedWordES6(id, strict) {
  4961. return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict);
  4962. }
  4963. function isRestrictedWord(id) {
  4964. return id === 'eval' || id === 'arguments';
  4965. }
  4966. function isIdentifierNameES5(id) {
  4967. var i, iz, ch;
  4968. if (id.length === 0) {
  4969. return false;
  4970. }
  4971. ch = id.charCodeAt(0);
  4972. if (!code$1.isIdentifierStartES5(ch)) {
  4973. return false;
  4974. }
  4975. for (i = 1, iz = id.length; i < iz; ++i) {
  4976. ch = id.charCodeAt(i);
  4977. if (!code$1.isIdentifierPartES5(ch)) {
  4978. return false;
  4979. }
  4980. }
  4981. return true;
  4982. }
  4983. function decodeUtf16(lead, trail) {
  4984. return (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
  4985. }
  4986. function isIdentifierNameES6(id) {
  4987. var i, iz, ch, lowCh, check;
  4988. if (id.length === 0) {
  4989. return false;
  4990. }
  4991. check = code$1.isIdentifierStartES6;
  4992. for (i = 0, iz = id.length; i < iz; ++i) {
  4993. ch = id.charCodeAt(i);
  4994. if (0xD800 <= ch && ch <= 0xDBFF) {
  4995. ++i;
  4996. if (i >= iz) {
  4997. return false;
  4998. }
  4999. lowCh = id.charCodeAt(i);
  5000. if (!(0xDC00 <= lowCh && lowCh <= 0xDFFF)) {
  5001. return false;
  5002. }
  5003. ch = decodeUtf16(ch, lowCh);
  5004. }
  5005. if (!check(ch)) {
  5006. return false;
  5007. }
  5008. check = code$1.isIdentifierPartES6;
  5009. }
  5010. return true;
  5011. }
  5012. function isIdentifierES5(id, strict) {
  5013. return isIdentifierNameES5(id) && !isReservedWordES5(id, strict);
  5014. }
  5015. function isIdentifierES6(id, strict) {
  5016. return isIdentifierNameES6(id) && !isReservedWordES6(id, strict);
  5017. }
  5018. module.exports = {
  5019. isKeywordES5: isKeywordES5,
  5020. isKeywordES6: isKeywordES6,
  5021. isReservedWordES5: isReservedWordES5,
  5022. isReservedWordES6: isReservedWordES6,
  5023. isRestrictedWord: isRestrictedWord,
  5024. isIdentifierNameES5: isIdentifierNameES5,
  5025. isIdentifierNameES6: isIdentifierNameES6,
  5026. isIdentifierES5: isIdentifierES5,
  5027. isIdentifierES6: isIdentifierES6
  5028. };
  5029. })();
  5030. });
  5031. var keyword_1 = keyword.isKeywordES5;
  5032. var keyword_2 = keyword.isKeywordES6;
  5033. var keyword_3 = keyword.isReservedWordES5;
  5034. var keyword_4 = keyword.isReservedWordES6;
  5035. var keyword_5 = keyword.isRestrictedWord;
  5036. var keyword_6 = keyword.isIdentifierNameES5;
  5037. var keyword_7 = keyword.isIdentifierNameES6;
  5038. var keyword_8 = keyword.isIdentifierES5;
  5039. var keyword_9 = keyword.isIdentifierES6;
  5040. var utils = createCommonjsModule(function (module, exports) {
  5041. (function () {
  5042. exports.ast = ast;
  5043. exports.code = code;
  5044. exports.keyword = keyword;
  5045. })();
  5046. });
  5047. var utils_1 = utils.ast;
  5048. var utils_2 = utils.code;
  5049. var utils_3 = utils.keyword;
  5050. function isType(nodeType, targetType) {
  5051. if (nodeType === targetType) return true;
  5052. if (ALIAS_KEYS[targetType]) return false;
  5053. var aliases = FLIPPED_ALIAS_KEYS[targetType];
  5054. if (aliases) {
  5055. if (aliases[0] === nodeType) return true;
  5056. for (var _iterator = aliases, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  5057. var _ref;
  5058. if (_isArray) {
  5059. if (_i >= _iterator.length) break;
  5060. _ref = _iterator[_i++];
  5061. } else {
  5062. _i = _iterator.next();
  5063. if (_i.done) break;
  5064. _ref = _i.value;
  5065. }
  5066. var alias = _ref;
  5067. if (nodeType === alias) return true;
  5068. }
  5069. }
  5070. return false;
  5071. }
  5072. function isPlaceholderType(placeholderType, targetType) {
  5073. if (placeholderType === targetType) return true;
  5074. var aliases = PLACEHOLDERS_ALIAS[placeholderType];
  5075. if (aliases) {
  5076. for (var _iterator = aliases, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  5077. var _ref;
  5078. if (_isArray) {
  5079. if (_i >= _iterator.length) break;
  5080. _ref = _iterator[_i++];
  5081. } else {
  5082. _i = _iterator.next();
  5083. if (_i.done) break;
  5084. _ref = _i.value;
  5085. }
  5086. var alias = _ref;
  5087. if (targetType === alias) return true;
  5088. }
  5089. }
  5090. return false;
  5091. }
  5092. function is(type, node, opts) {
  5093. if (!node) return false;
  5094. var matches = isType(node.type, type);
  5095. if (!matches) {
  5096. if (!opts && node.type === "Placeholder" && type in FLIPPED_ALIAS_KEYS) {
  5097. return isPlaceholderType(node.expectedNode, type);
  5098. }
  5099. return false;
  5100. }
  5101. if (typeof opts === "undefined") {
  5102. return true;
  5103. } else {
  5104. return shallowEqual(node, opts);
  5105. }
  5106. }
  5107. var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
  5108. var FLATTENABLE_KEYS = ["body", "expressions"];
  5109. var FOR_INIT_KEYS = ["left", "init"];
  5110. var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
  5111. var LOGICAL_OPERATORS = ["||", "&&", "??"];
  5112. var UPDATE_OPERATORS = ["++", "--"];
  5113. var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
  5114. var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
  5115. var COMPARISON_BINARY_OPERATORS = [].concat(EQUALITY_BINARY_OPERATORS, ["in", "instanceof"]);
  5116. var BOOLEAN_BINARY_OPERATORS = [].concat(COMPARISON_BINARY_OPERATORS, BOOLEAN_NUMBER_BINARY_OPERATORS);
  5117. var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
  5118. var BINARY_OPERATORS = ["+"].concat(NUMBER_BINARY_OPERATORS, BOOLEAN_BINARY_OPERATORS);
  5119. var ASSIGNMENT_OPERATORS = ["=", "+="].concat(NUMBER_BINARY_OPERATORS.map(function (op) {
  5120. return op + "=";
  5121. }));
  5122. var BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
  5123. var NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
  5124. var STRING_UNARY_OPERATORS = ["typeof"];
  5125. var UNARY_OPERATORS = ["void", "throw"].concat(BOOLEAN_UNARY_OPERATORS, NUMBER_UNARY_OPERATORS, STRING_UNARY_OPERATORS);
  5126. var INHERIT_KEYS = {
  5127. optional: ["typeAnnotation", "typeParameters", "returnType"],
  5128. force: ["start", "loc", "end"]
  5129. };
  5130. var BLOCK_SCOPED_SYMBOL = Symbol["for"]("var used to be block scoped");
  5131. var NOT_LOCAL_BINDING = Symbol["for"]("should not be considered a local binding");
  5132. function validate(node, key, val) {
  5133. if (!node) return;
  5134. var fields = NODE_FIELDS[node.type];
  5135. if (!fields) return;
  5136. var field = fields[key];
  5137. validateField(node, key, val, field);
  5138. validateChild(node, key, val);
  5139. }
  5140. function validateField(node, key, val, field) {
  5141. if (!field || !field.validate) return;
  5142. if (field.optional && val == null) return;
  5143. field.validate(node, key, val);
  5144. }
  5145. function validateChild(node, key, val) {
  5146. if (val == null) return;
  5147. var validate = NODE_PARENT_VALIDATIONS[val.type];
  5148. if (!validate) return;
  5149. validate(node, key, val);
  5150. }
  5151. var VISITOR_KEYS = {};
  5152. var ALIAS_KEYS = {};
  5153. var FLIPPED_ALIAS_KEYS = {};
  5154. var NODE_FIELDS = {};
  5155. var BUILDER_KEYS = {};
  5156. var DEPRECATED_KEYS = {};
  5157. var NODE_PARENT_VALIDATIONS = {};
  5158. function getType(val) {
  5159. if (Array.isArray(val)) {
  5160. return "array";
  5161. } else if (val === null) {
  5162. return "null";
  5163. } else {
  5164. return typeof val;
  5165. }
  5166. }
  5167. function validate$1(validate) {
  5168. return {
  5169. validate: validate
  5170. };
  5171. }
  5172. function typeIs(typeName) {
  5173. return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType.apply(void 0, typeName);
  5174. }
  5175. function validateType(typeName) {
  5176. return validate$1(typeIs(typeName));
  5177. }
  5178. function validateOptional(validate) {
  5179. return {
  5180. validate: validate,
  5181. optional: true
  5182. };
  5183. }
  5184. function validateOptionalType(typeName) {
  5185. return {
  5186. validate: typeIs(typeName),
  5187. optional: true
  5188. };
  5189. }
  5190. function arrayOf(elementType) {
  5191. return chain(assertValueType("array"), assertEach(elementType));
  5192. }
  5193. function arrayOfType(typeName) {
  5194. return arrayOf(typeIs(typeName));
  5195. }
  5196. function validateArrayOfType(typeName) {
  5197. return validate$1(arrayOfType(typeName));
  5198. }
  5199. function assertEach(callback) {
  5200. function validator(node, key, val) {
  5201. if (!Array.isArray(val)) return;
  5202. for (var i = 0; i < val.length; i++) {
  5203. var subkey = key + "[" + i + "]";
  5204. var v = val[i];
  5205. callback(node, subkey, v);
  5206. if (process.env.BABEL_TYPES_8_BREAKING) validateChild(node, subkey, v);
  5207. }
  5208. }
  5209. validator.each = callback;
  5210. return validator;
  5211. }
  5212. function assertOneOf() {
  5213. for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
  5214. values[_key] = arguments[_key];
  5215. }
  5216. function validate(node, key, val) {
  5217. if (values.indexOf(val) < 0) {
  5218. throw new TypeError("Property " + key + " expected value to be one of " + JSON.stringify(values) + " but got " + JSON.stringify(val));
  5219. }
  5220. }
  5221. validate.oneOf = values;
  5222. return validate;
  5223. }
  5224. function assertNodeType() {
  5225. for (var _len2 = arguments.length, types = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  5226. types[_key2] = arguments[_key2];
  5227. }
  5228. function validate(node, key, val) {
  5229. for (var _iterator = types, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  5230. var _ref;
  5231. if (_isArray) {
  5232. if (_i >= _iterator.length) break;
  5233. _ref = _iterator[_i++];
  5234. } else {
  5235. _i = _iterator.next();
  5236. if (_i.done) break;
  5237. _ref = _i.value;
  5238. }
  5239. var type = _ref;
  5240. if (is(type, val)) {
  5241. validateChild(node, key, val);
  5242. return;
  5243. }
  5244. }
  5245. throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + JSON.stringify(types) + " but instead got " + JSON.stringify(val && val.type));
  5246. }
  5247. validate.oneOfNodeTypes = types;
  5248. return validate;
  5249. }
  5250. function assertNodeOrValueType() {
  5251. for (var _len3 = arguments.length, types = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  5252. types[_key3] = arguments[_key3];
  5253. }
  5254. function validate(node, key, val) {
  5255. for (var _iterator2 = types, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  5256. var _ref2;
  5257. if (_isArray2) {
  5258. if (_i2 >= _iterator2.length) break;
  5259. _ref2 = _iterator2[_i2++];
  5260. } else {
  5261. _i2 = _iterator2.next();
  5262. if (_i2.done) break;
  5263. _ref2 = _i2.value;
  5264. }
  5265. var type = _ref2;
  5266. if (getType(val) === type || is(type, val)) {
  5267. validateChild(node, key, val);
  5268. return;
  5269. }
  5270. }
  5271. throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + JSON.stringify(types) + " but instead got " + JSON.stringify(val && val.type));
  5272. }
  5273. validate.oneOfNodeOrValueTypes = types;
  5274. return validate;
  5275. }
  5276. function assertValueType(type) {
  5277. function validate(node, key, val) {
  5278. var valid = getType(val) === type;
  5279. if (!valid) {
  5280. throw new TypeError("Property " + key + " expected type of " + type + " but got " + getType(val));
  5281. }
  5282. }
  5283. validate.type = type;
  5284. return validate;
  5285. }
  5286. function assertShape(shape) {
  5287. function validate(node, key, val) {
  5288. var errors = [];
  5289. for (var _i3 = 0, _Object$keys = Object.keys(shape); _i3 < _Object$keys.length; _i3++) {
  5290. var property = _Object$keys[_i3];
  5291. try {
  5292. validateField(node, property, val[property], shape[property]);
  5293. } catch (error) {
  5294. if (error instanceof TypeError) {
  5295. errors.push(error.message);
  5296. continue;
  5297. }
  5298. throw error;
  5299. }
  5300. }
  5301. if (errors.length) {
  5302. throw new TypeError("Property " + key + " of " + node.type + " expected to have the following:\n" + errors.join("\n"));
  5303. }
  5304. }
  5305. validate.shapeOf = shape;
  5306. return validate;
  5307. }
  5308. function chain() {
  5309. for (var _len4 = arguments.length, fns = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  5310. fns[_key4] = arguments[_key4];
  5311. }
  5312. function validate() {
  5313. for (var _iterator3 = fns, _isArray3 = Array.isArray(_iterator3), _i4 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
  5314. var _ref3;
  5315. if (_isArray3) {
  5316. if (_i4 >= _iterator3.length) break;
  5317. _ref3 = _iterator3[_i4++];
  5318. } else {
  5319. _i4 = _iterator3.next();
  5320. if (_i4.done) break;
  5321. _ref3 = _i4.value;
  5322. }
  5323. var fn = _ref3;
  5324. fn.apply(void 0, arguments);
  5325. }
  5326. }
  5327. validate.chainOf = fns;
  5328. return validate;
  5329. }
  5330. var validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"];
  5331. var validFieldKeys = ["default", "optional", "validate"];
  5332. function defineType(type, opts) {
  5333. if (opts === void 0) {
  5334. opts = {};
  5335. }
  5336. var inherits = opts.inherits && store[opts.inherits] || {};
  5337. var fields = opts.fields;
  5338. if (!fields) {
  5339. fields = {};
  5340. if (inherits.fields) {
  5341. var keys = Object.getOwnPropertyNames(inherits.fields);
  5342. for (var _i5 = 0, _arr = keys; _i5 < _arr.length; _i5++) {
  5343. var key = _arr[_i5];
  5344. var field = inherits.fields[key];
  5345. fields[key] = {
  5346. "default": field["default"],
  5347. optional: field.optional,
  5348. validate: field.validate
  5349. };
  5350. }
  5351. }
  5352. }
  5353. var visitor = opts.visitor || inherits.visitor || [];
  5354. var aliases = opts.aliases || inherits.aliases || [];
  5355. var builder = opts.builder || inherits.builder || opts.visitor || [];
  5356. for (var _i6 = 0, _arr2 = Object.keys(opts); _i6 < _arr2.length; _i6++) {
  5357. var k = _arr2[_i6];
  5358. if (validTypeOpts.indexOf(k) === -1) {
  5359. throw new Error("Unknown type option \"" + k + "\" on " + type);
  5360. }
  5361. }
  5362. if (opts.deprecatedAlias) {
  5363. DEPRECATED_KEYS[opts.deprecatedAlias] = type;
  5364. }
  5365. for (var _i7 = 0, _arr3 = visitor.concat(builder); _i7 < _arr3.length; _i7++) {
  5366. var _key5 = _arr3[_i7];
  5367. fields[_key5] = fields[_key5] || {};
  5368. }
  5369. for (var _i8 = 0, _Object$keys2 = Object.keys(fields); _i8 < _Object$keys2.length; _i8++) {
  5370. var _key6 = _Object$keys2[_i8];
  5371. var _field = fields[_key6];
  5372. if (_field["default"] !== undefined && builder.indexOf(_key6) === -1) {
  5373. _field.optional = true;
  5374. }
  5375. if (_field["default"] === undefined) {
  5376. _field["default"] = null;
  5377. } else if (!_field.validate && _field["default"] != null) {
  5378. _field.validate = assertValueType(getType(_field["default"]));
  5379. }
  5380. for (var _i9 = 0, _arr4 = Object.keys(_field); _i9 < _arr4.length; _i9++) {
  5381. var _k = _arr4[_i9];
  5382. if (validFieldKeys.indexOf(_k) === -1) {
  5383. throw new Error("Unknown field key \"" + _k + "\" on " + type + "." + _key6);
  5384. }
  5385. }
  5386. }
  5387. VISITOR_KEYS[type] = opts.visitor = visitor;
  5388. BUILDER_KEYS[type] = opts.builder = builder;
  5389. NODE_FIELDS[type] = opts.fields = fields;
  5390. ALIAS_KEYS[type] = opts.aliases = aliases;
  5391. aliases.forEach(function (alias) {
  5392. FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];
  5393. FLIPPED_ALIAS_KEYS[alias].push(type);
  5394. });
  5395. if (opts.validate) {
  5396. NODE_PARENT_VALIDATIONS[type] = opts.validate;
  5397. }
  5398. store[type] = opts;
  5399. }
  5400. var store = {};
  5401. defineType("ArrayExpression", {
  5402. fields: {
  5403. elements: {
  5404. validate: chain(assertValueType("array"), assertEach(assertNodeOrValueType("null", "Expression", "SpreadElement"))),
  5405. "default": !process.env.BABEL_TYPES_8_BREAKING ? [] : undefined
  5406. }
  5407. },
  5408. visitor: ["elements"],
  5409. aliases: ["Expression"]
  5410. });
  5411. defineType("AssignmentExpression", {
  5412. fields: {
  5413. operator: {
  5414. validate: function () {
  5415. if (!process.env.BABEL_TYPES_8_BREAKING) {
  5416. return assertValueType("string");
  5417. }
  5418. var identifier = assertOneOf.apply(void 0, ASSIGNMENT_OPERATORS);
  5419. var pattern = assertOneOf("=");
  5420. return function (node, key, val) {
  5421. var validator = is("Pattern", node.left) ? pattern : identifier;
  5422. validator(node, key, val);
  5423. };
  5424. }()
  5425. },
  5426. left: {
  5427. validate: !process.env.BABEL_TYPES_8_BREAKING ? assertNodeType("LVal") : assertNodeType("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  5428. },
  5429. right: {
  5430. validate: assertNodeType("Expression")
  5431. }
  5432. },
  5433. builder: ["operator", "left", "right"],
  5434. visitor: ["left", "right"],
  5435. aliases: ["Expression"]
  5436. });
  5437. defineType("BinaryExpression", {
  5438. builder: ["operator", "left", "right"],
  5439. fields: {
  5440. operator: {
  5441. validate: assertOneOf.apply(void 0, BINARY_OPERATORS)
  5442. },
  5443. left: {
  5444. validate: assertNodeType("Expression")
  5445. },
  5446. right: {
  5447. validate: assertNodeType("Expression")
  5448. }
  5449. },
  5450. visitor: ["left", "right"],
  5451. aliases: ["Binary", "Expression"]
  5452. });
  5453. defineType("InterpreterDirective", {
  5454. builder: ["value"],
  5455. fields: {
  5456. value: {
  5457. validate: assertValueType("string")
  5458. }
  5459. }
  5460. });
  5461. defineType("Directive", {
  5462. visitor: ["value"],
  5463. fields: {
  5464. value: {
  5465. validate: assertNodeType("DirectiveLiteral")
  5466. }
  5467. }
  5468. });
  5469. defineType("DirectiveLiteral", {
  5470. builder: ["value"],
  5471. fields: {
  5472. value: {
  5473. validate: assertValueType("string")
  5474. }
  5475. }
  5476. });
  5477. defineType("BlockStatement", {
  5478. builder: ["body", "directives"],
  5479. visitor: ["directives", "body"],
  5480. fields: {
  5481. directives: {
  5482. validate: chain(assertValueType("array"), assertEach(assertNodeType("Directive"))),
  5483. "default": []
  5484. },
  5485. body: {
  5486. validate: chain(assertValueType("array"), assertEach(assertNodeType("Statement")))
  5487. }
  5488. },
  5489. aliases: ["Scopable", "BlockParent", "Block", "Statement"]
  5490. });
  5491. defineType("BreakStatement", {
  5492. visitor: ["label"],
  5493. fields: {
  5494. label: {
  5495. validate: assertNodeType("Identifier"),
  5496. optional: true
  5497. }
  5498. },
  5499. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  5500. });
  5501. defineType("CallExpression", {
  5502. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  5503. builder: ["callee", "arguments"],
  5504. aliases: ["Expression"],
  5505. fields: Object.assign({
  5506. callee: {
  5507. validate: assertNodeType("Expression", "V8IntrinsicIdentifier")
  5508. },
  5509. arguments: {
  5510. validate: chain(assertValueType("array"), assertEach(assertNodeType("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  5511. }
  5512. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  5513. optional: {
  5514. validate: assertOneOf(true, false),
  5515. optional: true
  5516. }
  5517. } : {}, {
  5518. typeArguments: {
  5519. validate: assertNodeType("TypeParameterInstantiation"),
  5520. optional: true
  5521. },
  5522. typeParameters: {
  5523. validate: assertNodeType("TSTypeParameterInstantiation"),
  5524. optional: true
  5525. }
  5526. })
  5527. });
  5528. defineType("CatchClause", {
  5529. visitor: ["param", "body"],
  5530. fields: {
  5531. param: {
  5532. validate: assertNodeType("Identifier", "ArrayPattern", "ObjectPattern"),
  5533. optional: true
  5534. },
  5535. body: {
  5536. validate: assertNodeType("BlockStatement")
  5537. }
  5538. },
  5539. aliases: ["Scopable", "BlockParent"]
  5540. });
  5541. defineType("ConditionalExpression", {
  5542. visitor: ["test", "consequent", "alternate"],
  5543. fields: {
  5544. test: {
  5545. validate: assertNodeType("Expression")
  5546. },
  5547. consequent: {
  5548. validate: assertNodeType("Expression")
  5549. },
  5550. alternate: {
  5551. validate: assertNodeType("Expression")
  5552. }
  5553. },
  5554. aliases: ["Expression", "Conditional"]
  5555. });
  5556. defineType("ContinueStatement", {
  5557. visitor: ["label"],
  5558. fields: {
  5559. label: {
  5560. validate: assertNodeType("Identifier"),
  5561. optional: true
  5562. }
  5563. },
  5564. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  5565. });
  5566. defineType("DebuggerStatement", {
  5567. aliases: ["Statement"]
  5568. });
  5569. defineType("DoWhileStatement", {
  5570. visitor: ["test", "body"],
  5571. fields: {
  5572. test: {
  5573. validate: assertNodeType("Expression")
  5574. },
  5575. body: {
  5576. validate: assertNodeType("Statement")
  5577. }
  5578. },
  5579. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
  5580. });
  5581. defineType("EmptyStatement", {
  5582. aliases: ["Statement"]
  5583. });
  5584. defineType("ExpressionStatement", {
  5585. visitor: ["expression"],
  5586. fields: {
  5587. expression: {
  5588. validate: assertNodeType("Expression")
  5589. }
  5590. },
  5591. aliases: ["Statement", "ExpressionWrapper"]
  5592. });
  5593. defineType("File", {
  5594. builder: ["program", "comments", "tokens"],
  5595. visitor: ["program"],
  5596. fields: {
  5597. program: {
  5598. validate: assertNodeType("Program")
  5599. }
  5600. }
  5601. });
  5602. defineType("ForInStatement", {
  5603. visitor: ["left", "right", "body"],
  5604. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  5605. fields: {
  5606. left: {
  5607. validate: !process.env.BABEL_TYPES_8_BREAKING ? assertNodeType("VariableDeclaration", "LVal") : assertNodeType("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  5608. },
  5609. right: {
  5610. validate: assertNodeType("Expression")
  5611. },
  5612. body: {
  5613. validate: assertNodeType("Statement")
  5614. }
  5615. }
  5616. });
  5617. defineType("ForStatement", {
  5618. visitor: ["init", "test", "update", "body"],
  5619. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
  5620. fields: {
  5621. init: {
  5622. validate: assertNodeType("VariableDeclaration", "Expression"),
  5623. optional: true
  5624. },
  5625. test: {
  5626. validate: assertNodeType("Expression"),
  5627. optional: true
  5628. },
  5629. update: {
  5630. validate: assertNodeType("Expression"),
  5631. optional: true
  5632. },
  5633. body: {
  5634. validate: assertNodeType("Statement")
  5635. }
  5636. }
  5637. });
  5638. var functionCommon = {
  5639. params: {
  5640. validate: chain(assertValueType("array"), assertEach(assertNodeType("Identifier", "Pattern", "RestElement", "TSParameterProperty")))
  5641. },
  5642. generator: {
  5643. "default": false
  5644. },
  5645. async: {
  5646. "default": false
  5647. }
  5648. };
  5649. var functionTypeAnnotationCommon = {
  5650. returnType: {
  5651. validate: assertNodeType("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  5652. optional: true
  5653. },
  5654. typeParameters: {
  5655. validate: assertNodeType("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  5656. optional: true
  5657. }
  5658. };
  5659. var functionDeclarationCommon = Object.assign({}, functionCommon, {
  5660. declare: {
  5661. validate: assertValueType("boolean"),
  5662. optional: true
  5663. },
  5664. id: {
  5665. validate: assertNodeType("Identifier"),
  5666. optional: true
  5667. }
  5668. });
  5669. defineType("FunctionDeclaration", {
  5670. builder: ["id", "params", "body", "generator", "async"],
  5671. visitor: ["id", "params", "body", "returnType", "typeParameters"],
  5672. fields: Object.assign({}, functionDeclarationCommon, {}, functionTypeAnnotationCommon, {
  5673. body: {
  5674. validate: assertNodeType("BlockStatement")
  5675. }
  5676. }),
  5677. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"],
  5678. validate: function () {
  5679. if (!process.env.BABEL_TYPES_8_BREAKING) return function () {};
  5680. var identifier = assertNodeType("Identifier");
  5681. return function (parent, key, node) {
  5682. if (!is("ExportDefaultDeclaration", parent)) {
  5683. identifier(node, "id", node.id);
  5684. }
  5685. };
  5686. }()
  5687. });
  5688. defineType("FunctionExpression", {
  5689. inherits: "FunctionDeclaration",
  5690. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  5691. fields: Object.assign({}, functionCommon, {}, functionTypeAnnotationCommon, {
  5692. id: {
  5693. validate: assertNodeType("Identifier"),
  5694. optional: true
  5695. },
  5696. body: {
  5697. validate: assertNodeType("BlockStatement")
  5698. }
  5699. })
  5700. });
  5701. var patternLikeCommon = {
  5702. typeAnnotation: {
  5703. validate: assertNodeType("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  5704. optional: true
  5705. },
  5706. decorators: {
  5707. validate: chain(assertValueType("array"), assertEach(assertNodeType("Decorator")))
  5708. }
  5709. };
  5710. defineType("Identifier", {
  5711. builder: ["name"],
  5712. visitor: ["typeAnnotation", "decorators"],
  5713. aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
  5714. fields: Object.assign({}, patternLikeCommon, {
  5715. name: {
  5716. validate: chain(assertValueType("string"), function (node, key, val) {
  5717. if (!process.env.BABEL_TYPES_8_BREAKING) return;
  5718. if (!utils.keyword.isIdentifierNameES6(val)) {
  5719. throw new TypeError("\"" + val + "\" is not a valid identifier name");
  5720. }
  5721. })
  5722. },
  5723. optional: {
  5724. validate: assertValueType("boolean"),
  5725. optional: true
  5726. }
  5727. }),
  5728. validate: function validate(parent, key, node) {
  5729. if (!process.env.BABEL_TYPES_8_BREAKING) return;
  5730. var match = /\.(\w+)$/.exec(key);
  5731. if (!match) return;
  5732. var parentKey = match[1];
  5733. var nonComp = {
  5734. computed: false
  5735. };
  5736. if (parentKey === "property") {
  5737. if (is("MemberExpression", parent, nonComp)) return;
  5738. if (is("OptionalMemberExpression", parent, nonComp)) return;
  5739. } else if (parentKey === "key") {
  5740. if (is("Property", parent, nonComp)) return;
  5741. if (is("Method", parent, nonComp)) return;
  5742. } else if (parentKey === "exported") {
  5743. if (is("ExportSpecifier", parent)) return;
  5744. } else if (parentKey === "imported") {
  5745. if (is("ImportSpecifier", parent, {
  5746. imported: node
  5747. })) return;
  5748. } else if (parentKey === "meta") {
  5749. if (is("MetaProperty", parent, {
  5750. meta: node
  5751. })) return;
  5752. }
  5753. if (utils.keyword.isReservedWordES6(node.name, false) && node.name !== "this") {
  5754. throw new TypeError("\"" + node.name + "\" is not a valid identifer");
  5755. }
  5756. }
  5757. });
  5758. defineType("IfStatement", {
  5759. visitor: ["test", "consequent", "alternate"],
  5760. aliases: ["Statement", "Conditional"],
  5761. fields: {
  5762. test: {
  5763. validate: assertNodeType("Expression")
  5764. },
  5765. consequent: {
  5766. validate: assertNodeType("Statement")
  5767. },
  5768. alternate: {
  5769. optional: true,
  5770. validate: assertNodeType("Statement")
  5771. }
  5772. }
  5773. });
  5774. defineType("LabeledStatement", {
  5775. visitor: ["label", "body"],
  5776. aliases: ["Statement"],
  5777. fields: {
  5778. label: {
  5779. validate: assertNodeType("Identifier")
  5780. },
  5781. body: {
  5782. validate: assertNodeType("Statement")
  5783. }
  5784. }
  5785. });
  5786. defineType("StringLiteral", {
  5787. builder: ["value"],
  5788. fields: {
  5789. value: {
  5790. validate: assertValueType("string")
  5791. }
  5792. },
  5793. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  5794. });
  5795. defineType("NumericLiteral", {
  5796. builder: ["value"],
  5797. deprecatedAlias: "NumberLiteral",
  5798. fields: {
  5799. value: {
  5800. validate: assertValueType("number")
  5801. }
  5802. },
  5803. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  5804. });
  5805. defineType("NullLiteral", {
  5806. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  5807. });
  5808. defineType("BooleanLiteral", {
  5809. builder: ["value"],
  5810. fields: {
  5811. value: {
  5812. validate: assertValueType("boolean")
  5813. }
  5814. },
  5815. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  5816. });
  5817. defineType("RegExpLiteral", {
  5818. builder: ["pattern", "flags"],
  5819. deprecatedAlias: "RegexLiteral",
  5820. aliases: ["Expression", "Literal"],
  5821. fields: {
  5822. pattern: {
  5823. validate: assertValueType("string")
  5824. },
  5825. flags: {
  5826. validate: chain(assertValueType("string"), function (node, key, val) {
  5827. if (!process.env.BABEL_TYPES_8_BREAKING) return;
  5828. var invalid = /[^gimsuy]/.exec(val);
  5829. if (invalid) {
  5830. throw new TypeError("\"" + invalid[0] + "\" is not a valid RegExp flag");
  5831. }
  5832. }),
  5833. "default": ""
  5834. }
  5835. }
  5836. });
  5837. defineType("LogicalExpression", {
  5838. builder: ["operator", "left", "right"],
  5839. visitor: ["left", "right"],
  5840. aliases: ["Binary", "Expression"],
  5841. fields: {
  5842. operator: {
  5843. validate: assertOneOf.apply(void 0, LOGICAL_OPERATORS)
  5844. },
  5845. left: {
  5846. validate: assertNodeType("Expression")
  5847. },
  5848. right: {
  5849. validate: assertNodeType("Expression")
  5850. }
  5851. }
  5852. });
  5853. defineType("MemberExpression", {
  5854. builder: ["object", "property", "computed", "optional"],
  5855. visitor: ["object", "property"],
  5856. aliases: ["Expression", "LVal"],
  5857. fields: Object.assign({
  5858. object: {
  5859. validate: assertNodeType("Expression")
  5860. },
  5861. property: {
  5862. validate: function () {
  5863. var normal = assertNodeType("Identifier", "PrivateName");
  5864. var computed = assertNodeType("Expression");
  5865. return function (node, key, val) {
  5866. var validator = node.computed ? computed : normal;
  5867. validator(node, key, val);
  5868. };
  5869. }()
  5870. },
  5871. computed: {
  5872. "default": false
  5873. }
  5874. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  5875. optional: {
  5876. validate: assertOneOf(true, false),
  5877. optional: true
  5878. }
  5879. } : {})
  5880. });
  5881. defineType("NewExpression", {
  5882. inherits: "CallExpression"
  5883. });
  5884. defineType("Program", {
  5885. visitor: ["directives", "body"],
  5886. builder: ["body", "directives", "sourceType", "interpreter"],
  5887. fields: {
  5888. sourceFile: {
  5889. validate: assertValueType("string")
  5890. },
  5891. sourceType: {
  5892. validate: assertOneOf("script", "module"),
  5893. "default": "script"
  5894. },
  5895. interpreter: {
  5896. validate: assertNodeType("InterpreterDirective"),
  5897. "default": null,
  5898. optional: true
  5899. },
  5900. directives: {
  5901. validate: chain(assertValueType("array"), assertEach(assertNodeType("Directive"))),
  5902. "default": []
  5903. },
  5904. body: {
  5905. validate: chain(assertValueType("array"), assertEach(assertNodeType("Statement")))
  5906. }
  5907. },
  5908. aliases: ["Scopable", "BlockParent", "Block"]
  5909. });
  5910. defineType("ObjectExpression", {
  5911. visitor: ["properties"],
  5912. aliases: ["Expression"],
  5913. fields: {
  5914. properties: {
  5915. validate: chain(assertValueType("array"), assertEach(assertNodeType("ObjectMethod", "ObjectProperty", "SpreadElement")))
  5916. }
  5917. }
  5918. });
  5919. defineType("ObjectMethod", {
  5920. builder: ["kind", "key", "params", "body", "computed", "generator", "async"],
  5921. fields: Object.assign({}, functionCommon, {}, functionTypeAnnotationCommon, {
  5922. kind: Object.assign({
  5923. validate: assertOneOf("method", "get", "set")
  5924. }, !process.env.BABEL_TYPES_8_BREAKING ? {
  5925. "default": "method"
  5926. } : {}),
  5927. computed: {
  5928. "default": false
  5929. },
  5930. key: {
  5931. validate: function () {
  5932. var normal = assertNodeType("Identifier", "StringLiteral", "NumericLiteral");
  5933. var computed = assertNodeType("Expression");
  5934. return function (node, key, val) {
  5935. var validator = node.computed ? computed : normal;
  5936. validator(node, key, val);
  5937. };
  5938. }()
  5939. },
  5940. decorators: {
  5941. validate: chain(assertValueType("array"), assertEach(assertNodeType("Decorator"))),
  5942. optional: true
  5943. },
  5944. body: {
  5945. validate: assertNodeType("BlockStatement")
  5946. }
  5947. }),
  5948. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  5949. aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
  5950. });
  5951. defineType("ObjectProperty", {
  5952. builder: ["key", "value", "computed", "shorthand"].concat(!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : []),
  5953. fields: {
  5954. computed: {
  5955. "default": false
  5956. },
  5957. key: {
  5958. validate: function () {
  5959. var normal = assertNodeType("Identifier", "StringLiteral", "NumericLiteral");
  5960. var computed = assertNodeType("Expression");
  5961. return function (node, key, val) {
  5962. var validator = node.computed ? computed : normal;
  5963. validator(node, key, val);
  5964. };
  5965. }()
  5966. },
  5967. value: {
  5968. validate: assertNodeType("Expression", "PatternLike")
  5969. },
  5970. shorthand: {
  5971. validate: chain(assertValueType("boolean"), function (node, key, val) {
  5972. if (!process.env.BABEL_TYPES_8_BREAKING) return;
  5973. if (val && node.computed) {
  5974. throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");
  5975. }
  5976. }, function (node, key, val) {
  5977. if (!process.env.BABEL_TYPES_8_BREAKING) return;
  5978. if (val && !is("Identifier", node.key)) {
  5979. throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier");
  5980. }
  5981. }),
  5982. "default": false
  5983. },
  5984. decorators: {
  5985. validate: chain(assertValueType("array"), assertEach(assertNodeType("Decorator"))),
  5986. optional: true
  5987. }
  5988. },
  5989. visitor: ["key", "value", "decorators"],
  5990. aliases: ["UserWhitespacable", "Property", "ObjectMember"],
  5991. validate: function () {
  5992. var pattern = assertNodeType("Identifier", "Pattern");
  5993. var expression = assertNodeType("Expression");
  5994. return function (parent, key, node) {
  5995. if (!process.env.BABEL_TYPES_8_BREAKING) return;
  5996. var validator = is("ObjectPattern", parent) ? pattern : expression;
  5997. validator(node, "value", node.value);
  5998. };
  5999. }()
  6000. });
  6001. defineType("RestElement", {
  6002. visitor: ["argument", "typeAnnotation"],
  6003. builder: ["argument"],
  6004. aliases: ["LVal", "PatternLike"],
  6005. deprecatedAlias: "RestProperty",
  6006. fields: Object.assign({}, patternLikeCommon, {
  6007. argument: {
  6008. validate: !process.env.BABEL_TYPES_8_BREAKING ? assertNodeType("LVal") : assertNodeType("Identifier", "Pattern", "MemberExpression")
  6009. }
  6010. }),
  6011. validate: function validate(parent, key) {
  6012. if (!process.env.BABEL_TYPES_8_BREAKING) return;
  6013. var match = /(\w+)\[(\d+)\]/.exec(key);
  6014. if (!match) throw new Error("Internal Babel error: malformed key.");
  6015. var listKey = match[1],
  6016. index = match[2];
  6017. if (parent[listKey].length > index + 1) {
  6018. throw new TypeError("RestElement must be last element of " + listKey);
  6019. }
  6020. }
  6021. });
  6022. defineType("ReturnStatement", {
  6023. visitor: ["argument"],
  6024. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  6025. fields: {
  6026. argument: {
  6027. validate: assertNodeType("Expression"),
  6028. optional: true
  6029. }
  6030. }
  6031. });
  6032. defineType("SequenceExpression", {
  6033. visitor: ["expressions"],
  6034. fields: {
  6035. expressions: {
  6036. validate: chain(assertValueType("array"), assertEach(assertNodeType("Expression")))
  6037. }
  6038. },
  6039. aliases: ["Expression"]
  6040. });
  6041. defineType("ParenthesizedExpression", {
  6042. visitor: ["expression"],
  6043. aliases: ["Expression", "ExpressionWrapper"],
  6044. fields: {
  6045. expression: {
  6046. validate: assertNodeType("Expression")
  6047. }
  6048. }
  6049. });
  6050. defineType("SwitchCase", {
  6051. visitor: ["test", "consequent"],
  6052. fields: {
  6053. test: {
  6054. validate: assertNodeType("Expression"),
  6055. optional: true
  6056. },
  6057. consequent: {
  6058. validate: chain(assertValueType("array"), assertEach(assertNodeType("Statement")))
  6059. }
  6060. }
  6061. });
  6062. defineType("SwitchStatement", {
  6063. visitor: ["discriminant", "cases"],
  6064. aliases: ["Statement", "BlockParent", "Scopable"],
  6065. fields: {
  6066. discriminant: {
  6067. validate: assertNodeType("Expression")
  6068. },
  6069. cases: {
  6070. validate: chain(assertValueType("array"), assertEach(assertNodeType("SwitchCase")))
  6071. }
  6072. }
  6073. });
  6074. defineType("ThisExpression", {
  6075. aliases: ["Expression"]
  6076. });
  6077. defineType("ThrowStatement", {
  6078. visitor: ["argument"],
  6079. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  6080. fields: {
  6081. argument: {
  6082. validate: assertNodeType("Expression")
  6083. }
  6084. }
  6085. });
  6086. defineType("TryStatement", {
  6087. visitor: ["block", "handler", "finalizer"],
  6088. aliases: ["Statement"],
  6089. fields: {
  6090. block: {
  6091. validate: chain(assertNodeType("BlockStatement"), function (node) {
  6092. if (!process.env.BABEL_TYPES_8_BREAKING) return;
  6093. if (!node.handler && !node.finalizer) {
  6094. throw new TypeError("TryStatement expects either a handler or finalizer, or both");
  6095. }
  6096. })
  6097. },
  6098. handler: {
  6099. optional: true,
  6100. validate: assertNodeType("CatchClause")
  6101. },
  6102. finalizer: {
  6103. optional: true,
  6104. validate: assertNodeType("BlockStatement")
  6105. }
  6106. }
  6107. });
  6108. defineType("UnaryExpression", {
  6109. builder: ["operator", "argument", "prefix"],
  6110. fields: {
  6111. prefix: {
  6112. "default": true
  6113. },
  6114. argument: {
  6115. validate: assertNodeType("Expression")
  6116. },
  6117. operator: {
  6118. validate: assertOneOf.apply(void 0, UNARY_OPERATORS)
  6119. }
  6120. },
  6121. visitor: ["argument"],
  6122. aliases: ["UnaryLike", "Expression"]
  6123. });
  6124. defineType("UpdateExpression", {
  6125. builder: ["operator", "argument", "prefix"],
  6126. fields: {
  6127. prefix: {
  6128. "default": false
  6129. },
  6130. argument: {
  6131. validate: !process.env.BABEL_TYPES_8_BREAKING ? assertNodeType("Expression") : assertNodeType("Identifier", "MemberExpression")
  6132. },
  6133. operator: {
  6134. validate: assertOneOf.apply(void 0, UPDATE_OPERATORS)
  6135. }
  6136. },
  6137. visitor: ["argument"],
  6138. aliases: ["Expression"]
  6139. });
  6140. defineType("VariableDeclaration", {
  6141. builder: ["kind", "declarations"],
  6142. visitor: ["declarations"],
  6143. aliases: ["Statement", "Declaration"],
  6144. fields: {
  6145. declare: {
  6146. validate: assertValueType("boolean"),
  6147. optional: true
  6148. },
  6149. kind: {
  6150. validate: assertOneOf("var", "let", "const")
  6151. },
  6152. declarations: {
  6153. validate: chain(assertValueType("array"), assertEach(assertNodeType("VariableDeclarator")))
  6154. }
  6155. },
  6156. validate: function validate(parent, key, node) {
  6157. if (!process.env.BABEL_TYPES_8_BREAKING) return;
  6158. if (!is("ForXStatement", parent, {
  6159. left: node
  6160. })) return;
  6161. if (node.declarations.length !== 1) {
  6162. throw new TypeError("Exactly one VariableDeclarator is required in the VariableDeclaration of a " + parent.type);
  6163. }
  6164. }
  6165. });
  6166. defineType("VariableDeclarator", {
  6167. visitor: ["id", "init"],
  6168. fields: {
  6169. id: {
  6170. validate: function () {
  6171. if (!process.env.BABEL_TYPES_8_BREAKING) {
  6172. return assertNodeType("LVal");
  6173. }
  6174. var normal = assertNodeType("Identifier", "ArrayPattern", "ObjectPattern");
  6175. var without = assertNodeType("Identifier");
  6176. return function (node, key, val) {
  6177. var validator = node.init ? normal : without;
  6178. validator(node, key, val);
  6179. };
  6180. }()
  6181. },
  6182. definite: {
  6183. optional: true,
  6184. validate: assertValueType("boolean")
  6185. },
  6186. init: {
  6187. optional: true,
  6188. validate: assertNodeType("Expression")
  6189. }
  6190. }
  6191. });
  6192. defineType("WhileStatement", {
  6193. visitor: ["test", "body"],
  6194. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
  6195. fields: {
  6196. test: {
  6197. validate: assertNodeType("Expression")
  6198. },
  6199. body: {
  6200. validate: assertNodeType("Statement")
  6201. }
  6202. }
  6203. });
  6204. defineType("WithStatement", {
  6205. visitor: ["object", "body"],
  6206. aliases: ["Statement"],
  6207. fields: {
  6208. object: {
  6209. validate: assertNodeType("Expression")
  6210. },
  6211. body: {
  6212. validate: assertNodeType("Statement")
  6213. }
  6214. }
  6215. });
  6216. defineType("AssignmentPattern", {
  6217. visitor: ["left", "right", "decorators"],
  6218. builder: ["left", "right"],
  6219. aliases: ["Pattern", "PatternLike", "LVal"],
  6220. fields: Object.assign({}, patternLikeCommon, {
  6221. left: {
  6222. validate: assertNodeType("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression")
  6223. },
  6224. right: {
  6225. validate: assertNodeType("Expression")
  6226. },
  6227. decorators: {
  6228. validate: chain(assertValueType("array"), assertEach(assertNodeType("Decorator"))),
  6229. optional: true
  6230. }
  6231. })
  6232. });
  6233. defineType("ArrayPattern", {
  6234. visitor: ["elements", "typeAnnotation"],
  6235. builder: ["elements"],
  6236. aliases: ["Pattern", "PatternLike", "LVal"],
  6237. fields: Object.assign({}, patternLikeCommon, {
  6238. elements: {
  6239. validate: chain(assertValueType("array"), assertEach(assertNodeOrValueType("null", "PatternLike")))
  6240. },
  6241. decorators: {
  6242. validate: chain(assertValueType("array"), assertEach(assertNodeType("Decorator"))),
  6243. optional: true
  6244. }
  6245. })
  6246. });
  6247. defineType("ArrowFunctionExpression", {
  6248. builder: ["params", "body", "async"],
  6249. visitor: ["params", "body", "returnType", "typeParameters"],
  6250. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  6251. fields: Object.assign({}, functionCommon, {}, functionTypeAnnotationCommon, {
  6252. expression: {
  6253. validate: assertValueType("boolean")
  6254. },
  6255. body: {
  6256. validate: assertNodeType("BlockStatement", "Expression")
  6257. }
  6258. })
  6259. });
  6260. defineType("ClassBody", {
  6261. visitor: ["body"],
  6262. fields: {
  6263. body: {
  6264. validate: chain(assertValueType("array"), assertEach(assertNodeType("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature")))
  6265. }
  6266. }
  6267. });
  6268. defineType("ClassExpression", {
  6269. builder: ["id", "superClass", "body", "decorators"],
  6270. visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],
  6271. aliases: ["Scopable", "Class", "Expression", "Pureish"],
  6272. fields: {
  6273. id: {
  6274. validate: assertNodeType("Identifier"),
  6275. optional: true
  6276. },
  6277. typeParameters: {
  6278. validate: assertNodeType("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  6279. optional: true
  6280. },
  6281. body: {
  6282. validate: assertNodeType("ClassBody")
  6283. },
  6284. superClass: {
  6285. optional: true,
  6286. validate: assertNodeType("Expression")
  6287. },
  6288. superTypeParameters: {
  6289. validate: assertNodeType("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  6290. optional: true
  6291. },
  6292. "implements": {
  6293. validate: chain(assertValueType("array"), assertEach(assertNodeType("TSExpressionWithTypeArguments", "ClassImplements"))),
  6294. optional: true
  6295. },
  6296. decorators: {
  6297. validate: chain(assertValueType("array"), assertEach(assertNodeType("Decorator"))),
  6298. optional: true
  6299. }
  6300. }
  6301. });
  6302. defineType("ClassDeclaration", {
  6303. inherits: "ClassExpression",
  6304. aliases: ["Scopable", "Class", "Statement", "Declaration", "Pureish"],
  6305. fields: {
  6306. declare: {
  6307. validate: assertValueType("boolean"),
  6308. optional: true
  6309. },
  6310. "abstract": {
  6311. validate: assertValueType("boolean"),
  6312. optional: true
  6313. }
  6314. },
  6315. validate: function () {
  6316. var identifier = assertNodeType("Identifier");
  6317. return function (parent, key, node) {
  6318. if (!process.env.BABEL_TYPES_8_BREAKING) return;
  6319. if (!is("ExportDefaultDeclaration", parent)) {
  6320. identifier(node, "id", node.id);
  6321. }
  6322. };
  6323. }()
  6324. });
  6325. defineType("ExportAllDeclaration", {
  6326. visitor: ["source"],
  6327. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  6328. fields: {
  6329. source: {
  6330. validate: assertNodeType("StringLiteral")
  6331. }
  6332. }
  6333. });
  6334. defineType("ExportDefaultDeclaration", {
  6335. visitor: ["declaration"],
  6336. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  6337. fields: {
  6338. declaration: {
  6339. validate: assertNodeType("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression")
  6340. }
  6341. }
  6342. });
  6343. defineType("ExportNamedDeclaration", {
  6344. visitor: ["declaration", "specifiers", "source"],
  6345. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  6346. fields: {
  6347. declaration: {
  6348. optional: true,
  6349. validate: chain(assertNodeType("Declaration"), function (node, key, val) {
  6350. if (!process.env.BABEL_TYPES_8_BREAKING) return;
  6351. if (val && node.specifiers.length) {
  6352. throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");
  6353. }
  6354. }, function (node, key, val) {
  6355. if (!process.env.BABEL_TYPES_8_BREAKING) return;
  6356. if (val && node.source) {
  6357. throw new TypeError("Cannot export a declaration from a source");
  6358. }
  6359. })
  6360. },
  6361. specifiers: {
  6362. "default": [],
  6363. validate: chain(assertValueType("array"), assertEach(function () {
  6364. var sourced = assertNodeType("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier");
  6365. var sourceless = assertNodeType("ExportSpecifier");
  6366. if (!process.env.BABEL_TYPES_8_BREAKING) return sourced;
  6367. return function (node, key, val) {
  6368. var validator = node.source ? sourced : sourceless;
  6369. validator(node, key, val);
  6370. };
  6371. }()))
  6372. },
  6373. source: {
  6374. validate: assertNodeType("StringLiteral"),
  6375. optional: true
  6376. },
  6377. exportKind: validateOptional(assertOneOf("type", "value"))
  6378. }
  6379. });
  6380. defineType("ExportSpecifier", {
  6381. visitor: ["local", "exported"],
  6382. aliases: ["ModuleSpecifier"],
  6383. fields: {
  6384. local: {
  6385. validate: assertNodeType("Identifier")
  6386. },
  6387. exported: {
  6388. validate: assertNodeType("Identifier")
  6389. }
  6390. }
  6391. });
  6392. defineType("ForOfStatement", {
  6393. visitor: ["left", "right", "body"],
  6394. builder: ["left", "right", "body", "await"],
  6395. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  6396. fields: {
  6397. left: {
  6398. validate: function () {
  6399. if (!process.env.BABEL_TYPES_8_BREAKING) {
  6400. return assertNodeType("VariableDeclaration", "LVal");
  6401. }
  6402. var declaration = assertNodeType("VariableDeclaration");
  6403. var lval = assertNodeType("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern");
  6404. return function (node, key, val) {
  6405. if (is("VariableDeclaration", val)) {
  6406. declaration(node, key, val);
  6407. } else {
  6408. lval(node, key, val);
  6409. }
  6410. };
  6411. }()
  6412. },
  6413. right: {
  6414. validate: assertNodeType("Expression")
  6415. },
  6416. body: {
  6417. validate: assertNodeType("Statement")
  6418. },
  6419. "await": {
  6420. "default": false
  6421. }
  6422. }
  6423. });
  6424. defineType("ImportDeclaration", {
  6425. visitor: ["specifiers", "source"],
  6426. aliases: ["Statement", "Declaration", "ModuleDeclaration"],
  6427. fields: {
  6428. specifiers: {
  6429. validate: chain(assertValueType("array"), assertEach(assertNodeType("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
  6430. },
  6431. source: {
  6432. validate: assertNodeType("StringLiteral")
  6433. },
  6434. importKind: {
  6435. validate: assertOneOf("type", "typeof", "value"),
  6436. optional: true
  6437. }
  6438. }
  6439. });
  6440. defineType("ImportDefaultSpecifier", {
  6441. visitor: ["local"],
  6442. aliases: ["ModuleSpecifier"],
  6443. fields: {
  6444. local: {
  6445. validate: assertNodeType("Identifier")
  6446. }
  6447. }
  6448. });
  6449. defineType("ImportNamespaceSpecifier", {
  6450. visitor: ["local"],
  6451. aliases: ["ModuleSpecifier"],
  6452. fields: {
  6453. local: {
  6454. validate: assertNodeType("Identifier")
  6455. }
  6456. }
  6457. });
  6458. defineType("ImportSpecifier", {
  6459. visitor: ["local", "imported"],
  6460. aliases: ["ModuleSpecifier"],
  6461. fields: {
  6462. local: {
  6463. validate: assertNodeType("Identifier")
  6464. },
  6465. imported: {
  6466. validate: assertNodeType("Identifier")
  6467. },
  6468. importKind: {
  6469. validate: assertOneOf("type", "typeof"),
  6470. optional: true
  6471. }
  6472. }
  6473. });
  6474. defineType("MetaProperty", {
  6475. visitor: ["meta", "property"],
  6476. aliases: ["Expression"],
  6477. fields: {
  6478. meta: {
  6479. validate: chain(assertNodeType("Identifier"), function (node, key, val) {
  6480. if (!process.env.BABEL_TYPES_8_BREAKING) return;
  6481. var property;
  6482. switch (val.name) {
  6483. case "function":
  6484. property = "sent";
  6485. break;
  6486. case "new":
  6487. property = "target";
  6488. break;
  6489. case "import":
  6490. property = "meta";
  6491. break;
  6492. }
  6493. if (!is("Identifier", node.property, {
  6494. name: property
  6495. })) {
  6496. throw new TypeError("Unrecognised MetaProperty");
  6497. }
  6498. })
  6499. },
  6500. property: {
  6501. validate: assertNodeType("Identifier")
  6502. }
  6503. }
  6504. });
  6505. var classMethodOrPropertyCommon = {
  6506. "abstract": {
  6507. validate: assertValueType("boolean"),
  6508. optional: true
  6509. },
  6510. accessibility: {
  6511. validate: assertOneOf("public", "private", "protected"),
  6512. optional: true
  6513. },
  6514. "static": {
  6515. "default": false
  6516. },
  6517. computed: {
  6518. "default": false
  6519. },
  6520. optional: {
  6521. validate: assertValueType("boolean"),
  6522. optional: true
  6523. },
  6524. key: {
  6525. validate: chain(function () {
  6526. var normal = assertNodeType("Identifier", "StringLiteral", "NumericLiteral");
  6527. var computed = assertNodeType("Expression");
  6528. return function (node, key, val) {
  6529. var validator = node.computed ? computed : normal;
  6530. validator(node, key, val);
  6531. };
  6532. }(), assertNodeType("Identifier", "StringLiteral", "NumericLiteral", "Expression"))
  6533. }
  6534. };
  6535. var classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, {}, classMethodOrPropertyCommon, {
  6536. kind: {
  6537. validate: assertOneOf("get", "set", "method", "constructor"),
  6538. "default": "method"
  6539. },
  6540. access: {
  6541. validate: chain(assertValueType("string"), assertOneOf("public", "private", "protected")),
  6542. optional: true
  6543. },
  6544. decorators: {
  6545. validate: chain(assertValueType("array"), assertEach(assertNodeType("Decorator"))),
  6546. optional: true
  6547. }
  6548. });
  6549. defineType("ClassMethod", {
  6550. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
  6551. builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"],
  6552. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  6553. fields: Object.assign({}, classMethodOrDeclareMethodCommon, {}, functionTypeAnnotationCommon, {
  6554. body: {
  6555. validate: assertNodeType("BlockStatement")
  6556. }
  6557. })
  6558. });
  6559. defineType("ObjectPattern", {
  6560. visitor: ["properties", "typeAnnotation", "decorators"],
  6561. builder: ["properties"],
  6562. aliases: ["Pattern", "PatternLike", "LVal"],
  6563. fields: Object.assign({}, patternLikeCommon, {
  6564. properties: {
  6565. validate: chain(assertValueType("array"), assertEach(assertNodeType("RestElement", "ObjectProperty")))
  6566. }
  6567. })
  6568. });
  6569. defineType("SpreadElement", {
  6570. visitor: ["argument"],
  6571. aliases: ["UnaryLike"],
  6572. deprecatedAlias: "SpreadProperty",
  6573. fields: {
  6574. argument: {
  6575. validate: assertNodeType("Expression")
  6576. }
  6577. }
  6578. });
  6579. defineType("Super", {
  6580. aliases: ["Expression"]
  6581. });
  6582. defineType("TaggedTemplateExpression", {
  6583. visitor: ["tag", "quasi"],
  6584. aliases: ["Expression"],
  6585. fields: {
  6586. tag: {
  6587. validate: assertNodeType("Expression")
  6588. },
  6589. quasi: {
  6590. validate: assertNodeType("TemplateLiteral")
  6591. },
  6592. typeParameters: {
  6593. validate: assertNodeType("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  6594. optional: true
  6595. }
  6596. }
  6597. });
  6598. defineType("TemplateElement", {
  6599. builder: ["value", "tail"],
  6600. fields: {
  6601. value: {
  6602. validate: assertShape({
  6603. raw: {
  6604. validate: assertValueType("string")
  6605. },
  6606. cooked: {
  6607. validate: assertValueType("string"),
  6608. optional: true
  6609. }
  6610. })
  6611. },
  6612. tail: {
  6613. "default": false
  6614. }
  6615. }
  6616. });
  6617. defineType("TemplateLiteral", {
  6618. visitor: ["quasis", "expressions"],
  6619. aliases: ["Expression", "Literal"],
  6620. fields: {
  6621. quasis: {
  6622. validate: chain(assertValueType("array"), assertEach(assertNodeType("TemplateElement")))
  6623. },
  6624. expressions: {
  6625. validate: chain(assertValueType("array"), assertEach(assertNodeType("Expression")), function (node, key, val) {
  6626. if (node.quasis.length !== val.length + 1) {
  6627. 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);
  6628. }
  6629. })
  6630. }
  6631. }
  6632. });
  6633. defineType("YieldExpression", {
  6634. builder: ["argument", "delegate"],
  6635. visitor: ["argument"],
  6636. aliases: ["Expression", "Terminatorless"],
  6637. fields: {
  6638. delegate: {
  6639. validate: chain(assertValueType("boolean"), function (node, key, val) {
  6640. if (!process.env.BABEL_TYPES_8_BREAKING) return;
  6641. if (val && !node.argument) {
  6642. throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument");
  6643. }
  6644. }),
  6645. "default": false
  6646. },
  6647. argument: {
  6648. optional: true,
  6649. validate: assertNodeType("Expression")
  6650. }
  6651. }
  6652. });
  6653. var defineInterfaceishType = function defineInterfaceishType(name, typeParameterType) {
  6654. if (typeParameterType === void 0) {
  6655. typeParameterType = "TypeParameterDeclaration";
  6656. }
  6657. defineType(name, {
  6658. builder: ["id", "typeParameters", "extends", "body"],
  6659. visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"],
  6660. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6661. fields: {
  6662. id: validateType("Identifier"),
  6663. typeParameters: validateOptionalType(typeParameterType),
  6664. "extends": validateOptional(arrayOfType("InterfaceExtends")),
  6665. mixins: validateOptional(arrayOfType("InterfaceExtends")),
  6666. "implements": validateOptional(arrayOfType("ClassImplements")),
  6667. body: validateType("ObjectTypeAnnotation")
  6668. }
  6669. });
  6670. };
  6671. defineType("AnyTypeAnnotation", {
  6672. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6673. });
  6674. defineType("ArrayTypeAnnotation", {
  6675. visitor: ["elementType"],
  6676. aliases: ["Flow", "FlowType"],
  6677. fields: {
  6678. elementType: validateType("FlowType")
  6679. }
  6680. });
  6681. defineType("BooleanTypeAnnotation", {
  6682. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6683. });
  6684. defineType("BooleanLiteralTypeAnnotation", {
  6685. builder: ["value"],
  6686. aliases: ["Flow", "FlowType"],
  6687. fields: {
  6688. value: validate$1(assertValueType("boolean"))
  6689. }
  6690. });
  6691. defineType("NullLiteralTypeAnnotation", {
  6692. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6693. });
  6694. defineType("ClassImplements", {
  6695. visitor: ["id", "typeParameters"],
  6696. aliases: ["Flow"],
  6697. fields: {
  6698. id: validateType("Identifier"),
  6699. typeParameters: validateOptionalType("TypeParameterInstantiation")
  6700. }
  6701. });
  6702. defineInterfaceishType("DeclareClass");
  6703. defineType("DeclareFunction", {
  6704. visitor: ["id"],
  6705. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6706. fields: {
  6707. id: validateType("Identifier"),
  6708. predicate: validateOptionalType("DeclaredPredicate")
  6709. }
  6710. });
  6711. defineInterfaceishType("DeclareInterface");
  6712. defineType("DeclareModule", {
  6713. builder: ["id", "body", "kind"],
  6714. visitor: ["id", "body"],
  6715. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6716. fields: {
  6717. id: validateType(["Identifier", "StringLiteral"]),
  6718. body: validateType("BlockStatement"),
  6719. kind: validateOptional(assertOneOf("CommonJS", "ES"))
  6720. }
  6721. });
  6722. defineType("DeclareModuleExports", {
  6723. visitor: ["typeAnnotation"],
  6724. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6725. fields: {
  6726. typeAnnotation: validateType("TypeAnnotation")
  6727. }
  6728. });
  6729. defineType("DeclareTypeAlias", {
  6730. visitor: ["id", "typeParameters", "right"],
  6731. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6732. fields: {
  6733. id: validateType("Identifier"),
  6734. typeParameters: validateOptionalType("TypeParameterDeclaration"),
  6735. right: validateType("FlowType")
  6736. }
  6737. });
  6738. defineType("DeclareOpaqueType", {
  6739. visitor: ["id", "typeParameters", "supertype"],
  6740. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6741. fields: {
  6742. id: validateType("Identifier"),
  6743. typeParameters: validateOptionalType("TypeParameterDeclaration"),
  6744. supertype: validateOptionalType("FlowType")
  6745. }
  6746. });
  6747. defineType("DeclareVariable", {
  6748. visitor: ["id"],
  6749. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6750. fields: {
  6751. id: validateType("Identifier")
  6752. }
  6753. });
  6754. defineType("DeclareExportDeclaration", {
  6755. visitor: ["declaration", "specifiers", "source"],
  6756. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6757. fields: {
  6758. declaration: validateOptionalType("Flow"),
  6759. specifiers: validateOptional(arrayOfType(["ExportSpecifier", "ExportNamespaceSpecifier"])),
  6760. source: validateOptionalType("StringLiteral"),
  6761. "default": validateOptional(assertValueType("boolean"))
  6762. }
  6763. });
  6764. defineType("DeclareExportAllDeclaration", {
  6765. visitor: ["source"],
  6766. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6767. fields: {
  6768. source: validateType("StringLiteral"),
  6769. exportKind: validateOptional(assertOneOf("type", "value"))
  6770. }
  6771. });
  6772. defineType("DeclaredPredicate", {
  6773. visitor: ["value"],
  6774. aliases: ["Flow", "FlowPredicate"],
  6775. fields: {
  6776. value: validateType("Flow")
  6777. }
  6778. });
  6779. defineType("ExistsTypeAnnotation", {
  6780. aliases: ["Flow", "FlowType"]
  6781. });
  6782. defineType("FunctionTypeAnnotation", {
  6783. visitor: ["typeParameters", "params", "rest", "returnType"],
  6784. aliases: ["Flow", "FlowType"],
  6785. fields: {
  6786. typeParameters: validateOptionalType("TypeParameterDeclaration"),
  6787. params: validate$1(arrayOfType("FunctionTypeParam")),
  6788. rest: validateOptionalType("FunctionTypeParam"),
  6789. returnType: validateType("FlowType")
  6790. }
  6791. });
  6792. defineType("FunctionTypeParam", {
  6793. visitor: ["name", "typeAnnotation"],
  6794. aliases: ["Flow"],
  6795. fields: {
  6796. name: validateOptionalType("Identifier"),
  6797. typeAnnotation: validateType("FlowType"),
  6798. optional: validateOptional(assertValueType("boolean"))
  6799. }
  6800. });
  6801. defineType("GenericTypeAnnotation", {
  6802. visitor: ["id", "typeParameters"],
  6803. aliases: ["Flow", "FlowType"],
  6804. fields: {
  6805. id: validateType(["Identifier", "QualifiedTypeIdentifier"]),
  6806. typeParameters: validateOptionalType("TypeParameterInstantiation")
  6807. }
  6808. });
  6809. defineType("InferredPredicate", {
  6810. aliases: ["Flow", "FlowPredicate"]
  6811. });
  6812. defineType("InterfaceExtends", {
  6813. visitor: ["id", "typeParameters"],
  6814. aliases: ["Flow"],
  6815. fields: {
  6816. id: validateType(["Identifier", "QualifiedTypeIdentifier"]),
  6817. typeParameters: validateOptionalType("TypeParameterInstantiation")
  6818. }
  6819. });
  6820. defineInterfaceishType("InterfaceDeclaration");
  6821. defineType("InterfaceTypeAnnotation", {
  6822. visitor: ["extends", "body"],
  6823. aliases: ["Flow", "FlowType"],
  6824. fields: {
  6825. "extends": validateOptional(arrayOfType("InterfaceExtends")),
  6826. body: validateType("ObjectTypeAnnotation")
  6827. }
  6828. });
  6829. defineType("IntersectionTypeAnnotation", {
  6830. visitor: ["types"],
  6831. aliases: ["Flow", "FlowType"],
  6832. fields: {
  6833. types: validate$1(arrayOfType("FlowType"))
  6834. }
  6835. });
  6836. defineType("MixedTypeAnnotation", {
  6837. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6838. });
  6839. defineType("EmptyTypeAnnotation", {
  6840. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6841. });
  6842. defineType("NullableTypeAnnotation", {
  6843. visitor: ["typeAnnotation"],
  6844. aliases: ["Flow", "FlowType"],
  6845. fields: {
  6846. typeAnnotation: validateType("FlowType")
  6847. }
  6848. });
  6849. defineType("NumberLiteralTypeAnnotation", {
  6850. builder: ["value"],
  6851. aliases: ["Flow", "FlowType"],
  6852. fields: {
  6853. value: validate$1(assertValueType("number"))
  6854. }
  6855. });
  6856. defineType("NumberTypeAnnotation", {
  6857. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6858. });
  6859. defineType("ObjectTypeAnnotation", {
  6860. visitor: ["properties", "indexers", "callProperties", "internalSlots"],
  6861. aliases: ["Flow", "FlowType"],
  6862. builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
  6863. fields: {
  6864. properties: validate$1(arrayOfType(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])),
  6865. indexers: validateOptional(arrayOfType("ObjectTypeIndexer")),
  6866. callProperties: validateOptional(arrayOfType("ObjectTypeCallProperty")),
  6867. internalSlots: validateOptional(arrayOfType("ObjectTypeInternalSlot")),
  6868. exact: {
  6869. validate: assertValueType("boolean"),
  6870. "default": false
  6871. },
  6872. inexact: validateOptional(assertValueType("boolean"))
  6873. }
  6874. });
  6875. defineType("ObjectTypeInternalSlot", {
  6876. visitor: ["id", "value", "optional", "static", "method"],
  6877. aliases: ["Flow", "UserWhitespacable"],
  6878. fields: {
  6879. id: validateType("Identifier"),
  6880. value: validateType("FlowType"),
  6881. optional: validate$1(assertValueType("boolean")),
  6882. "static": validate$1(assertValueType("boolean")),
  6883. method: validate$1(assertValueType("boolean"))
  6884. }
  6885. });
  6886. defineType("ObjectTypeCallProperty", {
  6887. visitor: ["value"],
  6888. aliases: ["Flow", "UserWhitespacable"],
  6889. fields: {
  6890. value: validateType("FlowType"),
  6891. "static": validate$1(assertValueType("boolean"))
  6892. }
  6893. });
  6894. defineType("ObjectTypeIndexer", {
  6895. visitor: ["id", "key", "value", "variance"],
  6896. aliases: ["Flow", "UserWhitespacable"],
  6897. fields: {
  6898. id: validateOptionalType("Identifier"),
  6899. key: validateType("FlowType"),
  6900. value: validateType("FlowType"),
  6901. "static": validate$1(assertValueType("boolean")),
  6902. variance: validateOptionalType("Variance")
  6903. }
  6904. });
  6905. defineType("ObjectTypeProperty", {
  6906. visitor: ["key", "value", "variance"],
  6907. aliases: ["Flow", "UserWhitespacable"],
  6908. fields: {
  6909. key: validateType(["Identifier", "StringLiteral"]),
  6910. value: validateType("FlowType"),
  6911. kind: validate$1(assertOneOf("init", "get", "set")),
  6912. "static": validate$1(assertValueType("boolean")),
  6913. proto: validate$1(assertValueType("boolean")),
  6914. optional: validate$1(assertValueType("boolean")),
  6915. variance: validateOptionalType("Variance")
  6916. }
  6917. });
  6918. defineType("ObjectTypeSpreadProperty", {
  6919. visitor: ["argument"],
  6920. aliases: ["Flow", "UserWhitespacable"],
  6921. fields: {
  6922. argument: validateType("FlowType")
  6923. }
  6924. });
  6925. defineType("OpaqueType", {
  6926. visitor: ["id", "typeParameters", "supertype", "impltype"],
  6927. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6928. fields: {
  6929. id: validateType("Identifier"),
  6930. typeParameters: validateOptionalType("TypeParameterDeclaration"),
  6931. supertype: validateOptionalType("FlowType"),
  6932. impltype: validateType("FlowType")
  6933. }
  6934. });
  6935. defineType("QualifiedTypeIdentifier", {
  6936. visitor: ["id", "qualification"],
  6937. aliases: ["Flow"],
  6938. fields: {
  6939. id: validateType("Identifier"),
  6940. qualification: validateType(["Identifier", "QualifiedTypeIdentifier"])
  6941. }
  6942. });
  6943. defineType("StringLiteralTypeAnnotation", {
  6944. builder: ["value"],
  6945. aliases: ["Flow", "FlowType"],
  6946. fields: {
  6947. value: validate$1(assertValueType("string"))
  6948. }
  6949. });
  6950. defineType("StringTypeAnnotation", {
  6951. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6952. });
  6953. defineType("ThisTypeAnnotation", {
  6954. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6955. });
  6956. defineType("TupleTypeAnnotation", {
  6957. visitor: ["types"],
  6958. aliases: ["Flow", "FlowType"],
  6959. fields: {
  6960. types: validate$1(arrayOfType("FlowType"))
  6961. }
  6962. });
  6963. defineType("TypeofTypeAnnotation", {
  6964. visitor: ["argument"],
  6965. aliases: ["Flow", "FlowType"],
  6966. fields: {
  6967. argument: validateType("FlowType")
  6968. }
  6969. });
  6970. defineType("TypeAlias", {
  6971. visitor: ["id", "typeParameters", "right"],
  6972. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6973. fields: {
  6974. id: validateType("Identifier"),
  6975. typeParameters: validateOptionalType("TypeParameterDeclaration"),
  6976. right: validateType("FlowType")
  6977. }
  6978. });
  6979. defineType("TypeAnnotation", {
  6980. aliases: ["Flow"],
  6981. visitor: ["typeAnnotation"],
  6982. fields: {
  6983. typeAnnotation: validateType("FlowType")
  6984. }
  6985. });
  6986. defineType("TypeCastExpression", {
  6987. visitor: ["expression", "typeAnnotation"],
  6988. aliases: ["Flow", "ExpressionWrapper", "Expression"],
  6989. fields: {
  6990. expression: validateType("Expression"),
  6991. typeAnnotation: validateType("TypeAnnotation")
  6992. }
  6993. });
  6994. defineType("TypeParameter", {
  6995. aliases: ["Flow"],
  6996. visitor: ["bound", "default", "variance"],
  6997. fields: {
  6998. name: validate$1(assertValueType("string")),
  6999. bound: validateOptionalType("TypeAnnotation"),
  7000. "default": validateOptionalType("FlowType"),
  7001. variance: validateOptionalType("Variance")
  7002. }
  7003. });
  7004. defineType("TypeParameterDeclaration", {
  7005. aliases: ["Flow"],
  7006. visitor: ["params"],
  7007. fields: {
  7008. params: validate$1(arrayOfType("TypeParameter"))
  7009. }
  7010. });
  7011. defineType("TypeParameterInstantiation", {
  7012. aliases: ["Flow"],
  7013. visitor: ["params"],
  7014. fields: {
  7015. params: validate$1(arrayOfType("FlowType"))
  7016. }
  7017. });
  7018. defineType("UnionTypeAnnotation", {
  7019. visitor: ["types"],
  7020. aliases: ["Flow", "FlowType"],
  7021. fields: {
  7022. types: validate$1(arrayOfType("FlowType"))
  7023. }
  7024. });
  7025. defineType("Variance", {
  7026. aliases: ["Flow"],
  7027. builder: ["kind"],
  7028. fields: {
  7029. kind: validate$1(assertOneOf("minus", "plus"))
  7030. }
  7031. });
  7032. defineType("VoidTypeAnnotation", {
  7033. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  7034. });
  7035. defineType("EnumDeclaration", {
  7036. aliases: ["Declaration"],
  7037. visitor: ["id", "body"],
  7038. fields: {
  7039. id: validateType("Identifier"),
  7040. body: validateType(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"])
  7041. }
  7042. });
  7043. defineType("EnumBooleanBody", {
  7044. aliases: ["EnumBody"],
  7045. visitor: ["members"],
  7046. fields: {
  7047. explicit: validate$1(assertValueType("boolean")),
  7048. members: validateArrayOfType("EnumBooleanMember")
  7049. }
  7050. });
  7051. defineType("EnumNumberBody", {
  7052. aliases: ["EnumBody"],
  7053. visitor: ["members"],
  7054. fields: {
  7055. explicit: validate$1(assertValueType("boolean")),
  7056. members: validateArrayOfType("EnumNumberMember")
  7057. }
  7058. });
  7059. defineType("EnumStringBody", {
  7060. aliases: ["EnumBody"],
  7061. visitor: ["members"],
  7062. fields: {
  7063. explicit: validate$1(assertValueType("boolean")),
  7064. members: validateArrayOfType(["EnumStringMember", "EnumDefaultedMember"])
  7065. }
  7066. });
  7067. defineType("EnumSymbolBody", {
  7068. aliases: ["EnumBody"],
  7069. visitor: ["members"],
  7070. fields: {
  7071. members: validateArrayOfType("EnumDefaultedMember")
  7072. }
  7073. });
  7074. defineType("EnumBooleanMember", {
  7075. aliases: ["EnumMember"],
  7076. visitor: ["id"],
  7077. fields: {
  7078. id: validateType("Identifier"),
  7079. init: validateType("BooleanLiteral")
  7080. }
  7081. });
  7082. defineType("EnumNumberMember", {
  7083. aliases: ["EnumMember"],
  7084. visitor: ["id", "init"],
  7085. fields: {
  7086. id: validateType("Identifier"),
  7087. init: validateType("NumericLiteral")
  7088. }
  7089. });
  7090. defineType("EnumStringMember", {
  7091. aliases: ["EnumMember"],
  7092. visitor: ["id", "init"],
  7093. fields: {
  7094. id: validateType("Identifier"),
  7095. init: validateType("StringLiteral")
  7096. }
  7097. });
  7098. defineType("EnumDefaultedMember", {
  7099. aliases: ["EnumMember"],
  7100. visitor: ["id"],
  7101. fields: {
  7102. id: validateType("Identifier")
  7103. }
  7104. });
  7105. defineType("JSXAttribute", {
  7106. visitor: ["name", "value"],
  7107. aliases: ["JSX", "Immutable"],
  7108. fields: {
  7109. name: {
  7110. validate: assertNodeType("JSXIdentifier", "JSXNamespacedName")
  7111. },
  7112. value: {
  7113. optional: true,
  7114. validate: assertNodeType("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer")
  7115. }
  7116. }
  7117. });
  7118. defineType("JSXClosingElement", {
  7119. visitor: ["name"],
  7120. aliases: ["JSX", "Immutable"],
  7121. fields: {
  7122. name: {
  7123. validate: assertNodeType("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  7124. }
  7125. }
  7126. });
  7127. defineType("JSXElement", {
  7128. builder: ["openingElement", "closingElement", "children", "selfClosing"],
  7129. visitor: ["openingElement", "children", "closingElement"],
  7130. aliases: ["JSX", "Immutable", "Expression"],
  7131. fields: {
  7132. openingElement: {
  7133. validate: assertNodeType("JSXOpeningElement")
  7134. },
  7135. closingElement: {
  7136. optional: true,
  7137. validate: assertNodeType("JSXClosingElement")
  7138. },
  7139. children: {
  7140. validate: chain(assertValueType("array"), assertEach(assertNodeType("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  7141. }
  7142. }
  7143. });
  7144. defineType("JSXEmptyExpression", {
  7145. aliases: ["JSX"]
  7146. });
  7147. defineType("JSXExpressionContainer", {
  7148. visitor: ["expression"],
  7149. aliases: ["JSX", "Immutable"],
  7150. fields: {
  7151. expression: {
  7152. validate: assertNodeType("Expression", "JSXEmptyExpression")
  7153. }
  7154. }
  7155. });
  7156. defineType("JSXSpreadChild", {
  7157. visitor: ["expression"],
  7158. aliases: ["JSX", "Immutable"],
  7159. fields: {
  7160. expression: {
  7161. validate: assertNodeType("Expression")
  7162. }
  7163. }
  7164. });
  7165. defineType("JSXIdentifier", {
  7166. builder: ["name"],
  7167. aliases: ["JSX"],
  7168. fields: {
  7169. name: {
  7170. validate: assertValueType("string")
  7171. }
  7172. }
  7173. });
  7174. defineType("JSXMemberExpression", {
  7175. visitor: ["object", "property"],
  7176. aliases: ["JSX"],
  7177. fields: {
  7178. object: {
  7179. validate: assertNodeType("JSXMemberExpression", "JSXIdentifier")
  7180. },
  7181. property: {
  7182. validate: assertNodeType("JSXIdentifier")
  7183. }
  7184. }
  7185. });
  7186. defineType("JSXNamespacedName", {
  7187. visitor: ["namespace", "name"],
  7188. aliases: ["JSX"],
  7189. fields: {
  7190. namespace: {
  7191. validate: assertNodeType("JSXIdentifier")
  7192. },
  7193. name: {
  7194. validate: assertNodeType("JSXIdentifier")
  7195. }
  7196. }
  7197. });
  7198. defineType("JSXOpeningElement", {
  7199. builder: ["name", "attributes", "selfClosing"],
  7200. visitor: ["name", "attributes"],
  7201. aliases: ["JSX", "Immutable"],
  7202. fields: {
  7203. name: {
  7204. validate: assertNodeType("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  7205. },
  7206. selfClosing: {
  7207. "default": false
  7208. },
  7209. attributes: {
  7210. validate: chain(assertValueType("array"), assertEach(assertNodeType("JSXAttribute", "JSXSpreadAttribute")))
  7211. },
  7212. typeParameters: {
  7213. validate: assertNodeType("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  7214. optional: true
  7215. }
  7216. }
  7217. });
  7218. defineType("JSXSpreadAttribute", {
  7219. visitor: ["argument"],
  7220. aliases: ["JSX"],
  7221. fields: {
  7222. argument: {
  7223. validate: assertNodeType("Expression")
  7224. }
  7225. }
  7226. });
  7227. defineType("JSXText", {
  7228. aliases: ["JSX", "Immutable"],
  7229. builder: ["value"],
  7230. fields: {
  7231. value: {
  7232. validate: assertValueType("string")
  7233. }
  7234. }
  7235. });
  7236. defineType("JSXFragment", {
  7237. builder: ["openingFragment", "closingFragment", "children"],
  7238. visitor: ["openingFragment", "children", "closingFragment"],
  7239. aliases: ["JSX", "Immutable", "Expression"],
  7240. fields: {
  7241. openingFragment: {
  7242. validate: assertNodeType("JSXOpeningFragment")
  7243. },
  7244. closingFragment: {
  7245. validate: assertNodeType("JSXClosingFragment")
  7246. },
  7247. children: {
  7248. validate: chain(assertValueType("array"), assertEach(assertNodeType("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  7249. }
  7250. }
  7251. });
  7252. defineType("JSXOpeningFragment", {
  7253. aliases: ["JSX", "Immutable"]
  7254. });
  7255. defineType("JSXClosingFragment", {
  7256. aliases: ["JSX", "Immutable"]
  7257. });
  7258. var PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"];
  7259. var PLACEHOLDERS_ALIAS = {
  7260. Declaration: ["Statement"],
  7261. Pattern: ["PatternLike", "LVal"]
  7262. };
  7263. for (var _i = 0, _PLACEHOLDERS = PLACEHOLDERS; _i < _PLACEHOLDERS.length; _i++) {
  7264. var type = _PLACEHOLDERS[_i];
  7265. var alias = ALIAS_KEYS[type];
  7266. if (alias && alias.length) PLACEHOLDERS_ALIAS[type] = alias;
  7267. }
  7268. var PLACEHOLDERS_FLIPPED_ALIAS = {};
  7269. Object.keys(PLACEHOLDERS_ALIAS).forEach(function (type) {
  7270. PLACEHOLDERS_ALIAS[type].forEach(function (alias) {
  7271. if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {
  7272. PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];
  7273. }
  7274. PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);
  7275. });
  7276. });
  7277. defineType("Noop", {
  7278. visitor: []
  7279. });
  7280. defineType("Placeholder", {
  7281. visitor: [],
  7282. builder: ["expectedNode", "name"],
  7283. fields: {
  7284. name: {
  7285. validate: assertNodeType("Identifier")
  7286. },
  7287. expectedNode: {
  7288. validate: assertOneOf.apply(void 0, PLACEHOLDERS)
  7289. }
  7290. }
  7291. });
  7292. defineType("V8IntrinsicIdentifier", {
  7293. builder: ["name"],
  7294. fields: {
  7295. name: {
  7296. validate: assertValueType("string")
  7297. }
  7298. }
  7299. });
  7300. defineType("ArgumentPlaceholder", {});
  7301. defineType("AwaitExpression", {
  7302. builder: ["argument"],
  7303. visitor: ["argument"],
  7304. aliases: ["Expression", "Terminatorless"],
  7305. fields: {
  7306. argument: {
  7307. validate: assertNodeType("Expression")
  7308. }
  7309. }
  7310. });
  7311. defineType("BindExpression", {
  7312. visitor: ["object", "callee"],
  7313. aliases: ["Expression"],
  7314. fields: !process.env.BABEL_TYPES_8_BREAKING ? {} : {
  7315. object: {
  7316. validate: assertNodeType("Expression")
  7317. },
  7318. callee: {
  7319. validate: assertNodeType("Expression")
  7320. }
  7321. }
  7322. });
  7323. defineType("ClassProperty", {
  7324. visitor: ["key", "value", "typeAnnotation", "decorators"],
  7325. builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
  7326. aliases: ["Property"],
  7327. fields: Object.assign({}, classMethodOrPropertyCommon, {
  7328. value: {
  7329. validate: assertNodeType("Expression"),
  7330. optional: true
  7331. },
  7332. definite: {
  7333. validate: assertValueType("boolean"),
  7334. optional: true
  7335. },
  7336. typeAnnotation: {
  7337. validate: assertNodeType("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  7338. optional: true
  7339. },
  7340. decorators: {
  7341. validate: chain(assertValueType("array"), assertEach(assertNodeType("Decorator"))),
  7342. optional: true
  7343. },
  7344. readonly: {
  7345. validate: assertValueType("boolean"),
  7346. optional: true
  7347. },
  7348. declare: {
  7349. validate: assertValueType("boolean"),
  7350. optional: true
  7351. }
  7352. })
  7353. });
  7354. defineType("OptionalMemberExpression", {
  7355. builder: ["object", "property", "computed", "optional"],
  7356. visitor: ["object", "property"],
  7357. aliases: ["Expression"],
  7358. fields: {
  7359. object: {
  7360. validate: assertNodeType("Expression")
  7361. },
  7362. property: {
  7363. validate: function () {
  7364. var normal = assertNodeType("Identifier");
  7365. var computed = assertNodeType("Expression");
  7366. return function (node, key, val) {
  7367. var validator = node.computed ? computed : normal;
  7368. validator(node, key, val);
  7369. };
  7370. }()
  7371. },
  7372. computed: {
  7373. "default": false
  7374. },
  7375. optional: {
  7376. validate: assertValueType("boolean")
  7377. }
  7378. }
  7379. });
  7380. defineType("PipelineTopicExpression", {
  7381. builder: ["expression"],
  7382. visitor: ["expression"],
  7383. fields: {
  7384. expression: {
  7385. validate: assertNodeType("Expression")
  7386. }
  7387. }
  7388. });
  7389. defineType("PipelineBareFunction", {
  7390. builder: ["callee"],
  7391. visitor: ["callee"],
  7392. fields: {
  7393. callee: {
  7394. validate: assertNodeType("Expression")
  7395. }
  7396. }
  7397. });
  7398. defineType("PipelinePrimaryTopicReference", {
  7399. aliases: ["Expression"]
  7400. });
  7401. defineType("OptionalCallExpression", {
  7402. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  7403. builder: ["callee", "arguments", "optional"],
  7404. aliases: ["Expression"],
  7405. fields: {
  7406. callee: {
  7407. validate: assertNodeType("Expression")
  7408. },
  7409. arguments: {
  7410. validate: chain(assertValueType("array"), assertEach(assertNodeType("Expression", "SpreadElement", "JSXNamespacedName")))
  7411. },
  7412. optional: {
  7413. validate: assertValueType("boolean")
  7414. },
  7415. typeArguments: {
  7416. validate: assertNodeType("TypeParameterInstantiation"),
  7417. optional: true
  7418. },
  7419. typeParameters: {
  7420. validate: assertNodeType("TSTypeParameterInstantiation"),
  7421. optional: true
  7422. }
  7423. }
  7424. });
  7425. defineType("ClassPrivateProperty", {
  7426. visitor: ["key", "value", "decorators"],
  7427. builder: ["key", "value", "decorators"],
  7428. aliases: ["Property", "Private"],
  7429. fields: {
  7430. key: {
  7431. validate: assertNodeType("PrivateName")
  7432. },
  7433. value: {
  7434. validate: assertNodeType("Expression"),
  7435. optional: true
  7436. },
  7437. decorators: {
  7438. validate: chain(assertValueType("array"), assertEach(assertNodeType("Decorator"))),
  7439. optional: true
  7440. }
  7441. }
  7442. });
  7443. defineType("ClassPrivateMethod", {
  7444. builder: ["kind", "key", "params", "body", "static"],
  7445. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  7446. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
  7447. fields: Object.assign({}, classMethodOrDeclareMethodCommon, {
  7448. key: {
  7449. validate: assertNodeType("PrivateName")
  7450. },
  7451. body: {
  7452. validate: assertNodeType("BlockStatement")
  7453. }
  7454. })
  7455. });
  7456. defineType("Import", {
  7457. aliases: ["Expression"]
  7458. });
  7459. defineType("Decorator", {
  7460. visitor: ["expression"],
  7461. fields: {
  7462. expression: {
  7463. validate: assertNodeType("Expression")
  7464. }
  7465. }
  7466. });
  7467. defineType("DoExpression", {
  7468. visitor: ["body"],
  7469. aliases: ["Expression"],
  7470. fields: {
  7471. body: {
  7472. validate: assertNodeType("BlockStatement")
  7473. }
  7474. }
  7475. });
  7476. defineType("ExportDefaultSpecifier", {
  7477. visitor: ["exported"],
  7478. aliases: ["ModuleSpecifier"],
  7479. fields: {
  7480. exported: {
  7481. validate: assertNodeType("Identifier")
  7482. }
  7483. }
  7484. });
  7485. defineType("ExportNamespaceSpecifier", {
  7486. visitor: ["exported"],
  7487. aliases: ["ModuleSpecifier"],
  7488. fields: {
  7489. exported: {
  7490. validate: assertNodeType("Identifier")
  7491. }
  7492. }
  7493. });
  7494. defineType("PrivateName", {
  7495. visitor: ["id"],
  7496. aliases: ["Private"],
  7497. fields: {
  7498. id: {
  7499. validate: assertNodeType("Identifier")
  7500. }
  7501. }
  7502. });
  7503. defineType("BigIntLiteral", {
  7504. builder: ["value"],
  7505. fields: {
  7506. value: {
  7507. validate: assertValueType("string")
  7508. }
  7509. },
  7510. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  7511. });
  7512. var bool = assertValueType("boolean");
  7513. var tSFunctionTypeAnnotationCommon = {
  7514. returnType: {
  7515. validate: assertNodeType("TSTypeAnnotation", "Noop"),
  7516. optional: true
  7517. },
  7518. typeParameters: {
  7519. validate: assertNodeType("TSTypeParameterDeclaration", "Noop"),
  7520. optional: true
  7521. }
  7522. };
  7523. defineType("TSParameterProperty", {
  7524. aliases: ["LVal"],
  7525. visitor: ["parameter"],
  7526. fields: {
  7527. accessibility: {
  7528. validate: assertOneOf("public", "private", "protected"),
  7529. optional: true
  7530. },
  7531. readonly: {
  7532. validate: assertValueType("boolean"),
  7533. optional: true
  7534. },
  7535. parameter: {
  7536. validate: assertNodeType("Identifier", "AssignmentPattern")
  7537. }
  7538. }
  7539. });
  7540. defineType("TSDeclareFunction", {
  7541. aliases: ["Statement", "Declaration"],
  7542. visitor: ["id", "typeParameters", "params", "returnType"],
  7543. fields: Object.assign({}, functionDeclarationCommon, {}, tSFunctionTypeAnnotationCommon)
  7544. });
  7545. defineType("TSDeclareMethod", {
  7546. visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
  7547. fields: Object.assign({}, classMethodOrDeclareMethodCommon, {}, tSFunctionTypeAnnotationCommon)
  7548. });
  7549. defineType("TSQualifiedName", {
  7550. aliases: ["TSEntityName"],
  7551. visitor: ["left", "right"],
  7552. fields: {
  7553. left: validateType("TSEntityName"),
  7554. right: validateType("Identifier")
  7555. }
  7556. });
  7557. var signatureDeclarationCommon = {
  7558. typeParameters: validateOptionalType("TSTypeParameterDeclaration"),
  7559. parameters: validateArrayOfType(["Identifier", "RestElement"]),
  7560. typeAnnotation: validateOptionalType("TSTypeAnnotation")
  7561. };
  7562. var callConstructSignatureDeclaration = {
  7563. aliases: ["TSTypeElement"],
  7564. visitor: ["typeParameters", "parameters", "typeAnnotation"],
  7565. fields: signatureDeclarationCommon
  7566. };
  7567. defineType("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
  7568. defineType("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
  7569. var namedTypeElementCommon = {
  7570. key: validateType("Expression"),
  7571. computed: validate$1(bool),
  7572. optional: validateOptional(bool)
  7573. };
  7574. defineType("TSPropertySignature", {
  7575. aliases: ["TSTypeElement"],
  7576. visitor: ["key", "typeAnnotation", "initializer"],
  7577. fields: Object.assign({}, namedTypeElementCommon, {
  7578. readonly: validateOptional(bool),
  7579. typeAnnotation: validateOptionalType("TSTypeAnnotation"),
  7580. initializer: validateOptionalType("Expression")
  7581. })
  7582. });
  7583. defineType("TSMethodSignature", {
  7584. aliases: ["TSTypeElement"],
  7585. visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
  7586. fields: Object.assign({}, signatureDeclarationCommon, {}, namedTypeElementCommon)
  7587. });
  7588. defineType("TSIndexSignature", {
  7589. aliases: ["TSTypeElement"],
  7590. visitor: ["parameters", "typeAnnotation"],
  7591. fields: {
  7592. readonly: validateOptional(bool),
  7593. parameters: validateArrayOfType("Identifier"),
  7594. typeAnnotation: validateOptionalType("TSTypeAnnotation")
  7595. }
  7596. });
  7597. var tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"];
  7598. for (var _i$1 = 0, _tsKeywordTypes = tsKeywordTypes; _i$1 < _tsKeywordTypes.length; _i$1++) {
  7599. var type$1 = _tsKeywordTypes[_i$1];
  7600. defineType(type$1, {
  7601. aliases: ["TSType"],
  7602. visitor: [],
  7603. fields: {}
  7604. });
  7605. }
  7606. defineType("TSThisType", {
  7607. aliases: ["TSType"],
  7608. visitor: [],
  7609. fields: {}
  7610. });
  7611. var fnOrCtr = {
  7612. aliases: ["TSType"],
  7613. visitor: ["typeParameters", "parameters", "typeAnnotation"],
  7614. fields: signatureDeclarationCommon
  7615. };
  7616. defineType("TSFunctionType", fnOrCtr);
  7617. defineType("TSConstructorType", fnOrCtr);
  7618. defineType("TSTypeReference", {
  7619. aliases: ["TSType"],
  7620. visitor: ["typeName", "typeParameters"],
  7621. fields: {
  7622. typeName: validateType("TSEntityName"),
  7623. typeParameters: validateOptionalType("TSTypeParameterInstantiation")
  7624. }
  7625. });
  7626. defineType("TSTypePredicate", {
  7627. aliases: ["TSType"],
  7628. visitor: ["parameterName", "typeAnnotation"],
  7629. builder: ["parameterName", "typeAnnotation", "asserts"],
  7630. fields: {
  7631. parameterName: validateType(["Identifier", "TSThisType"]),
  7632. typeAnnotation: validateOptionalType("TSTypeAnnotation"),
  7633. asserts: validateOptional(bool)
  7634. }
  7635. });
  7636. defineType("TSTypeQuery", {
  7637. aliases: ["TSType"],
  7638. visitor: ["exprName"],
  7639. fields: {
  7640. exprName: validateType(["TSEntityName", "TSImportType"])
  7641. }
  7642. });
  7643. defineType("TSTypeLiteral", {
  7644. aliases: ["TSType"],
  7645. visitor: ["members"],
  7646. fields: {
  7647. members: validateArrayOfType("TSTypeElement")
  7648. }
  7649. });
  7650. defineType("TSArrayType", {
  7651. aliases: ["TSType"],
  7652. visitor: ["elementType"],
  7653. fields: {
  7654. elementType: validateType("TSType")
  7655. }
  7656. });
  7657. defineType("TSTupleType", {
  7658. aliases: ["TSType"],
  7659. visitor: ["elementTypes"],
  7660. fields: {
  7661. elementTypes: validateArrayOfType("TSType")
  7662. }
  7663. });
  7664. defineType("TSOptionalType", {
  7665. aliases: ["TSType"],
  7666. visitor: ["typeAnnotation"],
  7667. fields: {
  7668. typeAnnotation: validateType("TSType")
  7669. }
  7670. });
  7671. defineType("TSRestType", {
  7672. aliases: ["TSType"],
  7673. visitor: ["typeAnnotation"],
  7674. fields: {
  7675. typeAnnotation: validateType("TSType")
  7676. }
  7677. });
  7678. var unionOrIntersection = {
  7679. aliases: ["TSType"],
  7680. visitor: ["types"],
  7681. fields: {
  7682. types: validateArrayOfType("TSType")
  7683. }
  7684. };
  7685. defineType("TSUnionType", unionOrIntersection);
  7686. defineType("TSIntersectionType", unionOrIntersection);
  7687. defineType("TSConditionalType", {
  7688. aliases: ["TSType"],
  7689. visitor: ["checkType", "extendsType", "trueType", "falseType"],
  7690. fields: {
  7691. checkType: validateType("TSType"),
  7692. extendsType: validateType("TSType"),
  7693. trueType: validateType("TSType"),
  7694. falseType: validateType("TSType")
  7695. }
  7696. });
  7697. defineType("TSInferType", {
  7698. aliases: ["TSType"],
  7699. visitor: ["typeParameter"],
  7700. fields: {
  7701. typeParameter: validateType("TSTypeParameter")
  7702. }
  7703. });
  7704. defineType("TSParenthesizedType", {
  7705. aliases: ["TSType"],
  7706. visitor: ["typeAnnotation"],
  7707. fields: {
  7708. typeAnnotation: validateType("TSType")
  7709. }
  7710. });
  7711. defineType("TSTypeOperator", {
  7712. aliases: ["TSType"],
  7713. visitor: ["typeAnnotation"],
  7714. fields: {
  7715. operator: validate$1(assertValueType("string")),
  7716. typeAnnotation: validateType("TSType")
  7717. }
  7718. });
  7719. defineType("TSIndexedAccessType", {
  7720. aliases: ["TSType"],
  7721. visitor: ["objectType", "indexType"],
  7722. fields: {
  7723. objectType: validateType("TSType"),
  7724. indexType: validateType("TSType")
  7725. }
  7726. });
  7727. defineType("TSMappedType", {
  7728. aliases: ["TSType"],
  7729. visitor: ["typeParameter", "typeAnnotation"],
  7730. fields: {
  7731. readonly: validateOptional(bool),
  7732. typeParameter: validateType("TSTypeParameter"),
  7733. optional: validateOptional(bool),
  7734. typeAnnotation: validateOptionalType("TSType")
  7735. }
  7736. });
  7737. defineType("TSLiteralType", {
  7738. aliases: ["TSType"],
  7739. visitor: ["literal"],
  7740. fields: {
  7741. literal: validateType(["NumericLiteral", "StringLiteral", "BooleanLiteral"])
  7742. }
  7743. });
  7744. defineType("TSExpressionWithTypeArguments", {
  7745. aliases: ["TSType"],
  7746. visitor: ["expression", "typeParameters"],
  7747. fields: {
  7748. expression: validateType("TSEntityName"),
  7749. typeParameters: validateOptionalType("TSTypeParameterInstantiation")
  7750. }
  7751. });
  7752. defineType("TSInterfaceDeclaration", {
  7753. aliases: ["Statement", "Declaration"],
  7754. visitor: ["id", "typeParameters", "extends", "body"],
  7755. fields: {
  7756. declare: validateOptional(bool),
  7757. id: validateType("Identifier"),
  7758. typeParameters: validateOptionalType("TSTypeParameterDeclaration"),
  7759. "extends": validateOptional(arrayOfType("TSExpressionWithTypeArguments")),
  7760. body: validateType("TSInterfaceBody")
  7761. }
  7762. });
  7763. defineType("TSInterfaceBody", {
  7764. visitor: ["body"],
  7765. fields: {
  7766. body: validateArrayOfType("TSTypeElement")
  7767. }
  7768. });
  7769. defineType("TSTypeAliasDeclaration", {
  7770. aliases: ["Statement", "Declaration"],
  7771. visitor: ["id", "typeParameters", "typeAnnotation"],
  7772. fields: {
  7773. declare: validateOptional(bool),
  7774. id: validateType("Identifier"),
  7775. typeParameters: validateOptionalType("TSTypeParameterDeclaration"),
  7776. typeAnnotation: validateType("TSType")
  7777. }
  7778. });
  7779. defineType("TSAsExpression", {
  7780. aliases: ["Expression"],
  7781. visitor: ["expression", "typeAnnotation"],
  7782. fields: {
  7783. expression: validateType("Expression"),
  7784. typeAnnotation: validateType("TSType")
  7785. }
  7786. });
  7787. defineType("TSTypeAssertion", {
  7788. aliases: ["Expression"],
  7789. visitor: ["typeAnnotation", "expression"],
  7790. fields: {
  7791. typeAnnotation: validateType("TSType"),
  7792. expression: validateType("Expression")
  7793. }
  7794. });
  7795. defineType("TSEnumDeclaration", {
  7796. aliases: ["Statement", "Declaration"],
  7797. visitor: ["id", "members"],
  7798. fields: {
  7799. declare: validateOptional(bool),
  7800. "const": validateOptional(bool),
  7801. id: validateType("Identifier"),
  7802. members: validateArrayOfType("TSEnumMember"),
  7803. initializer: validateOptionalType("Expression")
  7804. }
  7805. });
  7806. defineType("TSEnumMember", {
  7807. visitor: ["id", "initializer"],
  7808. fields: {
  7809. id: validateType(["Identifier", "StringLiteral"]),
  7810. initializer: validateOptionalType("Expression")
  7811. }
  7812. });
  7813. defineType("TSModuleDeclaration", {
  7814. aliases: ["Statement", "Declaration"],
  7815. visitor: ["id", "body"],
  7816. fields: {
  7817. declare: validateOptional(bool),
  7818. global: validateOptional(bool),
  7819. id: validateType(["Identifier", "StringLiteral"]),
  7820. body: validateType(["TSModuleBlock", "TSModuleDeclaration"])
  7821. }
  7822. });
  7823. defineType("TSModuleBlock", {
  7824. aliases: ["Scopable", "Block", "BlockParent"],
  7825. visitor: ["body"],
  7826. fields: {
  7827. body: validateArrayOfType("Statement")
  7828. }
  7829. });
  7830. defineType("TSImportType", {
  7831. aliases: ["TSType"],
  7832. visitor: ["argument", "qualifier", "typeParameters"],
  7833. fields: {
  7834. argument: validateType("StringLiteral"),
  7835. qualifier: validateOptionalType("TSEntityName"),
  7836. typeParameters: validateOptionalType("TSTypeParameterInstantiation")
  7837. }
  7838. });
  7839. defineType("TSImportEqualsDeclaration", {
  7840. aliases: ["Statement"],
  7841. visitor: ["id", "moduleReference"],
  7842. fields: {
  7843. isExport: validate$1(bool),
  7844. id: validateType("Identifier"),
  7845. moduleReference: validateType(["TSEntityName", "TSExternalModuleReference"])
  7846. }
  7847. });
  7848. defineType("TSExternalModuleReference", {
  7849. visitor: ["expression"],
  7850. fields: {
  7851. expression: validateType("StringLiteral")
  7852. }
  7853. });
  7854. defineType("TSNonNullExpression", {
  7855. aliases: ["Expression"],
  7856. visitor: ["expression"],
  7857. fields: {
  7858. expression: validateType("Expression")
  7859. }
  7860. });
  7861. defineType("TSExportAssignment", {
  7862. aliases: ["Statement"],
  7863. visitor: ["expression"],
  7864. fields: {
  7865. expression: validateType("Expression")
  7866. }
  7867. });
  7868. defineType("TSNamespaceExportDeclaration", {
  7869. aliases: ["Statement"],
  7870. visitor: ["id"],
  7871. fields: {
  7872. id: validateType("Identifier")
  7873. }
  7874. });
  7875. defineType("TSTypeAnnotation", {
  7876. visitor: ["typeAnnotation"],
  7877. fields: {
  7878. typeAnnotation: {
  7879. validate: assertNodeType("TSType")
  7880. }
  7881. }
  7882. });
  7883. defineType("TSTypeParameterInstantiation", {
  7884. visitor: ["params"],
  7885. fields: {
  7886. params: {
  7887. validate: chain(assertValueType("array"), assertEach(assertNodeType("TSType")))
  7888. }
  7889. }
  7890. });
  7891. defineType("TSTypeParameterDeclaration", {
  7892. visitor: ["params"],
  7893. fields: {
  7894. params: {
  7895. validate: chain(assertValueType("array"), assertEach(assertNodeType("TSTypeParameter")))
  7896. }
  7897. }
  7898. });
  7899. defineType("TSTypeParameter", {
  7900. builder: ["constraint", "default", "name"],
  7901. visitor: ["constraint", "default"],
  7902. fields: {
  7903. name: {
  7904. validate: assertValueType("string")
  7905. },
  7906. constraint: {
  7907. validate: assertNodeType("TSType"),
  7908. optional: true
  7909. },
  7910. "default": {
  7911. validate: assertNodeType("TSType"),
  7912. optional: true
  7913. }
  7914. }
  7915. });
  7916. toFastProperties(VISITOR_KEYS);
  7917. toFastProperties(ALIAS_KEYS);
  7918. toFastProperties(FLIPPED_ALIAS_KEYS);
  7919. toFastProperties(NODE_FIELDS);
  7920. toFastProperties(BUILDER_KEYS);
  7921. toFastProperties(DEPRECATED_KEYS);
  7922. toFastProperties(PLACEHOLDERS_ALIAS);
  7923. toFastProperties(PLACEHOLDERS_FLIPPED_ALIAS);
  7924. var TYPES = Object.keys(VISITOR_KEYS).concat(Object.keys(FLIPPED_ALIAS_KEYS)).concat(Object.keys(DEPRECATED_KEYS));
  7925. function builder(type) {
  7926. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  7927. args[_key - 1] = arguments[_key];
  7928. }
  7929. var keys = BUILDER_KEYS[type];
  7930. var countArgs = args.length;
  7931. if (countArgs > keys.length) {
  7932. throw new Error(type + ": Too many arguments passed. Received " + countArgs + " but can receive no more than " + keys.length);
  7933. }
  7934. var node = {
  7935. type: type
  7936. };
  7937. var i = 0;
  7938. keys.forEach(function (key) {
  7939. var field = NODE_FIELDS[type][key];
  7940. var arg;
  7941. if (i < countArgs) arg = args[i];
  7942. if (arg === undefined) arg = clone_1(field["default"]);
  7943. node[key] = arg;
  7944. i++;
  7945. });
  7946. for (var _i = 0, _Object$keys = Object.keys(node); _i < _Object$keys.length; _i++) {
  7947. var key = _Object$keys[_i];
  7948. validate(node, key, node[key]);
  7949. }
  7950. return node;
  7951. }
  7952. function ArrayExpression() {
  7953. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  7954. args[_key] = arguments[_key];
  7955. }
  7956. return builder.apply(void 0, ["ArrayExpression"].concat(args));
  7957. }
  7958. function AssignmentExpression() {
  7959. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  7960. args[_key2] = arguments[_key2];
  7961. }
  7962. return builder.apply(void 0, ["AssignmentExpression"].concat(args));
  7963. }
  7964. function BinaryExpression() {
  7965. for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  7966. args[_key3] = arguments[_key3];
  7967. }
  7968. return builder.apply(void 0, ["BinaryExpression"].concat(args));
  7969. }
  7970. function InterpreterDirective() {
  7971. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  7972. args[_key4] = arguments[_key4];
  7973. }
  7974. return builder.apply(void 0, ["InterpreterDirective"].concat(args));
  7975. }
  7976. function Directive() {
  7977. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  7978. args[_key5] = arguments[_key5];
  7979. }
  7980. return builder.apply(void 0, ["Directive"].concat(args));
  7981. }
  7982. function DirectiveLiteral() {
  7983. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  7984. args[_key6] = arguments[_key6];
  7985. }
  7986. return builder.apply(void 0, ["DirectiveLiteral"].concat(args));
  7987. }
  7988. function BlockStatement() {
  7989. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  7990. args[_key7] = arguments[_key7];
  7991. }
  7992. return builder.apply(void 0, ["BlockStatement"].concat(args));
  7993. }
  7994. function BreakStatement() {
  7995. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  7996. args[_key8] = arguments[_key8];
  7997. }
  7998. return builder.apply(void 0, ["BreakStatement"].concat(args));
  7999. }
  8000. function CallExpression() {
  8001. for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
  8002. args[_key9] = arguments[_key9];
  8003. }
  8004. return builder.apply(void 0, ["CallExpression"].concat(args));
  8005. }
  8006. function CatchClause() {
  8007. for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
  8008. args[_key10] = arguments[_key10];
  8009. }
  8010. return builder.apply(void 0, ["CatchClause"].concat(args));
  8011. }
  8012. function ConditionalExpression() {
  8013. for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
  8014. args[_key11] = arguments[_key11];
  8015. }
  8016. return builder.apply(void 0, ["ConditionalExpression"].concat(args));
  8017. }
  8018. function ContinueStatement() {
  8019. for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
  8020. args[_key12] = arguments[_key12];
  8021. }
  8022. return builder.apply(void 0, ["ContinueStatement"].concat(args));
  8023. }
  8024. function DebuggerStatement() {
  8025. for (var _len13 = arguments.length, args = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {
  8026. args[_key13] = arguments[_key13];
  8027. }
  8028. return builder.apply(void 0, ["DebuggerStatement"].concat(args));
  8029. }
  8030. function DoWhileStatement() {
  8031. for (var _len14 = arguments.length, args = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) {
  8032. args[_key14] = arguments[_key14];
  8033. }
  8034. return builder.apply(void 0, ["DoWhileStatement"].concat(args));
  8035. }
  8036. function EmptyStatement() {
  8037. for (var _len15 = arguments.length, args = new Array(_len15), _key15 = 0; _key15 < _len15; _key15++) {
  8038. args[_key15] = arguments[_key15];
  8039. }
  8040. return builder.apply(void 0, ["EmptyStatement"].concat(args));
  8041. }
  8042. function ExpressionStatement() {
  8043. for (var _len16 = arguments.length, args = new Array(_len16), _key16 = 0; _key16 < _len16; _key16++) {
  8044. args[_key16] = arguments[_key16];
  8045. }
  8046. return builder.apply(void 0, ["ExpressionStatement"].concat(args));
  8047. }
  8048. function File() {
  8049. for (var _len17 = arguments.length, args = new Array(_len17), _key17 = 0; _key17 < _len17; _key17++) {
  8050. args[_key17] = arguments[_key17];
  8051. }
  8052. return builder.apply(void 0, ["File"].concat(args));
  8053. }
  8054. function ForInStatement() {
  8055. for (var _len18 = arguments.length, args = new Array(_len18), _key18 = 0; _key18 < _len18; _key18++) {
  8056. args[_key18] = arguments[_key18];
  8057. }
  8058. return builder.apply(void 0, ["ForInStatement"].concat(args));
  8059. }
  8060. function ForStatement() {
  8061. for (var _len19 = arguments.length, args = new Array(_len19), _key19 = 0; _key19 < _len19; _key19++) {
  8062. args[_key19] = arguments[_key19];
  8063. }
  8064. return builder.apply(void 0, ["ForStatement"].concat(args));
  8065. }
  8066. function FunctionDeclaration() {
  8067. for (var _len20 = arguments.length, args = new Array(_len20), _key20 = 0; _key20 < _len20; _key20++) {
  8068. args[_key20] = arguments[_key20];
  8069. }
  8070. return builder.apply(void 0, ["FunctionDeclaration"].concat(args));
  8071. }
  8072. function FunctionExpression() {
  8073. for (var _len21 = arguments.length, args = new Array(_len21), _key21 = 0; _key21 < _len21; _key21++) {
  8074. args[_key21] = arguments[_key21];
  8075. }
  8076. return builder.apply(void 0, ["FunctionExpression"].concat(args));
  8077. }
  8078. function Identifier() {
  8079. for (var _len22 = arguments.length, args = new Array(_len22), _key22 = 0; _key22 < _len22; _key22++) {
  8080. args[_key22] = arguments[_key22];
  8081. }
  8082. return builder.apply(void 0, ["Identifier"].concat(args));
  8083. }
  8084. function IfStatement() {
  8085. for (var _len23 = arguments.length, args = new Array(_len23), _key23 = 0; _key23 < _len23; _key23++) {
  8086. args[_key23] = arguments[_key23];
  8087. }
  8088. return builder.apply(void 0, ["IfStatement"].concat(args));
  8089. }
  8090. function LabeledStatement() {
  8091. for (var _len24 = arguments.length, args = new Array(_len24), _key24 = 0; _key24 < _len24; _key24++) {
  8092. args[_key24] = arguments[_key24];
  8093. }
  8094. return builder.apply(void 0, ["LabeledStatement"].concat(args));
  8095. }
  8096. function StringLiteral() {
  8097. for (var _len25 = arguments.length, args = new Array(_len25), _key25 = 0; _key25 < _len25; _key25++) {
  8098. args[_key25] = arguments[_key25];
  8099. }
  8100. return builder.apply(void 0, ["StringLiteral"].concat(args));
  8101. }
  8102. function NumericLiteral() {
  8103. for (var _len26 = arguments.length, args = new Array(_len26), _key26 = 0; _key26 < _len26; _key26++) {
  8104. args[_key26] = arguments[_key26];
  8105. }
  8106. return builder.apply(void 0, ["NumericLiteral"].concat(args));
  8107. }
  8108. function NullLiteral() {
  8109. for (var _len27 = arguments.length, args = new Array(_len27), _key27 = 0; _key27 < _len27; _key27++) {
  8110. args[_key27] = arguments[_key27];
  8111. }
  8112. return builder.apply(void 0, ["NullLiteral"].concat(args));
  8113. }
  8114. function BooleanLiteral() {
  8115. for (var _len28 = arguments.length, args = new Array(_len28), _key28 = 0; _key28 < _len28; _key28++) {
  8116. args[_key28] = arguments[_key28];
  8117. }
  8118. return builder.apply(void 0, ["BooleanLiteral"].concat(args));
  8119. }
  8120. function RegExpLiteral() {
  8121. for (var _len29 = arguments.length, args = new Array(_len29), _key29 = 0; _key29 < _len29; _key29++) {
  8122. args[_key29] = arguments[_key29];
  8123. }
  8124. return builder.apply(void 0, ["RegExpLiteral"].concat(args));
  8125. }
  8126. function LogicalExpression() {
  8127. for (var _len30 = arguments.length, args = new Array(_len30), _key30 = 0; _key30 < _len30; _key30++) {
  8128. args[_key30] = arguments[_key30];
  8129. }
  8130. return builder.apply(void 0, ["LogicalExpression"].concat(args));
  8131. }
  8132. function MemberExpression() {
  8133. for (var _len31 = arguments.length, args = new Array(_len31), _key31 = 0; _key31 < _len31; _key31++) {
  8134. args[_key31] = arguments[_key31];
  8135. }
  8136. return builder.apply(void 0, ["MemberExpression"].concat(args));
  8137. }
  8138. function NewExpression() {
  8139. for (var _len32 = arguments.length, args = new Array(_len32), _key32 = 0; _key32 < _len32; _key32++) {
  8140. args[_key32] = arguments[_key32];
  8141. }
  8142. return builder.apply(void 0, ["NewExpression"].concat(args));
  8143. }
  8144. function Program() {
  8145. for (var _len33 = arguments.length, args = new Array(_len33), _key33 = 0; _key33 < _len33; _key33++) {
  8146. args[_key33] = arguments[_key33];
  8147. }
  8148. return builder.apply(void 0, ["Program"].concat(args));
  8149. }
  8150. function ObjectExpression() {
  8151. for (var _len34 = arguments.length, args = new Array(_len34), _key34 = 0; _key34 < _len34; _key34++) {
  8152. args[_key34] = arguments[_key34];
  8153. }
  8154. return builder.apply(void 0, ["ObjectExpression"].concat(args));
  8155. }
  8156. function ObjectMethod() {
  8157. for (var _len35 = arguments.length, args = new Array(_len35), _key35 = 0; _key35 < _len35; _key35++) {
  8158. args[_key35] = arguments[_key35];
  8159. }
  8160. return builder.apply(void 0, ["ObjectMethod"].concat(args));
  8161. }
  8162. function ObjectProperty() {
  8163. for (var _len36 = arguments.length, args = new Array(_len36), _key36 = 0; _key36 < _len36; _key36++) {
  8164. args[_key36] = arguments[_key36];
  8165. }
  8166. return builder.apply(void 0, ["ObjectProperty"].concat(args));
  8167. }
  8168. function RestElement() {
  8169. for (var _len37 = arguments.length, args = new Array(_len37), _key37 = 0; _key37 < _len37; _key37++) {
  8170. args[_key37] = arguments[_key37];
  8171. }
  8172. return builder.apply(void 0, ["RestElement"].concat(args));
  8173. }
  8174. function ReturnStatement() {
  8175. for (var _len38 = arguments.length, args = new Array(_len38), _key38 = 0; _key38 < _len38; _key38++) {
  8176. args[_key38] = arguments[_key38];
  8177. }
  8178. return builder.apply(void 0, ["ReturnStatement"].concat(args));
  8179. }
  8180. function SequenceExpression() {
  8181. for (var _len39 = arguments.length, args = new Array(_len39), _key39 = 0; _key39 < _len39; _key39++) {
  8182. args[_key39] = arguments[_key39];
  8183. }
  8184. return builder.apply(void 0, ["SequenceExpression"].concat(args));
  8185. }
  8186. function ParenthesizedExpression() {
  8187. for (var _len40 = arguments.length, args = new Array(_len40), _key40 = 0; _key40 < _len40; _key40++) {
  8188. args[_key40] = arguments[_key40];
  8189. }
  8190. return builder.apply(void 0, ["ParenthesizedExpression"].concat(args));
  8191. }
  8192. function SwitchCase() {
  8193. for (var _len41 = arguments.length, args = new Array(_len41), _key41 = 0; _key41 < _len41; _key41++) {
  8194. args[_key41] = arguments[_key41];
  8195. }
  8196. return builder.apply(void 0, ["SwitchCase"].concat(args));
  8197. }
  8198. function SwitchStatement() {
  8199. for (var _len42 = arguments.length, args = new Array(_len42), _key42 = 0; _key42 < _len42; _key42++) {
  8200. args[_key42] = arguments[_key42];
  8201. }
  8202. return builder.apply(void 0, ["SwitchStatement"].concat(args));
  8203. }
  8204. function ThisExpression() {
  8205. for (var _len43 = arguments.length, args = new Array(_len43), _key43 = 0; _key43 < _len43; _key43++) {
  8206. args[_key43] = arguments[_key43];
  8207. }
  8208. return builder.apply(void 0, ["ThisExpression"].concat(args));
  8209. }
  8210. function ThrowStatement() {
  8211. for (var _len44 = arguments.length, args = new Array(_len44), _key44 = 0; _key44 < _len44; _key44++) {
  8212. args[_key44] = arguments[_key44];
  8213. }
  8214. return builder.apply(void 0, ["ThrowStatement"].concat(args));
  8215. }
  8216. function TryStatement() {
  8217. for (var _len45 = arguments.length, args = new Array(_len45), _key45 = 0; _key45 < _len45; _key45++) {
  8218. args[_key45] = arguments[_key45];
  8219. }
  8220. return builder.apply(void 0, ["TryStatement"].concat(args));
  8221. }
  8222. function UnaryExpression() {
  8223. for (var _len46 = arguments.length, args = new Array(_len46), _key46 = 0; _key46 < _len46; _key46++) {
  8224. args[_key46] = arguments[_key46];
  8225. }
  8226. return builder.apply(void 0, ["UnaryExpression"].concat(args));
  8227. }
  8228. function UpdateExpression() {
  8229. for (var _len47 = arguments.length, args = new Array(_len47), _key47 = 0; _key47 < _len47; _key47++) {
  8230. args[_key47] = arguments[_key47];
  8231. }
  8232. return builder.apply(void 0, ["UpdateExpression"].concat(args));
  8233. }
  8234. function VariableDeclaration() {
  8235. for (var _len48 = arguments.length, args = new Array(_len48), _key48 = 0; _key48 < _len48; _key48++) {
  8236. args[_key48] = arguments[_key48];
  8237. }
  8238. return builder.apply(void 0, ["VariableDeclaration"].concat(args));
  8239. }
  8240. function VariableDeclarator() {
  8241. for (var _len49 = arguments.length, args = new Array(_len49), _key49 = 0; _key49 < _len49; _key49++) {
  8242. args[_key49] = arguments[_key49];
  8243. }
  8244. return builder.apply(void 0, ["VariableDeclarator"].concat(args));
  8245. }
  8246. function WhileStatement() {
  8247. for (var _len50 = arguments.length, args = new Array(_len50), _key50 = 0; _key50 < _len50; _key50++) {
  8248. args[_key50] = arguments[_key50];
  8249. }
  8250. return builder.apply(void 0, ["WhileStatement"].concat(args));
  8251. }
  8252. function WithStatement() {
  8253. for (var _len51 = arguments.length, args = new Array(_len51), _key51 = 0; _key51 < _len51; _key51++) {
  8254. args[_key51] = arguments[_key51];
  8255. }
  8256. return builder.apply(void 0, ["WithStatement"].concat(args));
  8257. }
  8258. function AssignmentPattern() {
  8259. for (var _len52 = arguments.length, args = new Array(_len52), _key52 = 0; _key52 < _len52; _key52++) {
  8260. args[_key52] = arguments[_key52];
  8261. }
  8262. return builder.apply(void 0, ["AssignmentPattern"].concat(args));
  8263. }
  8264. function ArrayPattern() {
  8265. for (var _len53 = arguments.length, args = new Array(_len53), _key53 = 0; _key53 < _len53; _key53++) {
  8266. args[_key53] = arguments[_key53];
  8267. }
  8268. return builder.apply(void 0, ["ArrayPattern"].concat(args));
  8269. }
  8270. function ArrowFunctionExpression() {
  8271. for (var _len54 = arguments.length, args = new Array(_len54), _key54 = 0; _key54 < _len54; _key54++) {
  8272. args[_key54] = arguments[_key54];
  8273. }
  8274. return builder.apply(void 0, ["ArrowFunctionExpression"].concat(args));
  8275. }
  8276. function ClassBody() {
  8277. for (var _len55 = arguments.length, args = new Array(_len55), _key55 = 0; _key55 < _len55; _key55++) {
  8278. args[_key55] = arguments[_key55];
  8279. }
  8280. return builder.apply(void 0, ["ClassBody"].concat(args));
  8281. }
  8282. function ClassExpression() {
  8283. for (var _len56 = arguments.length, args = new Array(_len56), _key56 = 0; _key56 < _len56; _key56++) {
  8284. args[_key56] = arguments[_key56];
  8285. }
  8286. return builder.apply(void 0, ["ClassExpression"].concat(args));
  8287. }
  8288. function ClassDeclaration() {
  8289. for (var _len57 = arguments.length, args = new Array(_len57), _key57 = 0; _key57 < _len57; _key57++) {
  8290. args[_key57] = arguments[_key57];
  8291. }
  8292. return builder.apply(void 0, ["ClassDeclaration"].concat(args));
  8293. }
  8294. function ExportAllDeclaration() {
  8295. for (var _len58 = arguments.length, args = new Array(_len58), _key58 = 0; _key58 < _len58; _key58++) {
  8296. args[_key58] = arguments[_key58];
  8297. }
  8298. return builder.apply(void 0, ["ExportAllDeclaration"].concat(args));
  8299. }
  8300. function ExportDefaultDeclaration() {
  8301. for (var _len59 = arguments.length, args = new Array(_len59), _key59 = 0; _key59 < _len59; _key59++) {
  8302. args[_key59] = arguments[_key59];
  8303. }
  8304. return builder.apply(void 0, ["ExportDefaultDeclaration"].concat(args));
  8305. }
  8306. function ExportNamedDeclaration() {
  8307. for (var _len60 = arguments.length, args = new Array(_len60), _key60 = 0; _key60 < _len60; _key60++) {
  8308. args[_key60] = arguments[_key60];
  8309. }
  8310. return builder.apply(void 0, ["ExportNamedDeclaration"].concat(args));
  8311. }
  8312. function ExportSpecifier() {
  8313. for (var _len61 = arguments.length, args = new Array(_len61), _key61 = 0; _key61 < _len61; _key61++) {
  8314. args[_key61] = arguments[_key61];
  8315. }
  8316. return builder.apply(void 0, ["ExportSpecifier"].concat(args));
  8317. }
  8318. function ForOfStatement() {
  8319. for (var _len62 = arguments.length, args = new Array(_len62), _key62 = 0; _key62 < _len62; _key62++) {
  8320. args[_key62] = arguments[_key62];
  8321. }
  8322. return builder.apply(void 0, ["ForOfStatement"].concat(args));
  8323. }
  8324. function ImportDeclaration() {
  8325. for (var _len63 = arguments.length, args = new Array(_len63), _key63 = 0; _key63 < _len63; _key63++) {
  8326. args[_key63] = arguments[_key63];
  8327. }
  8328. return builder.apply(void 0, ["ImportDeclaration"].concat(args));
  8329. }
  8330. function ImportDefaultSpecifier() {
  8331. for (var _len64 = arguments.length, args = new Array(_len64), _key64 = 0; _key64 < _len64; _key64++) {
  8332. args[_key64] = arguments[_key64];
  8333. }
  8334. return builder.apply(void 0, ["ImportDefaultSpecifier"].concat(args));
  8335. }
  8336. function ImportNamespaceSpecifier() {
  8337. for (var _len65 = arguments.length, args = new Array(_len65), _key65 = 0; _key65 < _len65; _key65++) {
  8338. args[_key65] = arguments[_key65];
  8339. }
  8340. return builder.apply(void 0, ["ImportNamespaceSpecifier"].concat(args));
  8341. }
  8342. function ImportSpecifier() {
  8343. for (var _len66 = arguments.length, args = new Array(_len66), _key66 = 0; _key66 < _len66; _key66++) {
  8344. args[_key66] = arguments[_key66];
  8345. }
  8346. return builder.apply(void 0, ["ImportSpecifier"].concat(args));
  8347. }
  8348. function MetaProperty() {
  8349. for (var _len67 = arguments.length, args = new Array(_len67), _key67 = 0; _key67 < _len67; _key67++) {
  8350. args[_key67] = arguments[_key67];
  8351. }
  8352. return builder.apply(void 0, ["MetaProperty"].concat(args));
  8353. }
  8354. function ClassMethod() {
  8355. for (var _len68 = arguments.length, args = new Array(_len68), _key68 = 0; _key68 < _len68; _key68++) {
  8356. args[_key68] = arguments[_key68];
  8357. }
  8358. return builder.apply(void 0, ["ClassMethod"].concat(args));
  8359. }
  8360. function ObjectPattern() {
  8361. for (var _len69 = arguments.length, args = new Array(_len69), _key69 = 0; _key69 < _len69; _key69++) {
  8362. args[_key69] = arguments[_key69];
  8363. }
  8364. return builder.apply(void 0, ["ObjectPattern"].concat(args));
  8365. }
  8366. function SpreadElement() {
  8367. for (var _len70 = arguments.length, args = new Array(_len70), _key70 = 0; _key70 < _len70; _key70++) {
  8368. args[_key70] = arguments[_key70];
  8369. }
  8370. return builder.apply(void 0, ["SpreadElement"].concat(args));
  8371. }
  8372. function Super() {
  8373. for (var _len71 = arguments.length, args = new Array(_len71), _key71 = 0; _key71 < _len71; _key71++) {
  8374. args[_key71] = arguments[_key71];
  8375. }
  8376. return builder.apply(void 0, ["Super"].concat(args));
  8377. }
  8378. function TaggedTemplateExpression() {
  8379. for (var _len72 = arguments.length, args = new Array(_len72), _key72 = 0; _key72 < _len72; _key72++) {
  8380. args[_key72] = arguments[_key72];
  8381. }
  8382. return builder.apply(void 0, ["TaggedTemplateExpression"].concat(args));
  8383. }
  8384. function TemplateElement() {
  8385. for (var _len73 = arguments.length, args = new Array(_len73), _key73 = 0; _key73 < _len73; _key73++) {
  8386. args[_key73] = arguments[_key73];
  8387. }
  8388. return builder.apply(void 0, ["TemplateElement"].concat(args));
  8389. }
  8390. function TemplateLiteral() {
  8391. for (var _len74 = arguments.length, args = new Array(_len74), _key74 = 0; _key74 < _len74; _key74++) {
  8392. args[_key74] = arguments[_key74];
  8393. }
  8394. return builder.apply(void 0, ["TemplateLiteral"].concat(args));
  8395. }
  8396. function YieldExpression() {
  8397. for (var _len75 = arguments.length, args = new Array(_len75), _key75 = 0; _key75 < _len75; _key75++) {
  8398. args[_key75] = arguments[_key75];
  8399. }
  8400. return builder.apply(void 0, ["YieldExpression"].concat(args));
  8401. }
  8402. function AnyTypeAnnotation() {
  8403. for (var _len76 = arguments.length, args = new Array(_len76), _key76 = 0; _key76 < _len76; _key76++) {
  8404. args[_key76] = arguments[_key76];
  8405. }
  8406. return builder.apply(void 0, ["AnyTypeAnnotation"].concat(args));
  8407. }
  8408. function ArrayTypeAnnotation() {
  8409. for (var _len77 = arguments.length, args = new Array(_len77), _key77 = 0; _key77 < _len77; _key77++) {
  8410. args[_key77] = arguments[_key77];
  8411. }
  8412. return builder.apply(void 0, ["ArrayTypeAnnotation"].concat(args));
  8413. }
  8414. function BooleanTypeAnnotation() {
  8415. for (var _len78 = arguments.length, args = new Array(_len78), _key78 = 0; _key78 < _len78; _key78++) {
  8416. args[_key78] = arguments[_key78];
  8417. }
  8418. return builder.apply(void 0, ["BooleanTypeAnnotation"].concat(args));
  8419. }
  8420. function BooleanLiteralTypeAnnotation() {
  8421. for (var _len79 = arguments.length, args = new Array(_len79), _key79 = 0; _key79 < _len79; _key79++) {
  8422. args[_key79] = arguments[_key79];
  8423. }
  8424. return builder.apply(void 0, ["BooleanLiteralTypeAnnotation"].concat(args));
  8425. }
  8426. function NullLiteralTypeAnnotation() {
  8427. for (var _len80 = arguments.length, args = new Array(_len80), _key80 = 0; _key80 < _len80; _key80++) {
  8428. args[_key80] = arguments[_key80];
  8429. }
  8430. return builder.apply(void 0, ["NullLiteralTypeAnnotation"].concat(args));
  8431. }
  8432. function ClassImplements() {
  8433. for (var _len81 = arguments.length, args = new Array(_len81), _key81 = 0; _key81 < _len81; _key81++) {
  8434. args[_key81] = arguments[_key81];
  8435. }
  8436. return builder.apply(void 0, ["ClassImplements"].concat(args));
  8437. }
  8438. function DeclareClass() {
  8439. for (var _len82 = arguments.length, args = new Array(_len82), _key82 = 0; _key82 < _len82; _key82++) {
  8440. args[_key82] = arguments[_key82];
  8441. }
  8442. return builder.apply(void 0, ["DeclareClass"].concat(args));
  8443. }
  8444. function DeclareFunction() {
  8445. for (var _len83 = arguments.length, args = new Array(_len83), _key83 = 0; _key83 < _len83; _key83++) {
  8446. args[_key83] = arguments[_key83];
  8447. }
  8448. return builder.apply(void 0, ["DeclareFunction"].concat(args));
  8449. }
  8450. function DeclareInterface() {
  8451. for (var _len84 = arguments.length, args = new Array(_len84), _key84 = 0; _key84 < _len84; _key84++) {
  8452. args[_key84] = arguments[_key84];
  8453. }
  8454. return builder.apply(void 0, ["DeclareInterface"].concat(args));
  8455. }
  8456. function DeclareModule() {
  8457. for (var _len85 = arguments.length, args = new Array(_len85), _key85 = 0; _key85 < _len85; _key85++) {
  8458. args[_key85] = arguments[_key85];
  8459. }
  8460. return builder.apply(void 0, ["DeclareModule"].concat(args));
  8461. }
  8462. function DeclareModuleExports() {
  8463. for (var _len86 = arguments.length, args = new Array(_len86), _key86 = 0; _key86 < _len86; _key86++) {
  8464. args[_key86] = arguments[_key86];
  8465. }
  8466. return builder.apply(void 0, ["DeclareModuleExports"].concat(args));
  8467. }
  8468. function DeclareTypeAlias() {
  8469. for (var _len87 = arguments.length, args = new Array(_len87), _key87 = 0; _key87 < _len87; _key87++) {
  8470. args[_key87] = arguments[_key87];
  8471. }
  8472. return builder.apply(void 0, ["DeclareTypeAlias"].concat(args));
  8473. }
  8474. function DeclareOpaqueType() {
  8475. for (var _len88 = arguments.length, args = new Array(_len88), _key88 = 0; _key88 < _len88; _key88++) {
  8476. args[_key88] = arguments[_key88];
  8477. }
  8478. return builder.apply(void 0, ["DeclareOpaqueType"].concat(args));
  8479. }
  8480. function DeclareVariable() {
  8481. for (var _len89 = arguments.length, args = new Array(_len89), _key89 = 0; _key89 < _len89; _key89++) {
  8482. args[_key89] = arguments[_key89];
  8483. }
  8484. return builder.apply(void 0, ["DeclareVariable"].concat(args));
  8485. }
  8486. function DeclareExportDeclaration() {
  8487. for (var _len90 = arguments.length, args = new Array(_len90), _key90 = 0; _key90 < _len90; _key90++) {
  8488. args[_key90] = arguments[_key90];
  8489. }
  8490. return builder.apply(void 0, ["DeclareExportDeclaration"].concat(args));
  8491. }
  8492. function DeclareExportAllDeclaration() {
  8493. for (var _len91 = arguments.length, args = new Array(_len91), _key91 = 0; _key91 < _len91; _key91++) {
  8494. args[_key91] = arguments[_key91];
  8495. }
  8496. return builder.apply(void 0, ["DeclareExportAllDeclaration"].concat(args));
  8497. }
  8498. function DeclaredPredicate() {
  8499. for (var _len92 = arguments.length, args = new Array(_len92), _key92 = 0; _key92 < _len92; _key92++) {
  8500. args[_key92] = arguments[_key92];
  8501. }
  8502. return builder.apply(void 0, ["DeclaredPredicate"].concat(args));
  8503. }
  8504. function ExistsTypeAnnotation() {
  8505. for (var _len93 = arguments.length, args = new Array(_len93), _key93 = 0; _key93 < _len93; _key93++) {
  8506. args[_key93] = arguments[_key93];
  8507. }
  8508. return builder.apply(void 0, ["ExistsTypeAnnotation"].concat(args));
  8509. }
  8510. function FunctionTypeAnnotation() {
  8511. for (var _len94 = arguments.length, args = new Array(_len94), _key94 = 0; _key94 < _len94; _key94++) {
  8512. args[_key94] = arguments[_key94];
  8513. }
  8514. return builder.apply(void 0, ["FunctionTypeAnnotation"].concat(args));
  8515. }
  8516. function FunctionTypeParam() {
  8517. for (var _len95 = arguments.length, args = new Array(_len95), _key95 = 0; _key95 < _len95; _key95++) {
  8518. args[_key95] = arguments[_key95];
  8519. }
  8520. return builder.apply(void 0, ["FunctionTypeParam"].concat(args));
  8521. }
  8522. function GenericTypeAnnotation() {
  8523. for (var _len96 = arguments.length, args = new Array(_len96), _key96 = 0; _key96 < _len96; _key96++) {
  8524. args[_key96] = arguments[_key96];
  8525. }
  8526. return builder.apply(void 0, ["GenericTypeAnnotation"].concat(args));
  8527. }
  8528. function InferredPredicate() {
  8529. for (var _len97 = arguments.length, args = new Array(_len97), _key97 = 0; _key97 < _len97; _key97++) {
  8530. args[_key97] = arguments[_key97];
  8531. }
  8532. return builder.apply(void 0, ["InferredPredicate"].concat(args));
  8533. }
  8534. function InterfaceExtends() {
  8535. for (var _len98 = arguments.length, args = new Array(_len98), _key98 = 0; _key98 < _len98; _key98++) {
  8536. args[_key98] = arguments[_key98];
  8537. }
  8538. return builder.apply(void 0, ["InterfaceExtends"].concat(args));
  8539. }
  8540. function InterfaceDeclaration() {
  8541. for (var _len99 = arguments.length, args = new Array(_len99), _key99 = 0; _key99 < _len99; _key99++) {
  8542. args[_key99] = arguments[_key99];
  8543. }
  8544. return builder.apply(void 0, ["InterfaceDeclaration"].concat(args));
  8545. }
  8546. function InterfaceTypeAnnotation() {
  8547. for (var _len100 = arguments.length, args = new Array(_len100), _key100 = 0; _key100 < _len100; _key100++) {
  8548. args[_key100] = arguments[_key100];
  8549. }
  8550. return builder.apply(void 0, ["InterfaceTypeAnnotation"].concat(args));
  8551. }
  8552. function IntersectionTypeAnnotation() {
  8553. for (var _len101 = arguments.length, args = new Array(_len101), _key101 = 0; _key101 < _len101; _key101++) {
  8554. args[_key101] = arguments[_key101];
  8555. }
  8556. return builder.apply(void 0, ["IntersectionTypeAnnotation"].concat(args));
  8557. }
  8558. function MixedTypeAnnotation() {
  8559. for (var _len102 = arguments.length, args = new Array(_len102), _key102 = 0; _key102 < _len102; _key102++) {
  8560. args[_key102] = arguments[_key102];
  8561. }
  8562. return builder.apply(void 0, ["MixedTypeAnnotation"].concat(args));
  8563. }
  8564. function EmptyTypeAnnotation() {
  8565. for (var _len103 = arguments.length, args = new Array(_len103), _key103 = 0; _key103 < _len103; _key103++) {
  8566. args[_key103] = arguments[_key103];
  8567. }
  8568. return builder.apply(void 0, ["EmptyTypeAnnotation"].concat(args));
  8569. }
  8570. function NullableTypeAnnotation() {
  8571. for (var _len104 = arguments.length, args = new Array(_len104), _key104 = 0; _key104 < _len104; _key104++) {
  8572. args[_key104] = arguments[_key104];
  8573. }
  8574. return builder.apply(void 0, ["NullableTypeAnnotation"].concat(args));
  8575. }
  8576. function NumberLiteralTypeAnnotation() {
  8577. for (var _len105 = arguments.length, args = new Array(_len105), _key105 = 0; _key105 < _len105; _key105++) {
  8578. args[_key105] = arguments[_key105];
  8579. }
  8580. return builder.apply(void 0, ["NumberLiteralTypeAnnotation"].concat(args));
  8581. }
  8582. function NumberTypeAnnotation() {
  8583. for (var _len106 = arguments.length, args = new Array(_len106), _key106 = 0; _key106 < _len106; _key106++) {
  8584. args[_key106] = arguments[_key106];
  8585. }
  8586. return builder.apply(void 0, ["NumberTypeAnnotation"].concat(args));
  8587. }
  8588. function ObjectTypeAnnotation() {
  8589. for (var _len107 = arguments.length, args = new Array(_len107), _key107 = 0; _key107 < _len107; _key107++) {
  8590. args[_key107] = arguments[_key107];
  8591. }
  8592. return builder.apply(void 0, ["ObjectTypeAnnotation"].concat(args));
  8593. }
  8594. function ObjectTypeInternalSlot() {
  8595. for (var _len108 = arguments.length, args = new Array(_len108), _key108 = 0; _key108 < _len108; _key108++) {
  8596. args[_key108] = arguments[_key108];
  8597. }
  8598. return builder.apply(void 0, ["ObjectTypeInternalSlot"].concat(args));
  8599. }
  8600. function ObjectTypeCallProperty() {
  8601. for (var _len109 = arguments.length, args = new Array(_len109), _key109 = 0; _key109 < _len109; _key109++) {
  8602. args[_key109] = arguments[_key109];
  8603. }
  8604. return builder.apply(void 0, ["ObjectTypeCallProperty"].concat(args));
  8605. }
  8606. function ObjectTypeIndexer() {
  8607. for (var _len110 = arguments.length, args = new Array(_len110), _key110 = 0; _key110 < _len110; _key110++) {
  8608. args[_key110] = arguments[_key110];
  8609. }
  8610. return builder.apply(void 0, ["ObjectTypeIndexer"].concat(args));
  8611. }
  8612. function ObjectTypeProperty() {
  8613. for (var _len111 = arguments.length, args = new Array(_len111), _key111 = 0; _key111 < _len111; _key111++) {
  8614. args[_key111] = arguments[_key111];
  8615. }
  8616. return builder.apply(void 0, ["ObjectTypeProperty"].concat(args));
  8617. }
  8618. function ObjectTypeSpreadProperty() {
  8619. for (var _len112 = arguments.length, args = new Array(_len112), _key112 = 0; _key112 < _len112; _key112++) {
  8620. args[_key112] = arguments[_key112];
  8621. }
  8622. return builder.apply(void 0, ["ObjectTypeSpreadProperty"].concat(args));
  8623. }
  8624. function OpaqueType() {
  8625. for (var _len113 = arguments.length, args = new Array(_len113), _key113 = 0; _key113 < _len113; _key113++) {
  8626. args[_key113] = arguments[_key113];
  8627. }
  8628. return builder.apply(void 0, ["OpaqueType"].concat(args));
  8629. }
  8630. function QualifiedTypeIdentifier() {
  8631. for (var _len114 = arguments.length, args = new Array(_len114), _key114 = 0; _key114 < _len114; _key114++) {
  8632. args[_key114] = arguments[_key114];
  8633. }
  8634. return builder.apply(void 0, ["QualifiedTypeIdentifier"].concat(args));
  8635. }
  8636. function StringLiteralTypeAnnotation() {
  8637. for (var _len115 = arguments.length, args = new Array(_len115), _key115 = 0; _key115 < _len115; _key115++) {
  8638. args[_key115] = arguments[_key115];
  8639. }
  8640. return builder.apply(void 0, ["StringLiteralTypeAnnotation"].concat(args));
  8641. }
  8642. function StringTypeAnnotation() {
  8643. for (var _len116 = arguments.length, args = new Array(_len116), _key116 = 0; _key116 < _len116; _key116++) {
  8644. args[_key116] = arguments[_key116];
  8645. }
  8646. return builder.apply(void 0, ["StringTypeAnnotation"].concat(args));
  8647. }
  8648. function ThisTypeAnnotation() {
  8649. for (var _len117 = arguments.length, args = new Array(_len117), _key117 = 0; _key117 < _len117; _key117++) {
  8650. args[_key117] = arguments[_key117];
  8651. }
  8652. return builder.apply(void 0, ["ThisTypeAnnotation"].concat(args));
  8653. }
  8654. function TupleTypeAnnotation() {
  8655. for (var _len118 = arguments.length, args = new Array(_len118), _key118 = 0; _key118 < _len118; _key118++) {
  8656. args[_key118] = arguments[_key118];
  8657. }
  8658. return builder.apply(void 0, ["TupleTypeAnnotation"].concat(args));
  8659. }
  8660. function TypeofTypeAnnotation() {
  8661. for (var _len119 = arguments.length, args = new Array(_len119), _key119 = 0; _key119 < _len119; _key119++) {
  8662. args[_key119] = arguments[_key119];
  8663. }
  8664. return builder.apply(void 0, ["TypeofTypeAnnotation"].concat(args));
  8665. }
  8666. function TypeAlias() {
  8667. for (var _len120 = arguments.length, args = new Array(_len120), _key120 = 0; _key120 < _len120; _key120++) {
  8668. args[_key120] = arguments[_key120];
  8669. }
  8670. return builder.apply(void 0, ["TypeAlias"].concat(args));
  8671. }
  8672. function TypeAnnotation() {
  8673. for (var _len121 = arguments.length, args = new Array(_len121), _key121 = 0; _key121 < _len121; _key121++) {
  8674. args[_key121] = arguments[_key121];
  8675. }
  8676. return builder.apply(void 0, ["TypeAnnotation"].concat(args));
  8677. }
  8678. function TypeCastExpression() {
  8679. for (var _len122 = arguments.length, args = new Array(_len122), _key122 = 0; _key122 < _len122; _key122++) {
  8680. args[_key122] = arguments[_key122];
  8681. }
  8682. return builder.apply(void 0, ["TypeCastExpression"].concat(args));
  8683. }
  8684. function TypeParameter() {
  8685. for (var _len123 = arguments.length, args = new Array(_len123), _key123 = 0; _key123 < _len123; _key123++) {
  8686. args[_key123] = arguments[_key123];
  8687. }
  8688. return builder.apply(void 0, ["TypeParameter"].concat(args));
  8689. }
  8690. function TypeParameterDeclaration() {
  8691. for (var _len124 = arguments.length, args = new Array(_len124), _key124 = 0; _key124 < _len124; _key124++) {
  8692. args[_key124] = arguments[_key124];
  8693. }
  8694. return builder.apply(void 0, ["TypeParameterDeclaration"].concat(args));
  8695. }
  8696. function TypeParameterInstantiation() {
  8697. for (var _len125 = arguments.length, args = new Array(_len125), _key125 = 0; _key125 < _len125; _key125++) {
  8698. args[_key125] = arguments[_key125];
  8699. }
  8700. return builder.apply(void 0, ["TypeParameterInstantiation"].concat(args));
  8701. }
  8702. function UnionTypeAnnotation() {
  8703. for (var _len126 = arguments.length, args = new Array(_len126), _key126 = 0; _key126 < _len126; _key126++) {
  8704. args[_key126] = arguments[_key126];
  8705. }
  8706. return builder.apply(void 0, ["UnionTypeAnnotation"].concat(args));
  8707. }
  8708. function Variance() {
  8709. for (var _len127 = arguments.length, args = new Array(_len127), _key127 = 0; _key127 < _len127; _key127++) {
  8710. args[_key127] = arguments[_key127];
  8711. }
  8712. return builder.apply(void 0, ["Variance"].concat(args));
  8713. }
  8714. function VoidTypeAnnotation() {
  8715. for (var _len128 = arguments.length, args = new Array(_len128), _key128 = 0; _key128 < _len128; _key128++) {
  8716. args[_key128] = arguments[_key128];
  8717. }
  8718. return builder.apply(void 0, ["VoidTypeAnnotation"].concat(args));
  8719. }
  8720. function EnumDeclaration() {
  8721. for (var _len129 = arguments.length, args = new Array(_len129), _key129 = 0; _key129 < _len129; _key129++) {
  8722. args[_key129] = arguments[_key129];
  8723. }
  8724. return builder.apply(void 0, ["EnumDeclaration"].concat(args));
  8725. }
  8726. function EnumBooleanBody() {
  8727. for (var _len130 = arguments.length, args = new Array(_len130), _key130 = 0; _key130 < _len130; _key130++) {
  8728. args[_key130] = arguments[_key130];
  8729. }
  8730. return builder.apply(void 0, ["EnumBooleanBody"].concat(args));
  8731. }
  8732. function EnumNumberBody() {
  8733. for (var _len131 = arguments.length, args = new Array(_len131), _key131 = 0; _key131 < _len131; _key131++) {
  8734. args[_key131] = arguments[_key131];
  8735. }
  8736. return builder.apply(void 0, ["EnumNumberBody"].concat(args));
  8737. }
  8738. function EnumStringBody() {
  8739. for (var _len132 = arguments.length, args = new Array(_len132), _key132 = 0; _key132 < _len132; _key132++) {
  8740. args[_key132] = arguments[_key132];
  8741. }
  8742. return builder.apply(void 0, ["EnumStringBody"].concat(args));
  8743. }
  8744. function EnumSymbolBody() {
  8745. for (var _len133 = arguments.length, args = new Array(_len133), _key133 = 0; _key133 < _len133; _key133++) {
  8746. args[_key133] = arguments[_key133];
  8747. }
  8748. return builder.apply(void 0, ["EnumSymbolBody"].concat(args));
  8749. }
  8750. function EnumBooleanMember() {
  8751. for (var _len134 = arguments.length, args = new Array(_len134), _key134 = 0; _key134 < _len134; _key134++) {
  8752. args[_key134] = arguments[_key134];
  8753. }
  8754. return builder.apply(void 0, ["EnumBooleanMember"].concat(args));
  8755. }
  8756. function EnumNumberMember() {
  8757. for (var _len135 = arguments.length, args = new Array(_len135), _key135 = 0; _key135 < _len135; _key135++) {
  8758. args[_key135] = arguments[_key135];
  8759. }
  8760. return builder.apply(void 0, ["EnumNumberMember"].concat(args));
  8761. }
  8762. function EnumStringMember() {
  8763. for (var _len136 = arguments.length, args = new Array(_len136), _key136 = 0; _key136 < _len136; _key136++) {
  8764. args[_key136] = arguments[_key136];
  8765. }
  8766. return builder.apply(void 0, ["EnumStringMember"].concat(args));
  8767. }
  8768. function EnumDefaultedMember() {
  8769. for (var _len137 = arguments.length, args = new Array(_len137), _key137 = 0; _key137 < _len137; _key137++) {
  8770. args[_key137] = arguments[_key137];
  8771. }
  8772. return builder.apply(void 0, ["EnumDefaultedMember"].concat(args));
  8773. }
  8774. function JSXAttribute() {
  8775. for (var _len138 = arguments.length, args = new Array(_len138), _key138 = 0; _key138 < _len138; _key138++) {
  8776. args[_key138] = arguments[_key138];
  8777. }
  8778. return builder.apply(void 0, ["JSXAttribute"].concat(args));
  8779. }
  8780. function JSXClosingElement() {
  8781. for (var _len139 = arguments.length, args = new Array(_len139), _key139 = 0; _key139 < _len139; _key139++) {
  8782. args[_key139] = arguments[_key139];
  8783. }
  8784. return builder.apply(void 0, ["JSXClosingElement"].concat(args));
  8785. }
  8786. function JSXElement() {
  8787. for (var _len140 = arguments.length, args = new Array(_len140), _key140 = 0; _key140 < _len140; _key140++) {
  8788. args[_key140] = arguments[_key140];
  8789. }
  8790. return builder.apply(void 0, ["JSXElement"].concat(args));
  8791. }
  8792. function JSXEmptyExpression() {
  8793. for (var _len141 = arguments.length, args = new Array(_len141), _key141 = 0; _key141 < _len141; _key141++) {
  8794. args[_key141] = arguments[_key141];
  8795. }
  8796. return builder.apply(void 0, ["JSXEmptyExpression"].concat(args));
  8797. }
  8798. function JSXExpressionContainer() {
  8799. for (var _len142 = arguments.length, args = new Array(_len142), _key142 = 0; _key142 < _len142; _key142++) {
  8800. args[_key142] = arguments[_key142];
  8801. }
  8802. return builder.apply(void 0, ["JSXExpressionContainer"].concat(args));
  8803. }
  8804. function JSXSpreadChild() {
  8805. for (var _len143 = arguments.length, args = new Array(_len143), _key143 = 0; _key143 < _len143; _key143++) {
  8806. args[_key143] = arguments[_key143];
  8807. }
  8808. return builder.apply(void 0, ["JSXSpreadChild"].concat(args));
  8809. }
  8810. function JSXIdentifier() {
  8811. for (var _len144 = arguments.length, args = new Array(_len144), _key144 = 0; _key144 < _len144; _key144++) {
  8812. args[_key144] = arguments[_key144];
  8813. }
  8814. return builder.apply(void 0, ["JSXIdentifier"].concat(args));
  8815. }
  8816. function JSXMemberExpression() {
  8817. for (var _len145 = arguments.length, args = new Array(_len145), _key145 = 0; _key145 < _len145; _key145++) {
  8818. args[_key145] = arguments[_key145];
  8819. }
  8820. return builder.apply(void 0, ["JSXMemberExpression"].concat(args));
  8821. }
  8822. function JSXNamespacedName() {
  8823. for (var _len146 = arguments.length, args = new Array(_len146), _key146 = 0; _key146 < _len146; _key146++) {
  8824. args[_key146] = arguments[_key146];
  8825. }
  8826. return builder.apply(void 0, ["JSXNamespacedName"].concat(args));
  8827. }
  8828. function JSXOpeningElement() {
  8829. for (var _len147 = arguments.length, args = new Array(_len147), _key147 = 0; _key147 < _len147; _key147++) {
  8830. args[_key147] = arguments[_key147];
  8831. }
  8832. return builder.apply(void 0, ["JSXOpeningElement"].concat(args));
  8833. }
  8834. function JSXSpreadAttribute() {
  8835. for (var _len148 = arguments.length, args = new Array(_len148), _key148 = 0; _key148 < _len148; _key148++) {
  8836. args[_key148] = arguments[_key148];
  8837. }
  8838. return builder.apply(void 0, ["JSXSpreadAttribute"].concat(args));
  8839. }
  8840. function JSXText() {
  8841. for (var _len149 = arguments.length, args = new Array(_len149), _key149 = 0; _key149 < _len149; _key149++) {
  8842. args[_key149] = arguments[_key149];
  8843. }
  8844. return builder.apply(void 0, ["JSXText"].concat(args));
  8845. }
  8846. function JSXFragment() {
  8847. for (var _len150 = arguments.length, args = new Array(_len150), _key150 = 0; _key150 < _len150; _key150++) {
  8848. args[_key150] = arguments[_key150];
  8849. }
  8850. return builder.apply(void 0, ["JSXFragment"].concat(args));
  8851. }
  8852. function JSXOpeningFragment() {
  8853. for (var _len151 = arguments.length, args = new Array(_len151), _key151 = 0; _key151 < _len151; _key151++) {
  8854. args[_key151] = arguments[_key151];
  8855. }
  8856. return builder.apply(void 0, ["JSXOpeningFragment"].concat(args));
  8857. }
  8858. function JSXClosingFragment() {
  8859. for (var _len152 = arguments.length, args = new Array(_len152), _key152 = 0; _key152 < _len152; _key152++) {
  8860. args[_key152] = arguments[_key152];
  8861. }
  8862. return builder.apply(void 0, ["JSXClosingFragment"].concat(args));
  8863. }
  8864. function Noop() {
  8865. for (var _len153 = arguments.length, args = new Array(_len153), _key153 = 0; _key153 < _len153; _key153++) {
  8866. args[_key153] = arguments[_key153];
  8867. }
  8868. return builder.apply(void 0, ["Noop"].concat(args));
  8869. }
  8870. function Placeholder() {
  8871. for (var _len154 = arguments.length, args = new Array(_len154), _key154 = 0; _key154 < _len154; _key154++) {
  8872. args[_key154] = arguments[_key154];
  8873. }
  8874. return builder.apply(void 0, ["Placeholder"].concat(args));
  8875. }
  8876. function V8IntrinsicIdentifier() {
  8877. for (var _len155 = arguments.length, args = new Array(_len155), _key155 = 0; _key155 < _len155; _key155++) {
  8878. args[_key155] = arguments[_key155];
  8879. }
  8880. return builder.apply(void 0, ["V8IntrinsicIdentifier"].concat(args));
  8881. }
  8882. function ArgumentPlaceholder() {
  8883. for (var _len156 = arguments.length, args = new Array(_len156), _key156 = 0; _key156 < _len156; _key156++) {
  8884. args[_key156] = arguments[_key156];
  8885. }
  8886. return builder.apply(void 0, ["ArgumentPlaceholder"].concat(args));
  8887. }
  8888. function AwaitExpression() {
  8889. for (var _len157 = arguments.length, args = new Array(_len157), _key157 = 0; _key157 < _len157; _key157++) {
  8890. args[_key157] = arguments[_key157];
  8891. }
  8892. return builder.apply(void 0, ["AwaitExpression"].concat(args));
  8893. }
  8894. function BindExpression() {
  8895. for (var _len158 = arguments.length, args = new Array(_len158), _key158 = 0; _key158 < _len158; _key158++) {
  8896. args[_key158] = arguments[_key158];
  8897. }
  8898. return builder.apply(void 0, ["BindExpression"].concat(args));
  8899. }
  8900. function ClassProperty() {
  8901. for (var _len159 = arguments.length, args = new Array(_len159), _key159 = 0; _key159 < _len159; _key159++) {
  8902. args[_key159] = arguments[_key159];
  8903. }
  8904. return builder.apply(void 0, ["ClassProperty"].concat(args));
  8905. }
  8906. function OptionalMemberExpression() {
  8907. for (var _len160 = arguments.length, args = new Array(_len160), _key160 = 0; _key160 < _len160; _key160++) {
  8908. args[_key160] = arguments[_key160];
  8909. }
  8910. return builder.apply(void 0, ["OptionalMemberExpression"].concat(args));
  8911. }
  8912. function PipelineTopicExpression() {
  8913. for (var _len161 = arguments.length, args = new Array(_len161), _key161 = 0; _key161 < _len161; _key161++) {
  8914. args[_key161] = arguments[_key161];
  8915. }
  8916. return builder.apply(void 0, ["PipelineTopicExpression"].concat(args));
  8917. }
  8918. function PipelineBareFunction() {
  8919. for (var _len162 = arguments.length, args = new Array(_len162), _key162 = 0; _key162 < _len162; _key162++) {
  8920. args[_key162] = arguments[_key162];
  8921. }
  8922. return builder.apply(void 0, ["PipelineBareFunction"].concat(args));
  8923. }
  8924. function PipelinePrimaryTopicReference() {
  8925. for (var _len163 = arguments.length, args = new Array(_len163), _key163 = 0; _key163 < _len163; _key163++) {
  8926. args[_key163] = arguments[_key163];
  8927. }
  8928. return builder.apply(void 0, ["PipelinePrimaryTopicReference"].concat(args));
  8929. }
  8930. function OptionalCallExpression() {
  8931. for (var _len164 = arguments.length, args = new Array(_len164), _key164 = 0; _key164 < _len164; _key164++) {
  8932. args[_key164] = arguments[_key164];
  8933. }
  8934. return builder.apply(void 0, ["OptionalCallExpression"].concat(args));
  8935. }
  8936. function ClassPrivateProperty() {
  8937. for (var _len165 = arguments.length, args = new Array(_len165), _key165 = 0; _key165 < _len165; _key165++) {
  8938. args[_key165] = arguments[_key165];
  8939. }
  8940. return builder.apply(void 0, ["ClassPrivateProperty"].concat(args));
  8941. }
  8942. function ClassPrivateMethod() {
  8943. for (var _len166 = arguments.length, args = new Array(_len166), _key166 = 0; _key166 < _len166; _key166++) {
  8944. args[_key166] = arguments[_key166];
  8945. }
  8946. return builder.apply(void 0, ["ClassPrivateMethod"].concat(args));
  8947. }
  8948. function Import() {
  8949. for (var _len167 = arguments.length, args = new Array(_len167), _key167 = 0; _key167 < _len167; _key167++) {
  8950. args[_key167] = arguments[_key167];
  8951. }
  8952. return builder.apply(void 0, ["Import"].concat(args));
  8953. }
  8954. function Decorator() {
  8955. for (var _len168 = arguments.length, args = new Array(_len168), _key168 = 0; _key168 < _len168; _key168++) {
  8956. args[_key168] = arguments[_key168];
  8957. }
  8958. return builder.apply(void 0, ["Decorator"].concat(args));
  8959. }
  8960. function DoExpression() {
  8961. for (var _len169 = arguments.length, args = new Array(_len169), _key169 = 0; _key169 < _len169; _key169++) {
  8962. args[_key169] = arguments[_key169];
  8963. }
  8964. return builder.apply(void 0, ["DoExpression"].concat(args));
  8965. }
  8966. function ExportDefaultSpecifier() {
  8967. for (var _len170 = arguments.length, args = new Array(_len170), _key170 = 0; _key170 < _len170; _key170++) {
  8968. args[_key170] = arguments[_key170];
  8969. }
  8970. return builder.apply(void 0, ["ExportDefaultSpecifier"].concat(args));
  8971. }
  8972. function ExportNamespaceSpecifier() {
  8973. for (var _len171 = arguments.length, args = new Array(_len171), _key171 = 0; _key171 < _len171; _key171++) {
  8974. args[_key171] = arguments[_key171];
  8975. }
  8976. return builder.apply(void 0, ["ExportNamespaceSpecifier"].concat(args));
  8977. }
  8978. function PrivateName() {
  8979. for (var _len172 = arguments.length, args = new Array(_len172), _key172 = 0; _key172 < _len172; _key172++) {
  8980. args[_key172] = arguments[_key172];
  8981. }
  8982. return builder.apply(void 0, ["PrivateName"].concat(args));
  8983. }
  8984. function BigIntLiteral() {
  8985. for (var _len173 = arguments.length, args = new Array(_len173), _key173 = 0; _key173 < _len173; _key173++) {
  8986. args[_key173] = arguments[_key173];
  8987. }
  8988. return builder.apply(void 0, ["BigIntLiteral"].concat(args));
  8989. }
  8990. function TSParameterProperty() {
  8991. for (var _len174 = arguments.length, args = new Array(_len174), _key174 = 0; _key174 < _len174; _key174++) {
  8992. args[_key174] = arguments[_key174];
  8993. }
  8994. return builder.apply(void 0, ["TSParameterProperty"].concat(args));
  8995. }
  8996. function TSDeclareFunction() {
  8997. for (var _len175 = arguments.length, args = new Array(_len175), _key175 = 0; _key175 < _len175; _key175++) {
  8998. args[_key175] = arguments[_key175];
  8999. }
  9000. return builder.apply(void 0, ["TSDeclareFunction"].concat(args));
  9001. }
  9002. function TSDeclareMethod() {
  9003. for (var _len176 = arguments.length, args = new Array(_len176), _key176 = 0; _key176 < _len176; _key176++) {
  9004. args[_key176] = arguments[_key176];
  9005. }
  9006. return builder.apply(void 0, ["TSDeclareMethod"].concat(args));
  9007. }
  9008. function TSQualifiedName() {
  9009. for (var _len177 = arguments.length, args = new Array(_len177), _key177 = 0; _key177 < _len177; _key177++) {
  9010. args[_key177] = arguments[_key177];
  9011. }
  9012. return builder.apply(void 0, ["TSQualifiedName"].concat(args));
  9013. }
  9014. function TSCallSignatureDeclaration() {
  9015. for (var _len178 = arguments.length, args = new Array(_len178), _key178 = 0; _key178 < _len178; _key178++) {
  9016. args[_key178] = arguments[_key178];
  9017. }
  9018. return builder.apply(void 0, ["TSCallSignatureDeclaration"].concat(args));
  9019. }
  9020. function TSConstructSignatureDeclaration() {
  9021. for (var _len179 = arguments.length, args = new Array(_len179), _key179 = 0; _key179 < _len179; _key179++) {
  9022. args[_key179] = arguments[_key179];
  9023. }
  9024. return builder.apply(void 0, ["TSConstructSignatureDeclaration"].concat(args));
  9025. }
  9026. function TSPropertySignature() {
  9027. for (var _len180 = arguments.length, args = new Array(_len180), _key180 = 0; _key180 < _len180; _key180++) {
  9028. args[_key180] = arguments[_key180];
  9029. }
  9030. return builder.apply(void 0, ["TSPropertySignature"].concat(args));
  9031. }
  9032. function TSMethodSignature() {
  9033. for (var _len181 = arguments.length, args = new Array(_len181), _key181 = 0; _key181 < _len181; _key181++) {
  9034. args[_key181] = arguments[_key181];
  9035. }
  9036. return builder.apply(void 0, ["TSMethodSignature"].concat(args));
  9037. }
  9038. function TSIndexSignature() {
  9039. for (var _len182 = arguments.length, args = new Array(_len182), _key182 = 0; _key182 < _len182; _key182++) {
  9040. args[_key182] = arguments[_key182];
  9041. }
  9042. return builder.apply(void 0, ["TSIndexSignature"].concat(args));
  9043. }
  9044. function TSAnyKeyword() {
  9045. for (var _len183 = arguments.length, args = new Array(_len183), _key183 = 0; _key183 < _len183; _key183++) {
  9046. args[_key183] = arguments[_key183];
  9047. }
  9048. return builder.apply(void 0, ["TSAnyKeyword"].concat(args));
  9049. }
  9050. function TSBooleanKeyword() {
  9051. for (var _len184 = arguments.length, args = new Array(_len184), _key184 = 0; _key184 < _len184; _key184++) {
  9052. args[_key184] = arguments[_key184];
  9053. }
  9054. return builder.apply(void 0, ["TSBooleanKeyword"].concat(args));
  9055. }
  9056. function TSBigIntKeyword() {
  9057. for (var _len185 = arguments.length, args = new Array(_len185), _key185 = 0; _key185 < _len185; _key185++) {
  9058. args[_key185] = arguments[_key185];
  9059. }
  9060. return builder.apply(void 0, ["TSBigIntKeyword"].concat(args));
  9061. }
  9062. function TSNeverKeyword() {
  9063. for (var _len186 = arguments.length, args = new Array(_len186), _key186 = 0; _key186 < _len186; _key186++) {
  9064. args[_key186] = arguments[_key186];
  9065. }
  9066. return builder.apply(void 0, ["TSNeverKeyword"].concat(args));
  9067. }
  9068. function TSNullKeyword() {
  9069. for (var _len187 = arguments.length, args = new Array(_len187), _key187 = 0; _key187 < _len187; _key187++) {
  9070. args[_key187] = arguments[_key187];
  9071. }
  9072. return builder.apply(void 0, ["TSNullKeyword"].concat(args));
  9073. }
  9074. function TSNumberKeyword() {
  9075. for (var _len188 = arguments.length, args = new Array(_len188), _key188 = 0; _key188 < _len188; _key188++) {
  9076. args[_key188] = arguments[_key188];
  9077. }
  9078. return builder.apply(void 0, ["TSNumberKeyword"].concat(args));
  9079. }
  9080. function TSObjectKeyword() {
  9081. for (var _len189 = arguments.length, args = new Array(_len189), _key189 = 0; _key189 < _len189; _key189++) {
  9082. args[_key189] = arguments[_key189];
  9083. }
  9084. return builder.apply(void 0, ["TSObjectKeyword"].concat(args));
  9085. }
  9086. function TSStringKeyword() {
  9087. for (var _len190 = arguments.length, args = new Array(_len190), _key190 = 0; _key190 < _len190; _key190++) {
  9088. args[_key190] = arguments[_key190];
  9089. }
  9090. return builder.apply(void 0, ["TSStringKeyword"].concat(args));
  9091. }
  9092. function TSSymbolKeyword() {
  9093. for (var _len191 = arguments.length, args = new Array(_len191), _key191 = 0; _key191 < _len191; _key191++) {
  9094. args[_key191] = arguments[_key191];
  9095. }
  9096. return builder.apply(void 0, ["TSSymbolKeyword"].concat(args));
  9097. }
  9098. function TSUndefinedKeyword() {
  9099. for (var _len192 = arguments.length, args = new Array(_len192), _key192 = 0; _key192 < _len192; _key192++) {
  9100. args[_key192] = arguments[_key192];
  9101. }
  9102. return builder.apply(void 0, ["TSUndefinedKeyword"].concat(args));
  9103. }
  9104. function TSUnknownKeyword() {
  9105. for (var _len193 = arguments.length, args = new Array(_len193), _key193 = 0; _key193 < _len193; _key193++) {
  9106. args[_key193] = arguments[_key193];
  9107. }
  9108. return builder.apply(void 0, ["TSUnknownKeyword"].concat(args));
  9109. }
  9110. function TSVoidKeyword() {
  9111. for (var _len194 = arguments.length, args = new Array(_len194), _key194 = 0; _key194 < _len194; _key194++) {
  9112. args[_key194] = arguments[_key194];
  9113. }
  9114. return builder.apply(void 0, ["TSVoidKeyword"].concat(args));
  9115. }
  9116. function TSThisType() {
  9117. for (var _len195 = arguments.length, args = new Array(_len195), _key195 = 0; _key195 < _len195; _key195++) {
  9118. args[_key195] = arguments[_key195];
  9119. }
  9120. return builder.apply(void 0, ["TSThisType"].concat(args));
  9121. }
  9122. function TSFunctionType() {
  9123. for (var _len196 = arguments.length, args = new Array(_len196), _key196 = 0; _key196 < _len196; _key196++) {
  9124. args[_key196] = arguments[_key196];
  9125. }
  9126. return builder.apply(void 0, ["TSFunctionType"].concat(args));
  9127. }
  9128. function TSConstructorType() {
  9129. for (var _len197 = arguments.length, args = new Array(_len197), _key197 = 0; _key197 < _len197; _key197++) {
  9130. args[_key197] = arguments[_key197];
  9131. }
  9132. return builder.apply(void 0, ["TSConstructorType"].concat(args));
  9133. }
  9134. function TSTypeReference() {
  9135. for (var _len198 = arguments.length, args = new Array(_len198), _key198 = 0; _key198 < _len198; _key198++) {
  9136. args[_key198] = arguments[_key198];
  9137. }
  9138. return builder.apply(void 0, ["TSTypeReference"].concat(args));
  9139. }
  9140. function TSTypePredicate() {
  9141. for (var _len199 = arguments.length, args = new Array(_len199), _key199 = 0; _key199 < _len199; _key199++) {
  9142. args[_key199] = arguments[_key199];
  9143. }
  9144. return builder.apply(void 0, ["TSTypePredicate"].concat(args));
  9145. }
  9146. function TSTypeQuery() {
  9147. for (var _len200 = arguments.length, args = new Array(_len200), _key200 = 0; _key200 < _len200; _key200++) {
  9148. args[_key200] = arguments[_key200];
  9149. }
  9150. return builder.apply(void 0, ["TSTypeQuery"].concat(args));
  9151. }
  9152. function TSTypeLiteral() {
  9153. for (var _len201 = arguments.length, args = new Array(_len201), _key201 = 0; _key201 < _len201; _key201++) {
  9154. args[_key201] = arguments[_key201];
  9155. }
  9156. return builder.apply(void 0, ["TSTypeLiteral"].concat(args));
  9157. }
  9158. function TSArrayType() {
  9159. for (var _len202 = arguments.length, args = new Array(_len202), _key202 = 0; _key202 < _len202; _key202++) {
  9160. args[_key202] = arguments[_key202];
  9161. }
  9162. return builder.apply(void 0, ["TSArrayType"].concat(args));
  9163. }
  9164. function TSTupleType() {
  9165. for (var _len203 = arguments.length, args = new Array(_len203), _key203 = 0; _key203 < _len203; _key203++) {
  9166. args[_key203] = arguments[_key203];
  9167. }
  9168. return builder.apply(void 0, ["TSTupleType"].concat(args));
  9169. }
  9170. function TSOptionalType() {
  9171. for (var _len204 = arguments.length, args = new Array(_len204), _key204 = 0; _key204 < _len204; _key204++) {
  9172. args[_key204] = arguments[_key204];
  9173. }
  9174. return builder.apply(void 0, ["TSOptionalType"].concat(args));
  9175. }
  9176. function TSRestType() {
  9177. for (var _len205 = arguments.length, args = new Array(_len205), _key205 = 0; _key205 < _len205; _key205++) {
  9178. args[_key205] = arguments[_key205];
  9179. }
  9180. return builder.apply(void 0, ["TSRestType"].concat(args));
  9181. }
  9182. function TSUnionType() {
  9183. for (var _len206 = arguments.length, args = new Array(_len206), _key206 = 0; _key206 < _len206; _key206++) {
  9184. args[_key206] = arguments[_key206];
  9185. }
  9186. return builder.apply(void 0, ["TSUnionType"].concat(args));
  9187. }
  9188. function TSIntersectionType() {
  9189. for (var _len207 = arguments.length, args = new Array(_len207), _key207 = 0; _key207 < _len207; _key207++) {
  9190. args[_key207] = arguments[_key207];
  9191. }
  9192. return builder.apply(void 0, ["TSIntersectionType"].concat(args));
  9193. }
  9194. function TSConditionalType() {
  9195. for (var _len208 = arguments.length, args = new Array(_len208), _key208 = 0; _key208 < _len208; _key208++) {
  9196. args[_key208] = arguments[_key208];
  9197. }
  9198. return builder.apply(void 0, ["TSConditionalType"].concat(args));
  9199. }
  9200. function TSInferType() {
  9201. for (var _len209 = arguments.length, args = new Array(_len209), _key209 = 0; _key209 < _len209; _key209++) {
  9202. args[_key209] = arguments[_key209];
  9203. }
  9204. return builder.apply(void 0, ["TSInferType"].concat(args));
  9205. }
  9206. function TSParenthesizedType() {
  9207. for (var _len210 = arguments.length, args = new Array(_len210), _key210 = 0; _key210 < _len210; _key210++) {
  9208. args[_key210] = arguments[_key210];
  9209. }
  9210. return builder.apply(void 0, ["TSParenthesizedType"].concat(args));
  9211. }
  9212. function TSTypeOperator() {
  9213. for (var _len211 = arguments.length, args = new Array(_len211), _key211 = 0; _key211 < _len211; _key211++) {
  9214. args[_key211] = arguments[_key211];
  9215. }
  9216. return builder.apply(void 0, ["TSTypeOperator"].concat(args));
  9217. }
  9218. function TSIndexedAccessType() {
  9219. for (var _len212 = arguments.length, args = new Array(_len212), _key212 = 0; _key212 < _len212; _key212++) {
  9220. args[_key212] = arguments[_key212];
  9221. }
  9222. return builder.apply(void 0, ["TSIndexedAccessType"].concat(args));
  9223. }
  9224. function TSMappedType() {
  9225. for (var _len213 = arguments.length, args = new Array(_len213), _key213 = 0; _key213 < _len213; _key213++) {
  9226. args[_key213] = arguments[_key213];
  9227. }
  9228. return builder.apply(void 0, ["TSMappedType"].concat(args));
  9229. }
  9230. function TSLiteralType() {
  9231. for (var _len214 = arguments.length, args = new Array(_len214), _key214 = 0; _key214 < _len214; _key214++) {
  9232. args[_key214] = arguments[_key214];
  9233. }
  9234. return builder.apply(void 0, ["TSLiteralType"].concat(args));
  9235. }
  9236. function TSExpressionWithTypeArguments() {
  9237. for (var _len215 = arguments.length, args = new Array(_len215), _key215 = 0; _key215 < _len215; _key215++) {
  9238. args[_key215] = arguments[_key215];
  9239. }
  9240. return builder.apply(void 0, ["TSExpressionWithTypeArguments"].concat(args));
  9241. }
  9242. function TSInterfaceDeclaration() {
  9243. for (var _len216 = arguments.length, args = new Array(_len216), _key216 = 0; _key216 < _len216; _key216++) {
  9244. args[_key216] = arguments[_key216];
  9245. }
  9246. return builder.apply(void 0, ["TSInterfaceDeclaration"].concat(args));
  9247. }
  9248. function TSInterfaceBody() {
  9249. for (var _len217 = arguments.length, args = new Array(_len217), _key217 = 0; _key217 < _len217; _key217++) {
  9250. args[_key217] = arguments[_key217];
  9251. }
  9252. return builder.apply(void 0, ["TSInterfaceBody"].concat(args));
  9253. }
  9254. function TSTypeAliasDeclaration() {
  9255. for (var _len218 = arguments.length, args = new Array(_len218), _key218 = 0; _key218 < _len218; _key218++) {
  9256. args[_key218] = arguments[_key218];
  9257. }
  9258. return builder.apply(void 0, ["TSTypeAliasDeclaration"].concat(args));
  9259. }
  9260. function TSAsExpression() {
  9261. for (var _len219 = arguments.length, args = new Array(_len219), _key219 = 0; _key219 < _len219; _key219++) {
  9262. args[_key219] = arguments[_key219];
  9263. }
  9264. return builder.apply(void 0, ["TSAsExpression"].concat(args));
  9265. }
  9266. function TSTypeAssertion() {
  9267. for (var _len220 = arguments.length, args = new Array(_len220), _key220 = 0; _key220 < _len220; _key220++) {
  9268. args[_key220] = arguments[_key220];
  9269. }
  9270. return builder.apply(void 0, ["TSTypeAssertion"].concat(args));
  9271. }
  9272. function TSEnumDeclaration() {
  9273. for (var _len221 = arguments.length, args = new Array(_len221), _key221 = 0; _key221 < _len221; _key221++) {
  9274. args[_key221] = arguments[_key221];
  9275. }
  9276. return builder.apply(void 0, ["TSEnumDeclaration"].concat(args));
  9277. }
  9278. function TSEnumMember() {
  9279. for (var _len222 = arguments.length, args = new Array(_len222), _key222 = 0; _key222 < _len222; _key222++) {
  9280. args[_key222] = arguments[_key222];
  9281. }
  9282. return builder.apply(void 0, ["TSEnumMember"].concat(args));
  9283. }
  9284. function TSModuleDeclaration() {
  9285. for (var _len223 = arguments.length, args = new Array(_len223), _key223 = 0; _key223 < _len223; _key223++) {
  9286. args[_key223] = arguments[_key223];
  9287. }
  9288. return builder.apply(void 0, ["TSModuleDeclaration"].concat(args));
  9289. }
  9290. function TSModuleBlock() {
  9291. for (var _len224 = arguments.length, args = new Array(_len224), _key224 = 0; _key224 < _len224; _key224++) {
  9292. args[_key224] = arguments[_key224];
  9293. }
  9294. return builder.apply(void 0, ["TSModuleBlock"].concat(args));
  9295. }
  9296. function TSImportType() {
  9297. for (var _len225 = arguments.length, args = new Array(_len225), _key225 = 0; _key225 < _len225; _key225++) {
  9298. args[_key225] = arguments[_key225];
  9299. }
  9300. return builder.apply(void 0, ["TSImportType"].concat(args));
  9301. }
  9302. function TSImportEqualsDeclaration() {
  9303. for (var _len226 = arguments.length, args = new Array(_len226), _key226 = 0; _key226 < _len226; _key226++) {
  9304. args[_key226] = arguments[_key226];
  9305. }
  9306. return builder.apply(void 0, ["TSImportEqualsDeclaration"].concat(args));
  9307. }
  9308. function TSExternalModuleReference() {
  9309. for (var _len227 = arguments.length, args = new Array(_len227), _key227 = 0; _key227 < _len227; _key227++) {
  9310. args[_key227] = arguments[_key227];
  9311. }
  9312. return builder.apply(void 0, ["TSExternalModuleReference"].concat(args));
  9313. }
  9314. function TSNonNullExpression() {
  9315. for (var _len228 = arguments.length, args = new Array(_len228), _key228 = 0; _key228 < _len228; _key228++) {
  9316. args[_key228] = arguments[_key228];
  9317. }
  9318. return builder.apply(void 0, ["TSNonNullExpression"].concat(args));
  9319. }
  9320. function TSExportAssignment() {
  9321. for (var _len229 = arguments.length, args = new Array(_len229), _key229 = 0; _key229 < _len229; _key229++) {
  9322. args[_key229] = arguments[_key229];
  9323. }
  9324. return builder.apply(void 0, ["TSExportAssignment"].concat(args));
  9325. }
  9326. function TSNamespaceExportDeclaration() {
  9327. for (var _len230 = arguments.length, args = new Array(_len230), _key230 = 0; _key230 < _len230; _key230++) {
  9328. args[_key230] = arguments[_key230];
  9329. }
  9330. return builder.apply(void 0, ["TSNamespaceExportDeclaration"].concat(args));
  9331. }
  9332. function TSTypeAnnotation() {
  9333. for (var _len231 = arguments.length, args = new Array(_len231), _key231 = 0; _key231 < _len231; _key231++) {
  9334. args[_key231] = arguments[_key231];
  9335. }
  9336. return builder.apply(void 0, ["TSTypeAnnotation"].concat(args));
  9337. }
  9338. function TSTypeParameterInstantiation() {
  9339. for (var _len232 = arguments.length, args = new Array(_len232), _key232 = 0; _key232 < _len232; _key232++) {
  9340. args[_key232] = arguments[_key232];
  9341. }
  9342. return builder.apply(void 0, ["TSTypeParameterInstantiation"].concat(args));
  9343. }
  9344. function TSTypeParameterDeclaration() {
  9345. for (var _len233 = arguments.length, args = new Array(_len233), _key233 = 0; _key233 < _len233; _key233++) {
  9346. args[_key233] = arguments[_key233];
  9347. }
  9348. return builder.apply(void 0, ["TSTypeParameterDeclaration"].concat(args));
  9349. }
  9350. function TSTypeParameter() {
  9351. for (var _len234 = arguments.length, args = new Array(_len234), _key234 = 0; _key234 < _len234; _key234++) {
  9352. args[_key234] = arguments[_key234];
  9353. }
  9354. return builder.apply(void 0, ["TSTypeParameter"].concat(args));
  9355. }
  9356. function NumberLiteral() {
  9357. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  9358. for (var _len235 = arguments.length, args = new Array(_len235), _key235 = 0; _key235 < _len235; _key235++) {
  9359. args[_key235] = arguments[_key235];
  9360. }
  9361. return NumberLiteral.apply(void 0, ["NumberLiteral"].concat(args));
  9362. }
  9363. function RegexLiteral() {
  9364. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  9365. for (var _len236 = arguments.length, args = new Array(_len236), _key236 = 0; _key236 < _len236; _key236++) {
  9366. args[_key236] = arguments[_key236];
  9367. }
  9368. return RegexLiteral.apply(void 0, ["RegexLiteral"].concat(args));
  9369. }
  9370. function RestProperty() {
  9371. console.trace("The node type RestProperty has been renamed to RestElement");
  9372. for (var _len237 = arguments.length, args = new Array(_len237), _key237 = 0; _key237 < _len237; _key237++) {
  9373. args[_key237] = arguments[_key237];
  9374. }
  9375. return RestProperty.apply(void 0, ["RestProperty"].concat(args));
  9376. }
  9377. function SpreadProperty() {
  9378. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  9379. for (var _len238 = arguments.length, args = new Array(_len238), _key238 = 0; _key238 < _len238; _key238++) {
  9380. args[_key238] = arguments[_key238];
  9381. }
  9382. return SpreadProperty.apply(void 0, ["SpreadProperty"].concat(args));
  9383. }
  9384. function cleanJSXElementLiteralChild(child, args) {
  9385. var lines = child.value.split(/\r\n|\n|\r/);
  9386. var lastNonEmptyLine = 0;
  9387. for (var i = 0; i < lines.length; i++) {
  9388. if (lines[i].match(/[^ \t]/)) {
  9389. lastNonEmptyLine = i;
  9390. }
  9391. }
  9392. var str = "";
  9393. for (var _i = 0; _i < lines.length; _i++) {
  9394. var line = lines[_i];
  9395. var isFirstLine = _i === 0;
  9396. var isLastLine = _i === lines.length - 1;
  9397. var isLastNonEmptyLine = _i === lastNonEmptyLine;
  9398. var trimmedLine = line.replace(/\t/g, " ");
  9399. if (!isFirstLine) {
  9400. trimmedLine = trimmedLine.replace(/^[ ]+/, "");
  9401. }
  9402. if (!isLastLine) {
  9403. trimmedLine = trimmedLine.replace(/[ ]+$/, "");
  9404. }
  9405. if (trimmedLine) {
  9406. if (!isLastNonEmptyLine) {
  9407. trimmedLine += " ";
  9408. }
  9409. str += trimmedLine;
  9410. }
  9411. }
  9412. if (str) args.push(StringLiteral(str));
  9413. }
  9414. function buildChildren(node) {
  9415. var elements = [];
  9416. for (var i = 0; i < node.children.length; i++) {
  9417. var child = node.children[i];
  9418. if (isJSXText(child)) {
  9419. cleanJSXElementLiteralChild(child, elements);
  9420. continue;
  9421. }
  9422. if (isJSXExpressionContainer(child)) child = child.expression;
  9423. if (isJSXEmptyExpression(child)) continue;
  9424. elements.push(child);
  9425. }
  9426. return elements;
  9427. }
  9428. function isNode(node) {
  9429. return !!(node && VISITOR_KEYS[node.type]);
  9430. }
  9431. function assertNode(node) {
  9432. if (!isNode(node)) {
  9433. var type = node && node.type || JSON.stringify(node);
  9434. throw new TypeError("Not a valid node of type \"" + type + "\"");
  9435. }
  9436. }
  9437. function assert(type, node, opts) {
  9438. if (!is(type, node, opts)) {
  9439. throw new Error("Expected type \"" + type + "\" with option " + JSON.stringify(opts) + ", " + ("but instead got \"" + node.type + "\"."));
  9440. }
  9441. }
  9442. function assertArrayExpression(node, opts) {
  9443. if (opts === void 0) {
  9444. opts = {};
  9445. }
  9446. assert("ArrayExpression", node, opts);
  9447. }
  9448. function assertAssignmentExpression(node, opts) {
  9449. if (opts === void 0) {
  9450. opts = {};
  9451. }
  9452. assert("AssignmentExpression", node, opts);
  9453. }
  9454. function assertBinaryExpression(node, opts) {
  9455. if (opts === void 0) {
  9456. opts = {};
  9457. }
  9458. assert("BinaryExpression", node, opts);
  9459. }
  9460. function assertInterpreterDirective(node, opts) {
  9461. if (opts === void 0) {
  9462. opts = {};
  9463. }
  9464. assert("InterpreterDirective", node, opts);
  9465. }
  9466. function assertDirective(node, opts) {
  9467. if (opts === void 0) {
  9468. opts = {};
  9469. }
  9470. assert("Directive", node, opts);
  9471. }
  9472. function assertDirectiveLiteral(node, opts) {
  9473. if (opts === void 0) {
  9474. opts = {};
  9475. }
  9476. assert("DirectiveLiteral", node, opts);
  9477. }
  9478. function assertBlockStatement(node, opts) {
  9479. if (opts === void 0) {
  9480. opts = {};
  9481. }
  9482. assert("BlockStatement", node, opts);
  9483. }
  9484. function assertBreakStatement(node, opts) {
  9485. if (opts === void 0) {
  9486. opts = {};
  9487. }
  9488. assert("BreakStatement", node, opts);
  9489. }
  9490. function assertCallExpression(node, opts) {
  9491. if (opts === void 0) {
  9492. opts = {};
  9493. }
  9494. assert("CallExpression", node, opts);
  9495. }
  9496. function assertCatchClause(node, opts) {
  9497. if (opts === void 0) {
  9498. opts = {};
  9499. }
  9500. assert("CatchClause", node, opts);
  9501. }
  9502. function assertConditionalExpression(node, opts) {
  9503. if (opts === void 0) {
  9504. opts = {};
  9505. }
  9506. assert("ConditionalExpression", node, opts);
  9507. }
  9508. function assertContinueStatement(node, opts) {
  9509. if (opts === void 0) {
  9510. opts = {};
  9511. }
  9512. assert("ContinueStatement", node, opts);
  9513. }
  9514. function assertDebuggerStatement(node, opts) {
  9515. if (opts === void 0) {
  9516. opts = {};
  9517. }
  9518. assert("DebuggerStatement", node, opts);
  9519. }
  9520. function assertDoWhileStatement(node, opts) {
  9521. if (opts === void 0) {
  9522. opts = {};
  9523. }
  9524. assert("DoWhileStatement", node, opts);
  9525. }
  9526. function assertEmptyStatement(node, opts) {
  9527. if (opts === void 0) {
  9528. opts = {};
  9529. }
  9530. assert("EmptyStatement", node, opts);
  9531. }
  9532. function assertExpressionStatement(node, opts) {
  9533. if (opts === void 0) {
  9534. opts = {};
  9535. }
  9536. assert("ExpressionStatement", node, opts);
  9537. }
  9538. function assertFile(node, opts) {
  9539. if (opts === void 0) {
  9540. opts = {};
  9541. }
  9542. assert("File", node, opts);
  9543. }
  9544. function assertForInStatement(node, opts) {
  9545. if (opts === void 0) {
  9546. opts = {};
  9547. }
  9548. assert("ForInStatement", node, opts);
  9549. }
  9550. function assertForStatement(node, opts) {
  9551. if (opts === void 0) {
  9552. opts = {};
  9553. }
  9554. assert("ForStatement", node, opts);
  9555. }
  9556. function assertFunctionDeclaration(node, opts) {
  9557. if (opts === void 0) {
  9558. opts = {};
  9559. }
  9560. assert("FunctionDeclaration", node, opts);
  9561. }
  9562. function assertFunctionExpression(node, opts) {
  9563. if (opts === void 0) {
  9564. opts = {};
  9565. }
  9566. assert("FunctionExpression", node, opts);
  9567. }
  9568. function assertIdentifier(node, opts) {
  9569. if (opts === void 0) {
  9570. opts = {};
  9571. }
  9572. assert("Identifier", node, opts);
  9573. }
  9574. function assertIfStatement(node, opts) {
  9575. if (opts === void 0) {
  9576. opts = {};
  9577. }
  9578. assert("IfStatement", node, opts);
  9579. }
  9580. function assertLabeledStatement(node, opts) {
  9581. if (opts === void 0) {
  9582. opts = {};
  9583. }
  9584. assert("LabeledStatement", node, opts);
  9585. }
  9586. function assertStringLiteral(node, opts) {
  9587. if (opts === void 0) {
  9588. opts = {};
  9589. }
  9590. assert("StringLiteral", node, opts);
  9591. }
  9592. function assertNumericLiteral(node, opts) {
  9593. if (opts === void 0) {
  9594. opts = {};
  9595. }
  9596. assert("NumericLiteral", node, opts);
  9597. }
  9598. function assertNullLiteral(node, opts) {
  9599. if (opts === void 0) {
  9600. opts = {};
  9601. }
  9602. assert("NullLiteral", node, opts);
  9603. }
  9604. function assertBooleanLiteral(node, opts) {
  9605. if (opts === void 0) {
  9606. opts = {};
  9607. }
  9608. assert("BooleanLiteral", node, opts);
  9609. }
  9610. function assertRegExpLiteral(node, opts) {
  9611. if (opts === void 0) {
  9612. opts = {};
  9613. }
  9614. assert("RegExpLiteral", node, opts);
  9615. }
  9616. function assertLogicalExpression(node, opts) {
  9617. if (opts === void 0) {
  9618. opts = {};
  9619. }
  9620. assert("LogicalExpression", node, opts);
  9621. }
  9622. function assertMemberExpression(node, opts) {
  9623. if (opts === void 0) {
  9624. opts = {};
  9625. }
  9626. assert("MemberExpression", node, opts);
  9627. }
  9628. function assertNewExpression(node, opts) {
  9629. if (opts === void 0) {
  9630. opts = {};
  9631. }
  9632. assert("NewExpression", node, opts);
  9633. }
  9634. function assertProgram(node, opts) {
  9635. if (opts === void 0) {
  9636. opts = {};
  9637. }
  9638. assert("Program", node, opts);
  9639. }
  9640. function assertObjectExpression(node, opts) {
  9641. if (opts === void 0) {
  9642. opts = {};
  9643. }
  9644. assert("ObjectExpression", node, opts);
  9645. }
  9646. function assertObjectMethod(node, opts) {
  9647. if (opts === void 0) {
  9648. opts = {};
  9649. }
  9650. assert("ObjectMethod", node, opts);
  9651. }
  9652. function assertObjectProperty(node, opts) {
  9653. if (opts === void 0) {
  9654. opts = {};
  9655. }
  9656. assert("ObjectProperty", node, opts);
  9657. }
  9658. function assertRestElement(node, opts) {
  9659. if (opts === void 0) {
  9660. opts = {};
  9661. }
  9662. assert("RestElement", node, opts);
  9663. }
  9664. function assertReturnStatement(node, opts) {
  9665. if (opts === void 0) {
  9666. opts = {};
  9667. }
  9668. assert("ReturnStatement", node, opts);
  9669. }
  9670. function assertSequenceExpression(node, opts) {
  9671. if (opts === void 0) {
  9672. opts = {};
  9673. }
  9674. assert("SequenceExpression", node, opts);
  9675. }
  9676. function assertParenthesizedExpression(node, opts) {
  9677. if (opts === void 0) {
  9678. opts = {};
  9679. }
  9680. assert("ParenthesizedExpression", node, opts);
  9681. }
  9682. function assertSwitchCase(node, opts) {
  9683. if (opts === void 0) {
  9684. opts = {};
  9685. }
  9686. assert("SwitchCase", node, opts);
  9687. }
  9688. function assertSwitchStatement(node, opts) {
  9689. if (opts === void 0) {
  9690. opts = {};
  9691. }
  9692. assert("SwitchStatement", node, opts);
  9693. }
  9694. function assertThisExpression(node, opts) {
  9695. if (opts === void 0) {
  9696. opts = {};
  9697. }
  9698. assert("ThisExpression", node, opts);
  9699. }
  9700. function assertThrowStatement(node, opts) {
  9701. if (opts === void 0) {
  9702. opts = {};
  9703. }
  9704. assert("ThrowStatement", node, opts);
  9705. }
  9706. function assertTryStatement(node, opts) {
  9707. if (opts === void 0) {
  9708. opts = {};
  9709. }
  9710. assert("TryStatement", node, opts);
  9711. }
  9712. function assertUnaryExpression(node, opts) {
  9713. if (opts === void 0) {
  9714. opts = {};
  9715. }
  9716. assert("UnaryExpression", node, opts);
  9717. }
  9718. function assertUpdateExpression(node, opts) {
  9719. if (opts === void 0) {
  9720. opts = {};
  9721. }
  9722. assert("UpdateExpression", node, opts);
  9723. }
  9724. function assertVariableDeclaration(node, opts) {
  9725. if (opts === void 0) {
  9726. opts = {};
  9727. }
  9728. assert("VariableDeclaration", node, opts);
  9729. }
  9730. function assertVariableDeclarator(node, opts) {
  9731. if (opts === void 0) {
  9732. opts = {};
  9733. }
  9734. assert("VariableDeclarator", node, opts);
  9735. }
  9736. function assertWhileStatement(node, opts) {
  9737. if (opts === void 0) {
  9738. opts = {};
  9739. }
  9740. assert("WhileStatement", node, opts);
  9741. }
  9742. function assertWithStatement(node, opts) {
  9743. if (opts === void 0) {
  9744. opts = {};
  9745. }
  9746. assert("WithStatement", node, opts);
  9747. }
  9748. function assertAssignmentPattern(node, opts) {
  9749. if (opts === void 0) {
  9750. opts = {};
  9751. }
  9752. assert("AssignmentPattern", node, opts);
  9753. }
  9754. function assertArrayPattern(node, opts) {
  9755. if (opts === void 0) {
  9756. opts = {};
  9757. }
  9758. assert("ArrayPattern", node, opts);
  9759. }
  9760. function assertArrowFunctionExpression(node, opts) {
  9761. if (opts === void 0) {
  9762. opts = {};
  9763. }
  9764. assert("ArrowFunctionExpression", node, opts);
  9765. }
  9766. function assertClassBody(node, opts) {
  9767. if (opts === void 0) {
  9768. opts = {};
  9769. }
  9770. assert("ClassBody", node, opts);
  9771. }
  9772. function assertClassExpression(node, opts) {
  9773. if (opts === void 0) {
  9774. opts = {};
  9775. }
  9776. assert("ClassExpression", node, opts);
  9777. }
  9778. function assertClassDeclaration(node, opts) {
  9779. if (opts === void 0) {
  9780. opts = {};
  9781. }
  9782. assert("ClassDeclaration", node, opts);
  9783. }
  9784. function assertExportAllDeclaration(node, opts) {
  9785. if (opts === void 0) {
  9786. opts = {};
  9787. }
  9788. assert("ExportAllDeclaration", node, opts);
  9789. }
  9790. function assertExportDefaultDeclaration(node, opts) {
  9791. if (opts === void 0) {
  9792. opts = {};
  9793. }
  9794. assert("ExportDefaultDeclaration", node, opts);
  9795. }
  9796. function assertExportNamedDeclaration(node, opts) {
  9797. if (opts === void 0) {
  9798. opts = {};
  9799. }
  9800. assert("ExportNamedDeclaration", node, opts);
  9801. }
  9802. function assertExportSpecifier(node, opts) {
  9803. if (opts === void 0) {
  9804. opts = {};
  9805. }
  9806. assert("ExportSpecifier", node, opts);
  9807. }
  9808. function assertForOfStatement(node, opts) {
  9809. if (opts === void 0) {
  9810. opts = {};
  9811. }
  9812. assert("ForOfStatement", node, opts);
  9813. }
  9814. function assertImportDeclaration(node, opts) {
  9815. if (opts === void 0) {
  9816. opts = {};
  9817. }
  9818. assert("ImportDeclaration", node, opts);
  9819. }
  9820. function assertImportDefaultSpecifier(node, opts) {
  9821. if (opts === void 0) {
  9822. opts = {};
  9823. }
  9824. assert("ImportDefaultSpecifier", node, opts);
  9825. }
  9826. function assertImportNamespaceSpecifier(node, opts) {
  9827. if (opts === void 0) {
  9828. opts = {};
  9829. }
  9830. assert("ImportNamespaceSpecifier", node, opts);
  9831. }
  9832. function assertImportSpecifier(node, opts) {
  9833. if (opts === void 0) {
  9834. opts = {};
  9835. }
  9836. assert("ImportSpecifier", node, opts);
  9837. }
  9838. function assertMetaProperty(node, opts) {
  9839. if (opts === void 0) {
  9840. opts = {};
  9841. }
  9842. assert("MetaProperty", node, opts);
  9843. }
  9844. function assertClassMethod(node, opts) {
  9845. if (opts === void 0) {
  9846. opts = {};
  9847. }
  9848. assert("ClassMethod", node, opts);
  9849. }
  9850. function assertObjectPattern(node, opts) {
  9851. if (opts === void 0) {
  9852. opts = {};
  9853. }
  9854. assert("ObjectPattern", node, opts);
  9855. }
  9856. function assertSpreadElement(node, opts) {
  9857. if (opts === void 0) {
  9858. opts = {};
  9859. }
  9860. assert("SpreadElement", node, opts);
  9861. }
  9862. function assertSuper(node, opts) {
  9863. if (opts === void 0) {
  9864. opts = {};
  9865. }
  9866. assert("Super", node, opts);
  9867. }
  9868. function assertTaggedTemplateExpression(node, opts) {
  9869. if (opts === void 0) {
  9870. opts = {};
  9871. }
  9872. assert("TaggedTemplateExpression", node, opts);
  9873. }
  9874. function assertTemplateElement(node, opts) {
  9875. if (opts === void 0) {
  9876. opts = {};
  9877. }
  9878. assert("TemplateElement", node, opts);
  9879. }
  9880. function assertTemplateLiteral(node, opts) {
  9881. if (opts === void 0) {
  9882. opts = {};
  9883. }
  9884. assert("TemplateLiteral", node, opts);
  9885. }
  9886. function assertYieldExpression(node, opts) {
  9887. if (opts === void 0) {
  9888. opts = {};
  9889. }
  9890. assert("YieldExpression", node, opts);
  9891. }
  9892. function assertAnyTypeAnnotation(node, opts) {
  9893. if (opts === void 0) {
  9894. opts = {};
  9895. }
  9896. assert("AnyTypeAnnotation", node, opts);
  9897. }
  9898. function assertArrayTypeAnnotation(node, opts) {
  9899. if (opts === void 0) {
  9900. opts = {};
  9901. }
  9902. assert("ArrayTypeAnnotation", node, opts);
  9903. }
  9904. function assertBooleanTypeAnnotation(node, opts) {
  9905. if (opts === void 0) {
  9906. opts = {};
  9907. }
  9908. assert("BooleanTypeAnnotation", node, opts);
  9909. }
  9910. function assertBooleanLiteralTypeAnnotation(node, opts) {
  9911. if (opts === void 0) {
  9912. opts = {};
  9913. }
  9914. assert("BooleanLiteralTypeAnnotation", node, opts);
  9915. }
  9916. function assertNullLiteralTypeAnnotation(node, opts) {
  9917. if (opts === void 0) {
  9918. opts = {};
  9919. }
  9920. assert("NullLiteralTypeAnnotation", node, opts);
  9921. }
  9922. function assertClassImplements(node, opts) {
  9923. if (opts === void 0) {
  9924. opts = {};
  9925. }
  9926. assert("ClassImplements", node, opts);
  9927. }
  9928. function assertDeclareClass(node, opts) {
  9929. if (opts === void 0) {
  9930. opts = {};
  9931. }
  9932. assert("DeclareClass", node, opts);
  9933. }
  9934. function assertDeclareFunction(node, opts) {
  9935. if (opts === void 0) {
  9936. opts = {};
  9937. }
  9938. assert("DeclareFunction", node, opts);
  9939. }
  9940. function assertDeclareInterface(node, opts) {
  9941. if (opts === void 0) {
  9942. opts = {};
  9943. }
  9944. assert("DeclareInterface", node, opts);
  9945. }
  9946. function assertDeclareModule(node, opts) {
  9947. if (opts === void 0) {
  9948. opts = {};
  9949. }
  9950. assert("DeclareModule", node, opts);
  9951. }
  9952. function assertDeclareModuleExports(node, opts) {
  9953. if (opts === void 0) {
  9954. opts = {};
  9955. }
  9956. assert("DeclareModuleExports", node, opts);
  9957. }
  9958. function assertDeclareTypeAlias(node, opts) {
  9959. if (opts === void 0) {
  9960. opts = {};
  9961. }
  9962. assert("DeclareTypeAlias", node, opts);
  9963. }
  9964. function assertDeclareOpaqueType(node, opts) {
  9965. if (opts === void 0) {
  9966. opts = {};
  9967. }
  9968. assert("DeclareOpaqueType", node, opts);
  9969. }
  9970. function assertDeclareVariable(node, opts) {
  9971. if (opts === void 0) {
  9972. opts = {};
  9973. }
  9974. assert("DeclareVariable", node, opts);
  9975. }
  9976. function assertDeclareExportDeclaration(node, opts) {
  9977. if (opts === void 0) {
  9978. opts = {};
  9979. }
  9980. assert("DeclareExportDeclaration", node, opts);
  9981. }
  9982. function assertDeclareExportAllDeclaration(node, opts) {
  9983. if (opts === void 0) {
  9984. opts = {};
  9985. }
  9986. assert("DeclareExportAllDeclaration", node, opts);
  9987. }
  9988. function assertDeclaredPredicate(node, opts) {
  9989. if (opts === void 0) {
  9990. opts = {};
  9991. }
  9992. assert("DeclaredPredicate", node, opts);
  9993. }
  9994. function assertExistsTypeAnnotation(node, opts) {
  9995. if (opts === void 0) {
  9996. opts = {};
  9997. }
  9998. assert("ExistsTypeAnnotation", node, opts);
  9999. }
  10000. function assertFunctionTypeAnnotation(node, opts) {
  10001. if (opts === void 0) {
  10002. opts = {};
  10003. }
  10004. assert("FunctionTypeAnnotation", node, opts);
  10005. }
  10006. function assertFunctionTypeParam(node, opts) {
  10007. if (opts === void 0) {
  10008. opts = {};
  10009. }
  10010. assert("FunctionTypeParam", node, opts);
  10011. }
  10012. function assertGenericTypeAnnotation(node, opts) {
  10013. if (opts === void 0) {
  10014. opts = {};
  10015. }
  10016. assert("GenericTypeAnnotation", node, opts);
  10017. }
  10018. function assertInferredPredicate(node, opts) {
  10019. if (opts === void 0) {
  10020. opts = {};
  10021. }
  10022. assert("InferredPredicate", node, opts);
  10023. }
  10024. function assertInterfaceExtends(node, opts) {
  10025. if (opts === void 0) {
  10026. opts = {};
  10027. }
  10028. assert("InterfaceExtends", node, opts);
  10029. }
  10030. function assertInterfaceDeclaration(node, opts) {
  10031. if (opts === void 0) {
  10032. opts = {};
  10033. }
  10034. assert("InterfaceDeclaration", node, opts);
  10035. }
  10036. function assertInterfaceTypeAnnotation(node, opts) {
  10037. if (opts === void 0) {
  10038. opts = {};
  10039. }
  10040. assert("InterfaceTypeAnnotation", node, opts);
  10041. }
  10042. function assertIntersectionTypeAnnotation(node, opts) {
  10043. if (opts === void 0) {
  10044. opts = {};
  10045. }
  10046. assert("IntersectionTypeAnnotation", node, opts);
  10047. }
  10048. function assertMixedTypeAnnotation(node, opts) {
  10049. if (opts === void 0) {
  10050. opts = {};
  10051. }
  10052. assert("MixedTypeAnnotation", node, opts);
  10053. }
  10054. function assertEmptyTypeAnnotation(node, opts) {
  10055. if (opts === void 0) {
  10056. opts = {};
  10057. }
  10058. assert("EmptyTypeAnnotation", node, opts);
  10059. }
  10060. function assertNullableTypeAnnotation(node, opts) {
  10061. if (opts === void 0) {
  10062. opts = {};
  10063. }
  10064. assert("NullableTypeAnnotation", node, opts);
  10065. }
  10066. function assertNumberLiteralTypeAnnotation(node, opts) {
  10067. if (opts === void 0) {
  10068. opts = {};
  10069. }
  10070. assert("NumberLiteralTypeAnnotation", node, opts);
  10071. }
  10072. function assertNumberTypeAnnotation(node, opts) {
  10073. if (opts === void 0) {
  10074. opts = {};
  10075. }
  10076. assert("NumberTypeAnnotation", node, opts);
  10077. }
  10078. function assertObjectTypeAnnotation(node, opts) {
  10079. if (opts === void 0) {
  10080. opts = {};
  10081. }
  10082. assert("ObjectTypeAnnotation", node, opts);
  10083. }
  10084. function assertObjectTypeInternalSlot(node, opts) {
  10085. if (opts === void 0) {
  10086. opts = {};
  10087. }
  10088. assert("ObjectTypeInternalSlot", node, opts);
  10089. }
  10090. function assertObjectTypeCallProperty(node, opts) {
  10091. if (opts === void 0) {
  10092. opts = {};
  10093. }
  10094. assert("ObjectTypeCallProperty", node, opts);
  10095. }
  10096. function assertObjectTypeIndexer(node, opts) {
  10097. if (opts === void 0) {
  10098. opts = {};
  10099. }
  10100. assert("ObjectTypeIndexer", node, opts);
  10101. }
  10102. function assertObjectTypeProperty(node, opts) {
  10103. if (opts === void 0) {
  10104. opts = {};
  10105. }
  10106. assert("ObjectTypeProperty", node, opts);
  10107. }
  10108. function assertObjectTypeSpreadProperty(node, opts) {
  10109. if (opts === void 0) {
  10110. opts = {};
  10111. }
  10112. assert("ObjectTypeSpreadProperty", node, opts);
  10113. }
  10114. function assertOpaqueType(node, opts) {
  10115. if (opts === void 0) {
  10116. opts = {};
  10117. }
  10118. assert("OpaqueType", node, opts);
  10119. }
  10120. function assertQualifiedTypeIdentifier(node, opts) {
  10121. if (opts === void 0) {
  10122. opts = {};
  10123. }
  10124. assert("QualifiedTypeIdentifier", node, opts);
  10125. }
  10126. function assertStringLiteralTypeAnnotation(node, opts) {
  10127. if (opts === void 0) {
  10128. opts = {};
  10129. }
  10130. assert("StringLiteralTypeAnnotation", node, opts);
  10131. }
  10132. function assertStringTypeAnnotation(node, opts) {
  10133. if (opts === void 0) {
  10134. opts = {};
  10135. }
  10136. assert("StringTypeAnnotation", node, opts);
  10137. }
  10138. function assertThisTypeAnnotation(node, opts) {
  10139. if (opts === void 0) {
  10140. opts = {};
  10141. }
  10142. assert("ThisTypeAnnotation", node, opts);
  10143. }
  10144. function assertTupleTypeAnnotation(node, opts) {
  10145. if (opts === void 0) {
  10146. opts = {};
  10147. }
  10148. assert("TupleTypeAnnotation", node, opts);
  10149. }
  10150. function assertTypeofTypeAnnotation(node, opts) {
  10151. if (opts === void 0) {
  10152. opts = {};
  10153. }
  10154. assert("TypeofTypeAnnotation", node, opts);
  10155. }
  10156. function assertTypeAlias(node, opts) {
  10157. if (opts === void 0) {
  10158. opts = {};
  10159. }
  10160. assert("TypeAlias", node, opts);
  10161. }
  10162. function assertTypeAnnotation(node, opts) {
  10163. if (opts === void 0) {
  10164. opts = {};
  10165. }
  10166. assert("TypeAnnotation", node, opts);
  10167. }
  10168. function assertTypeCastExpression(node, opts) {
  10169. if (opts === void 0) {
  10170. opts = {};
  10171. }
  10172. assert("TypeCastExpression", node, opts);
  10173. }
  10174. function assertTypeParameter(node, opts) {
  10175. if (opts === void 0) {
  10176. opts = {};
  10177. }
  10178. assert("TypeParameter", node, opts);
  10179. }
  10180. function assertTypeParameterDeclaration(node, opts) {
  10181. if (opts === void 0) {
  10182. opts = {};
  10183. }
  10184. assert("TypeParameterDeclaration", node, opts);
  10185. }
  10186. function assertTypeParameterInstantiation(node, opts) {
  10187. if (opts === void 0) {
  10188. opts = {};
  10189. }
  10190. assert("TypeParameterInstantiation", node, opts);
  10191. }
  10192. function assertUnionTypeAnnotation(node, opts) {
  10193. if (opts === void 0) {
  10194. opts = {};
  10195. }
  10196. assert("UnionTypeAnnotation", node, opts);
  10197. }
  10198. function assertVariance(node, opts) {
  10199. if (opts === void 0) {
  10200. opts = {};
  10201. }
  10202. assert("Variance", node, opts);
  10203. }
  10204. function assertVoidTypeAnnotation(node, opts) {
  10205. if (opts === void 0) {
  10206. opts = {};
  10207. }
  10208. assert("VoidTypeAnnotation", node, opts);
  10209. }
  10210. function assertEnumDeclaration(node, opts) {
  10211. if (opts === void 0) {
  10212. opts = {};
  10213. }
  10214. assert("EnumDeclaration", node, opts);
  10215. }
  10216. function assertEnumBooleanBody(node, opts) {
  10217. if (opts === void 0) {
  10218. opts = {};
  10219. }
  10220. assert("EnumBooleanBody", node, opts);
  10221. }
  10222. function assertEnumNumberBody(node, opts) {
  10223. if (opts === void 0) {
  10224. opts = {};
  10225. }
  10226. assert("EnumNumberBody", node, opts);
  10227. }
  10228. function assertEnumStringBody(node, opts) {
  10229. if (opts === void 0) {
  10230. opts = {};
  10231. }
  10232. assert("EnumStringBody", node, opts);
  10233. }
  10234. function assertEnumSymbolBody(node, opts) {
  10235. if (opts === void 0) {
  10236. opts = {};
  10237. }
  10238. assert("EnumSymbolBody", node, opts);
  10239. }
  10240. function assertEnumBooleanMember(node, opts) {
  10241. if (opts === void 0) {
  10242. opts = {};
  10243. }
  10244. assert("EnumBooleanMember", node, opts);
  10245. }
  10246. function assertEnumNumberMember(node, opts) {
  10247. if (opts === void 0) {
  10248. opts = {};
  10249. }
  10250. assert("EnumNumberMember", node, opts);
  10251. }
  10252. function assertEnumStringMember(node, opts) {
  10253. if (opts === void 0) {
  10254. opts = {};
  10255. }
  10256. assert("EnumStringMember", node, opts);
  10257. }
  10258. function assertEnumDefaultedMember(node, opts) {
  10259. if (opts === void 0) {
  10260. opts = {};
  10261. }
  10262. assert("EnumDefaultedMember", node, opts);
  10263. }
  10264. function assertJSXAttribute(node, opts) {
  10265. if (opts === void 0) {
  10266. opts = {};
  10267. }
  10268. assert("JSXAttribute", node, opts);
  10269. }
  10270. function assertJSXClosingElement(node, opts) {
  10271. if (opts === void 0) {
  10272. opts = {};
  10273. }
  10274. assert("JSXClosingElement", node, opts);
  10275. }
  10276. function assertJSXElement(node, opts) {
  10277. if (opts === void 0) {
  10278. opts = {};
  10279. }
  10280. assert("JSXElement", node, opts);
  10281. }
  10282. function assertJSXEmptyExpression(node, opts) {
  10283. if (opts === void 0) {
  10284. opts = {};
  10285. }
  10286. assert("JSXEmptyExpression", node, opts);
  10287. }
  10288. function assertJSXExpressionContainer(node, opts) {
  10289. if (opts === void 0) {
  10290. opts = {};
  10291. }
  10292. assert("JSXExpressionContainer", node, opts);
  10293. }
  10294. function assertJSXSpreadChild(node, opts) {
  10295. if (opts === void 0) {
  10296. opts = {};
  10297. }
  10298. assert("JSXSpreadChild", node, opts);
  10299. }
  10300. function assertJSXIdentifier(node, opts) {
  10301. if (opts === void 0) {
  10302. opts = {};
  10303. }
  10304. assert("JSXIdentifier", node, opts);
  10305. }
  10306. function assertJSXMemberExpression(node, opts) {
  10307. if (opts === void 0) {
  10308. opts = {};
  10309. }
  10310. assert("JSXMemberExpression", node, opts);
  10311. }
  10312. function assertJSXNamespacedName(node, opts) {
  10313. if (opts === void 0) {
  10314. opts = {};
  10315. }
  10316. assert("JSXNamespacedName", node, opts);
  10317. }
  10318. function assertJSXOpeningElement(node, opts) {
  10319. if (opts === void 0) {
  10320. opts = {};
  10321. }
  10322. assert("JSXOpeningElement", node, opts);
  10323. }
  10324. function assertJSXSpreadAttribute(node, opts) {
  10325. if (opts === void 0) {
  10326. opts = {};
  10327. }
  10328. assert("JSXSpreadAttribute", node, opts);
  10329. }
  10330. function assertJSXText(node, opts) {
  10331. if (opts === void 0) {
  10332. opts = {};
  10333. }
  10334. assert("JSXText", node, opts);
  10335. }
  10336. function assertJSXFragment(node, opts) {
  10337. if (opts === void 0) {
  10338. opts = {};
  10339. }
  10340. assert("JSXFragment", node, opts);
  10341. }
  10342. function assertJSXOpeningFragment(node, opts) {
  10343. if (opts === void 0) {
  10344. opts = {};
  10345. }
  10346. assert("JSXOpeningFragment", node, opts);
  10347. }
  10348. function assertJSXClosingFragment(node, opts) {
  10349. if (opts === void 0) {
  10350. opts = {};
  10351. }
  10352. assert("JSXClosingFragment", node, opts);
  10353. }
  10354. function assertNoop(node, opts) {
  10355. if (opts === void 0) {
  10356. opts = {};
  10357. }
  10358. assert("Noop", node, opts);
  10359. }
  10360. function assertPlaceholder(node, opts) {
  10361. if (opts === void 0) {
  10362. opts = {};
  10363. }
  10364. assert("Placeholder", node, opts);
  10365. }
  10366. function assertV8IntrinsicIdentifier(node, opts) {
  10367. if (opts === void 0) {
  10368. opts = {};
  10369. }
  10370. assert("V8IntrinsicIdentifier", node, opts);
  10371. }
  10372. function assertArgumentPlaceholder(node, opts) {
  10373. if (opts === void 0) {
  10374. opts = {};
  10375. }
  10376. assert("ArgumentPlaceholder", node, opts);
  10377. }
  10378. function assertAwaitExpression(node, opts) {
  10379. if (opts === void 0) {
  10380. opts = {};
  10381. }
  10382. assert("AwaitExpression", node, opts);
  10383. }
  10384. function assertBindExpression(node, opts) {
  10385. if (opts === void 0) {
  10386. opts = {};
  10387. }
  10388. assert("BindExpression", node, opts);
  10389. }
  10390. function assertClassProperty(node, opts) {
  10391. if (opts === void 0) {
  10392. opts = {};
  10393. }
  10394. assert("ClassProperty", node, opts);
  10395. }
  10396. function assertOptionalMemberExpression(node, opts) {
  10397. if (opts === void 0) {
  10398. opts = {};
  10399. }
  10400. assert("OptionalMemberExpression", node, opts);
  10401. }
  10402. function assertPipelineTopicExpression(node, opts) {
  10403. if (opts === void 0) {
  10404. opts = {};
  10405. }
  10406. assert("PipelineTopicExpression", node, opts);
  10407. }
  10408. function assertPipelineBareFunction(node, opts) {
  10409. if (opts === void 0) {
  10410. opts = {};
  10411. }
  10412. assert("PipelineBareFunction", node, opts);
  10413. }
  10414. function assertPipelinePrimaryTopicReference(node, opts) {
  10415. if (opts === void 0) {
  10416. opts = {};
  10417. }
  10418. assert("PipelinePrimaryTopicReference", node, opts);
  10419. }
  10420. function assertOptionalCallExpression(node, opts) {
  10421. if (opts === void 0) {
  10422. opts = {};
  10423. }
  10424. assert("OptionalCallExpression", node, opts);
  10425. }
  10426. function assertClassPrivateProperty(node, opts) {
  10427. if (opts === void 0) {
  10428. opts = {};
  10429. }
  10430. assert("ClassPrivateProperty", node, opts);
  10431. }
  10432. function assertClassPrivateMethod(node, opts) {
  10433. if (opts === void 0) {
  10434. opts = {};
  10435. }
  10436. assert("ClassPrivateMethod", node, opts);
  10437. }
  10438. function assertImport(node, opts) {
  10439. if (opts === void 0) {
  10440. opts = {};
  10441. }
  10442. assert("Import", node, opts);
  10443. }
  10444. function assertDecorator(node, opts) {
  10445. if (opts === void 0) {
  10446. opts = {};
  10447. }
  10448. assert("Decorator", node, opts);
  10449. }
  10450. function assertDoExpression(node, opts) {
  10451. if (opts === void 0) {
  10452. opts = {};
  10453. }
  10454. assert("DoExpression", node, opts);
  10455. }
  10456. function assertExportDefaultSpecifier(node, opts) {
  10457. if (opts === void 0) {
  10458. opts = {};
  10459. }
  10460. assert("ExportDefaultSpecifier", node, opts);
  10461. }
  10462. function assertExportNamespaceSpecifier(node, opts) {
  10463. if (opts === void 0) {
  10464. opts = {};
  10465. }
  10466. assert("ExportNamespaceSpecifier", node, opts);
  10467. }
  10468. function assertPrivateName(node, opts) {
  10469. if (opts === void 0) {
  10470. opts = {};
  10471. }
  10472. assert("PrivateName", node, opts);
  10473. }
  10474. function assertBigIntLiteral(node, opts) {
  10475. if (opts === void 0) {
  10476. opts = {};
  10477. }
  10478. assert("BigIntLiteral", node, opts);
  10479. }
  10480. function assertTSParameterProperty(node, opts) {
  10481. if (opts === void 0) {
  10482. opts = {};
  10483. }
  10484. assert("TSParameterProperty", node, opts);
  10485. }
  10486. function assertTSDeclareFunction(node, opts) {
  10487. if (opts === void 0) {
  10488. opts = {};
  10489. }
  10490. assert("TSDeclareFunction", node, opts);
  10491. }
  10492. function assertTSDeclareMethod(node, opts) {
  10493. if (opts === void 0) {
  10494. opts = {};
  10495. }
  10496. assert("TSDeclareMethod", node, opts);
  10497. }
  10498. function assertTSQualifiedName(node, opts) {
  10499. if (opts === void 0) {
  10500. opts = {};
  10501. }
  10502. assert("TSQualifiedName", node, opts);
  10503. }
  10504. function assertTSCallSignatureDeclaration(node, opts) {
  10505. if (opts === void 0) {
  10506. opts = {};
  10507. }
  10508. assert("TSCallSignatureDeclaration", node, opts);
  10509. }
  10510. function assertTSConstructSignatureDeclaration(node, opts) {
  10511. if (opts === void 0) {
  10512. opts = {};
  10513. }
  10514. assert("TSConstructSignatureDeclaration", node, opts);
  10515. }
  10516. function assertTSPropertySignature(node, opts) {
  10517. if (opts === void 0) {
  10518. opts = {};
  10519. }
  10520. assert("TSPropertySignature", node, opts);
  10521. }
  10522. function assertTSMethodSignature(node, opts) {
  10523. if (opts === void 0) {
  10524. opts = {};
  10525. }
  10526. assert("TSMethodSignature", node, opts);
  10527. }
  10528. function assertTSIndexSignature(node, opts) {
  10529. if (opts === void 0) {
  10530. opts = {};
  10531. }
  10532. assert("TSIndexSignature", node, opts);
  10533. }
  10534. function assertTSAnyKeyword(node, opts) {
  10535. if (opts === void 0) {
  10536. opts = {};
  10537. }
  10538. assert("TSAnyKeyword", node, opts);
  10539. }
  10540. function assertTSBooleanKeyword(node, opts) {
  10541. if (opts === void 0) {
  10542. opts = {};
  10543. }
  10544. assert("TSBooleanKeyword", node, opts);
  10545. }
  10546. function assertTSBigIntKeyword(node, opts) {
  10547. if (opts === void 0) {
  10548. opts = {};
  10549. }
  10550. assert("TSBigIntKeyword", node, opts);
  10551. }
  10552. function assertTSNeverKeyword(node, opts) {
  10553. if (opts === void 0) {
  10554. opts = {};
  10555. }
  10556. assert("TSNeverKeyword", node, opts);
  10557. }
  10558. function assertTSNullKeyword(node, opts) {
  10559. if (opts === void 0) {
  10560. opts = {};
  10561. }
  10562. assert("TSNullKeyword", node, opts);
  10563. }
  10564. function assertTSNumberKeyword(node, opts) {
  10565. if (opts === void 0) {
  10566. opts = {};
  10567. }
  10568. assert("TSNumberKeyword", node, opts);
  10569. }
  10570. function assertTSObjectKeyword(node, opts) {
  10571. if (opts === void 0) {
  10572. opts = {};
  10573. }
  10574. assert("TSObjectKeyword", node, opts);
  10575. }
  10576. function assertTSStringKeyword(node, opts) {
  10577. if (opts === void 0) {
  10578. opts = {};
  10579. }
  10580. assert("TSStringKeyword", node, opts);
  10581. }
  10582. function assertTSSymbolKeyword(node, opts) {
  10583. if (opts === void 0) {
  10584. opts = {};
  10585. }
  10586. assert("TSSymbolKeyword", node, opts);
  10587. }
  10588. function assertTSUndefinedKeyword(node, opts) {
  10589. if (opts === void 0) {
  10590. opts = {};
  10591. }
  10592. assert("TSUndefinedKeyword", node, opts);
  10593. }
  10594. function assertTSUnknownKeyword(node, opts) {
  10595. if (opts === void 0) {
  10596. opts = {};
  10597. }
  10598. assert("TSUnknownKeyword", node, opts);
  10599. }
  10600. function assertTSVoidKeyword(node, opts) {
  10601. if (opts === void 0) {
  10602. opts = {};
  10603. }
  10604. assert("TSVoidKeyword", node, opts);
  10605. }
  10606. function assertTSThisType(node, opts) {
  10607. if (opts === void 0) {
  10608. opts = {};
  10609. }
  10610. assert("TSThisType", node, opts);
  10611. }
  10612. function assertTSFunctionType(node, opts) {
  10613. if (opts === void 0) {
  10614. opts = {};
  10615. }
  10616. assert("TSFunctionType", node, opts);
  10617. }
  10618. function assertTSConstructorType(node, opts) {
  10619. if (opts === void 0) {
  10620. opts = {};
  10621. }
  10622. assert("TSConstructorType", node, opts);
  10623. }
  10624. function assertTSTypeReference(node, opts) {
  10625. if (opts === void 0) {
  10626. opts = {};
  10627. }
  10628. assert("TSTypeReference", node, opts);
  10629. }
  10630. function assertTSTypePredicate(node, opts) {
  10631. if (opts === void 0) {
  10632. opts = {};
  10633. }
  10634. assert("TSTypePredicate", node, opts);
  10635. }
  10636. function assertTSTypeQuery(node, opts) {
  10637. if (opts === void 0) {
  10638. opts = {};
  10639. }
  10640. assert("TSTypeQuery", node, opts);
  10641. }
  10642. function assertTSTypeLiteral(node, opts) {
  10643. if (opts === void 0) {
  10644. opts = {};
  10645. }
  10646. assert("TSTypeLiteral", node, opts);
  10647. }
  10648. function assertTSArrayType(node, opts) {
  10649. if (opts === void 0) {
  10650. opts = {};
  10651. }
  10652. assert("TSArrayType", node, opts);
  10653. }
  10654. function assertTSTupleType(node, opts) {
  10655. if (opts === void 0) {
  10656. opts = {};
  10657. }
  10658. assert("TSTupleType", node, opts);
  10659. }
  10660. function assertTSOptionalType(node, opts) {
  10661. if (opts === void 0) {
  10662. opts = {};
  10663. }
  10664. assert("TSOptionalType", node, opts);
  10665. }
  10666. function assertTSRestType(node, opts) {
  10667. if (opts === void 0) {
  10668. opts = {};
  10669. }
  10670. assert("TSRestType", node, opts);
  10671. }
  10672. function assertTSUnionType(node, opts) {
  10673. if (opts === void 0) {
  10674. opts = {};
  10675. }
  10676. assert("TSUnionType", node, opts);
  10677. }
  10678. function assertTSIntersectionType(node, opts) {
  10679. if (opts === void 0) {
  10680. opts = {};
  10681. }
  10682. assert("TSIntersectionType", node, opts);
  10683. }
  10684. function assertTSConditionalType(node, opts) {
  10685. if (opts === void 0) {
  10686. opts = {};
  10687. }
  10688. assert("TSConditionalType", node, opts);
  10689. }
  10690. function assertTSInferType(node, opts) {
  10691. if (opts === void 0) {
  10692. opts = {};
  10693. }
  10694. assert("TSInferType", node, opts);
  10695. }
  10696. function assertTSParenthesizedType(node, opts) {
  10697. if (opts === void 0) {
  10698. opts = {};
  10699. }
  10700. assert("TSParenthesizedType", node, opts);
  10701. }
  10702. function assertTSTypeOperator(node, opts) {
  10703. if (opts === void 0) {
  10704. opts = {};
  10705. }
  10706. assert("TSTypeOperator", node, opts);
  10707. }
  10708. function assertTSIndexedAccessType(node, opts) {
  10709. if (opts === void 0) {
  10710. opts = {};
  10711. }
  10712. assert("TSIndexedAccessType", node, opts);
  10713. }
  10714. function assertTSMappedType(node, opts) {
  10715. if (opts === void 0) {
  10716. opts = {};
  10717. }
  10718. assert("TSMappedType", node, opts);
  10719. }
  10720. function assertTSLiteralType(node, opts) {
  10721. if (opts === void 0) {
  10722. opts = {};
  10723. }
  10724. assert("TSLiteralType", node, opts);
  10725. }
  10726. function assertTSExpressionWithTypeArguments(node, opts) {
  10727. if (opts === void 0) {
  10728. opts = {};
  10729. }
  10730. assert("TSExpressionWithTypeArguments", node, opts);
  10731. }
  10732. function assertTSInterfaceDeclaration(node, opts) {
  10733. if (opts === void 0) {
  10734. opts = {};
  10735. }
  10736. assert("TSInterfaceDeclaration", node, opts);
  10737. }
  10738. function assertTSInterfaceBody(node, opts) {
  10739. if (opts === void 0) {
  10740. opts = {};
  10741. }
  10742. assert("TSInterfaceBody", node, opts);
  10743. }
  10744. function assertTSTypeAliasDeclaration(node, opts) {
  10745. if (opts === void 0) {
  10746. opts = {};
  10747. }
  10748. assert("TSTypeAliasDeclaration", node, opts);
  10749. }
  10750. function assertTSAsExpression(node, opts) {
  10751. if (opts === void 0) {
  10752. opts = {};
  10753. }
  10754. assert("TSAsExpression", node, opts);
  10755. }
  10756. function assertTSTypeAssertion(node, opts) {
  10757. if (opts === void 0) {
  10758. opts = {};
  10759. }
  10760. assert("TSTypeAssertion", node, opts);
  10761. }
  10762. function assertTSEnumDeclaration(node, opts) {
  10763. if (opts === void 0) {
  10764. opts = {};
  10765. }
  10766. assert("TSEnumDeclaration", node, opts);
  10767. }
  10768. function assertTSEnumMember(node, opts) {
  10769. if (opts === void 0) {
  10770. opts = {};
  10771. }
  10772. assert("TSEnumMember", node, opts);
  10773. }
  10774. function assertTSModuleDeclaration(node, opts) {
  10775. if (opts === void 0) {
  10776. opts = {};
  10777. }
  10778. assert("TSModuleDeclaration", node, opts);
  10779. }
  10780. function assertTSModuleBlock(node, opts) {
  10781. if (opts === void 0) {
  10782. opts = {};
  10783. }
  10784. assert("TSModuleBlock", node, opts);
  10785. }
  10786. function assertTSImportType(node, opts) {
  10787. if (opts === void 0) {
  10788. opts = {};
  10789. }
  10790. assert("TSImportType", node, opts);
  10791. }
  10792. function assertTSImportEqualsDeclaration(node, opts) {
  10793. if (opts === void 0) {
  10794. opts = {};
  10795. }
  10796. assert("TSImportEqualsDeclaration", node, opts);
  10797. }
  10798. function assertTSExternalModuleReference(node, opts) {
  10799. if (opts === void 0) {
  10800. opts = {};
  10801. }
  10802. assert("TSExternalModuleReference", node, opts);
  10803. }
  10804. function assertTSNonNullExpression(node, opts) {
  10805. if (opts === void 0) {
  10806. opts = {};
  10807. }
  10808. assert("TSNonNullExpression", node, opts);
  10809. }
  10810. function assertTSExportAssignment(node, opts) {
  10811. if (opts === void 0) {
  10812. opts = {};
  10813. }
  10814. assert("TSExportAssignment", node, opts);
  10815. }
  10816. function assertTSNamespaceExportDeclaration(node, opts) {
  10817. if (opts === void 0) {
  10818. opts = {};
  10819. }
  10820. assert("TSNamespaceExportDeclaration", node, opts);
  10821. }
  10822. function assertTSTypeAnnotation(node, opts) {
  10823. if (opts === void 0) {
  10824. opts = {};
  10825. }
  10826. assert("TSTypeAnnotation", node, opts);
  10827. }
  10828. function assertTSTypeParameterInstantiation(node, opts) {
  10829. if (opts === void 0) {
  10830. opts = {};
  10831. }
  10832. assert("TSTypeParameterInstantiation", node, opts);
  10833. }
  10834. function assertTSTypeParameterDeclaration(node, opts) {
  10835. if (opts === void 0) {
  10836. opts = {};
  10837. }
  10838. assert("TSTypeParameterDeclaration", node, opts);
  10839. }
  10840. function assertTSTypeParameter(node, opts) {
  10841. if (opts === void 0) {
  10842. opts = {};
  10843. }
  10844. assert("TSTypeParameter", node, opts);
  10845. }
  10846. function assertExpression(node, opts) {
  10847. if (opts === void 0) {
  10848. opts = {};
  10849. }
  10850. assert("Expression", node, opts);
  10851. }
  10852. function assertBinary(node, opts) {
  10853. if (opts === void 0) {
  10854. opts = {};
  10855. }
  10856. assert("Binary", node, opts);
  10857. }
  10858. function assertScopable(node, opts) {
  10859. if (opts === void 0) {
  10860. opts = {};
  10861. }
  10862. assert("Scopable", node, opts);
  10863. }
  10864. function assertBlockParent(node, opts) {
  10865. if (opts === void 0) {
  10866. opts = {};
  10867. }
  10868. assert("BlockParent", node, opts);
  10869. }
  10870. function assertBlock(node, opts) {
  10871. if (opts === void 0) {
  10872. opts = {};
  10873. }
  10874. assert("Block", node, opts);
  10875. }
  10876. function assertStatement(node, opts) {
  10877. if (opts === void 0) {
  10878. opts = {};
  10879. }
  10880. assert("Statement", node, opts);
  10881. }
  10882. function assertTerminatorless(node, opts) {
  10883. if (opts === void 0) {
  10884. opts = {};
  10885. }
  10886. assert("Terminatorless", node, opts);
  10887. }
  10888. function assertCompletionStatement(node, opts) {
  10889. if (opts === void 0) {
  10890. opts = {};
  10891. }
  10892. assert("CompletionStatement", node, opts);
  10893. }
  10894. function assertConditional(node, opts) {
  10895. if (opts === void 0) {
  10896. opts = {};
  10897. }
  10898. assert("Conditional", node, opts);
  10899. }
  10900. function assertLoop(node, opts) {
  10901. if (opts === void 0) {
  10902. opts = {};
  10903. }
  10904. assert("Loop", node, opts);
  10905. }
  10906. function assertWhile(node, opts) {
  10907. if (opts === void 0) {
  10908. opts = {};
  10909. }
  10910. assert("While", node, opts);
  10911. }
  10912. function assertExpressionWrapper(node, opts) {
  10913. if (opts === void 0) {
  10914. opts = {};
  10915. }
  10916. assert("ExpressionWrapper", node, opts);
  10917. }
  10918. function assertFor(node, opts) {
  10919. if (opts === void 0) {
  10920. opts = {};
  10921. }
  10922. assert("For", node, opts);
  10923. }
  10924. function assertForXStatement(node, opts) {
  10925. if (opts === void 0) {
  10926. opts = {};
  10927. }
  10928. assert("ForXStatement", node, opts);
  10929. }
  10930. function assertFunction(node, opts) {
  10931. if (opts === void 0) {
  10932. opts = {};
  10933. }
  10934. assert("Function", node, opts);
  10935. }
  10936. function assertFunctionParent(node, opts) {
  10937. if (opts === void 0) {
  10938. opts = {};
  10939. }
  10940. assert("FunctionParent", node, opts);
  10941. }
  10942. function assertPureish(node, opts) {
  10943. if (opts === void 0) {
  10944. opts = {};
  10945. }
  10946. assert("Pureish", node, opts);
  10947. }
  10948. function assertDeclaration(node, opts) {
  10949. if (opts === void 0) {
  10950. opts = {};
  10951. }
  10952. assert("Declaration", node, opts);
  10953. }
  10954. function assertPatternLike(node, opts) {
  10955. if (opts === void 0) {
  10956. opts = {};
  10957. }
  10958. assert("PatternLike", node, opts);
  10959. }
  10960. function assertLVal(node, opts) {
  10961. if (opts === void 0) {
  10962. opts = {};
  10963. }
  10964. assert("LVal", node, opts);
  10965. }
  10966. function assertTSEntityName(node, opts) {
  10967. if (opts === void 0) {
  10968. opts = {};
  10969. }
  10970. assert("TSEntityName", node, opts);
  10971. }
  10972. function assertLiteral(node, opts) {
  10973. if (opts === void 0) {
  10974. opts = {};
  10975. }
  10976. assert("Literal", node, opts);
  10977. }
  10978. function assertImmutable(node, opts) {
  10979. if (opts === void 0) {
  10980. opts = {};
  10981. }
  10982. assert("Immutable", node, opts);
  10983. }
  10984. function assertUserWhitespacable(node, opts) {
  10985. if (opts === void 0) {
  10986. opts = {};
  10987. }
  10988. assert("UserWhitespacable", node, opts);
  10989. }
  10990. function assertMethod(node, opts) {
  10991. if (opts === void 0) {
  10992. opts = {};
  10993. }
  10994. assert("Method", node, opts);
  10995. }
  10996. function assertObjectMember(node, opts) {
  10997. if (opts === void 0) {
  10998. opts = {};
  10999. }
  11000. assert("ObjectMember", node, opts);
  11001. }
  11002. function assertProperty(node, opts) {
  11003. if (opts === void 0) {
  11004. opts = {};
  11005. }
  11006. assert("Property", node, opts);
  11007. }
  11008. function assertUnaryLike(node, opts) {
  11009. if (opts === void 0) {
  11010. opts = {};
  11011. }
  11012. assert("UnaryLike", node, opts);
  11013. }
  11014. function assertPattern(node, opts) {
  11015. if (opts === void 0) {
  11016. opts = {};
  11017. }
  11018. assert("Pattern", node, opts);
  11019. }
  11020. function assertClass(node, opts) {
  11021. if (opts === void 0) {
  11022. opts = {};
  11023. }
  11024. assert("Class", node, opts);
  11025. }
  11026. function assertModuleDeclaration(node, opts) {
  11027. if (opts === void 0) {
  11028. opts = {};
  11029. }
  11030. assert("ModuleDeclaration", node, opts);
  11031. }
  11032. function assertExportDeclaration(node, opts) {
  11033. if (opts === void 0) {
  11034. opts = {};
  11035. }
  11036. assert("ExportDeclaration", node, opts);
  11037. }
  11038. function assertModuleSpecifier(node, opts) {
  11039. if (opts === void 0) {
  11040. opts = {};
  11041. }
  11042. assert("ModuleSpecifier", node, opts);
  11043. }
  11044. function assertFlow(node, opts) {
  11045. if (opts === void 0) {
  11046. opts = {};
  11047. }
  11048. assert("Flow", node, opts);
  11049. }
  11050. function assertFlowType(node, opts) {
  11051. if (opts === void 0) {
  11052. opts = {};
  11053. }
  11054. assert("FlowType", node, opts);
  11055. }
  11056. function assertFlowBaseAnnotation(node, opts) {
  11057. if (opts === void 0) {
  11058. opts = {};
  11059. }
  11060. assert("FlowBaseAnnotation", node, opts);
  11061. }
  11062. function assertFlowDeclaration(node, opts) {
  11063. if (opts === void 0) {
  11064. opts = {};
  11065. }
  11066. assert("FlowDeclaration", node, opts);
  11067. }
  11068. function assertFlowPredicate(node, opts) {
  11069. if (opts === void 0) {
  11070. opts = {};
  11071. }
  11072. assert("FlowPredicate", node, opts);
  11073. }
  11074. function assertEnumBody(node, opts) {
  11075. if (opts === void 0) {
  11076. opts = {};
  11077. }
  11078. assert("EnumBody", node, opts);
  11079. }
  11080. function assertEnumMember(node, opts) {
  11081. if (opts === void 0) {
  11082. opts = {};
  11083. }
  11084. assert("EnumMember", node, opts);
  11085. }
  11086. function assertJSX(node, opts) {
  11087. if (opts === void 0) {
  11088. opts = {};
  11089. }
  11090. assert("JSX", node, opts);
  11091. }
  11092. function assertPrivate(node, opts) {
  11093. if (opts === void 0) {
  11094. opts = {};
  11095. }
  11096. assert("Private", node, opts);
  11097. }
  11098. function assertTSTypeElement(node, opts) {
  11099. if (opts === void 0) {
  11100. opts = {};
  11101. }
  11102. assert("TSTypeElement", node, opts);
  11103. }
  11104. function assertTSType(node, opts) {
  11105. if (opts === void 0) {
  11106. opts = {};
  11107. }
  11108. assert("TSType", node, opts);
  11109. }
  11110. function assertNumberLiteral(node, opts) {
  11111. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  11112. assert("NumberLiteral", node, opts);
  11113. }
  11114. function assertRegexLiteral(node, opts) {
  11115. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  11116. assert("RegexLiteral", node, opts);
  11117. }
  11118. function assertRestProperty(node, opts) {
  11119. console.trace("The node type RestProperty has been renamed to RestElement");
  11120. assert("RestProperty", node, opts);
  11121. }
  11122. function assertSpreadProperty(node, opts) {
  11123. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  11124. assert("SpreadProperty", node, opts);
  11125. }
  11126. function createTypeAnnotationBasedOnTypeof(type) {
  11127. if (type === "string") {
  11128. return StringTypeAnnotation();
  11129. } else if (type === "number") {
  11130. return NumberTypeAnnotation();
  11131. } else if (type === "undefined") {
  11132. return VoidTypeAnnotation();
  11133. } else if (type === "boolean") {
  11134. return BooleanTypeAnnotation();
  11135. } else if (type === "function") {
  11136. return GenericTypeAnnotation(Identifier("Function"));
  11137. } else if (type === "object") {
  11138. return GenericTypeAnnotation(Identifier("Object"));
  11139. } else if (type === "symbol") {
  11140. return GenericTypeAnnotation(Identifier("Symbol"));
  11141. } else {
  11142. throw new Error("Invalid typeof value");
  11143. }
  11144. }
  11145. function removeTypeDuplicates(nodes) {
  11146. var generics = {};
  11147. var bases = {};
  11148. var typeGroups = [];
  11149. var types = [];
  11150. for (var i = 0; i < nodes.length; i++) {
  11151. var node = nodes[i];
  11152. if (!node) continue;
  11153. if (types.indexOf(node) >= 0) {
  11154. continue;
  11155. }
  11156. if (isAnyTypeAnnotation(node)) {
  11157. return [node];
  11158. }
  11159. if (isFlowBaseAnnotation(node)) {
  11160. bases[node.type] = node;
  11161. continue;
  11162. }
  11163. if (isUnionTypeAnnotation(node)) {
  11164. if (typeGroups.indexOf(node.types) < 0) {
  11165. nodes = nodes.concat(node.types);
  11166. typeGroups.push(node.types);
  11167. }
  11168. continue;
  11169. }
  11170. if (isGenericTypeAnnotation(node)) {
  11171. var name = node.id.name;
  11172. if (generics[name]) {
  11173. var existing = generics[name];
  11174. if (existing.typeParameters) {
  11175. if (node.typeParameters) {
  11176. existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params));
  11177. }
  11178. } else {
  11179. existing = node.typeParameters;
  11180. }
  11181. } else {
  11182. generics[name] = node;
  11183. }
  11184. continue;
  11185. }
  11186. types.push(node);
  11187. }
  11188. for (var _i = 0, _Object$keys = Object.keys(bases); _i < _Object$keys.length; _i++) {
  11189. var type = _Object$keys[_i];
  11190. types.push(bases[type]);
  11191. }
  11192. for (var _i2 = 0, _Object$keys2 = Object.keys(generics); _i2 < _Object$keys2.length; _i2++) {
  11193. var _name = _Object$keys2[_i2];
  11194. types.push(generics[_name]);
  11195. }
  11196. return types;
  11197. }
  11198. function createUnionTypeAnnotation(types) {
  11199. var flattened = removeTypeDuplicates(types);
  11200. if (flattened.length === 1) {
  11201. return flattened[0];
  11202. } else {
  11203. return UnionTypeAnnotation(flattened);
  11204. }
  11205. }
  11206. var has = Function.call.bind(Object.prototype.hasOwnProperty);
  11207. function cloneIfNode(obj, deep) {
  11208. if (obj && typeof obj.type === "string" && obj.type !== "CommentLine" && obj.type !== "CommentBlock") {
  11209. return cloneNode(obj, deep);
  11210. }
  11211. return obj;
  11212. }
  11213. function cloneIfNodeOrArray(obj, deep) {
  11214. if (Array.isArray(obj)) {
  11215. return obj.map(function (node) {
  11216. return cloneIfNode(node, deep);
  11217. });
  11218. }
  11219. return cloneIfNode(obj, deep);
  11220. }
  11221. function cloneNode(node, deep) {
  11222. if (deep === void 0) {
  11223. deep = true;
  11224. }
  11225. if (!node) return node;
  11226. var type = node.type;
  11227. var newNode = {
  11228. type: type
  11229. };
  11230. if (type === "Identifier") {
  11231. newNode.name = node.name;
  11232. if (has(node, "optional") && typeof node.optional === "boolean") {
  11233. newNode.optional = node.optional;
  11234. }
  11235. if (has(node, "typeAnnotation")) {
  11236. newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true) : node.typeAnnotation;
  11237. }
  11238. } else if (!has(NODE_FIELDS, type)) {
  11239. throw new Error("Unknown node type: \"" + type + "\"");
  11240. } else {
  11241. for (var _i = 0, _Object$keys = Object.keys(NODE_FIELDS[type]); _i < _Object$keys.length; _i++) {
  11242. var field = _Object$keys[_i];
  11243. if (has(node, field)) {
  11244. newNode[field] = deep ? cloneIfNodeOrArray(node[field], true) : node[field];
  11245. }
  11246. }
  11247. }
  11248. if (has(node, "loc")) {
  11249. newNode.loc = node.loc;
  11250. }
  11251. if (has(node, "leadingComments")) {
  11252. newNode.leadingComments = node.leadingComments;
  11253. }
  11254. if (has(node, "innerComments")) {
  11255. newNode.innerComments = node.innerComments;
  11256. }
  11257. if (has(node, "trailingComments")) {
  11258. newNode.trailingComments = node.trailingComments;
  11259. }
  11260. if (has(node, "extra")) {
  11261. newNode.extra = Object.assign({}, node.extra);
  11262. }
  11263. return newNode;
  11264. }
  11265. function clone$1(node) {
  11266. return cloneNode(node, false);
  11267. }
  11268. function cloneDeep(node) {
  11269. return cloneNode(node);
  11270. }
  11271. function cloneWithoutLoc(node) {
  11272. var newNode = clone$1(node);
  11273. newNode.loc = null;
  11274. return newNode;
  11275. }
  11276. function addComments(node, type, comments) {
  11277. if (!comments || !node) return node;
  11278. var key = type + "Comments";
  11279. if (node[key]) {
  11280. if (type === "leading") {
  11281. node[key] = comments.concat(node[key]);
  11282. } else {
  11283. node[key] = node[key].concat(comments);
  11284. }
  11285. } else {
  11286. node[key] = comments;
  11287. }
  11288. return node;
  11289. }
  11290. function addComment(node, type, content, line) {
  11291. return addComments(node, type, [{
  11292. type: line ? "CommentLine" : "CommentBlock",
  11293. value: content
  11294. }]);
  11295. }
  11296. var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
  11297. function setCacheAdd(value) {
  11298. this.__data__.set(value, HASH_UNDEFINED$2);
  11299. return this;
  11300. }
  11301. var _setCacheAdd = setCacheAdd;
  11302. function setCacheHas(value) {
  11303. return this.__data__.has(value);
  11304. }
  11305. var _setCacheHas = setCacheHas;
  11306. function SetCache(values) {
  11307. var index = -1,
  11308. length = values == null ? 0 : values.length;
  11309. this.__data__ = new _MapCache();
  11310. while (++index < length) {
  11311. this.add(values[index]);
  11312. }
  11313. }
  11314. SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd;
  11315. SetCache.prototype.has = _setCacheHas;
  11316. var _SetCache = SetCache;
  11317. function baseFindIndex(array, predicate, fromIndex, fromRight) {
  11318. var length = array.length,
  11319. index = fromIndex + (fromRight ? 1 : -1);
  11320. while (fromRight ? index-- : ++index < length) {
  11321. if (predicate(array[index], index, array)) {
  11322. return index;
  11323. }
  11324. }
  11325. return -1;
  11326. }
  11327. var _baseFindIndex = baseFindIndex;
  11328. function baseIsNaN(value) {
  11329. return value !== value;
  11330. }
  11331. var _baseIsNaN = baseIsNaN;
  11332. function strictIndexOf(array, value, fromIndex) {
  11333. var index = fromIndex - 1,
  11334. length = array.length;
  11335. while (++index < length) {
  11336. if (array[index] === value) {
  11337. return index;
  11338. }
  11339. }
  11340. return -1;
  11341. }
  11342. var _strictIndexOf = strictIndexOf;
  11343. function baseIndexOf(array, value, fromIndex) {
  11344. return value === value ? _strictIndexOf(array, value, fromIndex) : _baseFindIndex(array, _baseIsNaN, fromIndex);
  11345. }
  11346. var _baseIndexOf = baseIndexOf;
  11347. function arrayIncludes(array, value) {
  11348. var length = array == null ? 0 : array.length;
  11349. return !!length && _baseIndexOf(array, value, 0) > -1;
  11350. }
  11351. var _arrayIncludes = arrayIncludes;
  11352. function arrayIncludesWith(array, value, comparator) {
  11353. var index = -1,
  11354. length = array == null ? 0 : array.length;
  11355. while (++index < length) {
  11356. if (comparator(value, array[index])) {
  11357. return true;
  11358. }
  11359. }
  11360. return false;
  11361. }
  11362. var _arrayIncludesWith = arrayIncludesWith;
  11363. function cacheHas(cache, key) {
  11364. return cache.has(key);
  11365. }
  11366. var _cacheHas = cacheHas;
  11367. function noop$1() {}
  11368. var noop_1 = noop$1;
  11369. function setToArray(set) {
  11370. var index = -1,
  11371. result = Array(set.size);
  11372. set.forEach(function (value) {
  11373. result[++index] = value;
  11374. });
  11375. return result;
  11376. }
  11377. var _setToArray = setToArray;
  11378. var INFINITY = 1 / 0;
  11379. var createSet = !(_Set && 1 / _setToArray(new _Set([, -0]))[1] == INFINITY) ? noop_1 : function (values) {
  11380. return new _Set(values);
  11381. };
  11382. var _createSet = createSet;
  11383. var LARGE_ARRAY_SIZE$1 = 200;
  11384. function baseUniq(array, iteratee, comparator) {
  11385. var index = -1,
  11386. includes = _arrayIncludes,
  11387. length = array.length,
  11388. isCommon = true,
  11389. result = [],
  11390. seen = result;
  11391. if (comparator) {
  11392. isCommon = false;
  11393. includes = _arrayIncludesWith;
  11394. } else if (length >= LARGE_ARRAY_SIZE$1) {
  11395. var set = iteratee ? null : _createSet(array);
  11396. if (set) {
  11397. return _setToArray(set);
  11398. }
  11399. isCommon = false;
  11400. includes = _cacheHas;
  11401. seen = new _SetCache();
  11402. } else {
  11403. seen = iteratee ? [] : result;
  11404. }
  11405. outer: while (++index < length) {
  11406. var value = array[index],
  11407. computed = iteratee ? iteratee(value) : value;
  11408. value = comparator || value !== 0 ? value : 0;
  11409. if (isCommon && computed === computed) {
  11410. var seenIndex = seen.length;
  11411. while (seenIndex--) {
  11412. if (seen[seenIndex] === computed) {
  11413. continue outer;
  11414. }
  11415. }
  11416. if (iteratee) {
  11417. seen.push(computed);
  11418. }
  11419. result.push(value);
  11420. } else if (!includes(seen, computed, comparator)) {
  11421. if (seen !== result) {
  11422. seen.push(computed);
  11423. }
  11424. result.push(value);
  11425. }
  11426. }
  11427. return result;
  11428. }
  11429. var _baseUniq = baseUniq;
  11430. function uniq(array) {
  11431. return array && array.length ? _baseUniq(array) : [];
  11432. }
  11433. var uniq_1 = uniq;
  11434. function inherit(key, child, parent) {
  11435. if (child && parent) {
  11436. child[key] = uniq_1([].concat(child[key], parent[key]).filter(Boolean));
  11437. }
  11438. }
  11439. function inheritInnerComments(child, parent) {
  11440. inherit("innerComments", child, parent);
  11441. }
  11442. function inheritLeadingComments(child, parent) {
  11443. inherit("leadingComments", child, parent);
  11444. }
  11445. function inheritTrailingComments(child, parent) {
  11446. inherit("trailingComments", child, parent);
  11447. }
  11448. function inheritsComments(child, parent) {
  11449. inheritTrailingComments(child, parent);
  11450. inheritLeadingComments(child, parent);
  11451. inheritInnerComments(child, parent);
  11452. return child;
  11453. }
  11454. function removeComments(node) {
  11455. COMMENT_KEYS.forEach(function (key) {
  11456. node[key] = null;
  11457. });
  11458. return node;
  11459. }
  11460. var EXPRESSION_TYPES = FLIPPED_ALIAS_KEYS["Expression"];
  11461. var BINARY_TYPES = FLIPPED_ALIAS_KEYS["Binary"];
  11462. var SCOPABLE_TYPES = FLIPPED_ALIAS_KEYS["Scopable"];
  11463. var BLOCKPARENT_TYPES = FLIPPED_ALIAS_KEYS["BlockParent"];
  11464. var BLOCK_TYPES = FLIPPED_ALIAS_KEYS["Block"];
  11465. var STATEMENT_TYPES = FLIPPED_ALIAS_KEYS["Statement"];
  11466. var TERMINATORLESS_TYPES = FLIPPED_ALIAS_KEYS["Terminatorless"];
  11467. var COMPLETIONSTATEMENT_TYPES = FLIPPED_ALIAS_KEYS["CompletionStatement"];
  11468. var CONDITIONAL_TYPES = FLIPPED_ALIAS_KEYS["Conditional"];
  11469. var LOOP_TYPES = FLIPPED_ALIAS_KEYS["Loop"];
  11470. var WHILE_TYPES = FLIPPED_ALIAS_KEYS["While"];
  11471. var EXPRESSIONWRAPPER_TYPES = FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
  11472. var FOR_TYPES = FLIPPED_ALIAS_KEYS["For"];
  11473. var FORXSTATEMENT_TYPES = FLIPPED_ALIAS_KEYS["ForXStatement"];
  11474. var FUNCTION_TYPES = FLIPPED_ALIAS_KEYS["Function"];
  11475. var FUNCTIONPARENT_TYPES = FLIPPED_ALIAS_KEYS["FunctionParent"];
  11476. var PUREISH_TYPES = FLIPPED_ALIAS_KEYS["Pureish"];
  11477. var DECLARATION_TYPES = FLIPPED_ALIAS_KEYS["Declaration"];
  11478. var PATTERNLIKE_TYPES = FLIPPED_ALIAS_KEYS["PatternLike"];
  11479. var LVAL_TYPES = FLIPPED_ALIAS_KEYS["LVal"];
  11480. var TSENTITYNAME_TYPES = FLIPPED_ALIAS_KEYS["TSEntityName"];
  11481. var LITERAL_TYPES = FLIPPED_ALIAS_KEYS["Literal"];
  11482. var IMMUTABLE_TYPES = FLIPPED_ALIAS_KEYS["Immutable"];
  11483. var USERWHITESPACABLE_TYPES = FLIPPED_ALIAS_KEYS["UserWhitespacable"];
  11484. var METHOD_TYPES = FLIPPED_ALIAS_KEYS["Method"];
  11485. var OBJECTMEMBER_TYPES = FLIPPED_ALIAS_KEYS["ObjectMember"];
  11486. var PROPERTY_TYPES = FLIPPED_ALIAS_KEYS["Property"];
  11487. var UNARYLIKE_TYPES = FLIPPED_ALIAS_KEYS["UnaryLike"];
  11488. var PATTERN_TYPES = FLIPPED_ALIAS_KEYS["Pattern"];
  11489. var CLASS_TYPES = FLIPPED_ALIAS_KEYS["Class"];
  11490. var MODULEDECLARATION_TYPES = FLIPPED_ALIAS_KEYS["ModuleDeclaration"];
  11491. var EXPORTDECLARATION_TYPES = FLIPPED_ALIAS_KEYS["ExportDeclaration"];
  11492. var MODULESPECIFIER_TYPES = FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
  11493. var FLOW_TYPES = FLIPPED_ALIAS_KEYS["Flow"];
  11494. var FLOWTYPE_TYPES = FLIPPED_ALIAS_KEYS["FlowType"];
  11495. var FLOWBASEANNOTATION_TYPES = FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
  11496. var FLOWDECLARATION_TYPES = FLIPPED_ALIAS_KEYS["FlowDeclaration"];
  11497. var FLOWPREDICATE_TYPES = FLIPPED_ALIAS_KEYS["FlowPredicate"];
  11498. var ENUMBODY_TYPES = FLIPPED_ALIAS_KEYS["EnumBody"];
  11499. var ENUMMEMBER_TYPES = FLIPPED_ALIAS_KEYS["EnumMember"];
  11500. var JSX_TYPES = FLIPPED_ALIAS_KEYS["JSX"];
  11501. var PRIVATE_TYPES = FLIPPED_ALIAS_KEYS["Private"];
  11502. var TSTYPEELEMENT_TYPES = FLIPPED_ALIAS_KEYS["TSTypeElement"];
  11503. var TSTYPE_TYPES = FLIPPED_ALIAS_KEYS["TSType"];
  11504. function toBlock(node, parent) {
  11505. if (isBlockStatement(node)) {
  11506. return node;
  11507. }
  11508. var blockNodes = [];
  11509. if (isEmptyStatement(node)) {
  11510. blockNodes = [];
  11511. } else {
  11512. if (!isStatement(node)) {
  11513. if (isFunction(parent)) {
  11514. node = ReturnStatement(node);
  11515. } else {
  11516. node = ExpressionStatement(node);
  11517. }
  11518. }
  11519. blockNodes = [node];
  11520. }
  11521. return BlockStatement(blockNodes);
  11522. }
  11523. function ensureBlock(node, key) {
  11524. if (key === void 0) {
  11525. key = "body";
  11526. }
  11527. return node[key] = toBlock(node[key], node);
  11528. }
  11529. function isValidIdentifier(name, reserved) {
  11530. if (reserved === void 0) {
  11531. reserved = true;
  11532. }
  11533. if (typeof name !== "string") return false;
  11534. if (reserved) {
  11535. if (utils.keyword.isReservedWordES6(name, true)) {
  11536. return false;
  11537. } else if (name === "await") {
  11538. return false;
  11539. }
  11540. }
  11541. return utils.keyword.isIdentifierNameES6(name);
  11542. }
  11543. function toIdentifier(name) {
  11544. name = name + "";
  11545. name = name.replace(/[^a-zA-Z0-9$_]/g, "-");
  11546. name = name.replace(/^[-0-9]+/, "");
  11547. name = name.replace(/[-\s]+(.)?/g, function (match, c) {
  11548. return c ? c.toUpperCase() : "";
  11549. });
  11550. if (!isValidIdentifier(name)) {
  11551. name = "_" + name;
  11552. }
  11553. return name || "_";
  11554. }
  11555. function toBindingIdentifierName(name) {
  11556. name = toIdentifier(name);
  11557. if (name === "eval" || name === "arguments") name = "_" + name;
  11558. return name;
  11559. }
  11560. function toComputedKey(node, key) {
  11561. if (key === void 0) {
  11562. key = node.key || node.property;
  11563. }
  11564. if (!node.computed && isIdentifier(key)) key = StringLiteral(key.name);
  11565. return key;
  11566. }
  11567. function toExpression(node) {
  11568. if (isExpressionStatement(node)) {
  11569. node = node.expression;
  11570. }
  11571. if (isExpression(node)) {
  11572. return node;
  11573. }
  11574. if (isClass(node)) {
  11575. node.type = "ClassExpression";
  11576. } else if (isFunction(node)) {
  11577. node.type = "FunctionExpression";
  11578. }
  11579. if (!isExpression(node)) {
  11580. throw new Error("cannot turn " + node.type + " to an expression");
  11581. }
  11582. return node;
  11583. }
  11584. function traverseFast(node, enter, opts) {
  11585. if (!node) return;
  11586. var keys = VISITOR_KEYS[node.type];
  11587. if (!keys) return;
  11588. opts = opts || {};
  11589. enter(node, opts);
  11590. for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  11591. var _ref;
  11592. if (_isArray) {
  11593. if (_i >= _iterator.length) break;
  11594. _ref = _iterator[_i++];
  11595. } else {
  11596. _i = _iterator.next();
  11597. if (_i.done) break;
  11598. _ref = _i.value;
  11599. }
  11600. var key = _ref;
  11601. var subNode = node[key];
  11602. if (Array.isArray(subNode)) {
  11603. for (var _iterator2 = subNode, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  11604. var _ref2;
  11605. if (_isArray2) {
  11606. if (_i2 >= _iterator2.length) break;
  11607. _ref2 = _iterator2[_i2++];
  11608. } else {
  11609. _i2 = _iterator2.next();
  11610. if (_i2.done) break;
  11611. _ref2 = _i2.value;
  11612. }
  11613. var _node = _ref2;
  11614. traverseFast(_node, enter, opts);
  11615. }
  11616. } else {
  11617. traverseFast(subNode, enter, opts);
  11618. }
  11619. }
  11620. }
  11621. var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"];
  11622. var CLEAR_KEYS_PLUS_COMMENTS = COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS);
  11623. function removeProperties(node, opts) {
  11624. if (opts === void 0) {
  11625. opts = {};
  11626. }
  11627. var map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;
  11628. for (var _iterator = map, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  11629. var _ref;
  11630. if (_isArray) {
  11631. if (_i >= _iterator.length) break;
  11632. _ref = _iterator[_i++];
  11633. } else {
  11634. _i = _iterator.next();
  11635. if (_i.done) break;
  11636. _ref = _i.value;
  11637. }
  11638. var key = _ref;
  11639. if (node[key] != null) node[key] = undefined;
  11640. }
  11641. for (var _i2 = 0, _Object$keys = Object.keys(node); _i2 < _Object$keys.length; _i2++) {
  11642. var _key = _Object$keys[_i2];
  11643. if (_key[0] === "_" && node[_key] != null) node[_key] = undefined;
  11644. }
  11645. var symbols = Object.getOwnPropertySymbols(node);
  11646. for (var _iterator2 = symbols, _isArray2 = Array.isArray(_iterator2), _i3 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  11647. var _ref2;
  11648. if (_isArray2) {
  11649. if (_i3 >= _iterator2.length) break;
  11650. _ref2 = _iterator2[_i3++];
  11651. } else {
  11652. _i3 = _iterator2.next();
  11653. if (_i3.done) break;
  11654. _ref2 = _i3.value;
  11655. }
  11656. var sym = _ref2;
  11657. node[sym] = null;
  11658. }
  11659. }
  11660. function removePropertiesDeep(tree, opts) {
  11661. traverseFast(tree, removeProperties, opts);
  11662. return tree;
  11663. }
  11664. function toKeyAlias(node, key) {
  11665. if (key === void 0) {
  11666. key = node.key;
  11667. }
  11668. var alias;
  11669. if (node.kind === "method") {
  11670. return toKeyAlias.increment() + "";
  11671. } else if (isIdentifier(key)) {
  11672. alias = key.name;
  11673. } else if (isStringLiteral(key)) {
  11674. alias = JSON.stringify(key.value);
  11675. } else {
  11676. alias = JSON.stringify(removePropertiesDeep(cloneNode(key)));
  11677. }
  11678. if (node.computed) {
  11679. alias = "[" + alias + "]";
  11680. }
  11681. if (node["static"]) {
  11682. alias = "static:" + alias;
  11683. }
  11684. return alias;
  11685. }
  11686. toKeyAlias.uid = 0;
  11687. toKeyAlias.increment = function () {
  11688. if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) {
  11689. return toKeyAlias.uid = 0;
  11690. } else {
  11691. return toKeyAlias.uid++;
  11692. }
  11693. };
  11694. function getBindingIdentifiers(node, duplicates, outerOnly) {
  11695. var search = [].concat(node);
  11696. var ids = Object.create(null);
  11697. while (search.length) {
  11698. var id = search.shift();
  11699. if (!id) continue;
  11700. var keys = getBindingIdentifiers.keys[id.type];
  11701. if (isIdentifier(id)) {
  11702. if (duplicates) {
  11703. var _ids = ids[id.name] = ids[id.name] || [];
  11704. _ids.push(id);
  11705. } else {
  11706. ids[id.name] = id;
  11707. }
  11708. continue;
  11709. }
  11710. if (isExportDeclaration(id)) {
  11711. if (isDeclaration(id.declaration)) {
  11712. search.push(id.declaration);
  11713. }
  11714. continue;
  11715. }
  11716. if (outerOnly) {
  11717. if (isFunctionDeclaration(id)) {
  11718. search.push(id.id);
  11719. continue;
  11720. }
  11721. if (isFunctionExpression(id)) {
  11722. continue;
  11723. }
  11724. }
  11725. if (keys) {
  11726. for (var i = 0; i < keys.length; i++) {
  11727. var key = keys[i];
  11728. if (id[key]) {
  11729. search = search.concat(id[key]);
  11730. }
  11731. }
  11732. }
  11733. }
  11734. return ids;
  11735. }
  11736. getBindingIdentifiers.keys = {
  11737. DeclareClass: ["id"],
  11738. DeclareFunction: ["id"],
  11739. DeclareModule: ["id"],
  11740. DeclareVariable: ["id"],
  11741. DeclareInterface: ["id"],
  11742. DeclareTypeAlias: ["id"],
  11743. DeclareOpaqueType: ["id"],
  11744. InterfaceDeclaration: ["id"],
  11745. TypeAlias: ["id"],
  11746. OpaqueType: ["id"],
  11747. CatchClause: ["param"],
  11748. LabeledStatement: ["label"],
  11749. UnaryExpression: ["argument"],
  11750. AssignmentExpression: ["left"],
  11751. ImportSpecifier: ["local"],
  11752. ImportNamespaceSpecifier: ["local"],
  11753. ImportDefaultSpecifier: ["local"],
  11754. ImportDeclaration: ["specifiers"],
  11755. ExportSpecifier: ["exported"],
  11756. ExportNamespaceSpecifier: ["exported"],
  11757. ExportDefaultSpecifier: ["exported"],
  11758. FunctionDeclaration: ["id", "params"],
  11759. FunctionExpression: ["id", "params"],
  11760. ArrowFunctionExpression: ["params"],
  11761. ObjectMethod: ["params"],
  11762. ClassMethod: ["params"],
  11763. ForInStatement: ["left"],
  11764. ForOfStatement: ["left"],
  11765. ClassDeclaration: ["id"],
  11766. ClassExpression: ["id"],
  11767. RestElement: ["argument"],
  11768. UpdateExpression: ["argument"],
  11769. ObjectProperty: ["value"],
  11770. AssignmentPattern: ["left"],
  11771. ArrayPattern: ["elements"],
  11772. ObjectPattern: ["properties"],
  11773. VariableDeclaration: ["declarations"],
  11774. VariableDeclarator: ["id"]
  11775. };
  11776. function gatherSequenceExpressions(nodes, scope, declars) {
  11777. var exprs = [];
  11778. var ensureLastUndefined = true;
  11779. for (var _iterator = nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  11780. var _ref;
  11781. if (_isArray) {
  11782. if (_i >= _iterator.length) break;
  11783. _ref = _iterator[_i++];
  11784. } else {
  11785. _i = _iterator.next();
  11786. if (_i.done) break;
  11787. _ref = _i.value;
  11788. }
  11789. var node = _ref;
  11790. ensureLastUndefined = false;
  11791. if (isExpression(node)) {
  11792. exprs.push(node);
  11793. } else if (isExpressionStatement(node)) {
  11794. exprs.push(node.expression);
  11795. } else if (isVariableDeclaration(node)) {
  11796. if (node.kind !== "var") return;
  11797. for (var _i2 = 0, _arr = node.declarations; _i2 < _arr.length; _i2++) {
  11798. var declar = _arr[_i2];
  11799. var bindings = getBindingIdentifiers(declar);
  11800. for (var _i3 = 0, _Object$keys = Object.keys(bindings); _i3 < _Object$keys.length; _i3++) {
  11801. var key = _Object$keys[_i3];
  11802. declars.push({
  11803. kind: node.kind,
  11804. id: cloneNode(bindings[key])
  11805. });
  11806. }
  11807. if (declar.init) {
  11808. exprs.push(AssignmentExpression("=", declar.id, declar.init));
  11809. }
  11810. }
  11811. ensureLastUndefined = true;
  11812. } else if (isIfStatement(node)) {
  11813. var consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode();
  11814. var alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode();
  11815. if (!consequent || !alternate) return;
  11816. exprs.push(ConditionalExpression(node.test, consequent, alternate));
  11817. } else if (isBlockStatement(node)) {
  11818. var body = gatherSequenceExpressions(node.body, scope, declars);
  11819. if (!body) return;
  11820. exprs.push(body);
  11821. } else if (isEmptyStatement(node)) {
  11822. ensureLastUndefined = true;
  11823. } else {
  11824. return;
  11825. }
  11826. }
  11827. if (ensureLastUndefined) {
  11828. exprs.push(scope.buildUndefinedNode());
  11829. }
  11830. if (exprs.length === 1) {
  11831. return exprs[0];
  11832. } else {
  11833. return SequenceExpression(exprs);
  11834. }
  11835. }
  11836. function toSequenceExpression(nodes, scope) {
  11837. if (!nodes || !nodes.length) return;
  11838. var declars = [];
  11839. var result = gatherSequenceExpressions(nodes, scope, declars);
  11840. if (!result) return;
  11841. for (var _i = 0, _declars = declars; _i < _declars.length; _i++) {
  11842. var declar = _declars[_i];
  11843. scope.push(declar);
  11844. }
  11845. return result;
  11846. }
  11847. function toStatement(node, ignore) {
  11848. if (isStatement(node)) {
  11849. return node;
  11850. }
  11851. var mustHaveId = false;
  11852. var newType;
  11853. if (isClass(node)) {
  11854. mustHaveId = true;
  11855. newType = "ClassDeclaration";
  11856. } else if (isFunction(node)) {
  11857. mustHaveId = true;
  11858. newType = "FunctionDeclaration";
  11859. } else if (isAssignmentExpression(node)) {
  11860. return ExpressionStatement(node);
  11861. }
  11862. if (mustHaveId && !node.id) {
  11863. newType = false;
  11864. }
  11865. if (!newType) {
  11866. if (ignore) {
  11867. return false;
  11868. } else {
  11869. throw new Error("cannot turn " + node.type + " to a statement");
  11870. }
  11871. }
  11872. node.type = newType;
  11873. return node;
  11874. }
  11875. var objectTag$3 = '[object Object]';
  11876. var funcProto$2 = Function.prototype,
  11877. objectProto$d = Object.prototype;
  11878. var funcToString$2 = funcProto$2.toString;
  11879. var hasOwnProperty$a = objectProto$d.hasOwnProperty;
  11880. var objectCtorString = funcToString$2.call(Object);
  11881. function isPlainObject(value) {
  11882. if (!isObjectLike_1(value) || _baseGetTag(value) != objectTag$3) {
  11883. return false;
  11884. }
  11885. var proto = _getPrototype(value);
  11886. if (proto === null) {
  11887. return true;
  11888. }
  11889. var Ctor = hasOwnProperty$a.call(proto, 'constructor') && proto.constructor;
  11890. return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString$2.call(Ctor) == objectCtorString;
  11891. }
  11892. var isPlainObject_1 = isPlainObject;
  11893. var regexpTag$3 = '[object RegExp]';
  11894. function baseIsRegExp(value) {
  11895. return isObjectLike_1(value) && _baseGetTag(value) == regexpTag$3;
  11896. }
  11897. var _baseIsRegExp = baseIsRegExp;
  11898. var nodeIsRegExp = _nodeUtil && _nodeUtil.isRegExp;
  11899. var isRegExp = nodeIsRegExp ? _baseUnary(nodeIsRegExp) : _baseIsRegExp;
  11900. var isRegExp_1 = isRegExp;
  11901. function valueToNode(value) {
  11902. if (value === undefined) {
  11903. return Identifier("undefined");
  11904. }
  11905. if (value === true || value === false) {
  11906. return BooleanLiteral(value);
  11907. }
  11908. if (value === null) {
  11909. return NullLiteral();
  11910. }
  11911. if (typeof value === "string") {
  11912. return StringLiteral(value);
  11913. }
  11914. if (typeof value === "number") {
  11915. var result;
  11916. if (Number.isFinite(value)) {
  11917. result = NumericLiteral(Math.abs(value));
  11918. } else {
  11919. var numerator;
  11920. if (Number.isNaN(value)) {
  11921. numerator = NumericLiteral(0);
  11922. } else {
  11923. numerator = NumericLiteral(1);
  11924. }
  11925. result = BinaryExpression("/", numerator, NumericLiteral(0));
  11926. }
  11927. if (value < 0 || Object.is(value, -0)) {
  11928. result = UnaryExpression("-", result);
  11929. }
  11930. return result;
  11931. }
  11932. if (isRegExp_1(value)) {
  11933. var pattern = value.source;
  11934. var flags = value.toString().match(/\/([a-z]+|)$/)[1];
  11935. return RegExpLiteral(pattern, flags);
  11936. }
  11937. if (Array.isArray(value)) {
  11938. return ArrayExpression(value.map(valueToNode));
  11939. }
  11940. if (isPlainObject_1(value)) {
  11941. var props = [];
  11942. for (var _i = 0, _Object$keys = Object.keys(value); _i < _Object$keys.length; _i++) {
  11943. var key = _Object$keys[_i];
  11944. var nodeKey = void 0;
  11945. if (isValidIdentifier(key)) {
  11946. nodeKey = Identifier(key);
  11947. } else {
  11948. nodeKey = StringLiteral(key);
  11949. }
  11950. props.push(ObjectProperty(nodeKey, valueToNode(value[key])));
  11951. }
  11952. return ObjectExpression(props);
  11953. }
  11954. throw new Error("don't know how to turn this value into a node");
  11955. }
  11956. function appendToMemberExpression(member, append, computed) {
  11957. if (computed === void 0) {
  11958. computed = false;
  11959. }
  11960. member.object = MemberExpression(member.object, member.property, member.computed);
  11961. member.property = append;
  11962. member.computed = !!computed;
  11963. return member;
  11964. }
  11965. function inherits(child, parent) {
  11966. if (!child || !parent) return child;
  11967. for (var _i = 0, _arr = INHERIT_KEYS.optional; _i < _arr.length; _i++) {
  11968. var key = _arr[_i];
  11969. if (child[key] == null) {
  11970. child[key] = parent[key];
  11971. }
  11972. }
  11973. for (var _i2 = 0, _Object$keys = Object.keys(parent); _i2 < _Object$keys.length; _i2++) {
  11974. var _key = _Object$keys[_i2];
  11975. if (_key[0] === "_" && _key !== "__clone") child[_key] = parent[_key];
  11976. }
  11977. for (var _i3 = 0, _arr2 = INHERIT_KEYS.force; _i3 < _arr2.length; _i3++) {
  11978. var _key2 = _arr2[_i3];
  11979. child[_key2] = parent[_key2];
  11980. }
  11981. inheritsComments(child, parent);
  11982. return child;
  11983. }
  11984. function prependToMemberExpression(member, prepend) {
  11985. member.object = MemberExpression(prepend, member.object);
  11986. return member;
  11987. }
  11988. function getOuterBindingIdentifiers(node, duplicates) {
  11989. return getBindingIdentifiers(node, duplicates, true);
  11990. }
  11991. function traverse(node, handlers, state) {
  11992. if (typeof handlers === "function") {
  11993. handlers = {
  11994. enter: handlers
  11995. };
  11996. }
  11997. var _ref = handlers,
  11998. enter = _ref.enter,
  11999. exit = _ref.exit;
  12000. traverseSimpleImpl(node, enter, exit, state, []);
  12001. }
  12002. function traverseSimpleImpl(node, enter, exit, state, ancestors) {
  12003. var keys = VISITOR_KEYS[node.type];
  12004. if (!keys) return;
  12005. if (enter) enter(node, ancestors, state);
  12006. for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  12007. var _ref2;
  12008. if (_isArray) {
  12009. if (_i >= _iterator.length) break;
  12010. _ref2 = _iterator[_i++];
  12011. } else {
  12012. _i = _iterator.next();
  12013. if (_i.done) break;
  12014. _ref2 = _i.value;
  12015. }
  12016. var key = _ref2;
  12017. var subNode = node[key];
  12018. if (Array.isArray(subNode)) {
  12019. for (var i = 0; i < subNode.length; i++) {
  12020. var child = subNode[i];
  12021. if (!child) continue;
  12022. ancestors.push({
  12023. node: node,
  12024. key: key,
  12025. index: i
  12026. });
  12027. traverseSimpleImpl(child, enter, exit, state, ancestors);
  12028. ancestors.pop();
  12029. }
  12030. } else if (subNode) {
  12031. ancestors.push({
  12032. node: node,
  12033. key: key
  12034. });
  12035. traverseSimpleImpl(subNode, enter, exit, state, ancestors);
  12036. ancestors.pop();
  12037. }
  12038. }
  12039. if (exit) exit(node, ancestors, state);
  12040. }
  12041. function isBinding(node, parent, grandparent) {
  12042. if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") {
  12043. return false;
  12044. }
  12045. var keys = getBindingIdentifiers.keys[parent.type];
  12046. if (keys) {
  12047. for (var i = 0; i < keys.length; i++) {
  12048. var key = keys[i];
  12049. var val = parent[key];
  12050. if (Array.isArray(val)) {
  12051. if (val.indexOf(node) >= 0) return true;
  12052. } else {
  12053. if (val === node) return true;
  12054. }
  12055. }
  12056. }
  12057. return false;
  12058. }
  12059. function isLet(node) {
  12060. return isVariableDeclaration(node) && (node.kind !== "var" || node[BLOCK_SCOPED_SYMBOL]);
  12061. }
  12062. function isBlockScoped(node) {
  12063. return isFunctionDeclaration(node) || isClassDeclaration(node) || isLet(node);
  12064. }
  12065. function isImmutable(node) {
  12066. if (isType(node.type, "Immutable")) return true;
  12067. if (isIdentifier(node)) {
  12068. if (node.name === "undefined") {
  12069. return true;
  12070. } else {
  12071. return false;
  12072. }
  12073. }
  12074. return false;
  12075. }
  12076. function isNodesEquivalent(a, b) {
  12077. if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) {
  12078. return a === b;
  12079. }
  12080. if (a.type !== b.type) {
  12081. return false;
  12082. }
  12083. var fields = Object.keys(NODE_FIELDS[a.type] || a.type);
  12084. var visitorKeys = VISITOR_KEYS[a.type];
  12085. for (var _i = 0, _fields = fields; _i < _fields.length; _i++) {
  12086. var field = _fields[_i];
  12087. if (typeof a[field] !== typeof b[field]) {
  12088. return false;
  12089. }
  12090. if (a[field] == null && b[field] == null) {
  12091. continue;
  12092. } else if (a[field] == null || b[field] == null) {
  12093. return false;
  12094. }
  12095. if (Array.isArray(a[field])) {
  12096. if (!Array.isArray(b[field])) {
  12097. return false;
  12098. }
  12099. if (a[field].length !== b[field].length) {
  12100. return false;
  12101. }
  12102. for (var i = 0; i < a[field].length; i++) {
  12103. if (!isNodesEquivalent(a[field][i], b[field][i])) {
  12104. return false;
  12105. }
  12106. }
  12107. continue;
  12108. }
  12109. if (typeof a[field] === "object" && (!visitorKeys || !visitorKeys.includes(field))) {
  12110. for (var _i2 = 0, _Object$keys = Object.keys(a[field]); _i2 < _Object$keys.length; _i2++) {
  12111. var key = _Object$keys[_i2];
  12112. if (a[field][key] !== b[field][key]) {
  12113. return false;
  12114. }
  12115. }
  12116. continue;
  12117. }
  12118. if (!isNodesEquivalent(a[field], b[field])) {
  12119. return false;
  12120. }
  12121. }
  12122. return true;
  12123. }
  12124. function isReferenced(node, parent, grandparent) {
  12125. switch (parent.type) {
  12126. case "MemberExpression":
  12127. case "JSXMemberExpression":
  12128. case "OptionalMemberExpression":
  12129. if (parent.property === node) {
  12130. return !!parent.computed;
  12131. }
  12132. return parent.object === node;
  12133. case "VariableDeclarator":
  12134. return parent.init === node;
  12135. case "ArrowFunctionExpression":
  12136. return parent.body === node;
  12137. case "ExportSpecifier":
  12138. if (parent.source) {
  12139. return false;
  12140. }
  12141. return parent.local === node;
  12142. case "PrivateName":
  12143. return false;
  12144. case "ObjectProperty":
  12145. case "ClassProperty":
  12146. case "ClassPrivateProperty":
  12147. case "ClassMethod":
  12148. case "ClassPrivateMethod":
  12149. case "ObjectMethod":
  12150. if (parent.key === node) {
  12151. return !!parent.computed;
  12152. }
  12153. if (parent.value === node) {
  12154. return !grandparent || grandparent.type !== "ObjectPattern";
  12155. }
  12156. return true;
  12157. case "ClassDeclaration":
  12158. case "ClassExpression":
  12159. return parent.superClass === node;
  12160. case "AssignmentExpression":
  12161. return parent.right === node;
  12162. case "AssignmentPattern":
  12163. return parent.right === node;
  12164. case "LabeledStatement":
  12165. return false;
  12166. case "CatchClause":
  12167. return false;
  12168. case "RestElement":
  12169. return false;
  12170. case "BreakStatement":
  12171. case "ContinueStatement":
  12172. return false;
  12173. case "FunctionDeclaration":
  12174. case "FunctionExpression":
  12175. return false;
  12176. case "ExportNamespaceSpecifier":
  12177. case "ExportDefaultSpecifier":
  12178. return false;
  12179. case "ImportDefaultSpecifier":
  12180. case "ImportNamespaceSpecifier":
  12181. case "ImportSpecifier":
  12182. return false;
  12183. case "JSXAttribute":
  12184. return false;
  12185. case "ObjectPattern":
  12186. case "ArrayPattern":
  12187. return false;
  12188. case "MetaProperty":
  12189. return false;
  12190. case "ObjectTypeProperty":
  12191. return parent.key !== node;
  12192. case "TSEnumMember":
  12193. return parent.id !== node;
  12194. case "TSPropertySignature":
  12195. if (parent.key === node) {
  12196. return !!parent.computed;
  12197. }
  12198. return true;
  12199. }
  12200. return true;
  12201. }
  12202. function isScope(node, parent) {
  12203. if (isBlockStatement(node) && isFunction(parent, {
  12204. body: node
  12205. })) {
  12206. return false;
  12207. }
  12208. if (isBlockStatement(node) && isCatchClause(parent, {
  12209. body: node
  12210. })) {
  12211. return false;
  12212. }
  12213. if (isPattern(node) && isFunction(parent)) {
  12214. return true;
  12215. }
  12216. return isScopable(node);
  12217. }
  12218. function isSpecifierDefault(specifier) {
  12219. return isImportDefaultSpecifier(specifier) || isIdentifier(specifier.imported || specifier.exported, {
  12220. name: "default"
  12221. });
  12222. }
  12223. 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"]);
  12224. function isValidES3Identifier(name) {
  12225. return isValidIdentifier(name) && !RESERVED_WORDS_ES3_ONLY.has(name);
  12226. }
  12227. function isVar(node) {
  12228. return isVariableDeclaration(node, {
  12229. kind: "var"
  12230. }) && !node[BLOCK_SCOPED_SYMBOL];
  12231. }
  12232. var react = {
  12233. isReactComponent: isReactComponent,
  12234. isCompatTag: isCompatTag,
  12235. buildChildren: buildChildren
  12236. };
  12237. var t = /*#__PURE__*/Object.freeze({
  12238. __proto__: null,
  12239. react: react,
  12240. assertNode: assertNode,
  12241. createTypeAnnotationBasedOnTypeof: createTypeAnnotationBasedOnTypeof,
  12242. createUnionTypeAnnotation: createUnionTypeAnnotation,
  12243. cloneNode: cloneNode,
  12244. clone: clone$1,
  12245. cloneDeep: cloneDeep,
  12246. cloneWithoutLoc: cloneWithoutLoc,
  12247. addComment: addComment,
  12248. addComments: addComments,
  12249. inheritInnerComments: inheritInnerComments,
  12250. inheritLeadingComments: inheritLeadingComments,
  12251. inheritsComments: inheritsComments,
  12252. inheritTrailingComments: inheritTrailingComments,
  12253. removeComments: removeComments,
  12254. ensureBlock: ensureBlock,
  12255. toBindingIdentifierName: toBindingIdentifierName,
  12256. toBlock: toBlock,
  12257. toComputedKey: toComputedKey,
  12258. toExpression: toExpression,
  12259. toIdentifier: toIdentifier,
  12260. toKeyAlias: toKeyAlias,
  12261. toSequenceExpression: toSequenceExpression,
  12262. toStatement: toStatement,
  12263. valueToNode: valueToNode,
  12264. appendToMemberExpression: appendToMemberExpression,
  12265. inherits: inherits,
  12266. prependToMemberExpression: prependToMemberExpression,
  12267. removeProperties: removeProperties,
  12268. removePropertiesDeep: removePropertiesDeep,
  12269. removeTypeDuplicates: removeTypeDuplicates,
  12270. getBindingIdentifiers: getBindingIdentifiers,
  12271. getOuterBindingIdentifiers: getOuterBindingIdentifiers,
  12272. traverse: traverse,
  12273. traverseFast: traverseFast,
  12274. shallowEqual: shallowEqual,
  12275. is: is,
  12276. isBinding: isBinding,
  12277. isBlockScoped: isBlockScoped,
  12278. isImmutable: isImmutable,
  12279. isLet: isLet,
  12280. isNode: isNode,
  12281. isNodesEquivalent: isNodesEquivalent,
  12282. isPlaceholderType: isPlaceholderType,
  12283. isReferenced: isReferenced,
  12284. isScope: isScope,
  12285. isSpecifierDefault: isSpecifierDefault,
  12286. isType: isType,
  12287. isValidES3Identifier: isValidES3Identifier,
  12288. isValidIdentifier: isValidIdentifier,
  12289. isVar: isVar,
  12290. matchesPattern: matchesPattern,
  12291. validate: validate,
  12292. buildMatchMemberExpression: buildMatchMemberExpression,
  12293. assertArrayExpression: assertArrayExpression,
  12294. assertAssignmentExpression: assertAssignmentExpression,
  12295. assertBinaryExpression: assertBinaryExpression,
  12296. assertInterpreterDirective: assertInterpreterDirective,
  12297. assertDirective: assertDirective,
  12298. assertDirectiveLiteral: assertDirectiveLiteral,
  12299. assertBlockStatement: assertBlockStatement,
  12300. assertBreakStatement: assertBreakStatement,
  12301. assertCallExpression: assertCallExpression,
  12302. assertCatchClause: assertCatchClause,
  12303. assertConditionalExpression: assertConditionalExpression,
  12304. assertContinueStatement: assertContinueStatement,
  12305. assertDebuggerStatement: assertDebuggerStatement,
  12306. assertDoWhileStatement: assertDoWhileStatement,
  12307. assertEmptyStatement: assertEmptyStatement,
  12308. assertExpressionStatement: assertExpressionStatement,
  12309. assertFile: assertFile,
  12310. assertForInStatement: assertForInStatement,
  12311. assertForStatement: assertForStatement,
  12312. assertFunctionDeclaration: assertFunctionDeclaration,
  12313. assertFunctionExpression: assertFunctionExpression,
  12314. assertIdentifier: assertIdentifier,
  12315. assertIfStatement: assertIfStatement,
  12316. assertLabeledStatement: assertLabeledStatement,
  12317. assertStringLiteral: assertStringLiteral,
  12318. assertNumericLiteral: assertNumericLiteral,
  12319. assertNullLiteral: assertNullLiteral,
  12320. assertBooleanLiteral: assertBooleanLiteral,
  12321. assertRegExpLiteral: assertRegExpLiteral,
  12322. assertLogicalExpression: assertLogicalExpression,
  12323. assertMemberExpression: assertMemberExpression,
  12324. assertNewExpression: assertNewExpression,
  12325. assertProgram: assertProgram,
  12326. assertObjectExpression: assertObjectExpression,
  12327. assertObjectMethod: assertObjectMethod,
  12328. assertObjectProperty: assertObjectProperty,
  12329. assertRestElement: assertRestElement,
  12330. assertReturnStatement: assertReturnStatement,
  12331. assertSequenceExpression: assertSequenceExpression,
  12332. assertParenthesizedExpression: assertParenthesizedExpression,
  12333. assertSwitchCase: assertSwitchCase,
  12334. assertSwitchStatement: assertSwitchStatement,
  12335. assertThisExpression: assertThisExpression,
  12336. assertThrowStatement: assertThrowStatement,
  12337. assertTryStatement: assertTryStatement,
  12338. assertUnaryExpression: assertUnaryExpression,
  12339. assertUpdateExpression: assertUpdateExpression,
  12340. assertVariableDeclaration: assertVariableDeclaration,
  12341. assertVariableDeclarator: assertVariableDeclarator,
  12342. assertWhileStatement: assertWhileStatement,
  12343. assertWithStatement: assertWithStatement,
  12344. assertAssignmentPattern: assertAssignmentPattern,
  12345. assertArrayPattern: assertArrayPattern,
  12346. assertArrowFunctionExpression: assertArrowFunctionExpression,
  12347. assertClassBody: assertClassBody,
  12348. assertClassExpression: assertClassExpression,
  12349. assertClassDeclaration: assertClassDeclaration,
  12350. assertExportAllDeclaration: assertExportAllDeclaration,
  12351. assertExportDefaultDeclaration: assertExportDefaultDeclaration,
  12352. assertExportNamedDeclaration: assertExportNamedDeclaration,
  12353. assertExportSpecifier: assertExportSpecifier,
  12354. assertForOfStatement: assertForOfStatement,
  12355. assertImportDeclaration: assertImportDeclaration,
  12356. assertImportDefaultSpecifier: assertImportDefaultSpecifier,
  12357. assertImportNamespaceSpecifier: assertImportNamespaceSpecifier,
  12358. assertImportSpecifier: assertImportSpecifier,
  12359. assertMetaProperty: assertMetaProperty,
  12360. assertClassMethod: assertClassMethod,
  12361. assertObjectPattern: assertObjectPattern,
  12362. assertSpreadElement: assertSpreadElement,
  12363. assertSuper: assertSuper,
  12364. assertTaggedTemplateExpression: assertTaggedTemplateExpression,
  12365. assertTemplateElement: assertTemplateElement,
  12366. assertTemplateLiteral: assertTemplateLiteral,
  12367. assertYieldExpression: assertYieldExpression,
  12368. assertAnyTypeAnnotation: assertAnyTypeAnnotation,
  12369. assertArrayTypeAnnotation: assertArrayTypeAnnotation,
  12370. assertBooleanTypeAnnotation: assertBooleanTypeAnnotation,
  12371. assertBooleanLiteralTypeAnnotation: assertBooleanLiteralTypeAnnotation,
  12372. assertNullLiteralTypeAnnotation: assertNullLiteralTypeAnnotation,
  12373. assertClassImplements: assertClassImplements,
  12374. assertDeclareClass: assertDeclareClass,
  12375. assertDeclareFunction: assertDeclareFunction,
  12376. assertDeclareInterface: assertDeclareInterface,
  12377. assertDeclareModule: assertDeclareModule,
  12378. assertDeclareModuleExports: assertDeclareModuleExports,
  12379. assertDeclareTypeAlias: assertDeclareTypeAlias,
  12380. assertDeclareOpaqueType: assertDeclareOpaqueType,
  12381. assertDeclareVariable: assertDeclareVariable,
  12382. assertDeclareExportDeclaration: assertDeclareExportDeclaration,
  12383. assertDeclareExportAllDeclaration: assertDeclareExportAllDeclaration,
  12384. assertDeclaredPredicate: assertDeclaredPredicate,
  12385. assertExistsTypeAnnotation: assertExistsTypeAnnotation,
  12386. assertFunctionTypeAnnotation: assertFunctionTypeAnnotation,
  12387. assertFunctionTypeParam: assertFunctionTypeParam,
  12388. assertGenericTypeAnnotation: assertGenericTypeAnnotation,
  12389. assertInferredPredicate: assertInferredPredicate,
  12390. assertInterfaceExtends: assertInterfaceExtends,
  12391. assertInterfaceDeclaration: assertInterfaceDeclaration,
  12392. assertInterfaceTypeAnnotation: assertInterfaceTypeAnnotation,
  12393. assertIntersectionTypeAnnotation: assertIntersectionTypeAnnotation,
  12394. assertMixedTypeAnnotation: assertMixedTypeAnnotation,
  12395. assertEmptyTypeAnnotation: assertEmptyTypeAnnotation,
  12396. assertNullableTypeAnnotation: assertNullableTypeAnnotation,
  12397. assertNumberLiteralTypeAnnotation: assertNumberLiteralTypeAnnotation,
  12398. assertNumberTypeAnnotation: assertNumberTypeAnnotation,
  12399. assertObjectTypeAnnotation: assertObjectTypeAnnotation,
  12400. assertObjectTypeInternalSlot: assertObjectTypeInternalSlot,
  12401. assertObjectTypeCallProperty: assertObjectTypeCallProperty,
  12402. assertObjectTypeIndexer: assertObjectTypeIndexer,
  12403. assertObjectTypeProperty: assertObjectTypeProperty,
  12404. assertObjectTypeSpreadProperty: assertObjectTypeSpreadProperty,
  12405. assertOpaqueType: assertOpaqueType,
  12406. assertQualifiedTypeIdentifier: assertQualifiedTypeIdentifier,
  12407. assertStringLiteralTypeAnnotation: assertStringLiteralTypeAnnotation,
  12408. assertStringTypeAnnotation: assertStringTypeAnnotation,
  12409. assertThisTypeAnnotation: assertThisTypeAnnotation,
  12410. assertTupleTypeAnnotation: assertTupleTypeAnnotation,
  12411. assertTypeofTypeAnnotation: assertTypeofTypeAnnotation,
  12412. assertTypeAlias: assertTypeAlias,
  12413. assertTypeAnnotation: assertTypeAnnotation,
  12414. assertTypeCastExpression: assertTypeCastExpression,
  12415. assertTypeParameter: assertTypeParameter,
  12416. assertTypeParameterDeclaration: assertTypeParameterDeclaration,
  12417. assertTypeParameterInstantiation: assertTypeParameterInstantiation,
  12418. assertUnionTypeAnnotation: assertUnionTypeAnnotation,
  12419. assertVariance: assertVariance,
  12420. assertVoidTypeAnnotation: assertVoidTypeAnnotation,
  12421. assertEnumDeclaration: assertEnumDeclaration,
  12422. assertEnumBooleanBody: assertEnumBooleanBody,
  12423. assertEnumNumberBody: assertEnumNumberBody,
  12424. assertEnumStringBody: assertEnumStringBody,
  12425. assertEnumSymbolBody: assertEnumSymbolBody,
  12426. assertEnumBooleanMember: assertEnumBooleanMember,
  12427. assertEnumNumberMember: assertEnumNumberMember,
  12428. assertEnumStringMember: assertEnumStringMember,
  12429. assertEnumDefaultedMember: assertEnumDefaultedMember,
  12430. assertJSXAttribute: assertJSXAttribute,
  12431. assertJSXClosingElement: assertJSXClosingElement,
  12432. assertJSXElement: assertJSXElement,
  12433. assertJSXEmptyExpression: assertJSXEmptyExpression,
  12434. assertJSXExpressionContainer: assertJSXExpressionContainer,
  12435. assertJSXSpreadChild: assertJSXSpreadChild,
  12436. assertJSXIdentifier: assertJSXIdentifier,
  12437. assertJSXMemberExpression: assertJSXMemberExpression,
  12438. assertJSXNamespacedName: assertJSXNamespacedName,
  12439. assertJSXOpeningElement: assertJSXOpeningElement,
  12440. assertJSXSpreadAttribute: assertJSXSpreadAttribute,
  12441. assertJSXText: assertJSXText,
  12442. assertJSXFragment: assertJSXFragment,
  12443. assertJSXOpeningFragment: assertJSXOpeningFragment,
  12444. assertJSXClosingFragment: assertJSXClosingFragment,
  12445. assertNoop: assertNoop,
  12446. assertPlaceholder: assertPlaceholder,
  12447. assertV8IntrinsicIdentifier: assertV8IntrinsicIdentifier,
  12448. assertArgumentPlaceholder: assertArgumentPlaceholder,
  12449. assertAwaitExpression: assertAwaitExpression,
  12450. assertBindExpression: assertBindExpression,
  12451. assertClassProperty: assertClassProperty,
  12452. assertOptionalMemberExpression: assertOptionalMemberExpression,
  12453. assertPipelineTopicExpression: assertPipelineTopicExpression,
  12454. assertPipelineBareFunction: assertPipelineBareFunction,
  12455. assertPipelinePrimaryTopicReference: assertPipelinePrimaryTopicReference,
  12456. assertOptionalCallExpression: assertOptionalCallExpression,
  12457. assertClassPrivateProperty: assertClassPrivateProperty,
  12458. assertClassPrivateMethod: assertClassPrivateMethod,
  12459. assertImport: assertImport,
  12460. assertDecorator: assertDecorator,
  12461. assertDoExpression: assertDoExpression,
  12462. assertExportDefaultSpecifier: assertExportDefaultSpecifier,
  12463. assertExportNamespaceSpecifier: assertExportNamespaceSpecifier,
  12464. assertPrivateName: assertPrivateName,
  12465. assertBigIntLiteral: assertBigIntLiteral,
  12466. assertTSParameterProperty: assertTSParameterProperty,
  12467. assertTSDeclareFunction: assertTSDeclareFunction,
  12468. assertTSDeclareMethod: assertTSDeclareMethod,
  12469. assertTSQualifiedName: assertTSQualifiedName,
  12470. assertTSCallSignatureDeclaration: assertTSCallSignatureDeclaration,
  12471. assertTSConstructSignatureDeclaration: assertTSConstructSignatureDeclaration,
  12472. assertTSPropertySignature: assertTSPropertySignature,
  12473. assertTSMethodSignature: assertTSMethodSignature,
  12474. assertTSIndexSignature: assertTSIndexSignature,
  12475. assertTSAnyKeyword: assertTSAnyKeyword,
  12476. assertTSBooleanKeyword: assertTSBooleanKeyword,
  12477. assertTSBigIntKeyword: assertTSBigIntKeyword,
  12478. assertTSNeverKeyword: assertTSNeverKeyword,
  12479. assertTSNullKeyword: assertTSNullKeyword,
  12480. assertTSNumberKeyword: assertTSNumberKeyword,
  12481. assertTSObjectKeyword: assertTSObjectKeyword,
  12482. assertTSStringKeyword: assertTSStringKeyword,
  12483. assertTSSymbolKeyword: assertTSSymbolKeyword,
  12484. assertTSUndefinedKeyword: assertTSUndefinedKeyword,
  12485. assertTSUnknownKeyword: assertTSUnknownKeyword,
  12486. assertTSVoidKeyword: assertTSVoidKeyword,
  12487. assertTSThisType: assertTSThisType,
  12488. assertTSFunctionType: assertTSFunctionType,
  12489. assertTSConstructorType: assertTSConstructorType,
  12490. assertTSTypeReference: assertTSTypeReference,
  12491. assertTSTypePredicate: assertTSTypePredicate,
  12492. assertTSTypeQuery: assertTSTypeQuery,
  12493. assertTSTypeLiteral: assertTSTypeLiteral,
  12494. assertTSArrayType: assertTSArrayType,
  12495. assertTSTupleType: assertTSTupleType,
  12496. assertTSOptionalType: assertTSOptionalType,
  12497. assertTSRestType: assertTSRestType,
  12498. assertTSUnionType: assertTSUnionType,
  12499. assertTSIntersectionType: assertTSIntersectionType,
  12500. assertTSConditionalType: assertTSConditionalType,
  12501. assertTSInferType: assertTSInferType,
  12502. assertTSParenthesizedType: assertTSParenthesizedType,
  12503. assertTSTypeOperator: assertTSTypeOperator,
  12504. assertTSIndexedAccessType: assertTSIndexedAccessType,
  12505. assertTSMappedType: assertTSMappedType,
  12506. assertTSLiteralType: assertTSLiteralType,
  12507. assertTSExpressionWithTypeArguments: assertTSExpressionWithTypeArguments,
  12508. assertTSInterfaceDeclaration: assertTSInterfaceDeclaration,
  12509. assertTSInterfaceBody: assertTSInterfaceBody,
  12510. assertTSTypeAliasDeclaration: assertTSTypeAliasDeclaration,
  12511. assertTSAsExpression: assertTSAsExpression,
  12512. assertTSTypeAssertion: assertTSTypeAssertion,
  12513. assertTSEnumDeclaration: assertTSEnumDeclaration,
  12514. assertTSEnumMember: assertTSEnumMember,
  12515. assertTSModuleDeclaration: assertTSModuleDeclaration,
  12516. assertTSModuleBlock: assertTSModuleBlock,
  12517. assertTSImportType: assertTSImportType,
  12518. assertTSImportEqualsDeclaration: assertTSImportEqualsDeclaration,
  12519. assertTSExternalModuleReference: assertTSExternalModuleReference,
  12520. assertTSNonNullExpression: assertTSNonNullExpression,
  12521. assertTSExportAssignment: assertTSExportAssignment,
  12522. assertTSNamespaceExportDeclaration: assertTSNamespaceExportDeclaration,
  12523. assertTSTypeAnnotation: assertTSTypeAnnotation,
  12524. assertTSTypeParameterInstantiation: assertTSTypeParameterInstantiation,
  12525. assertTSTypeParameterDeclaration: assertTSTypeParameterDeclaration,
  12526. assertTSTypeParameter: assertTSTypeParameter,
  12527. assertExpression: assertExpression,
  12528. assertBinary: assertBinary,
  12529. assertScopable: assertScopable,
  12530. assertBlockParent: assertBlockParent,
  12531. assertBlock: assertBlock,
  12532. assertStatement: assertStatement,
  12533. assertTerminatorless: assertTerminatorless,
  12534. assertCompletionStatement: assertCompletionStatement,
  12535. assertConditional: assertConditional,
  12536. assertLoop: assertLoop,
  12537. assertWhile: assertWhile,
  12538. assertExpressionWrapper: assertExpressionWrapper,
  12539. assertFor: assertFor,
  12540. assertForXStatement: assertForXStatement,
  12541. assertFunction: assertFunction,
  12542. assertFunctionParent: assertFunctionParent,
  12543. assertPureish: assertPureish,
  12544. assertDeclaration: assertDeclaration,
  12545. assertPatternLike: assertPatternLike,
  12546. assertLVal: assertLVal,
  12547. assertTSEntityName: assertTSEntityName,
  12548. assertLiteral: assertLiteral,
  12549. assertImmutable: assertImmutable,
  12550. assertUserWhitespacable: assertUserWhitespacable,
  12551. assertMethod: assertMethod,
  12552. assertObjectMember: assertObjectMember,
  12553. assertProperty: assertProperty,
  12554. assertUnaryLike: assertUnaryLike,
  12555. assertPattern: assertPattern,
  12556. assertClass: assertClass,
  12557. assertModuleDeclaration: assertModuleDeclaration,
  12558. assertExportDeclaration: assertExportDeclaration,
  12559. assertModuleSpecifier: assertModuleSpecifier,
  12560. assertFlow: assertFlow,
  12561. assertFlowType: assertFlowType,
  12562. assertFlowBaseAnnotation: assertFlowBaseAnnotation,
  12563. assertFlowDeclaration: assertFlowDeclaration,
  12564. assertFlowPredicate: assertFlowPredicate,
  12565. assertEnumBody: assertEnumBody,
  12566. assertEnumMember: assertEnumMember,
  12567. assertJSX: assertJSX,
  12568. assertPrivate: assertPrivate,
  12569. assertTSTypeElement: assertTSTypeElement,
  12570. assertTSType: assertTSType,
  12571. assertNumberLiteral: assertNumberLiteral,
  12572. assertRegexLiteral: assertRegexLiteral,
  12573. assertRestProperty: assertRestProperty,
  12574. assertSpreadProperty: assertSpreadProperty,
  12575. ArrayExpression: ArrayExpression,
  12576. arrayExpression: ArrayExpression,
  12577. AssignmentExpression: AssignmentExpression,
  12578. assignmentExpression: AssignmentExpression,
  12579. BinaryExpression: BinaryExpression,
  12580. binaryExpression: BinaryExpression,
  12581. InterpreterDirective: InterpreterDirective,
  12582. interpreterDirective: InterpreterDirective,
  12583. Directive: Directive,
  12584. directive: Directive,
  12585. DirectiveLiteral: DirectiveLiteral,
  12586. directiveLiteral: DirectiveLiteral,
  12587. BlockStatement: BlockStatement,
  12588. blockStatement: BlockStatement,
  12589. BreakStatement: BreakStatement,
  12590. breakStatement: BreakStatement,
  12591. CallExpression: CallExpression,
  12592. callExpression: CallExpression,
  12593. CatchClause: CatchClause,
  12594. catchClause: CatchClause,
  12595. ConditionalExpression: ConditionalExpression,
  12596. conditionalExpression: ConditionalExpression,
  12597. ContinueStatement: ContinueStatement,
  12598. continueStatement: ContinueStatement,
  12599. DebuggerStatement: DebuggerStatement,
  12600. debuggerStatement: DebuggerStatement,
  12601. DoWhileStatement: DoWhileStatement,
  12602. doWhileStatement: DoWhileStatement,
  12603. EmptyStatement: EmptyStatement,
  12604. emptyStatement: EmptyStatement,
  12605. ExpressionStatement: ExpressionStatement,
  12606. expressionStatement: ExpressionStatement,
  12607. File: File,
  12608. file: File,
  12609. ForInStatement: ForInStatement,
  12610. forInStatement: ForInStatement,
  12611. ForStatement: ForStatement,
  12612. forStatement: ForStatement,
  12613. FunctionDeclaration: FunctionDeclaration,
  12614. functionDeclaration: FunctionDeclaration,
  12615. FunctionExpression: FunctionExpression,
  12616. functionExpression: FunctionExpression,
  12617. Identifier: Identifier,
  12618. identifier: Identifier,
  12619. IfStatement: IfStatement,
  12620. ifStatement: IfStatement,
  12621. LabeledStatement: LabeledStatement,
  12622. labeledStatement: LabeledStatement,
  12623. StringLiteral: StringLiteral,
  12624. stringLiteral: StringLiteral,
  12625. NumericLiteral: NumericLiteral,
  12626. numericLiteral: NumericLiteral,
  12627. NullLiteral: NullLiteral,
  12628. nullLiteral: NullLiteral,
  12629. BooleanLiteral: BooleanLiteral,
  12630. booleanLiteral: BooleanLiteral,
  12631. RegExpLiteral: RegExpLiteral,
  12632. regExpLiteral: RegExpLiteral,
  12633. LogicalExpression: LogicalExpression,
  12634. logicalExpression: LogicalExpression,
  12635. MemberExpression: MemberExpression,
  12636. memberExpression: MemberExpression,
  12637. NewExpression: NewExpression,
  12638. newExpression: NewExpression,
  12639. Program: Program,
  12640. program: Program,
  12641. ObjectExpression: ObjectExpression,
  12642. objectExpression: ObjectExpression,
  12643. ObjectMethod: ObjectMethod,
  12644. objectMethod: ObjectMethod,
  12645. ObjectProperty: ObjectProperty,
  12646. objectProperty: ObjectProperty,
  12647. RestElement: RestElement,
  12648. restElement: RestElement,
  12649. ReturnStatement: ReturnStatement,
  12650. returnStatement: ReturnStatement,
  12651. SequenceExpression: SequenceExpression,
  12652. sequenceExpression: SequenceExpression,
  12653. ParenthesizedExpression: ParenthesizedExpression,
  12654. parenthesizedExpression: ParenthesizedExpression,
  12655. SwitchCase: SwitchCase,
  12656. switchCase: SwitchCase,
  12657. SwitchStatement: SwitchStatement,
  12658. switchStatement: SwitchStatement,
  12659. ThisExpression: ThisExpression,
  12660. thisExpression: ThisExpression,
  12661. ThrowStatement: ThrowStatement,
  12662. throwStatement: ThrowStatement,
  12663. TryStatement: TryStatement,
  12664. tryStatement: TryStatement,
  12665. UnaryExpression: UnaryExpression,
  12666. unaryExpression: UnaryExpression,
  12667. UpdateExpression: UpdateExpression,
  12668. updateExpression: UpdateExpression,
  12669. VariableDeclaration: VariableDeclaration,
  12670. variableDeclaration: VariableDeclaration,
  12671. VariableDeclarator: VariableDeclarator,
  12672. variableDeclarator: VariableDeclarator,
  12673. WhileStatement: WhileStatement,
  12674. whileStatement: WhileStatement,
  12675. WithStatement: WithStatement,
  12676. withStatement: WithStatement,
  12677. AssignmentPattern: AssignmentPattern,
  12678. assignmentPattern: AssignmentPattern,
  12679. ArrayPattern: ArrayPattern,
  12680. arrayPattern: ArrayPattern,
  12681. ArrowFunctionExpression: ArrowFunctionExpression,
  12682. arrowFunctionExpression: ArrowFunctionExpression,
  12683. ClassBody: ClassBody,
  12684. classBody: ClassBody,
  12685. ClassExpression: ClassExpression,
  12686. classExpression: ClassExpression,
  12687. ClassDeclaration: ClassDeclaration,
  12688. classDeclaration: ClassDeclaration,
  12689. ExportAllDeclaration: ExportAllDeclaration,
  12690. exportAllDeclaration: ExportAllDeclaration,
  12691. ExportDefaultDeclaration: ExportDefaultDeclaration,
  12692. exportDefaultDeclaration: ExportDefaultDeclaration,
  12693. ExportNamedDeclaration: ExportNamedDeclaration,
  12694. exportNamedDeclaration: ExportNamedDeclaration,
  12695. ExportSpecifier: ExportSpecifier,
  12696. exportSpecifier: ExportSpecifier,
  12697. ForOfStatement: ForOfStatement,
  12698. forOfStatement: ForOfStatement,
  12699. ImportDeclaration: ImportDeclaration,
  12700. importDeclaration: ImportDeclaration,
  12701. ImportDefaultSpecifier: ImportDefaultSpecifier,
  12702. importDefaultSpecifier: ImportDefaultSpecifier,
  12703. ImportNamespaceSpecifier: ImportNamespaceSpecifier,
  12704. importNamespaceSpecifier: ImportNamespaceSpecifier,
  12705. ImportSpecifier: ImportSpecifier,
  12706. importSpecifier: ImportSpecifier,
  12707. MetaProperty: MetaProperty,
  12708. metaProperty: MetaProperty,
  12709. ClassMethod: ClassMethod,
  12710. classMethod: ClassMethod,
  12711. ObjectPattern: ObjectPattern,
  12712. objectPattern: ObjectPattern,
  12713. SpreadElement: SpreadElement,
  12714. spreadElement: SpreadElement,
  12715. Super: Super,
  12716. 'super': Super,
  12717. TaggedTemplateExpression: TaggedTemplateExpression,
  12718. taggedTemplateExpression: TaggedTemplateExpression,
  12719. TemplateElement: TemplateElement,
  12720. templateElement: TemplateElement,
  12721. TemplateLiteral: TemplateLiteral,
  12722. templateLiteral: TemplateLiteral,
  12723. YieldExpression: YieldExpression,
  12724. yieldExpression: YieldExpression,
  12725. AnyTypeAnnotation: AnyTypeAnnotation,
  12726. anyTypeAnnotation: AnyTypeAnnotation,
  12727. ArrayTypeAnnotation: ArrayTypeAnnotation,
  12728. arrayTypeAnnotation: ArrayTypeAnnotation,
  12729. BooleanTypeAnnotation: BooleanTypeAnnotation,
  12730. booleanTypeAnnotation: BooleanTypeAnnotation,
  12731. BooleanLiteralTypeAnnotation: BooleanLiteralTypeAnnotation,
  12732. booleanLiteralTypeAnnotation: BooleanLiteralTypeAnnotation,
  12733. NullLiteralTypeAnnotation: NullLiteralTypeAnnotation,
  12734. nullLiteralTypeAnnotation: NullLiteralTypeAnnotation,
  12735. ClassImplements: ClassImplements,
  12736. classImplements: ClassImplements,
  12737. DeclareClass: DeclareClass,
  12738. declareClass: DeclareClass,
  12739. DeclareFunction: DeclareFunction,
  12740. declareFunction: DeclareFunction,
  12741. DeclareInterface: DeclareInterface,
  12742. declareInterface: DeclareInterface,
  12743. DeclareModule: DeclareModule,
  12744. declareModule: DeclareModule,
  12745. DeclareModuleExports: DeclareModuleExports,
  12746. declareModuleExports: DeclareModuleExports,
  12747. DeclareTypeAlias: DeclareTypeAlias,
  12748. declareTypeAlias: DeclareTypeAlias,
  12749. DeclareOpaqueType: DeclareOpaqueType,
  12750. declareOpaqueType: DeclareOpaqueType,
  12751. DeclareVariable: DeclareVariable,
  12752. declareVariable: DeclareVariable,
  12753. DeclareExportDeclaration: DeclareExportDeclaration,
  12754. declareExportDeclaration: DeclareExportDeclaration,
  12755. DeclareExportAllDeclaration: DeclareExportAllDeclaration,
  12756. declareExportAllDeclaration: DeclareExportAllDeclaration,
  12757. DeclaredPredicate: DeclaredPredicate,
  12758. declaredPredicate: DeclaredPredicate,
  12759. ExistsTypeAnnotation: ExistsTypeAnnotation,
  12760. existsTypeAnnotation: ExistsTypeAnnotation,
  12761. FunctionTypeAnnotation: FunctionTypeAnnotation,
  12762. functionTypeAnnotation: FunctionTypeAnnotation,
  12763. FunctionTypeParam: FunctionTypeParam,
  12764. functionTypeParam: FunctionTypeParam,
  12765. GenericTypeAnnotation: GenericTypeAnnotation,
  12766. genericTypeAnnotation: GenericTypeAnnotation,
  12767. InferredPredicate: InferredPredicate,
  12768. inferredPredicate: InferredPredicate,
  12769. InterfaceExtends: InterfaceExtends,
  12770. interfaceExtends: InterfaceExtends,
  12771. InterfaceDeclaration: InterfaceDeclaration,
  12772. interfaceDeclaration: InterfaceDeclaration,
  12773. InterfaceTypeAnnotation: InterfaceTypeAnnotation,
  12774. interfaceTypeAnnotation: InterfaceTypeAnnotation,
  12775. IntersectionTypeAnnotation: IntersectionTypeAnnotation,
  12776. intersectionTypeAnnotation: IntersectionTypeAnnotation,
  12777. MixedTypeAnnotation: MixedTypeAnnotation,
  12778. mixedTypeAnnotation: MixedTypeAnnotation,
  12779. EmptyTypeAnnotation: EmptyTypeAnnotation,
  12780. emptyTypeAnnotation: EmptyTypeAnnotation,
  12781. NullableTypeAnnotation: NullableTypeAnnotation,
  12782. nullableTypeAnnotation: NullableTypeAnnotation,
  12783. NumberLiteralTypeAnnotation: NumberLiteralTypeAnnotation,
  12784. numberLiteralTypeAnnotation: NumberLiteralTypeAnnotation,
  12785. NumberTypeAnnotation: NumberTypeAnnotation,
  12786. numberTypeAnnotation: NumberTypeAnnotation,
  12787. ObjectTypeAnnotation: ObjectTypeAnnotation,
  12788. objectTypeAnnotation: ObjectTypeAnnotation,
  12789. ObjectTypeInternalSlot: ObjectTypeInternalSlot,
  12790. objectTypeInternalSlot: ObjectTypeInternalSlot,
  12791. ObjectTypeCallProperty: ObjectTypeCallProperty,
  12792. objectTypeCallProperty: ObjectTypeCallProperty,
  12793. ObjectTypeIndexer: ObjectTypeIndexer,
  12794. objectTypeIndexer: ObjectTypeIndexer,
  12795. ObjectTypeProperty: ObjectTypeProperty,
  12796. objectTypeProperty: ObjectTypeProperty,
  12797. ObjectTypeSpreadProperty: ObjectTypeSpreadProperty,
  12798. objectTypeSpreadProperty: ObjectTypeSpreadProperty,
  12799. OpaqueType: OpaqueType,
  12800. opaqueType: OpaqueType,
  12801. QualifiedTypeIdentifier: QualifiedTypeIdentifier,
  12802. qualifiedTypeIdentifier: QualifiedTypeIdentifier,
  12803. StringLiteralTypeAnnotation: StringLiteralTypeAnnotation,
  12804. stringLiteralTypeAnnotation: StringLiteralTypeAnnotation,
  12805. StringTypeAnnotation: StringTypeAnnotation,
  12806. stringTypeAnnotation: StringTypeAnnotation,
  12807. ThisTypeAnnotation: ThisTypeAnnotation,
  12808. thisTypeAnnotation: ThisTypeAnnotation,
  12809. TupleTypeAnnotation: TupleTypeAnnotation,
  12810. tupleTypeAnnotation: TupleTypeAnnotation,
  12811. TypeofTypeAnnotation: TypeofTypeAnnotation,
  12812. typeofTypeAnnotation: TypeofTypeAnnotation,
  12813. TypeAlias: TypeAlias,
  12814. typeAlias: TypeAlias,
  12815. TypeAnnotation: TypeAnnotation,
  12816. typeAnnotation: TypeAnnotation,
  12817. TypeCastExpression: TypeCastExpression,
  12818. typeCastExpression: TypeCastExpression,
  12819. TypeParameter: TypeParameter,
  12820. typeParameter: TypeParameter,
  12821. TypeParameterDeclaration: TypeParameterDeclaration,
  12822. typeParameterDeclaration: TypeParameterDeclaration,
  12823. TypeParameterInstantiation: TypeParameterInstantiation,
  12824. typeParameterInstantiation: TypeParameterInstantiation,
  12825. UnionTypeAnnotation: UnionTypeAnnotation,
  12826. unionTypeAnnotation: UnionTypeAnnotation,
  12827. Variance: Variance,
  12828. variance: Variance,
  12829. VoidTypeAnnotation: VoidTypeAnnotation,
  12830. voidTypeAnnotation: VoidTypeAnnotation,
  12831. EnumDeclaration: EnumDeclaration,
  12832. enumDeclaration: EnumDeclaration,
  12833. EnumBooleanBody: EnumBooleanBody,
  12834. enumBooleanBody: EnumBooleanBody,
  12835. EnumNumberBody: EnumNumberBody,
  12836. enumNumberBody: EnumNumberBody,
  12837. EnumStringBody: EnumStringBody,
  12838. enumStringBody: EnumStringBody,
  12839. EnumSymbolBody: EnumSymbolBody,
  12840. enumSymbolBody: EnumSymbolBody,
  12841. EnumBooleanMember: EnumBooleanMember,
  12842. enumBooleanMember: EnumBooleanMember,
  12843. EnumNumberMember: EnumNumberMember,
  12844. enumNumberMember: EnumNumberMember,
  12845. EnumStringMember: EnumStringMember,
  12846. enumStringMember: EnumStringMember,
  12847. EnumDefaultedMember: EnumDefaultedMember,
  12848. enumDefaultedMember: EnumDefaultedMember,
  12849. JSXAttribute: JSXAttribute,
  12850. jsxAttribute: JSXAttribute,
  12851. jSXAttribute: JSXAttribute,
  12852. JSXClosingElement: JSXClosingElement,
  12853. jsxClosingElement: JSXClosingElement,
  12854. jSXClosingElement: JSXClosingElement,
  12855. JSXElement: JSXElement,
  12856. jsxElement: JSXElement,
  12857. jSXElement: JSXElement,
  12858. JSXEmptyExpression: JSXEmptyExpression,
  12859. jsxEmptyExpression: JSXEmptyExpression,
  12860. jSXEmptyExpression: JSXEmptyExpression,
  12861. JSXExpressionContainer: JSXExpressionContainer,
  12862. jsxExpressionContainer: JSXExpressionContainer,
  12863. jSXExpressionContainer: JSXExpressionContainer,
  12864. JSXSpreadChild: JSXSpreadChild,
  12865. jsxSpreadChild: JSXSpreadChild,
  12866. jSXSpreadChild: JSXSpreadChild,
  12867. JSXIdentifier: JSXIdentifier,
  12868. jsxIdentifier: JSXIdentifier,
  12869. jSXIdentifier: JSXIdentifier,
  12870. JSXMemberExpression: JSXMemberExpression,
  12871. jsxMemberExpression: JSXMemberExpression,
  12872. jSXMemberExpression: JSXMemberExpression,
  12873. JSXNamespacedName: JSXNamespacedName,
  12874. jsxNamespacedName: JSXNamespacedName,
  12875. jSXNamespacedName: JSXNamespacedName,
  12876. JSXOpeningElement: JSXOpeningElement,
  12877. jsxOpeningElement: JSXOpeningElement,
  12878. jSXOpeningElement: JSXOpeningElement,
  12879. JSXSpreadAttribute: JSXSpreadAttribute,
  12880. jsxSpreadAttribute: JSXSpreadAttribute,
  12881. jSXSpreadAttribute: JSXSpreadAttribute,
  12882. JSXText: JSXText,
  12883. jsxText: JSXText,
  12884. jSXText: JSXText,
  12885. JSXFragment: JSXFragment,
  12886. jsxFragment: JSXFragment,
  12887. jSXFragment: JSXFragment,
  12888. JSXOpeningFragment: JSXOpeningFragment,
  12889. jsxOpeningFragment: JSXOpeningFragment,
  12890. jSXOpeningFragment: JSXOpeningFragment,
  12891. JSXClosingFragment: JSXClosingFragment,
  12892. jsxClosingFragment: JSXClosingFragment,
  12893. jSXClosingFragment: JSXClosingFragment,
  12894. Noop: Noop,
  12895. noop: Noop,
  12896. Placeholder: Placeholder,
  12897. placeholder: Placeholder,
  12898. V8IntrinsicIdentifier: V8IntrinsicIdentifier,
  12899. v8IntrinsicIdentifier: V8IntrinsicIdentifier,
  12900. ArgumentPlaceholder: ArgumentPlaceholder,
  12901. argumentPlaceholder: ArgumentPlaceholder,
  12902. AwaitExpression: AwaitExpression,
  12903. awaitExpression: AwaitExpression,
  12904. BindExpression: BindExpression,
  12905. bindExpression: BindExpression,
  12906. ClassProperty: ClassProperty,
  12907. classProperty: ClassProperty,
  12908. OptionalMemberExpression: OptionalMemberExpression,
  12909. optionalMemberExpression: OptionalMemberExpression,
  12910. PipelineTopicExpression: PipelineTopicExpression,
  12911. pipelineTopicExpression: PipelineTopicExpression,
  12912. PipelineBareFunction: PipelineBareFunction,
  12913. pipelineBareFunction: PipelineBareFunction,
  12914. PipelinePrimaryTopicReference: PipelinePrimaryTopicReference,
  12915. pipelinePrimaryTopicReference: PipelinePrimaryTopicReference,
  12916. OptionalCallExpression: OptionalCallExpression,
  12917. optionalCallExpression: OptionalCallExpression,
  12918. ClassPrivateProperty: ClassPrivateProperty,
  12919. classPrivateProperty: ClassPrivateProperty,
  12920. ClassPrivateMethod: ClassPrivateMethod,
  12921. classPrivateMethod: ClassPrivateMethod,
  12922. Import: Import,
  12923. 'import': Import,
  12924. Decorator: Decorator,
  12925. decorator: Decorator,
  12926. DoExpression: DoExpression,
  12927. doExpression: DoExpression,
  12928. ExportDefaultSpecifier: ExportDefaultSpecifier,
  12929. exportDefaultSpecifier: ExportDefaultSpecifier,
  12930. ExportNamespaceSpecifier: ExportNamespaceSpecifier,
  12931. exportNamespaceSpecifier: ExportNamespaceSpecifier,
  12932. PrivateName: PrivateName,
  12933. privateName: PrivateName,
  12934. BigIntLiteral: BigIntLiteral,
  12935. bigIntLiteral: BigIntLiteral,
  12936. TSParameterProperty: TSParameterProperty,
  12937. tsParameterProperty: TSParameterProperty,
  12938. tSParameterProperty: TSParameterProperty,
  12939. TSDeclareFunction: TSDeclareFunction,
  12940. tsDeclareFunction: TSDeclareFunction,
  12941. tSDeclareFunction: TSDeclareFunction,
  12942. TSDeclareMethod: TSDeclareMethod,
  12943. tsDeclareMethod: TSDeclareMethod,
  12944. tSDeclareMethod: TSDeclareMethod,
  12945. TSQualifiedName: TSQualifiedName,
  12946. tsQualifiedName: TSQualifiedName,
  12947. tSQualifiedName: TSQualifiedName,
  12948. TSCallSignatureDeclaration: TSCallSignatureDeclaration,
  12949. tsCallSignatureDeclaration: TSCallSignatureDeclaration,
  12950. tSCallSignatureDeclaration: TSCallSignatureDeclaration,
  12951. TSConstructSignatureDeclaration: TSConstructSignatureDeclaration,
  12952. tsConstructSignatureDeclaration: TSConstructSignatureDeclaration,
  12953. tSConstructSignatureDeclaration: TSConstructSignatureDeclaration,
  12954. TSPropertySignature: TSPropertySignature,
  12955. tsPropertySignature: TSPropertySignature,
  12956. tSPropertySignature: TSPropertySignature,
  12957. TSMethodSignature: TSMethodSignature,
  12958. tsMethodSignature: TSMethodSignature,
  12959. tSMethodSignature: TSMethodSignature,
  12960. TSIndexSignature: TSIndexSignature,
  12961. tsIndexSignature: TSIndexSignature,
  12962. tSIndexSignature: TSIndexSignature,
  12963. TSAnyKeyword: TSAnyKeyword,
  12964. tsAnyKeyword: TSAnyKeyword,
  12965. tSAnyKeyword: TSAnyKeyword,
  12966. TSBooleanKeyword: TSBooleanKeyword,
  12967. tsBooleanKeyword: TSBooleanKeyword,
  12968. tSBooleanKeyword: TSBooleanKeyword,
  12969. TSBigIntKeyword: TSBigIntKeyword,
  12970. tsBigIntKeyword: TSBigIntKeyword,
  12971. tSBigIntKeyword: TSBigIntKeyword,
  12972. TSNeverKeyword: TSNeverKeyword,
  12973. tsNeverKeyword: TSNeverKeyword,
  12974. tSNeverKeyword: TSNeverKeyword,
  12975. TSNullKeyword: TSNullKeyword,
  12976. tsNullKeyword: TSNullKeyword,
  12977. tSNullKeyword: TSNullKeyword,
  12978. TSNumberKeyword: TSNumberKeyword,
  12979. tsNumberKeyword: TSNumberKeyword,
  12980. tSNumberKeyword: TSNumberKeyword,
  12981. TSObjectKeyword: TSObjectKeyword,
  12982. tsObjectKeyword: TSObjectKeyword,
  12983. tSObjectKeyword: TSObjectKeyword,
  12984. TSStringKeyword: TSStringKeyword,
  12985. tsStringKeyword: TSStringKeyword,
  12986. tSStringKeyword: TSStringKeyword,
  12987. TSSymbolKeyword: TSSymbolKeyword,
  12988. tsSymbolKeyword: TSSymbolKeyword,
  12989. tSSymbolKeyword: TSSymbolKeyword,
  12990. TSUndefinedKeyword: TSUndefinedKeyword,
  12991. tsUndefinedKeyword: TSUndefinedKeyword,
  12992. tSUndefinedKeyword: TSUndefinedKeyword,
  12993. TSUnknownKeyword: TSUnknownKeyword,
  12994. tsUnknownKeyword: TSUnknownKeyword,
  12995. tSUnknownKeyword: TSUnknownKeyword,
  12996. TSVoidKeyword: TSVoidKeyword,
  12997. tsVoidKeyword: TSVoidKeyword,
  12998. tSVoidKeyword: TSVoidKeyword,
  12999. TSThisType: TSThisType,
  13000. tsThisType: TSThisType,
  13001. tSThisType: TSThisType,
  13002. TSFunctionType: TSFunctionType,
  13003. tsFunctionType: TSFunctionType,
  13004. tSFunctionType: TSFunctionType,
  13005. TSConstructorType: TSConstructorType,
  13006. tsConstructorType: TSConstructorType,
  13007. tSConstructorType: TSConstructorType,
  13008. TSTypeReference: TSTypeReference,
  13009. tsTypeReference: TSTypeReference,
  13010. tSTypeReference: TSTypeReference,
  13011. TSTypePredicate: TSTypePredicate,
  13012. tsTypePredicate: TSTypePredicate,
  13013. tSTypePredicate: TSTypePredicate,
  13014. TSTypeQuery: TSTypeQuery,
  13015. tsTypeQuery: TSTypeQuery,
  13016. tSTypeQuery: TSTypeQuery,
  13017. TSTypeLiteral: TSTypeLiteral,
  13018. tsTypeLiteral: TSTypeLiteral,
  13019. tSTypeLiteral: TSTypeLiteral,
  13020. TSArrayType: TSArrayType,
  13021. tsArrayType: TSArrayType,
  13022. tSArrayType: TSArrayType,
  13023. TSTupleType: TSTupleType,
  13024. tsTupleType: TSTupleType,
  13025. tSTupleType: TSTupleType,
  13026. TSOptionalType: TSOptionalType,
  13027. tsOptionalType: TSOptionalType,
  13028. tSOptionalType: TSOptionalType,
  13029. TSRestType: TSRestType,
  13030. tsRestType: TSRestType,
  13031. tSRestType: TSRestType,
  13032. TSUnionType: TSUnionType,
  13033. tsUnionType: TSUnionType,
  13034. tSUnionType: TSUnionType,
  13035. TSIntersectionType: TSIntersectionType,
  13036. tsIntersectionType: TSIntersectionType,
  13037. tSIntersectionType: TSIntersectionType,
  13038. TSConditionalType: TSConditionalType,
  13039. tsConditionalType: TSConditionalType,
  13040. tSConditionalType: TSConditionalType,
  13041. TSInferType: TSInferType,
  13042. tsInferType: TSInferType,
  13043. tSInferType: TSInferType,
  13044. TSParenthesizedType: TSParenthesizedType,
  13045. tsParenthesizedType: TSParenthesizedType,
  13046. tSParenthesizedType: TSParenthesizedType,
  13047. TSTypeOperator: TSTypeOperator,
  13048. tsTypeOperator: TSTypeOperator,
  13049. tSTypeOperator: TSTypeOperator,
  13050. TSIndexedAccessType: TSIndexedAccessType,
  13051. tsIndexedAccessType: TSIndexedAccessType,
  13052. tSIndexedAccessType: TSIndexedAccessType,
  13053. TSMappedType: TSMappedType,
  13054. tsMappedType: TSMappedType,
  13055. tSMappedType: TSMappedType,
  13056. TSLiteralType: TSLiteralType,
  13057. tsLiteralType: TSLiteralType,
  13058. tSLiteralType: TSLiteralType,
  13059. TSExpressionWithTypeArguments: TSExpressionWithTypeArguments,
  13060. tsExpressionWithTypeArguments: TSExpressionWithTypeArguments,
  13061. tSExpressionWithTypeArguments: TSExpressionWithTypeArguments,
  13062. TSInterfaceDeclaration: TSInterfaceDeclaration,
  13063. tsInterfaceDeclaration: TSInterfaceDeclaration,
  13064. tSInterfaceDeclaration: TSInterfaceDeclaration,
  13065. TSInterfaceBody: TSInterfaceBody,
  13066. tsInterfaceBody: TSInterfaceBody,
  13067. tSInterfaceBody: TSInterfaceBody,
  13068. TSTypeAliasDeclaration: TSTypeAliasDeclaration,
  13069. tsTypeAliasDeclaration: TSTypeAliasDeclaration,
  13070. tSTypeAliasDeclaration: TSTypeAliasDeclaration,
  13071. TSAsExpression: TSAsExpression,
  13072. tsAsExpression: TSAsExpression,
  13073. tSAsExpression: TSAsExpression,
  13074. TSTypeAssertion: TSTypeAssertion,
  13075. tsTypeAssertion: TSTypeAssertion,
  13076. tSTypeAssertion: TSTypeAssertion,
  13077. TSEnumDeclaration: TSEnumDeclaration,
  13078. tsEnumDeclaration: TSEnumDeclaration,
  13079. tSEnumDeclaration: TSEnumDeclaration,
  13080. TSEnumMember: TSEnumMember,
  13081. tsEnumMember: TSEnumMember,
  13082. tSEnumMember: TSEnumMember,
  13083. TSModuleDeclaration: TSModuleDeclaration,
  13084. tsModuleDeclaration: TSModuleDeclaration,
  13085. tSModuleDeclaration: TSModuleDeclaration,
  13086. TSModuleBlock: TSModuleBlock,
  13087. tsModuleBlock: TSModuleBlock,
  13088. tSModuleBlock: TSModuleBlock,
  13089. TSImportType: TSImportType,
  13090. tsImportType: TSImportType,
  13091. tSImportType: TSImportType,
  13092. TSImportEqualsDeclaration: TSImportEqualsDeclaration,
  13093. tsImportEqualsDeclaration: TSImportEqualsDeclaration,
  13094. tSImportEqualsDeclaration: TSImportEqualsDeclaration,
  13095. TSExternalModuleReference: TSExternalModuleReference,
  13096. tsExternalModuleReference: TSExternalModuleReference,
  13097. tSExternalModuleReference: TSExternalModuleReference,
  13098. TSNonNullExpression: TSNonNullExpression,
  13099. tsNonNullExpression: TSNonNullExpression,
  13100. tSNonNullExpression: TSNonNullExpression,
  13101. TSExportAssignment: TSExportAssignment,
  13102. tsExportAssignment: TSExportAssignment,
  13103. tSExportAssignment: TSExportAssignment,
  13104. TSNamespaceExportDeclaration: TSNamespaceExportDeclaration,
  13105. tsNamespaceExportDeclaration: TSNamespaceExportDeclaration,
  13106. tSNamespaceExportDeclaration: TSNamespaceExportDeclaration,
  13107. TSTypeAnnotation: TSTypeAnnotation,
  13108. tsTypeAnnotation: TSTypeAnnotation,
  13109. tSTypeAnnotation: TSTypeAnnotation,
  13110. TSTypeParameterInstantiation: TSTypeParameterInstantiation,
  13111. tsTypeParameterInstantiation: TSTypeParameterInstantiation,
  13112. tSTypeParameterInstantiation: TSTypeParameterInstantiation,
  13113. TSTypeParameterDeclaration: TSTypeParameterDeclaration,
  13114. tsTypeParameterDeclaration: TSTypeParameterDeclaration,
  13115. tSTypeParameterDeclaration: TSTypeParameterDeclaration,
  13116. TSTypeParameter: TSTypeParameter,
  13117. tsTypeParameter: TSTypeParameter,
  13118. tSTypeParameter: TSTypeParameter,
  13119. NumberLiteral: NumberLiteral,
  13120. numberLiteral: NumberLiteral,
  13121. RegexLiteral: RegexLiteral,
  13122. regexLiteral: RegexLiteral,
  13123. RestProperty: RestProperty,
  13124. restProperty: RestProperty,
  13125. SpreadProperty: SpreadProperty,
  13126. spreadProperty: SpreadProperty,
  13127. EXPRESSION_TYPES: EXPRESSION_TYPES,
  13128. BINARY_TYPES: BINARY_TYPES,
  13129. SCOPABLE_TYPES: SCOPABLE_TYPES,
  13130. BLOCKPARENT_TYPES: BLOCKPARENT_TYPES,
  13131. BLOCK_TYPES: BLOCK_TYPES,
  13132. STATEMENT_TYPES: STATEMENT_TYPES,
  13133. TERMINATORLESS_TYPES: TERMINATORLESS_TYPES,
  13134. COMPLETIONSTATEMENT_TYPES: COMPLETIONSTATEMENT_TYPES,
  13135. CONDITIONAL_TYPES: CONDITIONAL_TYPES,
  13136. LOOP_TYPES: LOOP_TYPES,
  13137. WHILE_TYPES: WHILE_TYPES,
  13138. EXPRESSIONWRAPPER_TYPES: EXPRESSIONWRAPPER_TYPES,
  13139. FOR_TYPES: FOR_TYPES,
  13140. FORXSTATEMENT_TYPES: FORXSTATEMENT_TYPES,
  13141. FUNCTION_TYPES: FUNCTION_TYPES,
  13142. FUNCTIONPARENT_TYPES: FUNCTIONPARENT_TYPES,
  13143. PUREISH_TYPES: PUREISH_TYPES,
  13144. DECLARATION_TYPES: DECLARATION_TYPES,
  13145. PATTERNLIKE_TYPES: PATTERNLIKE_TYPES,
  13146. LVAL_TYPES: LVAL_TYPES,
  13147. TSENTITYNAME_TYPES: TSENTITYNAME_TYPES,
  13148. LITERAL_TYPES: LITERAL_TYPES,
  13149. IMMUTABLE_TYPES: IMMUTABLE_TYPES,
  13150. USERWHITESPACABLE_TYPES: USERWHITESPACABLE_TYPES,
  13151. METHOD_TYPES: METHOD_TYPES,
  13152. OBJECTMEMBER_TYPES: OBJECTMEMBER_TYPES,
  13153. PROPERTY_TYPES: PROPERTY_TYPES,
  13154. UNARYLIKE_TYPES: UNARYLIKE_TYPES,
  13155. PATTERN_TYPES: PATTERN_TYPES,
  13156. CLASS_TYPES: CLASS_TYPES,
  13157. MODULEDECLARATION_TYPES: MODULEDECLARATION_TYPES,
  13158. EXPORTDECLARATION_TYPES: EXPORTDECLARATION_TYPES,
  13159. MODULESPECIFIER_TYPES: MODULESPECIFIER_TYPES,
  13160. FLOW_TYPES: FLOW_TYPES,
  13161. FLOWTYPE_TYPES: FLOWTYPE_TYPES,
  13162. FLOWBASEANNOTATION_TYPES: FLOWBASEANNOTATION_TYPES,
  13163. FLOWDECLARATION_TYPES: FLOWDECLARATION_TYPES,
  13164. FLOWPREDICATE_TYPES: FLOWPREDICATE_TYPES,
  13165. ENUMBODY_TYPES: ENUMBODY_TYPES,
  13166. ENUMMEMBER_TYPES: ENUMMEMBER_TYPES,
  13167. JSX_TYPES: JSX_TYPES,
  13168. PRIVATE_TYPES: PRIVATE_TYPES,
  13169. TSTYPEELEMENT_TYPES: TSTYPEELEMENT_TYPES,
  13170. TSTYPE_TYPES: TSTYPE_TYPES,
  13171. STATEMENT_OR_BLOCK_KEYS: STATEMENT_OR_BLOCK_KEYS,
  13172. FLATTENABLE_KEYS: FLATTENABLE_KEYS,
  13173. FOR_INIT_KEYS: FOR_INIT_KEYS,
  13174. COMMENT_KEYS: COMMENT_KEYS,
  13175. LOGICAL_OPERATORS: LOGICAL_OPERATORS,
  13176. UPDATE_OPERATORS: UPDATE_OPERATORS,
  13177. BOOLEAN_NUMBER_BINARY_OPERATORS: BOOLEAN_NUMBER_BINARY_OPERATORS,
  13178. EQUALITY_BINARY_OPERATORS: EQUALITY_BINARY_OPERATORS,
  13179. COMPARISON_BINARY_OPERATORS: COMPARISON_BINARY_OPERATORS,
  13180. BOOLEAN_BINARY_OPERATORS: BOOLEAN_BINARY_OPERATORS,
  13181. NUMBER_BINARY_OPERATORS: NUMBER_BINARY_OPERATORS,
  13182. BINARY_OPERATORS: BINARY_OPERATORS,
  13183. ASSIGNMENT_OPERATORS: ASSIGNMENT_OPERATORS,
  13184. BOOLEAN_UNARY_OPERATORS: BOOLEAN_UNARY_OPERATORS,
  13185. NUMBER_UNARY_OPERATORS: NUMBER_UNARY_OPERATORS,
  13186. STRING_UNARY_OPERATORS: STRING_UNARY_OPERATORS,
  13187. UNARY_OPERATORS: UNARY_OPERATORS,
  13188. INHERIT_KEYS: INHERIT_KEYS,
  13189. BLOCK_SCOPED_SYMBOL: BLOCK_SCOPED_SYMBOL,
  13190. NOT_LOCAL_BINDING: NOT_LOCAL_BINDING,
  13191. VISITOR_KEYS: VISITOR_KEYS,
  13192. ALIAS_KEYS: ALIAS_KEYS,
  13193. FLIPPED_ALIAS_KEYS: FLIPPED_ALIAS_KEYS,
  13194. NODE_FIELDS: NODE_FIELDS,
  13195. BUILDER_KEYS: BUILDER_KEYS,
  13196. DEPRECATED_KEYS: DEPRECATED_KEYS,
  13197. NODE_PARENT_VALIDATIONS: NODE_PARENT_VALIDATIONS,
  13198. PLACEHOLDERS: PLACEHOLDERS,
  13199. PLACEHOLDERS_ALIAS: PLACEHOLDERS_ALIAS,
  13200. PLACEHOLDERS_FLIPPED_ALIAS: PLACEHOLDERS_FLIPPED_ALIAS,
  13201. TYPES: TYPES,
  13202. isArrayExpression: isArrayExpression,
  13203. isAssignmentExpression: isAssignmentExpression,
  13204. isBinaryExpression: isBinaryExpression,
  13205. isInterpreterDirective: isInterpreterDirective,
  13206. isDirective: isDirective,
  13207. isDirectiveLiteral: isDirectiveLiteral,
  13208. isBlockStatement: isBlockStatement,
  13209. isBreakStatement: isBreakStatement,
  13210. isCallExpression: isCallExpression,
  13211. isCatchClause: isCatchClause,
  13212. isConditionalExpression: isConditionalExpression,
  13213. isContinueStatement: isContinueStatement,
  13214. isDebuggerStatement: isDebuggerStatement,
  13215. isDoWhileStatement: isDoWhileStatement,
  13216. isEmptyStatement: isEmptyStatement,
  13217. isExpressionStatement: isExpressionStatement,
  13218. isFile: isFile,
  13219. isForInStatement: isForInStatement,
  13220. isForStatement: isForStatement,
  13221. isFunctionDeclaration: isFunctionDeclaration,
  13222. isFunctionExpression: isFunctionExpression,
  13223. isIdentifier: isIdentifier,
  13224. isIfStatement: isIfStatement,
  13225. isLabeledStatement: isLabeledStatement,
  13226. isStringLiteral: isStringLiteral,
  13227. isNumericLiteral: isNumericLiteral,
  13228. isNullLiteral: isNullLiteral,
  13229. isBooleanLiteral: isBooleanLiteral,
  13230. isRegExpLiteral: isRegExpLiteral,
  13231. isLogicalExpression: isLogicalExpression,
  13232. isMemberExpression: isMemberExpression,
  13233. isNewExpression: isNewExpression,
  13234. isProgram: isProgram,
  13235. isObjectExpression: isObjectExpression,
  13236. isObjectMethod: isObjectMethod,
  13237. isObjectProperty: isObjectProperty,
  13238. isRestElement: isRestElement,
  13239. isReturnStatement: isReturnStatement,
  13240. isSequenceExpression: isSequenceExpression,
  13241. isParenthesizedExpression: isParenthesizedExpression,
  13242. isSwitchCase: isSwitchCase,
  13243. isSwitchStatement: isSwitchStatement,
  13244. isThisExpression: isThisExpression,
  13245. isThrowStatement: isThrowStatement,
  13246. isTryStatement: isTryStatement,
  13247. isUnaryExpression: isUnaryExpression,
  13248. isUpdateExpression: isUpdateExpression,
  13249. isVariableDeclaration: isVariableDeclaration,
  13250. isVariableDeclarator: isVariableDeclarator,
  13251. isWhileStatement: isWhileStatement,
  13252. isWithStatement: isWithStatement,
  13253. isAssignmentPattern: isAssignmentPattern,
  13254. isArrayPattern: isArrayPattern,
  13255. isArrowFunctionExpression: isArrowFunctionExpression,
  13256. isClassBody: isClassBody,
  13257. isClassExpression: isClassExpression,
  13258. isClassDeclaration: isClassDeclaration,
  13259. isExportAllDeclaration: isExportAllDeclaration,
  13260. isExportDefaultDeclaration: isExportDefaultDeclaration,
  13261. isExportNamedDeclaration: isExportNamedDeclaration,
  13262. isExportSpecifier: isExportSpecifier,
  13263. isForOfStatement: isForOfStatement,
  13264. isImportDeclaration: isImportDeclaration,
  13265. isImportDefaultSpecifier: isImportDefaultSpecifier,
  13266. isImportNamespaceSpecifier: isImportNamespaceSpecifier,
  13267. isImportSpecifier: isImportSpecifier,
  13268. isMetaProperty: isMetaProperty,
  13269. isClassMethod: isClassMethod,
  13270. isObjectPattern: isObjectPattern,
  13271. isSpreadElement: isSpreadElement,
  13272. isSuper: isSuper,
  13273. isTaggedTemplateExpression: isTaggedTemplateExpression,
  13274. isTemplateElement: isTemplateElement,
  13275. isTemplateLiteral: isTemplateLiteral,
  13276. isYieldExpression: isYieldExpression,
  13277. isAnyTypeAnnotation: isAnyTypeAnnotation,
  13278. isArrayTypeAnnotation: isArrayTypeAnnotation,
  13279. isBooleanTypeAnnotation: isBooleanTypeAnnotation,
  13280. isBooleanLiteralTypeAnnotation: isBooleanLiteralTypeAnnotation,
  13281. isNullLiteralTypeAnnotation: isNullLiteralTypeAnnotation,
  13282. isClassImplements: isClassImplements,
  13283. isDeclareClass: isDeclareClass,
  13284. isDeclareFunction: isDeclareFunction,
  13285. isDeclareInterface: isDeclareInterface,
  13286. isDeclareModule: isDeclareModule,
  13287. isDeclareModuleExports: isDeclareModuleExports,
  13288. isDeclareTypeAlias: isDeclareTypeAlias,
  13289. isDeclareOpaqueType: isDeclareOpaqueType,
  13290. isDeclareVariable: isDeclareVariable,
  13291. isDeclareExportDeclaration: isDeclareExportDeclaration,
  13292. isDeclareExportAllDeclaration: isDeclareExportAllDeclaration,
  13293. isDeclaredPredicate: isDeclaredPredicate,
  13294. isExistsTypeAnnotation: isExistsTypeAnnotation,
  13295. isFunctionTypeAnnotation: isFunctionTypeAnnotation,
  13296. isFunctionTypeParam: isFunctionTypeParam,
  13297. isGenericTypeAnnotation: isGenericTypeAnnotation,
  13298. isInferredPredicate: isInferredPredicate,
  13299. isInterfaceExtends: isInterfaceExtends,
  13300. isInterfaceDeclaration: isInterfaceDeclaration,
  13301. isInterfaceTypeAnnotation: isInterfaceTypeAnnotation,
  13302. isIntersectionTypeAnnotation: isIntersectionTypeAnnotation,
  13303. isMixedTypeAnnotation: isMixedTypeAnnotation,
  13304. isEmptyTypeAnnotation: isEmptyTypeAnnotation,
  13305. isNullableTypeAnnotation: isNullableTypeAnnotation,
  13306. isNumberLiteralTypeAnnotation: isNumberLiteralTypeAnnotation,
  13307. isNumberTypeAnnotation: isNumberTypeAnnotation,
  13308. isObjectTypeAnnotation: isObjectTypeAnnotation,
  13309. isObjectTypeInternalSlot: isObjectTypeInternalSlot,
  13310. isObjectTypeCallProperty: isObjectTypeCallProperty,
  13311. isObjectTypeIndexer: isObjectTypeIndexer,
  13312. isObjectTypeProperty: isObjectTypeProperty,
  13313. isObjectTypeSpreadProperty: isObjectTypeSpreadProperty,
  13314. isOpaqueType: isOpaqueType,
  13315. isQualifiedTypeIdentifier: isQualifiedTypeIdentifier,
  13316. isStringLiteralTypeAnnotation: isStringLiteralTypeAnnotation,
  13317. isStringTypeAnnotation: isStringTypeAnnotation,
  13318. isThisTypeAnnotation: isThisTypeAnnotation,
  13319. isTupleTypeAnnotation: isTupleTypeAnnotation,
  13320. isTypeofTypeAnnotation: isTypeofTypeAnnotation,
  13321. isTypeAlias: isTypeAlias,
  13322. isTypeAnnotation: isTypeAnnotation,
  13323. isTypeCastExpression: isTypeCastExpression,
  13324. isTypeParameter: isTypeParameter,
  13325. isTypeParameterDeclaration: isTypeParameterDeclaration,
  13326. isTypeParameterInstantiation: isTypeParameterInstantiation,
  13327. isUnionTypeAnnotation: isUnionTypeAnnotation,
  13328. isVariance: isVariance,
  13329. isVoidTypeAnnotation: isVoidTypeAnnotation,
  13330. isEnumDeclaration: isEnumDeclaration,
  13331. isEnumBooleanBody: isEnumBooleanBody,
  13332. isEnumNumberBody: isEnumNumberBody,
  13333. isEnumStringBody: isEnumStringBody,
  13334. isEnumSymbolBody: isEnumSymbolBody,
  13335. isEnumBooleanMember: isEnumBooleanMember,
  13336. isEnumNumberMember: isEnumNumberMember,
  13337. isEnumStringMember: isEnumStringMember,
  13338. isEnumDefaultedMember: isEnumDefaultedMember,
  13339. isJSXAttribute: isJSXAttribute,
  13340. isJSXClosingElement: isJSXClosingElement,
  13341. isJSXElement: isJSXElement,
  13342. isJSXEmptyExpression: isJSXEmptyExpression,
  13343. isJSXExpressionContainer: isJSXExpressionContainer,
  13344. isJSXSpreadChild: isJSXSpreadChild,
  13345. isJSXIdentifier: isJSXIdentifier,
  13346. isJSXMemberExpression: isJSXMemberExpression,
  13347. isJSXNamespacedName: isJSXNamespacedName,
  13348. isJSXOpeningElement: isJSXOpeningElement,
  13349. isJSXSpreadAttribute: isJSXSpreadAttribute,
  13350. isJSXText: isJSXText,
  13351. isJSXFragment: isJSXFragment,
  13352. isJSXOpeningFragment: isJSXOpeningFragment,
  13353. isJSXClosingFragment: isJSXClosingFragment,
  13354. isNoop: isNoop,
  13355. isPlaceholder: isPlaceholder,
  13356. isV8IntrinsicIdentifier: isV8IntrinsicIdentifier,
  13357. isArgumentPlaceholder: isArgumentPlaceholder,
  13358. isAwaitExpression: isAwaitExpression,
  13359. isBindExpression: isBindExpression,
  13360. isClassProperty: isClassProperty,
  13361. isOptionalMemberExpression: isOptionalMemberExpression,
  13362. isPipelineTopicExpression: isPipelineTopicExpression,
  13363. isPipelineBareFunction: isPipelineBareFunction,
  13364. isPipelinePrimaryTopicReference: isPipelinePrimaryTopicReference,
  13365. isOptionalCallExpression: isOptionalCallExpression,
  13366. isClassPrivateProperty: isClassPrivateProperty,
  13367. isClassPrivateMethod: isClassPrivateMethod,
  13368. isImport: isImport,
  13369. isDecorator: isDecorator,
  13370. isDoExpression: isDoExpression,
  13371. isExportDefaultSpecifier: isExportDefaultSpecifier,
  13372. isExportNamespaceSpecifier: isExportNamespaceSpecifier,
  13373. isPrivateName: isPrivateName,
  13374. isBigIntLiteral: isBigIntLiteral,
  13375. isTSParameterProperty: isTSParameterProperty,
  13376. isTSDeclareFunction: isTSDeclareFunction,
  13377. isTSDeclareMethod: isTSDeclareMethod,
  13378. isTSQualifiedName: isTSQualifiedName,
  13379. isTSCallSignatureDeclaration: isTSCallSignatureDeclaration,
  13380. isTSConstructSignatureDeclaration: isTSConstructSignatureDeclaration,
  13381. isTSPropertySignature: isTSPropertySignature,
  13382. isTSMethodSignature: isTSMethodSignature,
  13383. isTSIndexSignature: isTSIndexSignature,
  13384. isTSAnyKeyword: isTSAnyKeyword,
  13385. isTSBooleanKeyword: isTSBooleanKeyword,
  13386. isTSBigIntKeyword: isTSBigIntKeyword,
  13387. isTSNeverKeyword: isTSNeverKeyword,
  13388. isTSNullKeyword: isTSNullKeyword,
  13389. isTSNumberKeyword: isTSNumberKeyword,
  13390. isTSObjectKeyword: isTSObjectKeyword,
  13391. isTSStringKeyword: isTSStringKeyword,
  13392. isTSSymbolKeyword: isTSSymbolKeyword,
  13393. isTSUndefinedKeyword: isTSUndefinedKeyword,
  13394. isTSUnknownKeyword: isTSUnknownKeyword,
  13395. isTSVoidKeyword: isTSVoidKeyword,
  13396. isTSThisType: isTSThisType,
  13397. isTSFunctionType: isTSFunctionType,
  13398. isTSConstructorType: isTSConstructorType,
  13399. isTSTypeReference: isTSTypeReference,
  13400. isTSTypePredicate: isTSTypePredicate,
  13401. isTSTypeQuery: isTSTypeQuery,
  13402. isTSTypeLiteral: isTSTypeLiteral,
  13403. isTSArrayType: isTSArrayType,
  13404. isTSTupleType: isTSTupleType,
  13405. isTSOptionalType: isTSOptionalType,
  13406. isTSRestType: isTSRestType,
  13407. isTSUnionType: isTSUnionType,
  13408. isTSIntersectionType: isTSIntersectionType,
  13409. isTSConditionalType: isTSConditionalType,
  13410. isTSInferType: isTSInferType,
  13411. isTSParenthesizedType: isTSParenthesizedType,
  13412. isTSTypeOperator: isTSTypeOperator,
  13413. isTSIndexedAccessType: isTSIndexedAccessType,
  13414. isTSMappedType: isTSMappedType,
  13415. isTSLiteralType: isTSLiteralType,
  13416. isTSExpressionWithTypeArguments: isTSExpressionWithTypeArguments,
  13417. isTSInterfaceDeclaration: isTSInterfaceDeclaration,
  13418. isTSInterfaceBody: isTSInterfaceBody,
  13419. isTSTypeAliasDeclaration: isTSTypeAliasDeclaration,
  13420. isTSAsExpression: isTSAsExpression,
  13421. isTSTypeAssertion: isTSTypeAssertion,
  13422. isTSEnumDeclaration: isTSEnumDeclaration,
  13423. isTSEnumMember: isTSEnumMember,
  13424. isTSModuleDeclaration: isTSModuleDeclaration,
  13425. isTSModuleBlock: isTSModuleBlock,
  13426. isTSImportType: isTSImportType,
  13427. isTSImportEqualsDeclaration: isTSImportEqualsDeclaration,
  13428. isTSExternalModuleReference: isTSExternalModuleReference,
  13429. isTSNonNullExpression: isTSNonNullExpression,
  13430. isTSExportAssignment: isTSExportAssignment,
  13431. isTSNamespaceExportDeclaration: isTSNamespaceExportDeclaration,
  13432. isTSTypeAnnotation: isTSTypeAnnotation,
  13433. isTSTypeParameterInstantiation: isTSTypeParameterInstantiation,
  13434. isTSTypeParameterDeclaration: isTSTypeParameterDeclaration,
  13435. isTSTypeParameter: isTSTypeParameter,
  13436. isExpression: isExpression,
  13437. isBinary: isBinary,
  13438. isScopable: isScopable,
  13439. isBlockParent: isBlockParent,
  13440. isBlock: isBlock,
  13441. isStatement: isStatement,
  13442. isTerminatorless: isTerminatorless,
  13443. isCompletionStatement: isCompletionStatement,
  13444. isConditional: isConditional,
  13445. isLoop: isLoop,
  13446. isWhile: isWhile,
  13447. isExpressionWrapper: isExpressionWrapper,
  13448. isFor: isFor,
  13449. isForXStatement: isForXStatement,
  13450. isFunction: isFunction,
  13451. isFunctionParent: isFunctionParent,
  13452. isPureish: isPureish,
  13453. isDeclaration: isDeclaration,
  13454. isPatternLike: isPatternLike,
  13455. isLVal: isLVal,
  13456. isTSEntityName: isTSEntityName,
  13457. isLiteral: isLiteral,
  13458. isUserWhitespacable: isUserWhitespacable,
  13459. isMethod: isMethod,
  13460. isObjectMember: isObjectMember,
  13461. isProperty: isProperty,
  13462. isUnaryLike: isUnaryLike,
  13463. isPattern: isPattern,
  13464. isClass: isClass,
  13465. isModuleDeclaration: isModuleDeclaration,
  13466. isExportDeclaration: isExportDeclaration,
  13467. isModuleSpecifier: isModuleSpecifier,
  13468. isFlow: isFlow,
  13469. isFlowType: isFlowType,
  13470. isFlowBaseAnnotation: isFlowBaseAnnotation,
  13471. isFlowDeclaration: isFlowDeclaration,
  13472. isFlowPredicate: isFlowPredicate,
  13473. isEnumBody: isEnumBody,
  13474. isEnumMember: isEnumMember,
  13475. isJSX: isJSX,
  13476. isPrivate: isPrivate,
  13477. isTSTypeElement: isTSTypeElement,
  13478. isTSType: isTSType,
  13479. isNumberLiteral: isNumberLiteral,
  13480. isRegexLiteral: isRegexLiteral,
  13481. isRestProperty: isRestProperty,
  13482. isSpreadProperty: isSpreadProperty
  13483. });
  13484. var ReferencedIdentifier = {
  13485. types: ["Identifier", "JSXIdentifier"],
  13486. checkPath: function checkPath(path, opts) {
  13487. var node = path.node,
  13488. parent = path.parent;
  13489. if (!isIdentifier(node, opts) && !isJSXMemberExpression(parent, opts)) {
  13490. if (isJSXIdentifier(node, opts)) {
  13491. if (react.isCompatTag(node.name)) return false;
  13492. } else {
  13493. return false;
  13494. }
  13495. }
  13496. return isReferenced(node, parent, path.parentPath.parent);
  13497. }
  13498. };
  13499. var ReferencedMemberExpression = {
  13500. types: ["MemberExpression"],
  13501. checkPath: function checkPath(_ref) {
  13502. var node = _ref.node,
  13503. parent = _ref.parent;
  13504. return isMemberExpression(node) && isReferenced(node, parent);
  13505. }
  13506. };
  13507. var BindingIdentifier = {
  13508. types: ["Identifier"],
  13509. checkPath: function checkPath(path) {
  13510. var node = path.node,
  13511. parent = path.parent;
  13512. var grandparent = path.parentPath.parent;
  13513. return isIdentifier(node) && isBinding(node, parent, grandparent);
  13514. }
  13515. };
  13516. var Statement = {
  13517. types: ["Statement"],
  13518. checkPath: function checkPath(_ref2) {
  13519. var node = _ref2.node,
  13520. parent = _ref2.parent;
  13521. if (isStatement(node)) {
  13522. if (isVariableDeclaration(node)) {
  13523. if (isForXStatement(parent, {
  13524. left: node
  13525. })) return false;
  13526. if (isForStatement(parent, {
  13527. init: node
  13528. })) return false;
  13529. }
  13530. return true;
  13531. } else {
  13532. return false;
  13533. }
  13534. }
  13535. };
  13536. var Expression = {
  13537. types: ["Expression"],
  13538. checkPath: function checkPath(path) {
  13539. if (path.isIdentifier()) {
  13540. return path.isReferencedIdentifier();
  13541. } else {
  13542. return isExpression(path.node);
  13543. }
  13544. }
  13545. };
  13546. var Scope = {
  13547. types: ["Scopable", "Pattern"],
  13548. checkPath: function checkPath(path) {
  13549. return isScope(path.node, path.parent);
  13550. }
  13551. };
  13552. var Referenced = {
  13553. checkPath: function checkPath(path) {
  13554. return isReferenced(path.node, path.parent);
  13555. }
  13556. };
  13557. var BlockScoped = {
  13558. checkPath: function checkPath(path) {
  13559. return isBlockScoped(path.node);
  13560. }
  13561. };
  13562. var Var = {
  13563. types: ["VariableDeclaration"],
  13564. checkPath: function checkPath(path) {
  13565. return isVar(path.node);
  13566. }
  13567. };
  13568. var User = {
  13569. checkPath: function checkPath(path) {
  13570. return path.node && !!path.node.loc;
  13571. }
  13572. };
  13573. var Generated = {
  13574. checkPath: function checkPath(path) {
  13575. return !path.isUser();
  13576. }
  13577. };
  13578. var Pure = {
  13579. checkPath: function checkPath(path, opts) {
  13580. return path.scope.isPure(path.node, opts);
  13581. }
  13582. };
  13583. var Flow = {
  13584. types: ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"],
  13585. checkPath: function checkPath(_ref3) {
  13586. var node = _ref3.node;
  13587. if (isFlow(node)) {
  13588. return true;
  13589. } else if (isImportDeclaration(node)) {
  13590. return node.importKind === "type" || node.importKind === "typeof";
  13591. } else if (isExportDeclaration(node)) {
  13592. return node.exportKind === "type";
  13593. } else if (isImportSpecifier(node)) {
  13594. return node.importKind === "type" || node.importKind === "typeof";
  13595. } else {
  13596. return false;
  13597. }
  13598. }
  13599. };
  13600. var RestProperty$1 = {
  13601. types: ["RestElement"],
  13602. checkPath: function checkPath(path) {
  13603. return path.parentPath && path.parentPath.isObjectPattern();
  13604. }
  13605. };
  13606. var SpreadProperty$1 = {
  13607. types: ["RestElement"],
  13608. checkPath: function checkPath(path) {
  13609. return path.parentPath && path.parentPath.isObjectExpression();
  13610. }
  13611. };
  13612. var ExistentialTypeParam = {
  13613. types: ["ExistsTypeAnnotation"]
  13614. };
  13615. var NumericLiteralTypeAnnotation = {
  13616. types: ["NumberLiteralTypeAnnotation"]
  13617. };
  13618. var ForAwaitStatement = {
  13619. types: ["ForOfStatement"],
  13620. checkPath: function checkPath(_ref4) {
  13621. var node = _ref4.node;
  13622. return node["await"] === true;
  13623. }
  13624. };
  13625. var virtualTypes = /*#__PURE__*/Object.freeze({
  13626. __proto__: null,
  13627. ReferencedIdentifier: ReferencedIdentifier,
  13628. ReferencedMemberExpression: ReferencedMemberExpression,
  13629. BindingIdentifier: BindingIdentifier,
  13630. Statement: Statement,
  13631. Expression: Expression,
  13632. Scope: Scope,
  13633. Referenced: Referenced,
  13634. BlockScoped: BlockScoped,
  13635. Var: Var,
  13636. User: User,
  13637. Generated: Generated,
  13638. Pure: Pure,
  13639. Flow: Flow,
  13640. RestProperty: RestProperty$1,
  13641. SpreadProperty: SpreadProperty$1,
  13642. ExistentialTypeParam: ExistentialTypeParam,
  13643. NumericLiteralTypeAnnotation: NumericLiteralTypeAnnotation,
  13644. ForAwaitStatement: ForAwaitStatement
  13645. });
  13646. var s = 1000;
  13647. var m = s * 60;
  13648. var h = m * 60;
  13649. var d = h * 24;
  13650. var w = d * 7;
  13651. var y = d * 365.25;
  13652. var ms = function (val, options) {
  13653. options = options || {};
  13654. var type = typeof val;
  13655. if (type === 'string' && val.length > 0) {
  13656. return parse(val);
  13657. } else if (type === 'number' && isFinite(val)) {
  13658. return options["long"] ? fmtLong(val) : fmtShort(val);
  13659. }
  13660. throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
  13661. };
  13662. function parse(str) {
  13663. str = String(str);
  13664. if (str.length > 100) {
  13665. return;
  13666. }
  13667. 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);
  13668. if (!match) {
  13669. return;
  13670. }
  13671. var n = parseFloat(match[1]);
  13672. var type = (match[2] || 'ms').toLowerCase();
  13673. switch (type) {
  13674. case 'years':
  13675. case 'year':
  13676. case 'yrs':
  13677. case 'yr':
  13678. case 'y':
  13679. return n * y;
  13680. case 'weeks':
  13681. case 'week':
  13682. case 'w':
  13683. return n * w;
  13684. case 'days':
  13685. case 'day':
  13686. case 'd':
  13687. return n * d;
  13688. case 'hours':
  13689. case 'hour':
  13690. case 'hrs':
  13691. case 'hr':
  13692. case 'h':
  13693. return n * h;
  13694. case 'minutes':
  13695. case 'minute':
  13696. case 'mins':
  13697. case 'min':
  13698. case 'm':
  13699. return n * m;
  13700. case 'seconds':
  13701. case 'second':
  13702. case 'secs':
  13703. case 'sec':
  13704. case 's':
  13705. return n * s;
  13706. case 'milliseconds':
  13707. case 'millisecond':
  13708. case 'msecs':
  13709. case 'msec':
  13710. case 'ms':
  13711. return n;
  13712. default:
  13713. return undefined;
  13714. }
  13715. }
  13716. function fmtShort(ms) {
  13717. var msAbs = Math.abs(ms);
  13718. if (msAbs >= d) {
  13719. return Math.round(ms / d) + 'd';
  13720. }
  13721. if (msAbs >= h) {
  13722. return Math.round(ms / h) + 'h';
  13723. }
  13724. if (msAbs >= m) {
  13725. return Math.round(ms / m) + 'm';
  13726. }
  13727. if (msAbs >= s) {
  13728. return Math.round(ms / s) + 's';
  13729. }
  13730. return ms + 'ms';
  13731. }
  13732. function fmtLong(ms) {
  13733. var msAbs = Math.abs(ms);
  13734. if (msAbs >= d) {
  13735. return plural(ms, msAbs, d, 'day');
  13736. }
  13737. if (msAbs >= h) {
  13738. return plural(ms, msAbs, h, 'hour');
  13739. }
  13740. if (msAbs >= m) {
  13741. return plural(ms, msAbs, m, 'minute');
  13742. }
  13743. if (msAbs >= s) {
  13744. return plural(ms, msAbs, s, 'second');
  13745. }
  13746. return ms + ' ms';
  13747. }
  13748. function plural(ms, msAbs, n, name) {
  13749. var isPlural = msAbs >= n * 1.5;
  13750. return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
  13751. }
  13752. function setup(env) {
  13753. createDebug.debug = createDebug;
  13754. createDebug["default"] = createDebug;
  13755. createDebug.coerce = coerce;
  13756. createDebug.disable = disable;
  13757. createDebug.enable = enable;
  13758. createDebug.enabled = enabled;
  13759. createDebug.humanize = ms;
  13760. Object.keys(env).forEach(function (key) {
  13761. createDebug[key] = env[key];
  13762. });
  13763. createDebug.instances = [];
  13764. createDebug.names = [];
  13765. createDebug.skips = [];
  13766. createDebug.formatters = {};
  13767. function selectColor(namespace) {
  13768. var hash = 0;
  13769. for (var i = 0; i < namespace.length; i++) {
  13770. hash = (hash << 5) - hash + namespace.charCodeAt(i);
  13771. hash |= 0;
  13772. }
  13773. return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
  13774. }
  13775. createDebug.selectColor = selectColor;
  13776. function createDebug(namespace) {
  13777. var prevTime;
  13778. function debug() {
  13779. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  13780. args[_key] = arguments[_key];
  13781. }
  13782. if (!debug.enabled) {
  13783. return;
  13784. }
  13785. var self = debug;
  13786. var curr = Number(new Date());
  13787. var ms = curr - (prevTime || curr);
  13788. self.diff = ms;
  13789. self.prev = prevTime;
  13790. self.curr = curr;
  13791. prevTime = curr;
  13792. args[0] = createDebug.coerce(args[0]);
  13793. if (typeof args[0] !== 'string') {
  13794. args.unshift('%O');
  13795. }
  13796. var index = 0;
  13797. args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
  13798. if (match === '%%') {
  13799. return match;
  13800. }
  13801. index++;
  13802. var formatter = createDebug.formatters[format];
  13803. if (typeof formatter === 'function') {
  13804. var val = args[index];
  13805. match = formatter.call(self, val);
  13806. args.splice(index, 1);
  13807. index--;
  13808. }
  13809. return match;
  13810. });
  13811. createDebug.formatArgs.call(self, args);
  13812. var logFn = self.log || createDebug.log;
  13813. logFn.apply(self, args);
  13814. }
  13815. debug.namespace = namespace;
  13816. debug.enabled = createDebug.enabled(namespace);
  13817. debug.useColors = createDebug.useColors();
  13818. debug.color = selectColor(namespace);
  13819. debug.destroy = destroy;
  13820. debug.extend = extend;
  13821. if (typeof createDebug.init === 'function') {
  13822. createDebug.init(debug);
  13823. }
  13824. createDebug.instances.push(debug);
  13825. return debug;
  13826. }
  13827. function destroy() {
  13828. var index = createDebug.instances.indexOf(this);
  13829. if (index !== -1) {
  13830. createDebug.instances.splice(index, 1);
  13831. return true;
  13832. }
  13833. return false;
  13834. }
  13835. function extend(namespace, delimiter) {
  13836. var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
  13837. newDebug.log = this.log;
  13838. return newDebug;
  13839. }
  13840. function enable(namespaces) {
  13841. createDebug.save(namespaces);
  13842. createDebug.names = [];
  13843. createDebug.skips = [];
  13844. var i;
  13845. var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
  13846. var len = split.length;
  13847. for (i = 0; i < len; i++) {
  13848. if (!split[i]) {
  13849. continue;
  13850. }
  13851. namespaces = split[i].replace(/\*/g, '.*?');
  13852. if (namespaces[0] === '-') {
  13853. createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
  13854. } else {
  13855. createDebug.names.push(new RegExp('^' + namespaces + '$'));
  13856. }
  13857. }
  13858. for (i = 0; i < createDebug.instances.length; i++) {
  13859. var instance = createDebug.instances[i];
  13860. instance.enabled = createDebug.enabled(instance.namespace);
  13861. }
  13862. }
  13863. function disable() {
  13864. var namespaces = [].concat(createDebug.names.map(toNamespace), createDebug.skips.map(toNamespace).map(function (namespace) {
  13865. return '-' + namespace;
  13866. })).join(',');
  13867. createDebug.enable('');
  13868. return namespaces;
  13869. }
  13870. function enabled(name) {
  13871. if (name[name.length - 1] === '*') {
  13872. return true;
  13873. }
  13874. var i;
  13875. var len;
  13876. for (i = 0, len = createDebug.skips.length; i < len; i++) {
  13877. if (createDebug.skips[i].test(name)) {
  13878. return false;
  13879. }
  13880. }
  13881. for (i = 0, len = createDebug.names.length; i < len; i++) {
  13882. if (createDebug.names[i].test(name)) {
  13883. return true;
  13884. }
  13885. }
  13886. return false;
  13887. }
  13888. function toNamespace(regexp) {
  13889. return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*');
  13890. }
  13891. function coerce(val) {
  13892. if (val instanceof Error) {
  13893. return val.stack || val.message;
  13894. }
  13895. return val;
  13896. }
  13897. createDebug.enable(createDebug.load());
  13898. return createDebug;
  13899. }
  13900. var common = setup;
  13901. var browser$1 = createCommonjsModule(function (module, exports) {
  13902. exports.log = log;
  13903. exports.formatArgs = formatArgs;
  13904. exports.save = save;
  13905. exports.load = load;
  13906. exports.useColors = useColors;
  13907. exports.storage = localstorage();
  13908. 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'];
  13909. function useColors() {
  13910. if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
  13911. return true;
  13912. }
  13913. if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
  13914. return false;
  13915. }
  13916. 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+)/);
  13917. }
  13918. function formatArgs(args) {
  13919. args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
  13920. if (!this.useColors) {
  13921. return;
  13922. }
  13923. var c = 'color: ' + this.color;
  13924. args.splice(1, 0, c, 'color: inherit');
  13925. var index = 0;
  13926. var lastC = 0;
  13927. args[0].replace(/%[a-zA-Z%]/g, function (match) {
  13928. if (match === '%%') {
  13929. return;
  13930. }
  13931. index++;
  13932. if (match === '%c') {
  13933. lastC = index;
  13934. }
  13935. });
  13936. args.splice(lastC, 0, c);
  13937. }
  13938. function log() {
  13939. var _console;
  13940. return typeof console === 'object' && console.log && (_console = console).log.apply(_console, arguments);
  13941. }
  13942. function save(namespaces) {
  13943. try {
  13944. if (namespaces) {
  13945. exports.storage.setItem('debug', namespaces);
  13946. } else {
  13947. exports.storage.removeItem('debug');
  13948. }
  13949. } catch (error) {}
  13950. }
  13951. function load() {
  13952. var r;
  13953. try {
  13954. r = exports.storage.getItem('debug');
  13955. } catch (error) {}
  13956. if (!r && typeof process !== 'undefined' && 'env' in process) {
  13957. r = process.env.DEBUG;
  13958. }
  13959. return r;
  13960. }
  13961. function localstorage() {
  13962. try {
  13963. return localStorage;
  13964. } catch (error) {}
  13965. }
  13966. module.exports = common(exports);
  13967. var formatters = module.exports.formatters;
  13968. formatters.j = function (v) {
  13969. try {
  13970. return JSON.stringify(v);
  13971. } catch (error) {
  13972. return '[UnexpectedJSONParseError]: ' + error.message;
  13973. }
  13974. };
  13975. });
  13976. var browser_1 = browser$1.log;
  13977. var browser_2 = browser$1.formatArgs;
  13978. var browser_3 = browser$1.save;
  13979. var browser_4 = browser$1.load;
  13980. var browser_5 = browser$1.useColors;
  13981. var browser_6 = browser$1.storage;
  13982. var browser_7 = browser$1.colors;
  13983. var stringTag$3 = '[object String]';
  13984. function isString(value) {
  13985. return typeof value == 'string' || !isArray_1(value) && isObjectLike_1(value) && _baseGetTag(value) == stringTag$3;
  13986. }
  13987. var isString_1 = isString;
  13988. var symbolTag$2 = '[object Symbol]';
  13989. function isSymbol(value) {
  13990. return typeof value == 'symbol' || isObjectLike_1(value) && _baseGetTag(value) == symbolTag$2;
  13991. }
  13992. var isSymbol_1 = isSymbol;
  13993. var NAN = 0 / 0;
  13994. var reTrim = /^\s+|\s+$/g;
  13995. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  13996. var reIsBinary = /^0b[01]+$/i;
  13997. var reIsOctal = /^0o[0-7]+$/i;
  13998. var freeParseInt = parseInt;
  13999. function toNumber(value) {
  14000. if (typeof value == 'number') {
  14001. return value;
  14002. }
  14003. if (isSymbol_1(value)) {
  14004. return NAN;
  14005. }
  14006. if (isObject_1(value)) {
  14007. var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
  14008. value = isObject_1(other) ? other + '' : other;
  14009. }
  14010. if (typeof value != 'string') {
  14011. return value === 0 ? value : +value;
  14012. }
  14013. value = value.replace(reTrim, '');
  14014. var isBinary = reIsBinary.test(value);
  14015. return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
  14016. }
  14017. var toNumber_1 = toNumber;
  14018. var INFINITY$1 = 1 / 0,
  14019. MAX_INTEGER = 1.7976931348623157e+308;
  14020. function toFinite(value) {
  14021. if (!value) {
  14022. return value === 0 ? value : 0;
  14023. }
  14024. value = toNumber_1(value);
  14025. if (value === INFINITY$1 || value === -INFINITY$1) {
  14026. var sign = value < 0 ? -1 : 1;
  14027. return sign * MAX_INTEGER;
  14028. }
  14029. return value === value ? value : 0;
  14030. }
  14031. var toFinite_1 = toFinite;
  14032. function toInteger(value) {
  14033. var result = toFinite_1(value),
  14034. remainder = result % 1;
  14035. return result === result ? remainder ? result - remainder : result : 0;
  14036. }
  14037. var toInteger_1 = toInteger;
  14038. function arrayMap(array, iteratee) {
  14039. var index = -1,
  14040. length = array == null ? 0 : array.length,
  14041. result = Array(length);
  14042. while (++index < length) {
  14043. result[index] = iteratee(array[index], index, array);
  14044. }
  14045. return result;
  14046. }
  14047. var _arrayMap = arrayMap;
  14048. function baseValues(object, props) {
  14049. return _arrayMap(props, function (key) {
  14050. return object[key];
  14051. });
  14052. }
  14053. var _baseValues = baseValues;
  14054. function values(object) {
  14055. return object == null ? [] : _baseValues(object, keys_1(object));
  14056. }
  14057. var values_1 = values;
  14058. var nativeMax = Math.max;
  14059. function includes(collection, value, fromIndex, guard) {
  14060. collection = isArrayLike_1(collection) ? collection : values_1(collection);
  14061. fromIndex = fromIndex && !guard ? toInteger_1(fromIndex) : 0;
  14062. var length = collection.length;
  14063. if (fromIndex < 0) {
  14064. fromIndex = nativeMax(length + fromIndex, 0);
  14065. }
  14066. return isString_1(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && _baseIndexOf(collection, value, fromIndex) > -1;
  14067. }
  14068. var includes_1 = includes;
  14069. var MAX_SAFE_INTEGER$2 = 9007199254740991;
  14070. var nativeFloor = Math.floor;
  14071. function baseRepeat(string, n) {
  14072. var result = '';
  14073. if (!string || n < 1 || n > MAX_SAFE_INTEGER$2) {
  14074. return result;
  14075. }
  14076. do {
  14077. if (n % 2) {
  14078. result += string;
  14079. }
  14080. n = nativeFloor(n / 2);
  14081. if (n) {
  14082. string += string;
  14083. }
  14084. } while (n);
  14085. return result;
  14086. }
  14087. var _baseRepeat = baseRepeat;
  14088. function isIterateeCall(value, index, object) {
  14089. if (!isObject_1(object)) {
  14090. return false;
  14091. }
  14092. var type = typeof index;
  14093. if (type == 'number' ? isArrayLike_1(object) && _isIndex(index, object.length) : type == 'string' && index in object) {
  14094. return eq_1(object[index], value);
  14095. }
  14096. return false;
  14097. }
  14098. var _isIterateeCall = isIterateeCall;
  14099. var INFINITY$2 = 1 / 0;
  14100. var symbolProto$1 = _Symbol ? _Symbol.prototype : undefined,
  14101. symbolToString = symbolProto$1 ? symbolProto$1.toString : undefined;
  14102. function baseToString(value) {
  14103. if (typeof value == 'string') {
  14104. return value;
  14105. }
  14106. if (isArray_1(value)) {
  14107. return _arrayMap(value, baseToString) + '';
  14108. }
  14109. if (isSymbol_1(value)) {
  14110. return symbolToString ? symbolToString.call(value) : '';
  14111. }
  14112. var result = value + '';
  14113. return result == '0' && 1 / value == -INFINITY$2 ? '-0' : result;
  14114. }
  14115. var _baseToString = baseToString;
  14116. function toString(value) {
  14117. return value == null ? '' : _baseToString(value);
  14118. }
  14119. var toString_1 = toString;
  14120. function repeat(string, n, guard) {
  14121. if (guard ? _isIterateeCall(string, n, guard) : n === undefined) {
  14122. n = 1;
  14123. } else {
  14124. n = toInteger_1(n);
  14125. }
  14126. return _baseRepeat(toString_1(string), n);
  14127. }
  14128. var repeat_1 = repeat;
  14129. var Binding = function () {
  14130. function Binding(_ref) {
  14131. var identifier = _ref.identifier,
  14132. scope = _ref.scope,
  14133. path = _ref.path,
  14134. kind = _ref.kind;
  14135. this.identifier = identifier;
  14136. this.scope = scope;
  14137. this.path = path;
  14138. this.kind = kind;
  14139. this.constantViolations = [];
  14140. this.constant = true;
  14141. this.referencePaths = [];
  14142. this.referenced = false;
  14143. this.references = 0;
  14144. this.clearValue();
  14145. }
  14146. var _proto = Binding.prototype;
  14147. _proto.deoptValue = function deoptValue() {
  14148. this.clearValue();
  14149. this.hasDeoptedValue = true;
  14150. };
  14151. _proto.setValue = function setValue(value) {
  14152. if (this.hasDeoptedValue) return;
  14153. this.hasValue = true;
  14154. this.value = value;
  14155. };
  14156. _proto.clearValue = function clearValue() {
  14157. this.hasDeoptedValue = false;
  14158. this.hasValue = false;
  14159. this.value = null;
  14160. };
  14161. _proto.reassign = function reassign(path) {
  14162. this.constant = false;
  14163. if (this.constantViolations.indexOf(path) !== -1) {
  14164. return;
  14165. }
  14166. this.constantViolations.push(path);
  14167. };
  14168. _proto.reference = function reference(path) {
  14169. if (this.referencePaths.indexOf(path) !== -1) {
  14170. return;
  14171. }
  14172. this.referenced = true;
  14173. this.references++;
  14174. this.referencePaths.push(path);
  14175. };
  14176. _proto.dereference = function dereference() {
  14177. this.references--;
  14178. this.referenced = !!this.references;
  14179. };
  14180. return Binding;
  14181. }();
  14182. function splitExportDeclaration(exportDeclaration) {
  14183. if (!exportDeclaration.isExportDeclaration()) {
  14184. throw new Error("Only export declarations can be splitted.");
  14185. }
  14186. var isDefault = exportDeclaration.isExportDefaultDeclaration();
  14187. var declaration = exportDeclaration.get("declaration");
  14188. var isClassDeclaration = declaration.isClassDeclaration();
  14189. if (isDefault) {
  14190. var standaloneDeclaration = declaration.isFunctionDeclaration() || isClassDeclaration;
  14191. var scope = declaration.isScope() ? declaration.scope.parent : declaration.scope;
  14192. var id = declaration.node.id;
  14193. var needBindingRegistration = false;
  14194. if (!id) {
  14195. needBindingRegistration = true;
  14196. id = scope.generateUidIdentifier("default");
  14197. if (standaloneDeclaration || declaration.isFunctionExpression() || declaration.isClassExpression()) {
  14198. declaration.node.id = cloneNode(id);
  14199. }
  14200. }
  14201. var updatedDeclaration = standaloneDeclaration ? declaration : VariableDeclaration("var", [VariableDeclarator(cloneNode(id), declaration.node)]);
  14202. var updatedExportDeclaration = ExportNamedDeclaration(null, [ExportSpecifier(cloneNode(id), Identifier("default"))]);
  14203. exportDeclaration.insertAfter(updatedExportDeclaration);
  14204. exportDeclaration.replaceWith(updatedDeclaration);
  14205. if (needBindingRegistration) {
  14206. scope.registerDeclaration(exportDeclaration);
  14207. }
  14208. return exportDeclaration;
  14209. }
  14210. if (exportDeclaration.get("specifiers").length > 0) {
  14211. throw new Error("It doesn't make sense to split exported specifiers.");
  14212. }
  14213. var bindingIdentifiers = declaration.getOuterBindingIdentifiers();
  14214. var specifiers = Object.keys(bindingIdentifiers).map(function (name) {
  14215. return ExportSpecifier(Identifier(name), Identifier(name));
  14216. });
  14217. var aliasDeclar = ExportNamedDeclaration(null, specifiers);
  14218. exportDeclaration.insertAfter(aliasDeclar);
  14219. exportDeclaration.replaceWith(declaration.node);
  14220. return exportDeclaration;
  14221. }
  14222. var renameVisitor = {
  14223. ReferencedIdentifier: function ReferencedIdentifier(_ref, state) {
  14224. var node = _ref.node;
  14225. if (node.name === state.oldName) {
  14226. node.name = state.newName;
  14227. }
  14228. },
  14229. Scope: function Scope(path, state) {
  14230. if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) {
  14231. path.skip();
  14232. }
  14233. },
  14234. "AssignmentExpression|Declaration": function AssignmentExpressionDeclaration(path, state) {
  14235. var ids = path.getOuterBindingIdentifiers();
  14236. for (var name in ids) {
  14237. if (name === state.oldName) ids[name].name = state.newName;
  14238. }
  14239. }
  14240. };
  14241. var Renamer = function () {
  14242. function Renamer(binding, oldName, newName) {
  14243. this.newName = newName;
  14244. this.oldName = oldName;
  14245. this.binding = binding;
  14246. }
  14247. var _proto = Renamer.prototype;
  14248. _proto.maybeConvertFromExportDeclaration = function maybeConvertFromExportDeclaration(parentDeclar) {
  14249. var maybeExportDeclar = parentDeclar.parentPath;
  14250. if (!maybeExportDeclar.isExportDeclaration()) {
  14251. return;
  14252. }
  14253. if (maybeExportDeclar.isExportDefaultDeclaration() && !maybeExportDeclar.get("declaration").node.id) {
  14254. return;
  14255. }
  14256. splitExportDeclaration(maybeExportDeclar);
  14257. };
  14258. _proto.maybeConvertFromClassFunctionDeclaration = function maybeConvertFromClassFunctionDeclaration(path) {
  14259. return;
  14260. };
  14261. _proto.maybeConvertFromClassFunctionExpression = function maybeConvertFromClassFunctionExpression(path) {
  14262. return;
  14263. };
  14264. _proto.rename = function rename(block) {
  14265. var binding = this.binding,
  14266. oldName = this.oldName,
  14267. newName = this.newName;
  14268. var scope = binding.scope,
  14269. path = binding.path;
  14270. var parentDeclar = path.find(function (path) {
  14271. return path.isDeclaration() || path.isFunctionExpression() || path.isClassExpression();
  14272. });
  14273. if (parentDeclar) {
  14274. var bindingIds = parentDeclar.getOuterBindingIdentifiers();
  14275. if (bindingIds[oldName] === binding.identifier) {
  14276. this.maybeConvertFromExportDeclaration(parentDeclar);
  14277. }
  14278. }
  14279. scope.traverse(block || scope.block, renameVisitor, this);
  14280. if (!block) {
  14281. scope.removeOwnBinding(oldName);
  14282. scope.bindings[newName] = binding;
  14283. this.binding.identifier.name = newName;
  14284. }
  14285. if (binding.type === "hoisted") ;
  14286. if (parentDeclar) {
  14287. this.maybeConvertFromClassFunctionDeclaration(parentDeclar);
  14288. this.maybeConvertFromClassFunctionExpression(parentDeclar);
  14289. }
  14290. };
  14291. return Renamer;
  14292. }();
  14293. function identity(value) {
  14294. return value;
  14295. }
  14296. var identity_1 = identity;
  14297. function apply(func, thisArg, args) {
  14298. switch (args.length) {
  14299. case 0:
  14300. return func.call(thisArg);
  14301. case 1:
  14302. return func.call(thisArg, args[0]);
  14303. case 2:
  14304. return func.call(thisArg, args[0], args[1]);
  14305. case 3:
  14306. return func.call(thisArg, args[0], args[1], args[2]);
  14307. }
  14308. return func.apply(thisArg, args);
  14309. }
  14310. var _apply = apply;
  14311. var nativeMax$1 = Math.max;
  14312. function overRest(func, start, transform) {
  14313. start = nativeMax$1(start === undefined ? func.length - 1 : start, 0);
  14314. return function () {
  14315. var args = arguments,
  14316. index = -1,
  14317. length = nativeMax$1(args.length - start, 0),
  14318. array = Array(length);
  14319. while (++index < length) {
  14320. array[index] = args[start + index];
  14321. }
  14322. index = -1;
  14323. var otherArgs = Array(start + 1);
  14324. while (++index < start) {
  14325. otherArgs[index] = args[index];
  14326. }
  14327. otherArgs[start] = transform(array);
  14328. return _apply(func, this, otherArgs);
  14329. };
  14330. }
  14331. var _overRest = overRest;
  14332. function constant(value) {
  14333. return function () {
  14334. return value;
  14335. };
  14336. }
  14337. var constant_1 = constant;
  14338. var baseSetToString = !_defineProperty ? identity_1 : function (func, string) {
  14339. return _defineProperty(func, 'toString', {
  14340. 'configurable': true,
  14341. 'enumerable': false,
  14342. 'value': constant_1(string),
  14343. 'writable': true
  14344. });
  14345. };
  14346. var _baseSetToString = baseSetToString;
  14347. var HOT_COUNT = 800,
  14348. HOT_SPAN = 16;
  14349. var nativeNow = Date.now;
  14350. function shortOut(func) {
  14351. var count = 0,
  14352. lastCalled = 0;
  14353. return function () {
  14354. var stamp = nativeNow(),
  14355. remaining = HOT_SPAN - (stamp - lastCalled);
  14356. lastCalled = stamp;
  14357. if (remaining > 0) {
  14358. if (++count >= HOT_COUNT) {
  14359. return arguments[0];
  14360. }
  14361. } else {
  14362. count = 0;
  14363. }
  14364. return func.apply(undefined, arguments);
  14365. };
  14366. }
  14367. var _shortOut = shortOut;
  14368. var setToString = _shortOut(_baseSetToString);
  14369. var _setToString = setToString;
  14370. function baseRest(func, start) {
  14371. return _setToString(_overRest(func, start, identity_1), func + '');
  14372. }
  14373. var _baseRest = baseRest;
  14374. var objectProto$e = Object.prototype;
  14375. var hasOwnProperty$b = objectProto$e.hasOwnProperty;
  14376. var defaults = _baseRest(function (object, sources) {
  14377. object = Object(object);
  14378. var index = -1;
  14379. var length = sources.length;
  14380. var guard = length > 2 ? sources[2] : undefined;
  14381. if (guard && _isIterateeCall(sources[0], sources[1], guard)) {
  14382. length = 1;
  14383. }
  14384. while (++index < length) {
  14385. var source = sources[index];
  14386. var props = keysIn_1(source);
  14387. var propsIndex = -1;
  14388. var propsLength = props.length;
  14389. while (++propsIndex < propsLength) {
  14390. var key = props[propsIndex];
  14391. var value = object[key];
  14392. if (value === undefined || eq_1(value, objectProto$e[key]) && !hasOwnProperty$b.call(object, key)) {
  14393. object[key] = source[key];
  14394. }
  14395. }
  14396. }
  14397. return object;
  14398. });
  14399. var defaults_1 = defaults;
  14400. var builtin = {
  14401. "Array": false,
  14402. "ArrayBuffer": false,
  14403. Atomics: false,
  14404. BigInt: false,
  14405. BigInt64Array: false,
  14406. BigUint64Array: false,
  14407. "Boolean": false,
  14408. constructor: false,
  14409. "DataView": false,
  14410. "Date": false,
  14411. "decodeURI": false,
  14412. "decodeURIComponent": false,
  14413. "encodeURI": false,
  14414. "encodeURIComponent": false,
  14415. "Error": false,
  14416. "escape": false,
  14417. "eval": false,
  14418. "EvalError": false,
  14419. "Float32Array": false,
  14420. "Float64Array": false,
  14421. "Function": false,
  14422. globalThis: false,
  14423. hasOwnProperty: false,
  14424. "Infinity": false,
  14425. "Int16Array": false,
  14426. "Int32Array": false,
  14427. "Int8Array": false,
  14428. "isFinite": false,
  14429. "isNaN": false,
  14430. isPrototypeOf: false,
  14431. "JSON": false,
  14432. "Map": false,
  14433. "Math": false,
  14434. "NaN": false,
  14435. "Number": false,
  14436. "Object": false,
  14437. "parseFloat": false,
  14438. "parseInt": false,
  14439. "Promise": false,
  14440. propertyIsEnumerable: false,
  14441. "Proxy": false,
  14442. "RangeError": false,
  14443. "ReferenceError": false,
  14444. "Reflect": false,
  14445. "RegExp": false,
  14446. "Set": false,
  14447. SharedArrayBuffer: false,
  14448. "String": false,
  14449. "Symbol": false,
  14450. "SyntaxError": false,
  14451. toLocaleString: false,
  14452. toString: false,
  14453. "TypeError": false,
  14454. "Uint16Array": false,
  14455. "Uint32Array": false,
  14456. "Uint8Array": false,
  14457. "Uint8ClampedArray": false,
  14458. "undefined": false,
  14459. "unescape": false,
  14460. "URIError": false,
  14461. valueOf: false,
  14462. "WeakMap": false,
  14463. "WeakSet": false
  14464. };
  14465. var es5 = {
  14466. "Array": false,
  14467. "Boolean": false,
  14468. constructor: false,
  14469. "Date": false,
  14470. "decodeURI": false,
  14471. "decodeURIComponent": false,
  14472. "encodeURI": false,
  14473. "encodeURIComponent": false,
  14474. "Error": false,
  14475. "escape": false,
  14476. "eval": false,
  14477. "EvalError": false,
  14478. "Function": false,
  14479. hasOwnProperty: false,
  14480. "Infinity": false,
  14481. "isFinite": false,
  14482. "isNaN": false,
  14483. isPrototypeOf: false,
  14484. "JSON": false,
  14485. "Math": false,
  14486. "NaN": false,
  14487. "Number": false,
  14488. "Object": false,
  14489. "parseFloat": false,
  14490. "parseInt": false,
  14491. propertyIsEnumerable: false,
  14492. "RangeError": false,
  14493. "ReferenceError": false,
  14494. "RegExp": false,
  14495. "String": false,
  14496. "SyntaxError": false,
  14497. toLocaleString: false,
  14498. toString: false,
  14499. "TypeError": false,
  14500. "undefined": false,
  14501. "unescape": false,
  14502. "URIError": false,
  14503. valueOf: false
  14504. };
  14505. var es2015 = {
  14506. "Array": false,
  14507. "ArrayBuffer": false,
  14508. "Boolean": false,
  14509. constructor: false,
  14510. "DataView": false,
  14511. "Date": false,
  14512. "decodeURI": false,
  14513. "decodeURIComponent": false,
  14514. "encodeURI": false,
  14515. "encodeURIComponent": false,
  14516. "Error": false,
  14517. "escape": false,
  14518. "eval": false,
  14519. "EvalError": false,
  14520. "Float32Array": false,
  14521. "Float64Array": false,
  14522. "Function": false,
  14523. hasOwnProperty: false,
  14524. "Infinity": false,
  14525. "Int16Array": false,
  14526. "Int32Array": false,
  14527. "Int8Array": false,
  14528. "isFinite": false,
  14529. "isNaN": false,
  14530. isPrototypeOf: false,
  14531. "JSON": false,
  14532. "Map": false,
  14533. "Math": false,
  14534. "NaN": false,
  14535. "Number": false,
  14536. "Object": false,
  14537. "parseFloat": false,
  14538. "parseInt": false,
  14539. "Promise": false,
  14540. propertyIsEnumerable: false,
  14541. "Proxy": false,
  14542. "RangeError": false,
  14543. "ReferenceError": false,
  14544. "Reflect": false,
  14545. "RegExp": false,
  14546. "Set": false,
  14547. "String": false,
  14548. "Symbol": false,
  14549. "SyntaxError": false,
  14550. toLocaleString: false,
  14551. toString: false,
  14552. "TypeError": false,
  14553. "Uint16Array": false,
  14554. "Uint32Array": false,
  14555. "Uint8Array": false,
  14556. "Uint8ClampedArray": false,
  14557. "undefined": false,
  14558. "unescape": false,
  14559. "URIError": false,
  14560. valueOf: false,
  14561. "WeakMap": false,
  14562. "WeakSet": false
  14563. };
  14564. var es2017 = {
  14565. "Array": false,
  14566. "ArrayBuffer": false,
  14567. Atomics: false,
  14568. "Boolean": false,
  14569. constructor: false,
  14570. "DataView": false,
  14571. "Date": false,
  14572. "decodeURI": false,
  14573. "decodeURIComponent": false,
  14574. "encodeURI": false,
  14575. "encodeURIComponent": false,
  14576. "Error": false,
  14577. "escape": false,
  14578. "eval": false,
  14579. "EvalError": false,
  14580. "Float32Array": false,
  14581. "Float64Array": false,
  14582. "Function": false,
  14583. hasOwnProperty: false,
  14584. "Infinity": false,
  14585. "Int16Array": false,
  14586. "Int32Array": false,
  14587. "Int8Array": false,
  14588. "isFinite": false,
  14589. "isNaN": false,
  14590. isPrototypeOf: false,
  14591. "JSON": false,
  14592. "Map": false,
  14593. "Math": false,
  14594. "NaN": false,
  14595. "Number": false,
  14596. "Object": false,
  14597. "parseFloat": false,
  14598. "parseInt": false,
  14599. "Promise": false,
  14600. propertyIsEnumerable: false,
  14601. "Proxy": false,
  14602. "RangeError": false,
  14603. "ReferenceError": false,
  14604. "Reflect": false,
  14605. "RegExp": false,
  14606. "Set": false,
  14607. SharedArrayBuffer: false,
  14608. "String": false,
  14609. "Symbol": false,
  14610. "SyntaxError": false,
  14611. toLocaleString: false,
  14612. toString: false,
  14613. "TypeError": false,
  14614. "Uint16Array": false,
  14615. "Uint32Array": false,
  14616. "Uint8Array": false,
  14617. "Uint8ClampedArray": false,
  14618. "undefined": false,
  14619. "unescape": false,
  14620. "URIError": false,
  14621. valueOf: false,
  14622. "WeakMap": false,
  14623. "WeakSet": false
  14624. };
  14625. var browser$2 = {
  14626. AbortController: false,
  14627. AbortSignal: false,
  14628. addEventListener: false,
  14629. alert: false,
  14630. AnalyserNode: false,
  14631. Animation: false,
  14632. AnimationEffectReadOnly: false,
  14633. AnimationEffectTiming: false,
  14634. AnimationEffectTimingReadOnly: false,
  14635. AnimationEvent: false,
  14636. AnimationPlaybackEvent: false,
  14637. AnimationTimeline: false,
  14638. applicationCache: false,
  14639. ApplicationCache: false,
  14640. ApplicationCacheErrorEvent: false,
  14641. atob: false,
  14642. Attr: false,
  14643. Audio: false,
  14644. AudioBuffer: false,
  14645. AudioBufferSourceNode: false,
  14646. AudioContext: false,
  14647. AudioDestinationNode: false,
  14648. AudioListener: false,
  14649. AudioNode: false,
  14650. AudioParam: false,
  14651. AudioProcessingEvent: false,
  14652. AudioScheduledSourceNode: false,
  14653. "AudioWorkletGlobalScope ": false,
  14654. AudioWorkletNode: false,
  14655. AudioWorkletProcessor: false,
  14656. BarProp: false,
  14657. BaseAudioContext: false,
  14658. BatteryManager: false,
  14659. BeforeUnloadEvent: false,
  14660. BiquadFilterNode: false,
  14661. Blob: false,
  14662. BlobEvent: false,
  14663. blur: false,
  14664. BroadcastChannel: false,
  14665. btoa: false,
  14666. BudgetService: false,
  14667. ByteLengthQueuingStrategy: false,
  14668. Cache: false,
  14669. caches: false,
  14670. CacheStorage: false,
  14671. cancelAnimationFrame: false,
  14672. cancelIdleCallback: false,
  14673. CanvasCaptureMediaStreamTrack: false,
  14674. CanvasGradient: false,
  14675. CanvasPattern: false,
  14676. CanvasRenderingContext2D: false,
  14677. ChannelMergerNode: false,
  14678. ChannelSplitterNode: false,
  14679. CharacterData: false,
  14680. clearInterval: false,
  14681. clearTimeout: false,
  14682. clientInformation: false,
  14683. ClipboardEvent: false,
  14684. close: false,
  14685. closed: false,
  14686. CloseEvent: false,
  14687. Comment: false,
  14688. CompositionEvent: false,
  14689. confirm: false,
  14690. console: false,
  14691. ConstantSourceNode: false,
  14692. ConvolverNode: false,
  14693. CountQueuingStrategy: false,
  14694. createImageBitmap: false,
  14695. Credential: false,
  14696. CredentialsContainer: false,
  14697. crypto: false,
  14698. Crypto: false,
  14699. CryptoKey: false,
  14700. CSS: false,
  14701. CSSConditionRule: false,
  14702. CSSFontFaceRule: false,
  14703. CSSGroupingRule: false,
  14704. CSSImportRule: false,
  14705. CSSKeyframeRule: false,
  14706. CSSKeyframesRule: false,
  14707. CSSMediaRule: false,
  14708. CSSNamespaceRule: false,
  14709. CSSPageRule: false,
  14710. CSSRule: false,
  14711. CSSRuleList: false,
  14712. CSSStyleDeclaration: false,
  14713. CSSStyleRule: false,
  14714. CSSStyleSheet: false,
  14715. CSSSupportsRule: false,
  14716. CustomElementRegistry: false,
  14717. customElements: false,
  14718. CustomEvent: false,
  14719. DataTransfer: false,
  14720. DataTransferItem: false,
  14721. DataTransferItemList: false,
  14722. defaultstatus: false,
  14723. defaultStatus: false,
  14724. DelayNode: false,
  14725. DeviceMotionEvent: false,
  14726. DeviceOrientationEvent: false,
  14727. devicePixelRatio: false,
  14728. dispatchEvent: false,
  14729. document: false,
  14730. Document: false,
  14731. DocumentFragment: false,
  14732. DocumentType: false,
  14733. DOMError: false,
  14734. DOMException: false,
  14735. DOMImplementation: false,
  14736. DOMMatrix: false,
  14737. DOMMatrixReadOnly: false,
  14738. DOMParser: false,
  14739. DOMPoint: false,
  14740. DOMPointReadOnly: false,
  14741. DOMQuad: false,
  14742. DOMRect: false,
  14743. DOMRectReadOnly: false,
  14744. DOMStringList: false,
  14745. DOMStringMap: false,
  14746. DOMTokenList: false,
  14747. DragEvent: false,
  14748. DynamicsCompressorNode: false,
  14749. Element: false,
  14750. ErrorEvent: false,
  14751. event: false,
  14752. Event: false,
  14753. EventSource: false,
  14754. EventTarget: false,
  14755. external: false,
  14756. fetch: false,
  14757. File: false,
  14758. FileList: false,
  14759. FileReader: false,
  14760. find: false,
  14761. focus: false,
  14762. FocusEvent: false,
  14763. FontFace: false,
  14764. FontFaceSetLoadEvent: false,
  14765. FormData: false,
  14766. frameElement: false,
  14767. frames: false,
  14768. GainNode: false,
  14769. Gamepad: false,
  14770. GamepadButton: false,
  14771. GamepadEvent: false,
  14772. getComputedStyle: false,
  14773. getSelection: false,
  14774. HashChangeEvent: false,
  14775. Headers: false,
  14776. history: false,
  14777. History: false,
  14778. HTMLAllCollection: false,
  14779. HTMLAnchorElement: false,
  14780. HTMLAreaElement: false,
  14781. HTMLAudioElement: false,
  14782. HTMLBaseElement: false,
  14783. HTMLBodyElement: false,
  14784. HTMLBRElement: false,
  14785. HTMLButtonElement: false,
  14786. HTMLCanvasElement: false,
  14787. HTMLCollection: false,
  14788. HTMLContentElement: false,
  14789. HTMLDataElement: false,
  14790. HTMLDataListElement: false,
  14791. HTMLDetailsElement: false,
  14792. HTMLDialogElement: false,
  14793. HTMLDirectoryElement: false,
  14794. HTMLDivElement: false,
  14795. HTMLDListElement: false,
  14796. HTMLDocument: false,
  14797. HTMLElement: false,
  14798. HTMLEmbedElement: false,
  14799. HTMLFieldSetElement: false,
  14800. HTMLFontElement: false,
  14801. HTMLFormControlsCollection: false,
  14802. HTMLFormElement: false,
  14803. HTMLFrameElement: false,
  14804. HTMLFrameSetElement: false,
  14805. HTMLHeadElement: false,
  14806. HTMLHeadingElement: false,
  14807. HTMLHRElement: false,
  14808. HTMLHtmlElement: false,
  14809. HTMLIFrameElement: false,
  14810. HTMLImageElement: false,
  14811. HTMLInputElement: false,
  14812. HTMLLabelElement: false,
  14813. HTMLLegendElement: false,
  14814. HTMLLIElement: false,
  14815. HTMLLinkElement: false,
  14816. HTMLMapElement: false,
  14817. HTMLMarqueeElement: false,
  14818. HTMLMediaElement: false,
  14819. HTMLMenuElement: false,
  14820. HTMLMetaElement: false,
  14821. HTMLMeterElement: false,
  14822. HTMLModElement: false,
  14823. HTMLObjectElement: false,
  14824. HTMLOListElement: false,
  14825. HTMLOptGroupElement: false,
  14826. HTMLOptionElement: false,
  14827. HTMLOptionsCollection: false,
  14828. HTMLOutputElement: false,
  14829. HTMLParagraphElement: false,
  14830. HTMLParamElement: false,
  14831. HTMLPictureElement: false,
  14832. HTMLPreElement: false,
  14833. HTMLProgressElement: false,
  14834. HTMLQuoteElement: false,
  14835. HTMLScriptElement: false,
  14836. HTMLSelectElement: false,
  14837. HTMLShadowElement: false,
  14838. HTMLSlotElement: false,
  14839. HTMLSourceElement: false,
  14840. HTMLSpanElement: false,
  14841. HTMLStyleElement: false,
  14842. HTMLTableCaptionElement: false,
  14843. HTMLTableCellElement: false,
  14844. HTMLTableColElement: false,
  14845. HTMLTableElement: false,
  14846. HTMLTableRowElement: false,
  14847. HTMLTableSectionElement: false,
  14848. HTMLTemplateElement: false,
  14849. HTMLTextAreaElement: false,
  14850. HTMLTimeElement: false,
  14851. HTMLTitleElement: false,
  14852. HTMLTrackElement: false,
  14853. HTMLUListElement: false,
  14854. HTMLUnknownElement: false,
  14855. HTMLVideoElement: false,
  14856. IDBCursor: false,
  14857. IDBCursorWithValue: false,
  14858. IDBDatabase: false,
  14859. IDBFactory: false,
  14860. IDBIndex: false,
  14861. IDBKeyRange: false,
  14862. IDBObjectStore: false,
  14863. IDBOpenDBRequest: false,
  14864. IDBRequest: false,
  14865. IDBTransaction: false,
  14866. IDBVersionChangeEvent: false,
  14867. IdleDeadline: false,
  14868. IIRFilterNode: false,
  14869. Image: false,
  14870. ImageBitmap: false,
  14871. ImageBitmapRenderingContext: false,
  14872. ImageCapture: false,
  14873. ImageData: false,
  14874. indexedDB: false,
  14875. innerHeight: false,
  14876. innerWidth: false,
  14877. InputEvent: false,
  14878. IntersectionObserver: false,
  14879. IntersectionObserverEntry: false,
  14880. "Intl": false,
  14881. isSecureContext: false,
  14882. KeyboardEvent: false,
  14883. KeyframeEffect: false,
  14884. KeyframeEffectReadOnly: false,
  14885. length: false,
  14886. localStorage: false,
  14887. location: true,
  14888. Location: false,
  14889. locationbar: false,
  14890. matchMedia: false,
  14891. MediaDeviceInfo: false,
  14892. MediaDevices: false,
  14893. MediaElementAudioSourceNode: false,
  14894. MediaEncryptedEvent: false,
  14895. MediaError: false,
  14896. MediaKeyMessageEvent: false,
  14897. MediaKeySession: false,
  14898. MediaKeyStatusMap: false,
  14899. MediaKeySystemAccess: false,
  14900. MediaList: false,
  14901. MediaQueryList: false,
  14902. MediaQueryListEvent: false,
  14903. MediaRecorder: false,
  14904. MediaSettingsRange: false,
  14905. MediaSource: false,
  14906. MediaStream: false,
  14907. MediaStreamAudioDestinationNode: false,
  14908. MediaStreamAudioSourceNode: false,
  14909. MediaStreamEvent: false,
  14910. MediaStreamTrack: false,
  14911. MediaStreamTrackEvent: false,
  14912. menubar: false,
  14913. MessageChannel: false,
  14914. MessageEvent: false,
  14915. MessagePort: false,
  14916. MIDIAccess: false,
  14917. MIDIConnectionEvent: false,
  14918. MIDIInput: false,
  14919. MIDIInputMap: false,
  14920. MIDIMessageEvent: false,
  14921. MIDIOutput: false,
  14922. MIDIOutputMap: false,
  14923. MIDIPort: false,
  14924. MimeType: false,
  14925. MimeTypeArray: false,
  14926. MouseEvent: false,
  14927. moveBy: false,
  14928. moveTo: false,
  14929. MutationEvent: false,
  14930. MutationObserver: false,
  14931. MutationRecord: false,
  14932. name: false,
  14933. NamedNodeMap: false,
  14934. NavigationPreloadManager: false,
  14935. navigator: false,
  14936. Navigator: false,
  14937. NetworkInformation: false,
  14938. Node: false,
  14939. NodeFilter: false,
  14940. NodeIterator: false,
  14941. NodeList: false,
  14942. Notification: false,
  14943. OfflineAudioCompletionEvent: false,
  14944. OfflineAudioContext: false,
  14945. offscreenBuffering: false,
  14946. OffscreenCanvas: true,
  14947. onabort: true,
  14948. onafterprint: true,
  14949. onanimationend: true,
  14950. onanimationiteration: true,
  14951. onanimationstart: true,
  14952. onappinstalled: true,
  14953. onauxclick: true,
  14954. onbeforeinstallprompt: true,
  14955. onbeforeprint: true,
  14956. onbeforeunload: true,
  14957. onblur: true,
  14958. oncancel: true,
  14959. oncanplay: true,
  14960. oncanplaythrough: true,
  14961. onchange: true,
  14962. onclick: true,
  14963. onclose: true,
  14964. oncontextmenu: true,
  14965. oncuechange: true,
  14966. ondblclick: true,
  14967. ondevicemotion: true,
  14968. ondeviceorientation: true,
  14969. ondeviceorientationabsolute: true,
  14970. ondrag: true,
  14971. ondragend: true,
  14972. ondragenter: true,
  14973. ondragleave: true,
  14974. ondragover: true,
  14975. ondragstart: true,
  14976. ondrop: true,
  14977. ondurationchange: true,
  14978. onemptied: true,
  14979. onended: true,
  14980. onerror: true,
  14981. onfocus: true,
  14982. ongotpointercapture: true,
  14983. onhashchange: true,
  14984. oninput: true,
  14985. oninvalid: true,
  14986. onkeydown: true,
  14987. onkeypress: true,
  14988. onkeyup: true,
  14989. onlanguagechange: true,
  14990. onload: true,
  14991. onloadeddata: true,
  14992. onloadedmetadata: true,
  14993. onloadstart: true,
  14994. onlostpointercapture: true,
  14995. onmessage: true,
  14996. onmessageerror: true,
  14997. onmousedown: true,
  14998. onmouseenter: true,
  14999. onmouseleave: true,
  15000. onmousemove: true,
  15001. onmouseout: true,
  15002. onmouseover: true,
  15003. onmouseup: true,
  15004. onmousewheel: true,
  15005. onoffline: true,
  15006. ononline: true,
  15007. onpagehide: true,
  15008. onpageshow: true,
  15009. onpause: true,
  15010. onplay: true,
  15011. onplaying: true,
  15012. onpointercancel: true,
  15013. onpointerdown: true,
  15014. onpointerenter: true,
  15015. onpointerleave: true,
  15016. onpointermove: true,
  15017. onpointerout: true,
  15018. onpointerover: true,
  15019. onpointerup: true,
  15020. onpopstate: true,
  15021. onprogress: true,
  15022. onratechange: true,
  15023. onrejectionhandled: true,
  15024. onreset: true,
  15025. onresize: true,
  15026. onscroll: true,
  15027. onsearch: true,
  15028. onseeked: true,
  15029. onseeking: true,
  15030. onselect: true,
  15031. onstalled: true,
  15032. onstorage: true,
  15033. onsubmit: true,
  15034. onsuspend: true,
  15035. ontimeupdate: true,
  15036. ontoggle: true,
  15037. ontransitionend: true,
  15038. onunhandledrejection: true,
  15039. onunload: true,
  15040. onvolumechange: true,
  15041. onwaiting: true,
  15042. onwheel: true,
  15043. open: false,
  15044. openDatabase: false,
  15045. opener: false,
  15046. Option: false,
  15047. origin: false,
  15048. OscillatorNode: false,
  15049. outerHeight: false,
  15050. outerWidth: false,
  15051. PageTransitionEvent: false,
  15052. pageXOffset: false,
  15053. pageYOffset: false,
  15054. PannerNode: false,
  15055. parent: false,
  15056. Path2D: false,
  15057. PaymentAddress: false,
  15058. PaymentRequest: false,
  15059. PaymentRequestUpdateEvent: false,
  15060. PaymentResponse: false,
  15061. performance: false,
  15062. Performance: false,
  15063. PerformanceEntry: false,
  15064. PerformanceLongTaskTiming: false,
  15065. PerformanceMark: false,
  15066. PerformanceMeasure: false,
  15067. PerformanceNavigation: false,
  15068. PerformanceNavigationTiming: false,
  15069. PerformanceObserver: false,
  15070. PerformanceObserverEntryList: false,
  15071. PerformancePaintTiming: false,
  15072. PerformanceResourceTiming: false,
  15073. PerformanceTiming: false,
  15074. PeriodicWave: false,
  15075. Permissions: false,
  15076. PermissionStatus: false,
  15077. personalbar: false,
  15078. PhotoCapabilities: false,
  15079. Plugin: false,
  15080. PluginArray: false,
  15081. PointerEvent: false,
  15082. PopStateEvent: false,
  15083. postMessage: false,
  15084. Presentation: false,
  15085. PresentationAvailability: false,
  15086. PresentationConnection: false,
  15087. PresentationConnectionAvailableEvent: false,
  15088. PresentationConnectionCloseEvent: false,
  15089. PresentationConnectionList: false,
  15090. PresentationReceiver: false,
  15091. PresentationRequest: false,
  15092. print: false,
  15093. ProcessingInstruction: false,
  15094. ProgressEvent: false,
  15095. PromiseRejectionEvent: false,
  15096. prompt: false,
  15097. PushManager: false,
  15098. PushSubscription: false,
  15099. PushSubscriptionOptions: false,
  15100. queueMicrotask: false,
  15101. RadioNodeList: false,
  15102. Range: false,
  15103. ReadableStream: false,
  15104. registerProcessor: false,
  15105. RemotePlayback: false,
  15106. removeEventListener: false,
  15107. Request: false,
  15108. requestAnimationFrame: false,
  15109. requestIdleCallback: false,
  15110. resizeBy: false,
  15111. ResizeObserver: false,
  15112. ResizeObserverEntry: false,
  15113. resizeTo: false,
  15114. Response: false,
  15115. RTCCertificate: false,
  15116. RTCDataChannel: false,
  15117. RTCDataChannelEvent: false,
  15118. RTCDtlsTransport: false,
  15119. RTCIceCandidate: false,
  15120. RTCIceGatherer: false,
  15121. RTCIceTransport: false,
  15122. RTCPeerConnection: false,
  15123. RTCPeerConnectionIceEvent: false,
  15124. RTCRtpContributingSource: false,
  15125. RTCRtpReceiver: false,
  15126. RTCRtpSender: false,
  15127. RTCSctpTransport: false,
  15128. RTCSessionDescription: false,
  15129. RTCStatsReport: false,
  15130. RTCTrackEvent: false,
  15131. screen: false,
  15132. Screen: false,
  15133. screenLeft: false,
  15134. ScreenOrientation: false,
  15135. screenTop: false,
  15136. screenX: false,
  15137. screenY: false,
  15138. ScriptProcessorNode: false,
  15139. scroll: false,
  15140. scrollbars: false,
  15141. scrollBy: false,
  15142. scrollTo: false,
  15143. scrollX: false,
  15144. scrollY: false,
  15145. SecurityPolicyViolationEvent: false,
  15146. Selection: false,
  15147. self: false,
  15148. ServiceWorker: false,
  15149. ServiceWorkerContainer: false,
  15150. ServiceWorkerRegistration: false,
  15151. sessionStorage: false,
  15152. setInterval: false,
  15153. setTimeout: false,
  15154. ShadowRoot: false,
  15155. SharedWorker: false,
  15156. SourceBuffer: false,
  15157. SourceBufferList: false,
  15158. speechSynthesis: false,
  15159. SpeechSynthesisEvent: false,
  15160. SpeechSynthesisUtterance: false,
  15161. StaticRange: false,
  15162. status: false,
  15163. statusbar: false,
  15164. StereoPannerNode: false,
  15165. stop: false,
  15166. Storage: false,
  15167. StorageEvent: false,
  15168. StorageManager: false,
  15169. styleMedia: false,
  15170. StyleSheet: false,
  15171. StyleSheetList: false,
  15172. SubtleCrypto: false,
  15173. SVGAElement: false,
  15174. SVGAngle: false,
  15175. SVGAnimatedAngle: false,
  15176. SVGAnimatedBoolean: false,
  15177. SVGAnimatedEnumeration: false,
  15178. SVGAnimatedInteger: false,
  15179. SVGAnimatedLength: false,
  15180. SVGAnimatedLengthList: false,
  15181. SVGAnimatedNumber: false,
  15182. SVGAnimatedNumberList: false,
  15183. SVGAnimatedPreserveAspectRatio: false,
  15184. SVGAnimatedRect: false,
  15185. SVGAnimatedString: false,
  15186. SVGAnimatedTransformList: false,
  15187. SVGAnimateElement: false,
  15188. SVGAnimateMotionElement: false,
  15189. SVGAnimateTransformElement: false,
  15190. SVGAnimationElement: false,
  15191. SVGCircleElement: false,
  15192. SVGClipPathElement: false,
  15193. SVGComponentTransferFunctionElement: false,
  15194. SVGDefsElement: false,
  15195. SVGDescElement: false,
  15196. SVGDiscardElement: false,
  15197. SVGElement: false,
  15198. SVGEllipseElement: false,
  15199. SVGFEBlendElement: false,
  15200. SVGFEColorMatrixElement: false,
  15201. SVGFEComponentTransferElement: false,
  15202. SVGFECompositeElement: false,
  15203. SVGFEConvolveMatrixElement: false,
  15204. SVGFEDiffuseLightingElement: false,
  15205. SVGFEDisplacementMapElement: false,
  15206. SVGFEDistantLightElement: false,
  15207. SVGFEDropShadowElement: false,
  15208. SVGFEFloodElement: false,
  15209. SVGFEFuncAElement: false,
  15210. SVGFEFuncBElement: false,
  15211. SVGFEFuncGElement: false,
  15212. SVGFEFuncRElement: false,
  15213. SVGFEGaussianBlurElement: false,
  15214. SVGFEImageElement: false,
  15215. SVGFEMergeElement: false,
  15216. SVGFEMergeNodeElement: false,
  15217. SVGFEMorphologyElement: false,
  15218. SVGFEOffsetElement: false,
  15219. SVGFEPointLightElement: false,
  15220. SVGFESpecularLightingElement: false,
  15221. SVGFESpotLightElement: false,
  15222. SVGFETileElement: false,
  15223. SVGFETurbulenceElement: false,
  15224. SVGFilterElement: false,
  15225. SVGForeignObjectElement: false,
  15226. SVGGElement: false,
  15227. SVGGeometryElement: false,
  15228. SVGGradientElement: false,
  15229. SVGGraphicsElement: false,
  15230. SVGImageElement: false,
  15231. SVGLength: false,
  15232. SVGLengthList: false,
  15233. SVGLinearGradientElement: false,
  15234. SVGLineElement: false,
  15235. SVGMarkerElement: false,
  15236. SVGMaskElement: false,
  15237. SVGMatrix: false,
  15238. SVGMetadataElement: false,
  15239. SVGMPathElement: false,
  15240. SVGNumber: false,
  15241. SVGNumberList: false,
  15242. SVGPathElement: false,
  15243. SVGPatternElement: false,
  15244. SVGPoint: false,
  15245. SVGPointList: false,
  15246. SVGPolygonElement: false,
  15247. SVGPolylineElement: false,
  15248. SVGPreserveAspectRatio: false,
  15249. SVGRadialGradientElement: false,
  15250. SVGRect: false,
  15251. SVGRectElement: false,
  15252. SVGScriptElement: false,
  15253. SVGSetElement: false,
  15254. SVGStopElement: false,
  15255. SVGStringList: false,
  15256. SVGStyleElement: false,
  15257. SVGSVGElement: false,
  15258. SVGSwitchElement: false,
  15259. SVGSymbolElement: false,
  15260. SVGTextContentElement: false,
  15261. SVGTextElement: false,
  15262. SVGTextPathElement: false,
  15263. SVGTextPositioningElement: false,
  15264. SVGTitleElement: false,
  15265. SVGTransform: false,
  15266. SVGTransformList: false,
  15267. SVGTSpanElement: false,
  15268. SVGUnitTypes: false,
  15269. SVGUseElement: false,
  15270. SVGViewElement: false,
  15271. TaskAttributionTiming: false,
  15272. Text: false,
  15273. TextDecoder: false,
  15274. TextEncoder: false,
  15275. TextEvent: false,
  15276. TextMetrics: false,
  15277. TextTrack: false,
  15278. TextTrackCue: false,
  15279. TextTrackCueList: false,
  15280. TextTrackList: false,
  15281. TimeRanges: false,
  15282. toolbar: false,
  15283. top: false,
  15284. Touch: false,
  15285. TouchEvent: false,
  15286. TouchList: false,
  15287. TrackEvent: false,
  15288. TransitionEvent: false,
  15289. TreeWalker: false,
  15290. UIEvent: false,
  15291. URL: false,
  15292. URLSearchParams: false,
  15293. ValidityState: false,
  15294. visualViewport: false,
  15295. VisualViewport: false,
  15296. VTTCue: false,
  15297. WaveShaperNode: false,
  15298. WebAssembly: false,
  15299. WebGL2RenderingContext: false,
  15300. WebGLActiveInfo: false,
  15301. WebGLBuffer: false,
  15302. WebGLContextEvent: false,
  15303. WebGLFramebuffer: false,
  15304. WebGLProgram: false,
  15305. WebGLQuery: false,
  15306. WebGLRenderbuffer: false,
  15307. WebGLRenderingContext: false,
  15308. WebGLSampler: false,
  15309. WebGLShader: false,
  15310. WebGLShaderPrecisionFormat: false,
  15311. WebGLSync: false,
  15312. WebGLTexture: false,
  15313. WebGLTransformFeedback: false,
  15314. WebGLUniformLocation: false,
  15315. WebGLVertexArrayObject: false,
  15316. WebSocket: false,
  15317. WheelEvent: false,
  15318. window: false,
  15319. Window: false,
  15320. Worker: false,
  15321. WritableStream: false,
  15322. XMLDocument: false,
  15323. XMLHttpRequest: false,
  15324. XMLHttpRequestEventTarget: false,
  15325. XMLHttpRequestUpload: false,
  15326. XMLSerializer: false,
  15327. XPathEvaluator: false,
  15328. XPathExpression: false,
  15329. XPathResult: false,
  15330. XSLTProcessor: false
  15331. };
  15332. var worker = {
  15333. addEventListener: false,
  15334. applicationCache: false,
  15335. atob: false,
  15336. Blob: false,
  15337. BroadcastChannel: false,
  15338. btoa: false,
  15339. Cache: false,
  15340. caches: false,
  15341. clearInterval: false,
  15342. clearTimeout: false,
  15343. close: true,
  15344. console: false,
  15345. fetch: false,
  15346. FileReaderSync: false,
  15347. FormData: false,
  15348. Headers: false,
  15349. IDBCursor: false,
  15350. IDBCursorWithValue: false,
  15351. IDBDatabase: false,
  15352. IDBFactory: false,
  15353. IDBIndex: false,
  15354. IDBKeyRange: false,
  15355. IDBObjectStore: false,
  15356. IDBOpenDBRequest: false,
  15357. IDBRequest: false,
  15358. IDBTransaction: false,
  15359. IDBVersionChangeEvent: false,
  15360. ImageData: false,
  15361. importScripts: true,
  15362. indexedDB: false,
  15363. location: false,
  15364. MessageChannel: false,
  15365. MessagePort: false,
  15366. name: false,
  15367. navigator: false,
  15368. Notification: false,
  15369. onclose: true,
  15370. onconnect: true,
  15371. onerror: true,
  15372. onlanguagechange: true,
  15373. onmessage: true,
  15374. onoffline: true,
  15375. ononline: true,
  15376. onrejectionhandled: true,
  15377. onunhandledrejection: true,
  15378. performance: false,
  15379. Performance: false,
  15380. PerformanceEntry: false,
  15381. PerformanceMark: false,
  15382. PerformanceMeasure: false,
  15383. PerformanceNavigation: false,
  15384. PerformanceResourceTiming: false,
  15385. PerformanceTiming: false,
  15386. postMessage: true,
  15387. "Promise": false,
  15388. queueMicrotask: false,
  15389. removeEventListener: false,
  15390. Request: false,
  15391. Response: false,
  15392. self: true,
  15393. ServiceWorkerRegistration: false,
  15394. setInterval: false,
  15395. setTimeout: false,
  15396. TextDecoder: false,
  15397. TextEncoder: false,
  15398. URL: false,
  15399. URLSearchParams: false,
  15400. WebSocket: false,
  15401. Worker: false,
  15402. WorkerGlobalScope: false,
  15403. XMLHttpRequest: false
  15404. };
  15405. var node = {
  15406. __dirname: false,
  15407. __filename: false,
  15408. Buffer: false,
  15409. clearImmediate: false,
  15410. clearInterval: false,
  15411. clearTimeout: false,
  15412. console: false,
  15413. exports: true,
  15414. global: false,
  15415. "Intl": false,
  15416. module: false,
  15417. process: false,
  15418. queueMicrotask: false,
  15419. require: false,
  15420. setImmediate: false,
  15421. setInterval: false,
  15422. setTimeout: false,
  15423. TextDecoder: false,
  15424. TextEncoder: false,
  15425. URL: false,
  15426. URLSearchParams: false
  15427. };
  15428. var commonjs = {
  15429. exports: true,
  15430. global: false,
  15431. module: false,
  15432. require: false
  15433. };
  15434. var amd = {
  15435. define: false,
  15436. require: false
  15437. };
  15438. var mocha = {
  15439. after: false,
  15440. afterEach: false,
  15441. before: false,
  15442. beforeEach: false,
  15443. context: false,
  15444. describe: false,
  15445. it: false,
  15446. mocha: false,
  15447. run: false,
  15448. setup: false,
  15449. specify: false,
  15450. suite: false,
  15451. suiteSetup: false,
  15452. suiteTeardown: false,
  15453. teardown: false,
  15454. test: false,
  15455. xcontext: false,
  15456. xdescribe: false,
  15457. xit: false,
  15458. xspecify: false
  15459. };
  15460. var jasmine = {
  15461. afterAll: false,
  15462. afterEach: false,
  15463. beforeAll: false,
  15464. beforeEach: false,
  15465. describe: false,
  15466. expect: false,
  15467. fail: false,
  15468. fdescribe: false,
  15469. fit: false,
  15470. it: false,
  15471. jasmine: false,
  15472. pending: false,
  15473. runs: false,
  15474. spyOn: false,
  15475. spyOnProperty: false,
  15476. waits: false,
  15477. waitsFor: false,
  15478. xdescribe: false,
  15479. xit: false
  15480. };
  15481. var jest = {
  15482. afterAll: false,
  15483. afterEach: false,
  15484. beforeAll: false,
  15485. beforeEach: false,
  15486. describe: false,
  15487. expect: false,
  15488. fdescribe: false,
  15489. fit: false,
  15490. it: false,
  15491. jest: false,
  15492. pit: false,
  15493. require: false,
  15494. test: false,
  15495. xdescribe: false,
  15496. xit: false,
  15497. xtest: false
  15498. };
  15499. var qunit = {
  15500. asyncTest: false,
  15501. deepEqual: false,
  15502. equal: false,
  15503. expect: false,
  15504. module: false,
  15505. notDeepEqual: false,
  15506. notEqual: false,
  15507. notOk: false,
  15508. notPropEqual: false,
  15509. notStrictEqual: false,
  15510. ok: false,
  15511. propEqual: false,
  15512. QUnit: false,
  15513. raises: false,
  15514. start: false,
  15515. stop: false,
  15516. strictEqual: false,
  15517. test: false,
  15518. throws: false
  15519. };
  15520. var phantomjs = {
  15521. console: true,
  15522. exports: true,
  15523. phantom: true,
  15524. require: true,
  15525. WebPage: true
  15526. };
  15527. var couch = {
  15528. emit: false,
  15529. exports: false,
  15530. getRow: false,
  15531. log: false,
  15532. module: false,
  15533. provides: false,
  15534. require: false,
  15535. respond: false,
  15536. send: false,
  15537. start: false,
  15538. sum: false
  15539. };
  15540. var rhino = {
  15541. defineClass: false,
  15542. deserialize: false,
  15543. gc: false,
  15544. help: false,
  15545. importClass: false,
  15546. importPackage: false,
  15547. java: false,
  15548. load: false,
  15549. loadClass: false,
  15550. Packages: false,
  15551. print: false,
  15552. quit: false,
  15553. readFile: false,
  15554. readUrl: false,
  15555. runCommand: false,
  15556. seal: false,
  15557. serialize: false,
  15558. spawn: false,
  15559. sync: false,
  15560. toint32: false,
  15561. version: false
  15562. };
  15563. var nashorn = {
  15564. __DIR__: false,
  15565. __FILE__: false,
  15566. __LINE__: false,
  15567. com: false,
  15568. edu: false,
  15569. exit: false,
  15570. java: false,
  15571. Java: false,
  15572. javafx: false,
  15573. JavaImporter: false,
  15574. javax: false,
  15575. JSAdapter: false,
  15576. load: false,
  15577. loadWithNewGlobal: false,
  15578. org: false,
  15579. Packages: false,
  15580. print: false,
  15581. quit: false
  15582. };
  15583. var wsh = {
  15584. ActiveXObject: true,
  15585. Enumerator: true,
  15586. GetObject: true,
  15587. ScriptEngine: true,
  15588. ScriptEngineBuildVersion: true,
  15589. ScriptEngineMajorVersion: true,
  15590. ScriptEngineMinorVersion: true,
  15591. VBArray: true,
  15592. WScript: true,
  15593. WSH: true,
  15594. XDomainRequest: true
  15595. };
  15596. var jquery = {
  15597. $: false,
  15598. jQuery: false
  15599. };
  15600. var yui = {
  15601. YAHOO: false,
  15602. YAHOO_config: false,
  15603. YUI: false,
  15604. YUI_config: false
  15605. };
  15606. var shelljs = {
  15607. cat: false,
  15608. cd: false,
  15609. chmod: false,
  15610. config: false,
  15611. cp: false,
  15612. dirs: false,
  15613. echo: false,
  15614. env: false,
  15615. error: false,
  15616. exec: false,
  15617. exit: false,
  15618. find: false,
  15619. grep: false,
  15620. ln: false,
  15621. ls: false,
  15622. mkdir: false,
  15623. mv: false,
  15624. popd: false,
  15625. pushd: false,
  15626. pwd: false,
  15627. rm: false,
  15628. sed: false,
  15629. set: false,
  15630. target: false,
  15631. tempdir: false,
  15632. test: false,
  15633. touch: false,
  15634. which: false
  15635. };
  15636. var prototypejs = {
  15637. $: false,
  15638. $$: false,
  15639. $A: false,
  15640. $break: false,
  15641. $continue: false,
  15642. $F: false,
  15643. $H: false,
  15644. $R: false,
  15645. $w: false,
  15646. Abstract: false,
  15647. Ajax: false,
  15648. Autocompleter: false,
  15649. Builder: false,
  15650. Class: false,
  15651. Control: false,
  15652. Draggable: false,
  15653. Draggables: false,
  15654. Droppables: false,
  15655. Effect: false,
  15656. Element: false,
  15657. Enumerable: false,
  15658. Event: false,
  15659. Field: false,
  15660. Form: false,
  15661. Hash: false,
  15662. Insertion: false,
  15663. ObjectRange: false,
  15664. PeriodicalExecuter: false,
  15665. Position: false,
  15666. Prototype: false,
  15667. Scriptaculous: false,
  15668. Selector: false,
  15669. Sortable: false,
  15670. SortableObserver: false,
  15671. Sound: false,
  15672. Template: false,
  15673. Toggle: false,
  15674. Try: false
  15675. };
  15676. var meteor = {
  15677. _: false,
  15678. $: false,
  15679. Accounts: false,
  15680. AccountsClient: false,
  15681. AccountsCommon: false,
  15682. AccountsServer: false,
  15683. App: false,
  15684. Assets: false,
  15685. Blaze: false,
  15686. check: false,
  15687. Cordova: false,
  15688. DDP: false,
  15689. DDPRateLimiter: false,
  15690. DDPServer: false,
  15691. Deps: false,
  15692. EJSON: false,
  15693. Email: false,
  15694. HTTP: false,
  15695. Log: false,
  15696. Match: false,
  15697. Meteor: false,
  15698. Mongo: false,
  15699. MongoInternals: false,
  15700. Npm: false,
  15701. Package: false,
  15702. Plugin: false,
  15703. process: false,
  15704. Random: false,
  15705. ReactiveDict: false,
  15706. ReactiveVar: false,
  15707. Router: false,
  15708. ServiceConfiguration: false,
  15709. Session: false,
  15710. share: false,
  15711. Spacebars: false,
  15712. Template: false,
  15713. Tinytest: false,
  15714. Tracker: false,
  15715. UI: false,
  15716. Utils: false,
  15717. WebApp: false,
  15718. WebAppInternals: false
  15719. };
  15720. var mongo = {
  15721. _isWindows: false,
  15722. _rand: false,
  15723. BulkWriteResult: false,
  15724. cat: false,
  15725. cd: false,
  15726. connect: false,
  15727. db: false,
  15728. getHostName: false,
  15729. getMemInfo: false,
  15730. hostname: false,
  15731. ISODate: false,
  15732. listFiles: false,
  15733. load: false,
  15734. ls: false,
  15735. md5sumFile: false,
  15736. mkdir: false,
  15737. Mongo: false,
  15738. NumberInt: false,
  15739. NumberLong: false,
  15740. ObjectId: false,
  15741. PlanCache: false,
  15742. print: false,
  15743. printjson: false,
  15744. pwd: false,
  15745. quit: false,
  15746. removeFile: false,
  15747. rs: false,
  15748. sh: false,
  15749. UUID: false,
  15750. version: false,
  15751. WriteResult: false
  15752. };
  15753. var applescript = {
  15754. $: false,
  15755. Application: false,
  15756. Automation: false,
  15757. console: false,
  15758. delay: false,
  15759. Library: false,
  15760. ObjC: false,
  15761. ObjectSpecifier: false,
  15762. Path: false,
  15763. Progress: false,
  15764. Ref: false
  15765. };
  15766. var serviceworker = {
  15767. addEventListener: false,
  15768. applicationCache: false,
  15769. atob: false,
  15770. Blob: false,
  15771. BroadcastChannel: false,
  15772. btoa: false,
  15773. Cache: false,
  15774. caches: false,
  15775. CacheStorage: false,
  15776. clearInterval: false,
  15777. clearTimeout: false,
  15778. Client: false,
  15779. clients: false,
  15780. Clients: false,
  15781. close: true,
  15782. console: false,
  15783. ExtendableEvent: false,
  15784. ExtendableMessageEvent: false,
  15785. fetch: false,
  15786. FetchEvent: false,
  15787. FileReaderSync: false,
  15788. FormData: false,
  15789. Headers: false,
  15790. IDBCursor: false,
  15791. IDBCursorWithValue: false,
  15792. IDBDatabase: false,
  15793. IDBFactory: false,
  15794. IDBIndex: false,
  15795. IDBKeyRange: false,
  15796. IDBObjectStore: false,
  15797. IDBOpenDBRequest: false,
  15798. IDBRequest: false,
  15799. IDBTransaction: false,
  15800. IDBVersionChangeEvent: false,
  15801. ImageData: false,
  15802. importScripts: false,
  15803. indexedDB: false,
  15804. location: false,
  15805. MessageChannel: false,
  15806. MessagePort: false,
  15807. name: false,
  15808. navigator: false,
  15809. Notification: false,
  15810. onclose: true,
  15811. onconnect: true,
  15812. onerror: true,
  15813. onfetch: true,
  15814. oninstall: true,
  15815. onlanguagechange: true,
  15816. onmessage: true,
  15817. onmessageerror: true,
  15818. onnotificationclick: true,
  15819. onnotificationclose: true,
  15820. onoffline: true,
  15821. ononline: true,
  15822. onpush: true,
  15823. onpushsubscriptionchange: true,
  15824. onrejectionhandled: true,
  15825. onsync: true,
  15826. onunhandledrejection: true,
  15827. performance: false,
  15828. Performance: false,
  15829. PerformanceEntry: false,
  15830. PerformanceMark: false,
  15831. PerformanceMeasure: false,
  15832. PerformanceNavigation: false,
  15833. PerformanceResourceTiming: false,
  15834. PerformanceTiming: false,
  15835. postMessage: true,
  15836. "Promise": false,
  15837. queueMicrotask: false,
  15838. registration: false,
  15839. removeEventListener: false,
  15840. Request: false,
  15841. Response: false,
  15842. self: false,
  15843. ServiceWorker: false,
  15844. ServiceWorkerContainer: false,
  15845. ServiceWorkerGlobalScope: false,
  15846. ServiceWorkerMessageEvent: false,
  15847. ServiceWorkerRegistration: false,
  15848. setInterval: false,
  15849. setTimeout: false,
  15850. skipWaiting: false,
  15851. TextDecoder: false,
  15852. TextEncoder: false,
  15853. URL: false,
  15854. URLSearchParams: false,
  15855. WebSocket: false,
  15856. WindowClient: false,
  15857. Worker: false,
  15858. WorkerGlobalScope: false,
  15859. XMLHttpRequest: false
  15860. };
  15861. var atomtest = {
  15862. advanceClock: false,
  15863. fakeClearInterval: false,
  15864. fakeClearTimeout: false,
  15865. fakeSetInterval: false,
  15866. fakeSetTimeout: false,
  15867. resetTimeouts: false,
  15868. waitsForPromise: false
  15869. };
  15870. var embertest = {
  15871. andThen: false,
  15872. click: false,
  15873. currentPath: false,
  15874. currentRouteName: false,
  15875. currentURL: false,
  15876. fillIn: false,
  15877. find: false,
  15878. findAll: false,
  15879. findWithAssert: false,
  15880. keyEvent: false,
  15881. pauseTest: false,
  15882. resumeTest: false,
  15883. triggerEvent: false,
  15884. visit: false,
  15885. wait: false
  15886. };
  15887. var protractor = {
  15888. $: false,
  15889. $$: false,
  15890. browser: false,
  15891. by: false,
  15892. By: false,
  15893. DartObject: false,
  15894. element: false,
  15895. protractor: false
  15896. };
  15897. var webextensions = {
  15898. browser: false,
  15899. chrome: false,
  15900. opr: false
  15901. };
  15902. var greasemonkey = {
  15903. cloneInto: false,
  15904. createObjectIn: false,
  15905. exportFunction: false,
  15906. GM: false,
  15907. GM_addStyle: false,
  15908. GM_deleteValue: false,
  15909. GM_getResourceText: false,
  15910. GM_getResourceURL: false,
  15911. GM_getValue: false,
  15912. GM_info: false,
  15913. GM_listValues: false,
  15914. GM_log: false,
  15915. GM_openInTab: false,
  15916. GM_registerMenuCommand: false,
  15917. GM_setClipboard: false,
  15918. GM_setValue: false,
  15919. GM_xmlhttpRequest: false,
  15920. unsafeWindow: false
  15921. };
  15922. var devtools = {
  15923. $: false,
  15924. $_: false,
  15925. $$: false,
  15926. $0: false,
  15927. $1: false,
  15928. $2: false,
  15929. $3: false,
  15930. $4: false,
  15931. $x: false,
  15932. chrome: false,
  15933. clear: false,
  15934. copy: false,
  15935. debug: false,
  15936. dir: false,
  15937. dirxml: false,
  15938. getEventListeners: false,
  15939. inspect: false,
  15940. keys: false,
  15941. monitor: false,
  15942. monitorEvents: false,
  15943. profile: false,
  15944. profileEnd: false,
  15945. queryObjects: false,
  15946. table: false,
  15947. undebug: false,
  15948. unmonitor: false,
  15949. unmonitorEvents: false,
  15950. values: false
  15951. };
  15952. var globals = {
  15953. builtin: builtin,
  15954. es5: es5,
  15955. es2015: es2015,
  15956. es2017: es2017,
  15957. browser: browser$2,
  15958. worker: worker,
  15959. node: node,
  15960. commonjs: commonjs,
  15961. amd: amd,
  15962. mocha: mocha,
  15963. jasmine: jasmine,
  15964. jest: jest,
  15965. qunit: qunit,
  15966. phantomjs: phantomjs,
  15967. couch: couch,
  15968. rhino: rhino,
  15969. nashorn: nashorn,
  15970. wsh: wsh,
  15971. jquery: jquery,
  15972. yui: yui,
  15973. shelljs: shelljs,
  15974. prototypejs: prototypejs,
  15975. meteor: meteor,
  15976. mongo: mongo,
  15977. applescript: applescript,
  15978. serviceworker: serviceworker,
  15979. atomtest: atomtest,
  15980. embertest: embertest,
  15981. protractor: protractor,
  15982. "shared-node-browser": {
  15983. clearInterval: false,
  15984. clearTimeout: false,
  15985. console: false,
  15986. setInterval: false,
  15987. setTimeout: false,
  15988. URL: false,
  15989. URLSearchParams: false
  15990. },
  15991. webextensions: webextensions,
  15992. greasemonkey: greasemonkey,
  15993. devtools: devtools
  15994. };
  15995. var globals$1 = /*#__PURE__*/Object.freeze({
  15996. __proto__: null,
  15997. builtin: builtin,
  15998. es5: es5,
  15999. es2015: es2015,
  16000. es2017: es2017,
  16001. browser: browser$2,
  16002. worker: worker,
  16003. node: node,
  16004. commonjs: commonjs,
  16005. amd: amd,
  16006. mocha: mocha,
  16007. jasmine: jasmine,
  16008. jest: jest,
  16009. qunit: qunit,
  16010. phantomjs: phantomjs,
  16011. couch: couch,
  16012. rhino: rhino,
  16013. nashorn: nashorn,
  16014. wsh: wsh,
  16015. jquery: jquery,
  16016. yui: yui,
  16017. shelljs: shelljs,
  16018. prototypejs: prototypejs,
  16019. meteor: meteor,
  16020. mongo: mongo,
  16021. applescript: applescript,
  16022. serviceworker: serviceworker,
  16023. atomtest: atomtest,
  16024. embertest: embertest,
  16025. protractor: protractor,
  16026. webextensions: webextensions,
  16027. greasemonkey: greasemonkey,
  16028. devtools: devtools,
  16029. 'default': globals
  16030. });
  16031. var require$$0 = getCjsExportFromNamespace(globals$1);
  16032. var globals$2 = require$$0;
  16033. var path = new WeakMap();
  16034. var scope = new WeakMap();
  16035. function clear() {
  16036. clearPath();
  16037. clearScope();
  16038. }
  16039. function clearPath() {
  16040. path = new WeakMap();
  16041. }
  16042. function clearScope() {
  16043. scope = new WeakMap();
  16044. }
  16045. var cache = /*#__PURE__*/Object.freeze({
  16046. __proto__: null,
  16047. get path () { return path; },
  16048. get scope () { return scope; },
  16049. clear: clear,
  16050. clearPath: clearPath,
  16051. clearScope: clearScope
  16052. });
  16053. function gatherNodeParts(node, parts) {
  16054. if (isModuleDeclaration(node)) {
  16055. if (node.source) {
  16056. gatherNodeParts(node.source, parts);
  16057. } else if (node.specifiers && node.specifiers.length) {
  16058. for (var _i = 0, _arr = node.specifiers; _i < _arr.length; _i++) {
  16059. var specifier = _arr[_i];
  16060. gatherNodeParts(specifier, parts);
  16061. }
  16062. } else if (node.declaration) {
  16063. gatherNodeParts(node.declaration, parts);
  16064. }
  16065. } else if (isModuleSpecifier(node)) {
  16066. gatherNodeParts(node.local, parts);
  16067. } else if (isMemberExpression(node)) {
  16068. gatherNodeParts(node.object, parts);
  16069. gatherNodeParts(node.property, parts);
  16070. } else if (isIdentifier(node)) {
  16071. parts.push(node.name);
  16072. } else if (isLiteral(node)) {
  16073. parts.push(node.value);
  16074. } else if (isCallExpression(node)) {
  16075. gatherNodeParts(node.callee, parts);
  16076. } else if (isObjectExpression(node) || isObjectPattern(node)) {
  16077. for (var _i2 = 0, _arr2 = node.properties; _i2 < _arr2.length; _i2++) {
  16078. var prop = _arr2[_i2];
  16079. gatherNodeParts(prop.key || prop.argument, parts);
  16080. }
  16081. } else if (isPrivateName(node)) {
  16082. gatherNodeParts(node.id, parts);
  16083. } else if (isThisExpression(node)) {
  16084. parts.push("this");
  16085. } else if (isSuper(node)) {
  16086. parts.push("super");
  16087. }
  16088. }
  16089. var collectorVisitor = {
  16090. For: function For(path) {
  16091. for (var _i3 = 0, _arr3 = FOR_INIT_KEYS; _i3 < _arr3.length; _i3++) {
  16092. var key = _arr3[_i3];
  16093. var declar = path.get(key);
  16094. if (declar.isVar()) {
  16095. var parentScope = path.scope.getFunctionParent() || path.scope.getProgramParent();
  16096. parentScope.registerBinding("var", declar);
  16097. }
  16098. }
  16099. },
  16100. Declaration: function Declaration(path) {
  16101. if (path.isBlockScoped()) return;
  16102. if (path.isExportDeclaration() && path.get("declaration").isDeclaration()) {
  16103. return;
  16104. }
  16105. var parent = path.scope.getFunctionParent() || path.scope.getProgramParent();
  16106. parent.registerDeclaration(path);
  16107. },
  16108. ReferencedIdentifier: function ReferencedIdentifier(path, state) {
  16109. state.references.push(path);
  16110. },
  16111. ForXStatement: function ForXStatement(path, state) {
  16112. var left = path.get("left");
  16113. if (left.isPattern() || left.isIdentifier()) {
  16114. state.constantViolations.push(path);
  16115. }
  16116. },
  16117. ExportDeclaration: {
  16118. exit: function exit(path) {
  16119. var node = path.node,
  16120. scope = path.scope;
  16121. var declar = node.declaration;
  16122. if (isClassDeclaration(declar) || isFunctionDeclaration(declar)) {
  16123. var id = declar.id;
  16124. if (!id) return;
  16125. var binding = scope.getBinding(id.name);
  16126. if (binding) binding.reference(path);
  16127. } else if (isVariableDeclaration(declar)) {
  16128. for (var _i4 = 0, _arr4 = declar.declarations; _i4 < _arr4.length; _i4++) {
  16129. var decl = _arr4[_i4];
  16130. for (var _i5 = 0, _Object$keys = Object.keys(getBindingIdentifiers(decl)); _i5 < _Object$keys.length; _i5++) {
  16131. var name = _Object$keys[_i5];
  16132. var _binding = scope.getBinding(name);
  16133. if (_binding) _binding.reference(path);
  16134. }
  16135. }
  16136. }
  16137. }
  16138. },
  16139. LabeledStatement: function LabeledStatement(path) {
  16140. path.scope.getProgramParent().addGlobal(path.node);
  16141. path.scope.getBlockParent().registerDeclaration(path);
  16142. },
  16143. AssignmentExpression: function AssignmentExpression(path, state) {
  16144. state.assignments.push(path);
  16145. },
  16146. UpdateExpression: function UpdateExpression(path, state) {
  16147. state.constantViolations.push(path);
  16148. },
  16149. UnaryExpression: function UnaryExpression(path, state) {
  16150. if (path.node.operator === "delete") {
  16151. state.constantViolations.push(path);
  16152. }
  16153. },
  16154. BlockScoped: function BlockScoped(path) {
  16155. var scope = path.scope;
  16156. if (scope.path === path) scope = scope.parent;
  16157. scope.getBlockParent().registerDeclaration(path);
  16158. },
  16159. ClassDeclaration: function ClassDeclaration(path) {
  16160. var id = path.node.id;
  16161. if (!id) return;
  16162. var name = id.name;
  16163. path.scope.bindings[name] = path.scope.getBinding(name);
  16164. },
  16165. Block: function Block(path) {
  16166. var paths = path.get("body");
  16167. for (var _i6 = 0, _arr5 = paths; _i6 < _arr5.length; _i6++) {
  16168. var bodyPath = _arr5[_i6];
  16169. if (bodyPath.isFunctionDeclaration()) {
  16170. path.scope.getBlockParent().registerDeclaration(bodyPath);
  16171. }
  16172. }
  16173. }
  16174. };
  16175. var uid = 0;
  16176. var Scope$1 = function () {
  16177. function Scope(path) {
  16178. var node = path.node;
  16179. var cached = scope.get(node);
  16180. if (cached && cached.path === path) {
  16181. return cached;
  16182. }
  16183. scope.set(node, this);
  16184. this.uid = uid++;
  16185. this.block = node;
  16186. this.path = path;
  16187. this.labels = new Map();
  16188. }
  16189. var _proto = Scope.prototype;
  16190. _proto.traverse = function traverse(node, opts, state) {
  16191. traverse$1(node, opts, this, state, this.path);
  16192. };
  16193. _proto.generateDeclaredUidIdentifier = function generateDeclaredUidIdentifier(name) {
  16194. var id = this.generateUidIdentifier(name);
  16195. this.push({
  16196. id: id
  16197. });
  16198. return cloneNode(id);
  16199. };
  16200. _proto.generateUidIdentifier = function generateUidIdentifier(name) {
  16201. return Identifier(this.generateUid(name));
  16202. };
  16203. _proto.generateUid = function generateUid(name) {
  16204. if (name === void 0) {
  16205. name = "temp";
  16206. }
  16207. name = toIdentifier(name).replace(/^_+/, "").replace(/[0-9]+$/g, "");
  16208. var uid;
  16209. var i = 0;
  16210. do {
  16211. uid = this._generateUid(name, i);
  16212. i++;
  16213. } while (this.hasLabel(uid) || this.hasBinding(uid) || this.hasGlobal(uid) || this.hasReference(uid));
  16214. var program = this.getProgramParent();
  16215. program.references[uid] = true;
  16216. program.uids[uid] = true;
  16217. return uid;
  16218. };
  16219. _proto._generateUid = function _generateUid(name, i) {
  16220. var id = name;
  16221. if (i > 1) id += i;
  16222. return "_" + id;
  16223. };
  16224. _proto.generateUidBasedOnNode = function generateUidBasedOnNode(parent, defaultName) {
  16225. var node = parent;
  16226. if (isAssignmentExpression(parent)) {
  16227. node = parent.left;
  16228. } else if (isVariableDeclarator(parent)) {
  16229. node = parent.id;
  16230. } else if (isObjectProperty(node) || isObjectMethod(node)) {
  16231. node = node.key;
  16232. }
  16233. var parts = [];
  16234. gatherNodeParts(node, parts);
  16235. var id = parts.join("$");
  16236. id = id.replace(/^_/, "") || defaultName || "ref";
  16237. return this.generateUid(id.slice(0, 20));
  16238. };
  16239. _proto.generateUidIdentifierBasedOnNode = function generateUidIdentifierBasedOnNode(parent, defaultName) {
  16240. return Identifier(this.generateUidBasedOnNode(parent, defaultName));
  16241. };
  16242. _proto.isStatic = function isStatic(node) {
  16243. if (isThisExpression(node) || isSuper(node)) {
  16244. return true;
  16245. }
  16246. if (isIdentifier(node)) {
  16247. var binding = this.getBinding(node.name);
  16248. if (binding) {
  16249. return binding.constant;
  16250. } else {
  16251. return this.hasBinding(node.name);
  16252. }
  16253. }
  16254. return false;
  16255. };
  16256. _proto.maybeGenerateMemoised = function maybeGenerateMemoised(node, dontPush) {
  16257. if (this.isStatic(node)) {
  16258. return null;
  16259. } else {
  16260. var id = this.generateUidIdentifierBasedOnNode(node);
  16261. if (!dontPush) {
  16262. this.push({
  16263. id: id
  16264. });
  16265. return cloneNode(id);
  16266. }
  16267. return id;
  16268. }
  16269. };
  16270. _proto.checkBlockScopedCollisions = function checkBlockScopedCollisions(local, kind, name, id) {
  16271. if (kind === "param") return;
  16272. if (local.kind === "local") return;
  16273. var duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module" || local.kind === "param" && (kind === "let" || kind === "const");
  16274. if (duplicate) {
  16275. throw this.hub.buildError(id, "Duplicate declaration \"" + name + "\"", TypeError);
  16276. }
  16277. };
  16278. _proto.rename = function rename(oldName, newName, block) {
  16279. var binding = this.getBinding(oldName);
  16280. if (binding) {
  16281. newName = newName || this.generateUidIdentifier(oldName).name;
  16282. return new Renamer(binding, oldName, newName).rename(block);
  16283. }
  16284. };
  16285. _proto._renameFromMap = function _renameFromMap(map, oldName, newName, value) {
  16286. if (map[oldName]) {
  16287. map[newName] = value;
  16288. map[oldName] = null;
  16289. }
  16290. };
  16291. _proto.dump = function dump() {
  16292. var sep = repeat_1("-", 60);
  16293. console.log(sep);
  16294. var scope = this;
  16295. do {
  16296. console.log("#", scope.block.type);
  16297. for (var _i7 = 0, _Object$keys2 = Object.keys(scope.bindings); _i7 < _Object$keys2.length; _i7++) {
  16298. var name = _Object$keys2[_i7];
  16299. var binding = scope.bindings[name];
  16300. console.log(" -", name, {
  16301. constant: binding.constant,
  16302. references: binding.references,
  16303. violations: binding.constantViolations.length,
  16304. kind: binding.kind
  16305. });
  16306. }
  16307. } while (scope = scope.parent);
  16308. console.log(sep);
  16309. };
  16310. _proto.toArray = function toArray(node, i) {
  16311. if (isIdentifier(node)) {
  16312. var binding = this.getBinding(node.name);
  16313. if (binding && binding.constant && binding.path.isGenericType("Array")) {
  16314. return node;
  16315. }
  16316. }
  16317. if (isArrayExpression(node)) {
  16318. return node;
  16319. }
  16320. if (isIdentifier(node, {
  16321. name: "arguments"
  16322. })) {
  16323. return CallExpression(MemberExpression(MemberExpression(MemberExpression(Identifier("Array"), Identifier("prototype")), Identifier("slice")), Identifier("call")), [node]);
  16324. }
  16325. var helperName;
  16326. var args = [node];
  16327. if (i === true) {
  16328. helperName = "toConsumableArray";
  16329. } else if (i) {
  16330. args.push(NumericLiteral(i));
  16331. helperName = "slicedToArray";
  16332. } else {
  16333. helperName = "toArray";
  16334. }
  16335. return CallExpression(this.hub.addHelper(helperName), args);
  16336. };
  16337. _proto.hasLabel = function hasLabel(name) {
  16338. return !!this.getLabel(name);
  16339. };
  16340. _proto.getLabel = function getLabel(name) {
  16341. return this.labels.get(name);
  16342. };
  16343. _proto.registerLabel = function registerLabel(path) {
  16344. this.labels.set(path.node.label.name, path);
  16345. };
  16346. _proto.registerDeclaration = function registerDeclaration(path) {
  16347. if (path.isLabeledStatement()) {
  16348. this.registerLabel(path);
  16349. } else if (path.isFunctionDeclaration()) {
  16350. this.registerBinding("hoisted", path.get("id"), path);
  16351. } else if (path.isVariableDeclaration()) {
  16352. var declarations = path.get("declarations");
  16353. for (var _i8 = 0, _arr6 = declarations; _i8 < _arr6.length; _i8++) {
  16354. var declar = _arr6[_i8];
  16355. this.registerBinding(path.node.kind, declar);
  16356. }
  16357. } else if (path.isClassDeclaration()) {
  16358. this.registerBinding("let", path);
  16359. } else if (path.isImportDeclaration()) {
  16360. var specifiers = path.get("specifiers");
  16361. for (var _i9 = 0, _arr7 = specifiers; _i9 < _arr7.length; _i9++) {
  16362. var specifier = _arr7[_i9];
  16363. this.registerBinding("module", specifier);
  16364. }
  16365. } else if (path.isExportDeclaration()) {
  16366. var _declar = path.get("declaration");
  16367. if (_declar.isClassDeclaration() || _declar.isFunctionDeclaration() || _declar.isVariableDeclaration()) {
  16368. this.registerDeclaration(_declar);
  16369. }
  16370. } else {
  16371. this.registerBinding("unknown", path);
  16372. }
  16373. };
  16374. _proto.buildUndefinedNode = function buildUndefinedNode() {
  16375. return UnaryExpression("void", NumericLiteral(0), true);
  16376. };
  16377. _proto.registerConstantViolation = function registerConstantViolation(path) {
  16378. var ids = path.getBindingIdentifiers();
  16379. for (var _i10 = 0, _Object$keys3 = Object.keys(ids); _i10 < _Object$keys3.length; _i10++) {
  16380. var name = _Object$keys3[_i10];
  16381. var binding = this.getBinding(name);
  16382. if (binding) binding.reassign(path);
  16383. }
  16384. };
  16385. _proto.registerBinding = function registerBinding(kind, path, bindingPath) {
  16386. if (bindingPath === void 0) {
  16387. bindingPath = path;
  16388. }
  16389. if (!kind) throw new ReferenceError("no `kind`");
  16390. if (path.isVariableDeclaration()) {
  16391. var declarators = path.get("declarations");
  16392. for (var _iterator = declarators, _isArray = Array.isArray(_iterator), _i11 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  16393. var _ref;
  16394. if (_isArray) {
  16395. if (_i11 >= _iterator.length) break;
  16396. _ref = _iterator[_i11++];
  16397. } else {
  16398. _i11 = _iterator.next();
  16399. if (_i11.done) break;
  16400. _ref = _i11.value;
  16401. }
  16402. var declar = _ref;
  16403. this.registerBinding(kind, declar);
  16404. }
  16405. return;
  16406. }
  16407. var parent = this.getProgramParent();
  16408. var ids = path.getOuterBindingIdentifiers(true);
  16409. for (var _i12 = 0, _Object$keys4 = Object.keys(ids); _i12 < _Object$keys4.length; _i12++) {
  16410. var name = _Object$keys4[_i12];
  16411. for (var _i13 = 0, _arr8 = ids[name]; _i13 < _arr8.length; _i13++) {
  16412. var id = _arr8[_i13];
  16413. var local = this.getOwnBinding(name);
  16414. if (local) {
  16415. if (local.identifier === id) continue;
  16416. this.checkBlockScopedCollisions(local, kind, name, id);
  16417. }
  16418. parent.references[name] = true;
  16419. if (local) {
  16420. this.registerConstantViolation(bindingPath);
  16421. } else {
  16422. this.bindings[name] = new Binding({
  16423. identifier: id,
  16424. scope: this,
  16425. path: bindingPath,
  16426. kind: kind
  16427. });
  16428. }
  16429. }
  16430. }
  16431. };
  16432. _proto.addGlobal = function addGlobal(node) {
  16433. this.globals[node.name] = node;
  16434. };
  16435. _proto.hasUid = function hasUid(name) {
  16436. var scope = this;
  16437. do {
  16438. if (scope.uids[name]) return true;
  16439. } while (scope = scope.parent);
  16440. return false;
  16441. };
  16442. _proto.hasGlobal = function hasGlobal(name) {
  16443. var scope = this;
  16444. do {
  16445. if (scope.globals[name]) return true;
  16446. } while (scope = scope.parent);
  16447. return false;
  16448. };
  16449. _proto.hasReference = function hasReference(name) {
  16450. var scope = this;
  16451. do {
  16452. if (scope.references[name]) return true;
  16453. } while (scope = scope.parent);
  16454. return false;
  16455. };
  16456. _proto.isPure = function isPure(node, constantsOnly) {
  16457. if (isIdentifier(node)) {
  16458. var binding = this.getBinding(node.name);
  16459. if (!binding) return false;
  16460. if (constantsOnly) return binding.constant;
  16461. return true;
  16462. } else if (isClass(node)) {
  16463. if (node.superClass && !this.isPure(node.superClass, constantsOnly)) {
  16464. return false;
  16465. }
  16466. return this.isPure(node.body, constantsOnly);
  16467. } else if (isClassBody(node)) {
  16468. for (var _iterator2 = node.body, _isArray2 = Array.isArray(_iterator2), _i14 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  16469. var _ref2;
  16470. if (_isArray2) {
  16471. if (_i14 >= _iterator2.length) break;
  16472. _ref2 = _iterator2[_i14++];
  16473. } else {
  16474. _i14 = _iterator2.next();
  16475. if (_i14.done) break;
  16476. _ref2 = _i14.value;
  16477. }
  16478. var method = _ref2;
  16479. if (!this.isPure(method, constantsOnly)) return false;
  16480. }
  16481. return true;
  16482. } else if (isBinary(node)) {
  16483. return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly);
  16484. } else if (isArrayExpression(node)) {
  16485. for (var _i15 = 0, _arr9 = node.elements; _i15 < _arr9.length; _i15++) {
  16486. var elem = _arr9[_i15];
  16487. if (!this.isPure(elem, constantsOnly)) return false;
  16488. }
  16489. return true;
  16490. } else if (isObjectExpression(node)) {
  16491. for (var _i16 = 0, _arr10 = node.properties; _i16 < _arr10.length; _i16++) {
  16492. var prop = _arr10[_i16];
  16493. if (!this.isPure(prop, constantsOnly)) return false;
  16494. }
  16495. return true;
  16496. } else if (isClassMethod(node)) {
  16497. if (node.computed && !this.isPure(node.key, constantsOnly)) return false;
  16498. if (node.kind === "get" || node.kind === "set") return false;
  16499. return true;
  16500. } else if (isProperty(node)) {
  16501. if (node.computed && !this.isPure(node.key, constantsOnly)) return false;
  16502. return this.isPure(node.value, constantsOnly);
  16503. } else if (isUnaryExpression(node)) {
  16504. return this.isPure(node.argument, constantsOnly);
  16505. } else if (isTaggedTemplateExpression(node)) {
  16506. return matchesPattern(node.tag, "String.raw") && !this.hasBinding("String", true) && this.isPure(node.quasi, constantsOnly);
  16507. } else if (isTemplateLiteral(node)) {
  16508. for (var _i17 = 0, _arr11 = node.expressions; _i17 < _arr11.length; _i17++) {
  16509. var expression = _arr11[_i17];
  16510. if (!this.isPure(expression, constantsOnly)) return false;
  16511. }
  16512. return true;
  16513. } else {
  16514. return isPureish(node);
  16515. }
  16516. };
  16517. _proto.setData = function setData(key, val) {
  16518. return this.data[key] = val;
  16519. };
  16520. _proto.getData = function getData(key) {
  16521. var scope = this;
  16522. do {
  16523. var data = scope.data[key];
  16524. if (data != null) return data;
  16525. } while (scope = scope.parent);
  16526. };
  16527. _proto.removeData = function removeData(key) {
  16528. var scope = this;
  16529. do {
  16530. var data = scope.data[key];
  16531. if (data != null) scope.data[key] = null;
  16532. } while (scope = scope.parent);
  16533. };
  16534. _proto.init = function init() {
  16535. if (!this.references) this.crawl();
  16536. };
  16537. _proto.crawl = function crawl() {
  16538. var path = this.path;
  16539. this.references = Object.create(null);
  16540. this.bindings = Object.create(null);
  16541. this.globals = Object.create(null);
  16542. this.uids = Object.create(null);
  16543. this.data = Object.create(null);
  16544. if (path.isLoop()) {
  16545. for (var _i18 = 0, _arr12 = FOR_INIT_KEYS; _i18 < _arr12.length; _i18++) {
  16546. var key = _arr12[_i18];
  16547. var node = path.get(key);
  16548. if (node.isBlockScoped()) this.registerBinding(node.node.kind, node);
  16549. }
  16550. }
  16551. if (path.isFunctionExpression() && path.has("id")) {
  16552. if (!path.get("id").node[NOT_LOCAL_BINDING]) {
  16553. this.registerBinding("local", path.get("id"), path);
  16554. }
  16555. }
  16556. if (path.isClassExpression() && path.has("id")) {
  16557. if (!path.get("id").node[NOT_LOCAL_BINDING]) {
  16558. this.registerBinding("local", path);
  16559. }
  16560. }
  16561. if (path.isFunction()) {
  16562. var params = path.get("params");
  16563. for (var _iterator3 = params, _isArray3 = Array.isArray(_iterator3), _i19 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
  16564. var _ref3;
  16565. if (_isArray3) {
  16566. if (_i19 >= _iterator3.length) break;
  16567. _ref3 = _iterator3[_i19++];
  16568. } else {
  16569. _i19 = _iterator3.next();
  16570. if (_i19.done) break;
  16571. _ref3 = _i19.value;
  16572. }
  16573. var param = _ref3;
  16574. this.registerBinding("param", param);
  16575. }
  16576. }
  16577. if (path.isCatchClause()) {
  16578. this.registerBinding("let", path);
  16579. }
  16580. var parent = this.getProgramParent();
  16581. if (parent.crawling) return;
  16582. var state = {
  16583. references: [],
  16584. constantViolations: [],
  16585. assignments: []
  16586. };
  16587. this.crawling = true;
  16588. path.traverse(collectorVisitor, state);
  16589. this.crawling = false;
  16590. for (var _iterator4 = state.assignments, _isArray4 = Array.isArray(_iterator4), _i20 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
  16591. var _ref4;
  16592. if (_isArray4) {
  16593. if (_i20 >= _iterator4.length) break;
  16594. _ref4 = _iterator4[_i20++];
  16595. } else {
  16596. _i20 = _iterator4.next();
  16597. if (_i20.done) break;
  16598. _ref4 = _i20.value;
  16599. }
  16600. var _path = _ref4;
  16601. var ids = _path.getBindingIdentifiers();
  16602. var programParent = void 0;
  16603. for (var _i23 = 0, _Object$keys5 = Object.keys(ids); _i23 < _Object$keys5.length; _i23++) {
  16604. var name = _Object$keys5[_i23];
  16605. if (_path.scope.getBinding(name)) continue;
  16606. programParent = programParent || _path.scope.getProgramParent();
  16607. programParent.addGlobal(ids[name]);
  16608. }
  16609. _path.scope.registerConstantViolation(_path);
  16610. }
  16611. for (var _iterator5 = state.references, _isArray5 = Array.isArray(_iterator5), _i21 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) {
  16612. var _ref5;
  16613. if (_isArray5) {
  16614. if (_i21 >= _iterator5.length) break;
  16615. _ref5 = _iterator5[_i21++];
  16616. } else {
  16617. _i21 = _iterator5.next();
  16618. if (_i21.done) break;
  16619. _ref5 = _i21.value;
  16620. }
  16621. var ref = _ref5;
  16622. var binding = ref.scope.getBinding(ref.node.name);
  16623. if (binding) {
  16624. binding.reference(ref);
  16625. } else {
  16626. ref.scope.getProgramParent().addGlobal(ref.node);
  16627. }
  16628. }
  16629. for (var _iterator6 = state.constantViolations, _isArray6 = Array.isArray(_iterator6), _i22 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) {
  16630. var _ref6;
  16631. if (_isArray6) {
  16632. if (_i22 >= _iterator6.length) break;
  16633. _ref6 = _iterator6[_i22++];
  16634. } else {
  16635. _i22 = _iterator6.next();
  16636. if (_i22.done) break;
  16637. _ref6 = _i22.value;
  16638. }
  16639. var _path2 = _ref6;
  16640. _path2.scope.registerConstantViolation(_path2);
  16641. }
  16642. };
  16643. _proto.push = function push(opts) {
  16644. var path = this.path;
  16645. if (!path.isBlockStatement() && !path.isProgram()) {
  16646. path = this.getBlockParent().path;
  16647. }
  16648. if (path.isSwitchStatement()) {
  16649. path = (this.getFunctionParent() || this.getProgramParent()).path;
  16650. }
  16651. if (path.isLoop() || path.isCatchClause() || path.isFunction()) {
  16652. path.ensureBlock();
  16653. path = path.get("body");
  16654. }
  16655. var unique = opts.unique;
  16656. var kind = opts.kind || "var";
  16657. var blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist;
  16658. var dataKey = "declaration:" + kind + ":" + blockHoist;
  16659. var declarPath = !unique && path.getData(dataKey);
  16660. if (!declarPath) {
  16661. var declar = VariableDeclaration(kind, []);
  16662. declar._blockHoist = blockHoist;
  16663. var _path$unshiftContaine = path.unshiftContainer("body", [declar]);
  16664. declarPath = _path$unshiftContaine[0];
  16665. if (!unique) path.setData(dataKey, declarPath);
  16666. }
  16667. var declarator = VariableDeclarator(opts.id, opts.init);
  16668. declarPath.node.declarations.push(declarator);
  16669. this.registerBinding(kind, declarPath.get("declarations").pop());
  16670. };
  16671. _proto.getProgramParent = function getProgramParent() {
  16672. var scope = this;
  16673. do {
  16674. if (scope.path.isProgram()) {
  16675. return scope;
  16676. }
  16677. } while (scope = scope.parent);
  16678. throw new Error("Couldn't find a Program");
  16679. };
  16680. _proto.getFunctionParent = function getFunctionParent() {
  16681. var scope = this;
  16682. do {
  16683. if (scope.path.isFunctionParent()) {
  16684. return scope;
  16685. }
  16686. } while (scope = scope.parent);
  16687. return null;
  16688. };
  16689. _proto.getBlockParent = function getBlockParent() {
  16690. var scope = this;
  16691. do {
  16692. if (scope.path.isBlockParent()) {
  16693. return scope;
  16694. }
  16695. } while (scope = scope.parent);
  16696. throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...");
  16697. };
  16698. _proto.getAllBindings = function getAllBindings() {
  16699. var ids = Object.create(null);
  16700. var scope = this;
  16701. do {
  16702. defaults_1(ids, scope.bindings);
  16703. scope = scope.parent;
  16704. } while (scope);
  16705. return ids;
  16706. };
  16707. _proto.getAllBindingsOfKind = function getAllBindingsOfKind() {
  16708. var ids = Object.create(null);
  16709. for (var _i24 = 0, _arr13 = arguments; _i24 < _arr13.length; _i24++) {
  16710. var kind = _arr13[_i24];
  16711. var scope = this;
  16712. do {
  16713. for (var _i25 = 0, _Object$keys6 = Object.keys(scope.bindings); _i25 < _Object$keys6.length; _i25++) {
  16714. var name = _Object$keys6[_i25];
  16715. var binding = scope.bindings[name];
  16716. if (binding.kind === kind) ids[name] = binding;
  16717. }
  16718. scope = scope.parent;
  16719. } while (scope);
  16720. }
  16721. return ids;
  16722. };
  16723. _proto.bindingIdentifierEquals = function bindingIdentifierEquals(name, node) {
  16724. return this.getBindingIdentifier(name) === node;
  16725. };
  16726. _proto.getBinding = function getBinding(name) {
  16727. var scope = this;
  16728. var previousPath;
  16729. do {
  16730. var binding = scope.getOwnBinding(name);
  16731. if (binding) {
  16732. if (previousPath && previousPath.isPattern() && previousPath.parentPath.isFunction() && binding.kind !== "param") ; else {
  16733. return binding;
  16734. }
  16735. }
  16736. previousPath = scope.path;
  16737. } while (scope = scope.parent);
  16738. };
  16739. _proto.getOwnBinding = function getOwnBinding(name) {
  16740. return this.bindings[name];
  16741. };
  16742. _proto.getBindingIdentifier = function getBindingIdentifier(name) {
  16743. var info = this.getBinding(name);
  16744. return info && info.identifier;
  16745. };
  16746. _proto.getOwnBindingIdentifier = function getOwnBindingIdentifier(name) {
  16747. var binding = this.bindings[name];
  16748. return binding && binding.identifier;
  16749. };
  16750. _proto.hasOwnBinding = function hasOwnBinding(name) {
  16751. return !!this.getOwnBinding(name);
  16752. };
  16753. _proto.hasBinding = function hasBinding(name, noGlobals) {
  16754. if (!name) return false;
  16755. if (this.hasOwnBinding(name)) return true;
  16756. if (this.parentHasBinding(name, noGlobals)) return true;
  16757. if (this.hasUid(name)) return true;
  16758. if (!noGlobals && includes_1(Scope.globals, name)) return true;
  16759. if (!noGlobals && includes_1(Scope.contextVariables, name)) return true;
  16760. return false;
  16761. };
  16762. _proto.parentHasBinding = function parentHasBinding(name, noGlobals) {
  16763. return this.parent && this.parent.hasBinding(name, noGlobals);
  16764. };
  16765. _proto.moveBindingTo = function moveBindingTo(name, scope) {
  16766. var info = this.getBinding(name);
  16767. if (info) {
  16768. info.scope.removeOwnBinding(name);
  16769. info.scope = scope;
  16770. scope.bindings[name] = info;
  16771. }
  16772. };
  16773. _proto.removeOwnBinding = function removeOwnBinding(name) {
  16774. delete this.bindings[name];
  16775. };
  16776. _proto.removeBinding = function removeBinding(name) {
  16777. var info = this.getBinding(name);
  16778. if (info) {
  16779. info.scope.removeOwnBinding(name);
  16780. }
  16781. var scope = this;
  16782. do {
  16783. if (scope.uids[name]) {
  16784. scope.uids[name] = false;
  16785. }
  16786. } while (scope = scope.parent);
  16787. };
  16788. _createClass(Scope, [{
  16789. key: "parent",
  16790. get: function get() {
  16791. var parent = this.path.findParent(function (p) {
  16792. return p.isScope();
  16793. });
  16794. return parent && parent.scope;
  16795. }
  16796. }, {
  16797. key: "parentBlock",
  16798. get: function get() {
  16799. return this.path.parent;
  16800. }
  16801. }, {
  16802. key: "hub",
  16803. get: function get() {
  16804. return this.path.hub;
  16805. }
  16806. }]);
  16807. return Scope;
  16808. }();
  16809. Scope$1.globals = Object.keys(globals$2.builtin);
  16810. Scope$1.contextVariables = ["arguments", "undefined", "Infinity", "NaN"];
  16811. var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
  16812. var encode = function (number) {
  16813. if (0 <= number && number < intToCharMap.length) {
  16814. return intToCharMap[number];
  16815. }
  16816. throw new TypeError("Must be between 0 and 63: " + number);
  16817. };
  16818. var decode = function (charCode) {
  16819. var bigA = 65;
  16820. var bigZ = 90;
  16821. var littleA = 97;
  16822. var littleZ = 122;
  16823. var zero = 48;
  16824. var nine = 57;
  16825. var plus = 43;
  16826. var slash = 47;
  16827. var littleOffset = 26;
  16828. var numberOffset = 52;
  16829. if (bigA <= charCode && charCode <= bigZ) {
  16830. return charCode - bigA;
  16831. }
  16832. if (littleA <= charCode && charCode <= littleZ) {
  16833. return charCode - littleA + littleOffset;
  16834. }
  16835. if (zero <= charCode && charCode <= nine) {
  16836. return charCode - zero + numberOffset;
  16837. }
  16838. if (charCode == plus) {
  16839. return 62;
  16840. }
  16841. if (charCode == slash) {
  16842. return 63;
  16843. }
  16844. return -1;
  16845. };
  16846. var base64 = {
  16847. encode: encode,
  16848. decode: decode
  16849. };
  16850. var VLQ_BASE_SHIFT = 5;
  16851. var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
  16852. var VLQ_BASE_MASK = VLQ_BASE - 1;
  16853. var VLQ_CONTINUATION_BIT = VLQ_BASE;
  16854. function toVLQSigned(aValue) {
  16855. return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
  16856. }
  16857. function fromVLQSigned(aValue) {
  16858. var isNegative = (aValue & 1) === 1;
  16859. var shifted = aValue >> 1;
  16860. return isNegative ? -shifted : shifted;
  16861. }
  16862. var encode$1 = function base64VLQ_encode(aValue) {
  16863. var encoded = "";
  16864. var digit;
  16865. var vlq = toVLQSigned(aValue);
  16866. do {
  16867. digit = vlq & VLQ_BASE_MASK;
  16868. vlq >>>= VLQ_BASE_SHIFT;
  16869. if (vlq > 0) {
  16870. digit |= VLQ_CONTINUATION_BIT;
  16871. }
  16872. encoded += base64.encode(digit);
  16873. } while (vlq > 0);
  16874. return encoded;
  16875. };
  16876. var decode$1 = function base64VLQ_decode(aStr, aIndex, aOutParam) {
  16877. var strLen = aStr.length;
  16878. var result = 0;
  16879. var shift = 0;
  16880. var continuation, digit;
  16881. do {
  16882. if (aIndex >= strLen) {
  16883. throw new Error("Expected more digits in base 64 VLQ value.");
  16884. }
  16885. digit = base64.decode(aStr.charCodeAt(aIndex++));
  16886. if (digit === -1) {
  16887. throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
  16888. }
  16889. continuation = !!(digit & VLQ_CONTINUATION_BIT);
  16890. digit &= VLQ_BASE_MASK;
  16891. result = result + (digit << shift);
  16892. shift += VLQ_BASE_SHIFT;
  16893. } while (continuation);
  16894. aOutParam.value = fromVLQSigned(result);
  16895. aOutParam.rest = aIndex;
  16896. };
  16897. var base64Vlq = {
  16898. encode: encode$1,
  16899. decode: decode$1
  16900. };
  16901. var util = createCommonjsModule(function (module, exports) {
  16902. function getArg(aArgs, aName, aDefaultValue) {
  16903. if (aName in aArgs) {
  16904. return aArgs[aName];
  16905. } else if (arguments.length === 3) {
  16906. return aDefaultValue;
  16907. } else {
  16908. throw new Error('"' + aName + '" is a required argument.');
  16909. }
  16910. }
  16911. exports.getArg = getArg;
  16912. var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
  16913. var dataUrlRegexp = /^data:.+\,.+$/;
  16914. function urlParse(aUrl) {
  16915. var match = aUrl.match(urlRegexp);
  16916. if (!match) {
  16917. return null;
  16918. }
  16919. return {
  16920. scheme: match[1],
  16921. auth: match[2],
  16922. host: match[3],
  16923. port: match[4],
  16924. path: match[5]
  16925. };
  16926. }
  16927. exports.urlParse = urlParse;
  16928. function urlGenerate(aParsedUrl) {
  16929. var url = '';
  16930. if (aParsedUrl.scheme) {
  16931. url += aParsedUrl.scheme + ':';
  16932. }
  16933. url += '//';
  16934. if (aParsedUrl.auth) {
  16935. url += aParsedUrl.auth + '@';
  16936. }
  16937. if (aParsedUrl.host) {
  16938. url += aParsedUrl.host;
  16939. }
  16940. if (aParsedUrl.port) {
  16941. url += ":" + aParsedUrl.port;
  16942. }
  16943. if (aParsedUrl.path) {
  16944. url += aParsedUrl.path;
  16945. }
  16946. return url;
  16947. }
  16948. exports.urlGenerate = urlGenerate;
  16949. function normalize(aPath) {
  16950. var path = aPath;
  16951. var url = urlParse(aPath);
  16952. if (url) {
  16953. if (!url.path) {
  16954. return aPath;
  16955. }
  16956. path = url.path;
  16957. }
  16958. var isAbsolute = exports.isAbsolute(path);
  16959. var parts = path.split(/\/+/);
  16960. for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
  16961. part = parts[i];
  16962. if (part === '.') {
  16963. parts.splice(i, 1);
  16964. } else if (part === '..') {
  16965. up++;
  16966. } else if (up > 0) {
  16967. if (part === '') {
  16968. parts.splice(i + 1, up);
  16969. up = 0;
  16970. } else {
  16971. parts.splice(i, 2);
  16972. up--;
  16973. }
  16974. }
  16975. }
  16976. path = parts.join('/');
  16977. if (path === '') {
  16978. path = isAbsolute ? '/' : '.';
  16979. }
  16980. if (url) {
  16981. url.path = path;
  16982. return urlGenerate(url);
  16983. }
  16984. return path;
  16985. }
  16986. exports.normalize = normalize;
  16987. function join(aRoot, aPath) {
  16988. if (aRoot === "") {
  16989. aRoot = ".";
  16990. }
  16991. if (aPath === "") {
  16992. aPath = ".";
  16993. }
  16994. var aPathUrl = urlParse(aPath);
  16995. var aRootUrl = urlParse(aRoot);
  16996. if (aRootUrl) {
  16997. aRoot = aRootUrl.path || '/';
  16998. }
  16999. if (aPathUrl && !aPathUrl.scheme) {
  17000. if (aRootUrl) {
  17001. aPathUrl.scheme = aRootUrl.scheme;
  17002. }
  17003. return urlGenerate(aPathUrl);
  17004. }
  17005. if (aPathUrl || aPath.match(dataUrlRegexp)) {
  17006. return aPath;
  17007. }
  17008. if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
  17009. aRootUrl.host = aPath;
  17010. return urlGenerate(aRootUrl);
  17011. }
  17012. var joined = aPath.charAt(0) === '/' ? aPath : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
  17013. if (aRootUrl) {
  17014. aRootUrl.path = joined;
  17015. return urlGenerate(aRootUrl);
  17016. }
  17017. return joined;
  17018. }
  17019. exports.join = join;
  17020. exports.isAbsolute = function (aPath) {
  17021. return aPath.charAt(0) === '/' || urlRegexp.test(aPath);
  17022. };
  17023. function relative(aRoot, aPath) {
  17024. if (aRoot === "") {
  17025. aRoot = ".";
  17026. }
  17027. aRoot = aRoot.replace(/\/$/, '');
  17028. var level = 0;
  17029. while (aPath.indexOf(aRoot + '/') !== 0) {
  17030. var index = aRoot.lastIndexOf("/");
  17031. if (index < 0) {
  17032. return aPath;
  17033. }
  17034. aRoot = aRoot.slice(0, index);
  17035. if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
  17036. return aPath;
  17037. }
  17038. ++level;
  17039. }
  17040. return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
  17041. }
  17042. exports.relative = relative;
  17043. var supportsNullProto = function () {
  17044. var obj = Object.create(null);
  17045. return !('__proto__' in obj);
  17046. }();
  17047. function identity(s) {
  17048. return s;
  17049. }
  17050. function toSetString(aStr) {
  17051. if (isProtoString(aStr)) {
  17052. return '$' + aStr;
  17053. }
  17054. return aStr;
  17055. }
  17056. exports.toSetString = supportsNullProto ? identity : toSetString;
  17057. function fromSetString(aStr) {
  17058. if (isProtoString(aStr)) {
  17059. return aStr.slice(1);
  17060. }
  17061. return aStr;
  17062. }
  17063. exports.fromSetString = supportsNullProto ? identity : fromSetString;
  17064. function isProtoString(s) {
  17065. if (!s) {
  17066. return false;
  17067. }
  17068. var length = s.length;
  17069. if (length < 9) {
  17070. return false;
  17071. }
  17072. 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) {
  17073. return false;
  17074. }
  17075. for (var i = length - 10; i >= 0; i--) {
  17076. if (s.charCodeAt(i) !== 36) {
  17077. return false;
  17078. }
  17079. }
  17080. return true;
  17081. }
  17082. function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
  17083. var cmp = strcmp(mappingA.source, mappingB.source);
  17084. if (cmp !== 0) {
  17085. return cmp;
  17086. }
  17087. cmp = mappingA.originalLine - mappingB.originalLine;
  17088. if (cmp !== 0) {
  17089. return cmp;
  17090. }
  17091. cmp = mappingA.originalColumn - mappingB.originalColumn;
  17092. if (cmp !== 0 || onlyCompareOriginal) {
  17093. return cmp;
  17094. }
  17095. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  17096. if (cmp !== 0) {
  17097. return cmp;
  17098. }
  17099. cmp = mappingA.generatedLine - mappingB.generatedLine;
  17100. if (cmp !== 0) {
  17101. return cmp;
  17102. }
  17103. return strcmp(mappingA.name, mappingB.name);
  17104. }
  17105. exports.compareByOriginalPositions = compareByOriginalPositions;
  17106. function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
  17107. var cmp = mappingA.generatedLine - mappingB.generatedLine;
  17108. if (cmp !== 0) {
  17109. return cmp;
  17110. }
  17111. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  17112. if (cmp !== 0 || onlyCompareGenerated) {
  17113. return cmp;
  17114. }
  17115. cmp = strcmp(mappingA.source, mappingB.source);
  17116. if (cmp !== 0) {
  17117. return cmp;
  17118. }
  17119. cmp = mappingA.originalLine - mappingB.originalLine;
  17120. if (cmp !== 0) {
  17121. return cmp;
  17122. }
  17123. cmp = mappingA.originalColumn - mappingB.originalColumn;
  17124. if (cmp !== 0) {
  17125. return cmp;
  17126. }
  17127. return strcmp(mappingA.name, mappingB.name);
  17128. }
  17129. exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
  17130. function strcmp(aStr1, aStr2) {
  17131. if (aStr1 === aStr2) {
  17132. return 0;
  17133. }
  17134. if (aStr1 === null) {
  17135. return 1;
  17136. }
  17137. if (aStr2 === null) {
  17138. return -1;
  17139. }
  17140. if (aStr1 > aStr2) {
  17141. return 1;
  17142. }
  17143. return -1;
  17144. }
  17145. function compareByGeneratedPositionsInflated(mappingA, mappingB) {
  17146. var cmp = mappingA.generatedLine - mappingB.generatedLine;
  17147. if (cmp !== 0) {
  17148. return cmp;
  17149. }
  17150. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  17151. if (cmp !== 0) {
  17152. return cmp;
  17153. }
  17154. cmp = strcmp(mappingA.source, mappingB.source);
  17155. if (cmp !== 0) {
  17156. return cmp;
  17157. }
  17158. cmp = mappingA.originalLine - mappingB.originalLine;
  17159. if (cmp !== 0) {
  17160. return cmp;
  17161. }
  17162. cmp = mappingA.originalColumn - mappingB.originalColumn;
  17163. if (cmp !== 0) {
  17164. return cmp;
  17165. }
  17166. return strcmp(mappingA.name, mappingB.name);
  17167. }
  17168. exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
  17169. function parseSourceMapInput(str) {
  17170. return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ''));
  17171. }
  17172. exports.parseSourceMapInput = parseSourceMapInput;
  17173. function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
  17174. sourceURL = sourceURL || '';
  17175. if (sourceRoot) {
  17176. if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {
  17177. sourceRoot += '/';
  17178. }
  17179. sourceURL = sourceRoot + sourceURL;
  17180. }
  17181. if (sourceMapURL) {
  17182. var parsed = urlParse(sourceMapURL);
  17183. if (!parsed) {
  17184. throw new Error("sourceMapURL could not be parsed");
  17185. }
  17186. if (parsed.path) {
  17187. var index = parsed.path.lastIndexOf('/');
  17188. if (index >= 0) {
  17189. parsed.path = parsed.path.substring(0, index + 1);
  17190. }
  17191. }
  17192. sourceURL = join(urlGenerate(parsed), sourceURL);
  17193. }
  17194. return normalize(sourceURL);
  17195. }
  17196. exports.computeSourceURL = computeSourceURL;
  17197. });
  17198. var util_1 = util.getArg;
  17199. var util_2 = util.urlParse;
  17200. var util_3 = util.urlGenerate;
  17201. var util_4 = util.normalize;
  17202. var util_5 = util.join;
  17203. var util_6 = util.isAbsolute;
  17204. var util_7 = util.relative;
  17205. var util_8 = util.toSetString;
  17206. var util_9 = util.fromSetString;
  17207. var util_10 = util.compareByOriginalPositions;
  17208. var util_11 = util.compareByGeneratedPositionsDeflated;
  17209. var util_12 = util.compareByGeneratedPositionsInflated;
  17210. var util_13 = util.parseSourceMapInput;
  17211. var util_14 = util.computeSourceURL;
  17212. var has$1 = Object.prototype.hasOwnProperty;
  17213. var hasNativeMap = typeof Map !== "undefined";
  17214. function ArraySet() {
  17215. this._array = [];
  17216. this._set = hasNativeMap ? new Map() : Object.create(null);
  17217. }
  17218. ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
  17219. var set = new ArraySet();
  17220. for (var i = 0, len = aArray.length; i < len; i++) {
  17221. set.add(aArray[i], aAllowDuplicates);
  17222. }
  17223. return set;
  17224. };
  17225. ArraySet.prototype.size = function ArraySet_size() {
  17226. return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
  17227. };
  17228. ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
  17229. var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
  17230. var isDuplicate = hasNativeMap ? this.has(aStr) : has$1.call(this._set, sStr);
  17231. var idx = this._array.length;
  17232. if (!isDuplicate || aAllowDuplicates) {
  17233. this._array.push(aStr);
  17234. }
  17235. if (!isDuplicate) {
  17236. if (hasNativeMap) {
  17237. this._set.set(aStr, idx);
  17238. } else {
  17239. this._set[sStr] = idx;
  17240. }
  17241. }
  17242. };
  17243. ArraySet.prototype.has = function ArraySet_has(aStr) {
  17244. if (hasNativeMap) {
  17245. return this._set.has(aStr);
  17246. } else {
  17247. var sStr = util.toSetString(aStr);
  17248. return has$1.call(this._set, sStr);
  17249. }
  17250. };
  17251. ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
  17252. if (hasNativeMap) {
  17253. var idx = this._set.get(aStr);
  17254. if (idx >= 0) {
  17255. return idx;
  17256. }
  17257. } else {
  17258. var sStr = util.toSetString(aStr);
  17259. if (has$1.call(this._set, sStr)) {
  17260. return this._set[sStr];
  17261. }
  17262. }
  17263. throw new Error('"' + aStr + '" is not in the set.');
  17264. };
  17265. ArraySet.prototype.at = function ArraySet_at(aIdx) {
  17266. if (aIdx >= 0 && aIdx < this._array.length) {
  17267. return this._array[aIdx];
  17268. }
  17269. throw new Error('No element indexed by ' + aIdx);
  17270. };
  17271. ArraySet.prototype.toArray = function ArraySet_toArray() {
  17272. return this._array.slice();
  17273. };
  17274. var ArraySet_1 = ArraySet;
  17275. var arraySet = {
  17276. ArraySet: ArraySet_1
  17277. };
  17278. function generatedPositionAfter(mappingA, mappingB) {
  17279. var lineA = mappingA.generatedLine;
  17280. var lineB = mappingB.generatedLine;
  17281. var columnA = mappingA.generatedColumn;
  17282. var columnB = mappingB.generatedColumn;
  17283. return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
  17284. }
  17285. function MappingList() {
  17286. this._array = [];
  17287. this._sorted = true;
  17288. this._last = {
  17289. generatedLine: -1,
  17290. generatedColumn: 0
  17291. };
  17292. }
  17293. MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {
  17294. this._array.forEach(aCallback, aThisArg);
  17295. };
  17296. MappingList.prototype.add = function MappingList_add(aMapping) {
  17297. if (generatedPositionAfter(this._last, aMapping)) {
  17298. this._last = aMapping;
  17299. this._array.push(aMapping);
  17300. } else {
  17301. this._sorted = false;
  17302. this._array.push(aMapping);
  17303. }
  17304. };
  17305. MappingList.prototype.toArray = function MappingList_toArray() {
  17306. if (!this._sorted) {
  17307. this._array.sort(util.compareByGeneratedPositionsInflated);
  17308. this._sorted = true;
  17309. }
  17310. return this._array;
  17311. };
  17312. var MappingList_1 = MappingList;
  17313. var mappingList = {
  17314. MappingList: MappingList_1
  17315. };
  17316. var ArraySet$1 = arraySet.ArraySet;
  17317. var MappingList$1 = mappingList.MappingList;
  17318. function SourceMapGenerator(aArgs) {
  17319. if (!aArgs) {
  17320. aArgs = {};
  17321. }
  17322. this._file = util.getArg(aArgs, 'file', null);
  17323. this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
  17324. this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
  17325. this._sources = new ArraySet$1();
  17326. this._names = new ArraySet$1();
  17327. this._mappings = new MappingList$1();
  17328. this._sourcesContents = null;
  17329. }
  17330. SourceMapGenerator.prototype._version = 3;
  17331. SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
  17332. var sourceRoot = aSourceMapConsumer.sourceRoot;
  17333. var generator = new SourceMapGenerator({
  17334. file: aSourceMapConsumer.file,
  17335. sourceRoot: sourceRoot
  17336. });
  17337. aSourceMapConsumer.eachMapping(function (mapping) {
  17338. var newMapping = {
  17339. generated: {
  17340. line: mapping.generatedLine,
  17341. column: mapping.generatedColumn
  17342. }
  17343. };
  17344. if (mapping.source != null) {
  17345. newMapping.source = mapping.source;
  17346. if (sourceRoot != null) {
  17347. newMapping.source = util.relative(sourceRoot, newMapping.source);
  17348. }
  17349. newMapping.original = {
  17350. line: mapping.originalLine,
  17351. column: mapping.originalColumn
  17352. };
  17353. if (mapping.name != null) {
  17354. newMapping.name = mapping.name;
  17355. }
  17356. }
  17357. generator.addMapping(newMapping);
  17358. });
  17359. aSourceMapConsumer.sources.forEach(function (sourceFile) {
  17360. var sourceRelative = sourceFile;
  17361. if (sourceRoot !== null) {
  17362. sourceRelative = util.relative(sourceRoot, sourceFile);
  17363. }
  17364. if (!generator._sources.has(sourceRelative)) {
  17365. generator._sources.add(sourceRelative);
  17366. }
  17367. var content = aSourceMapConsumer.sourceContentFor(sourceFile);
  17368. if (content != null) {
  17369. generator.setSourceContent(sourceFile, content);
  17370. }
  17371. });
  17372. return generator;
  17373. };
  17374. SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
  17375. var generated = util.getArg(aArgs, 'generated');
  17376. var original = util.getArg(aArgs, 'original', null);
  17377. var source = util.getArg(aArgs, 'source', null);
  17378. var name = util.getArg(aArgs, 'name', null);
  17379. if (!this._skipValidation) {
  17380. this._validateMapping(generated, original, source, name);
  17381. }
  17382. if (source != null) {
  17383. source = String(source);
  17384. if (!this._sources.has(source)) {
  17385. this._sources.add(source);
  17386. }
  17387. }
  17388. if (name != null) {
  17389. name = String(name);
  17390. if (!this._names.has(name)) {
  17391. this._names.add(name);
  17392. }
  17393. }
  17394. this._mappings.add({
  17395. generatedLine: generated.line,
  17396. generatedColumn: generated.column,
  17397. originalLine: original != null && original.line,
  17398. originalColumn: original != null && original.column,
  17399. source: source,
  17400. name: name
  17401. });
  17402. };
  17403. SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
  17404. var source = aSourceFile;
  17405. if (this._sourceRoot != null) {
  17406. source = util.relative(this._sourceRoot, source);
  17407. }
  17408. if (aSourceContent != null) {
  17409. if (!this._sourcesContents) {
  17410. this._sourcesContents = Object.create(null);
  17411. }
  17412. this._sourcesContents[util.toSetString(source)] = aSourceContent;
  17413. } else if (this._sourcesContents) {
  17414. delete this._sourcesContents[util.toSetString(source)];
  17415. if (Object.keys(this._sourcesContents).length === 0) {
  17416. this._sourcesContents = null;
  17417. }
  17418. }
  17419. };
  17420. SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
  17421. var sourceFile = aSourceFile;
  17422. if (aSourceFile == null) {
  17423. if (aSourceMapConsumer.file == null) {
  17424. throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + 'or the source map\'s "file" property. Both were omitted.');
  17425. }
  17426. sourceFile = aSourceMapConsumer.file;
  17427. }
  17428. var sourceRoot = this._sourceRoot;
  17429. if (sourceRoot != null) {
  17430. sourceFile = util.relative(sourceRoot, sourceFile);
  17431. }
  17432. var newSources = new ArraySet$1();
  17433. var newNames = new ArraySet$1();
  17434. this._mappings.unsortedForEach(function (mapping) {
  17435. if (mapping.source === sourceFile && mapping.originalLine != null) {
  17436. var original = aSourceMapConsumer.originalPositionFor({
  17437. line: mapping.originalLine,
  17438. column: mapping.originalColumn
  17439. });
  17440. if (original.source != null) {
  17441. mapping.source = original.source;
  17442. if (aSourceMapPath != null) {
  17443. mapping.source = util.join(aSourceMapPath, mapping.source);
  17444. }
  17445. if (sourceRoot != null) {
  17446. mapping.source = util.relative(sourceRoot, mapping.source);
  17447. }
  17448. mapping.originalLine = original.line;
  17449. mapping.originalColumn = original.column;
  17450. if (original.name != null) {
  17451. mapping.name = original.name;
  17452. }
  17453. }
  17454. }
  17455. var source = mapping.source;
  17456. if (source != null && !newSources.has(source)) {
  17457. newSources.add(source);
  17458. }
  17459. var name = mapping.name;
  17460. if (name != null && !newNames.has(name)) {
  17461. newNames.add(name);
  17462. }
  17463. }, this);
  17464. this._sources = newSources;
  17465. this._names = newNames;
  17466. aSourceMapConsumer.sources.forEach(function (sourceFile) {
  17467. var content = aSourceMapConsumer.sourceContentFor(sourceFile);
  17468. if (content != null) {
  17469. if (aSourceMapPath != null) {
  17470. sourceFile = util.join(aSourceMapPath, sourceFile);
  17471. }
  17472. if (sourceRoot != null) {
  17473. sourceFile = util.relative(sourceRoot, sourceFile);
  17474. }
  17475. this.setSourceContent(sourceFile, content);
  17476. }
  17477. }, this);
  17478. };
  17479. SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
  17480. if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {
  17481. 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.');
  17482. }
  17483. if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {
  17484. return;
  17485. } 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) {
  17486. return;
  17487. } else {
  17488. throw new Error('Invalid mapping: ' + JSON.stringify({
  17489. generated: aGenerated,
  17490. source: aSource,
  17491. original: aOriginal,
  17492. name: aName
  17493. }));
  17494. }
  17495. };
  17496. SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
  17497. var previousGeneratedColumn = 0;
  17498. var previousGeneratedLine = 1;
  17499. var previousOriginalColumn = 0;
  17500. var previousOriginalLine = 0;
  17501. var previousName = 0;
  17502. var previousSource = 0;
  17503. var result = '';
  17504. var next;
  17505. var mapping;
  17506. var nameIdx;
  17507. var sourceIdx;
  17508. var mappings = this._mappings.toArray();
  17509. for (var i = 0, len = mappings.length; i < len; i++) {
  17510. mapping = mappings[i];
  17511. next = '';
  17512. if (mapping.generatedLine !== previousGeneratedLine) {
  17513. previousGeneratedColumn = 0;
  17514. while (mapping.generatedLine !== previousGeneratedLine) {
  17515. next += ';';
  17516. previousGeneratedLine++;
  17517. }
  17518. } else {
  17519. if (i > 0) {
  17520. if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
  17521. continue;
  17522. }
  17523. next += ',';
  17524. }
  17525. }
  17526. next += base64Vlq.encode(mapping.generatedColumn - previousGeneratedColumn);
  17527. previousGeneratedColumn = mapping.generatedColumn;
  17528. if (mapping.source != null) {
  17529. sourceIdx = this._sources.indexOf(mapping.source);
  17530. next += base64Vlq.encode(sourceIdx - previousSource);
  17531. previousSource = sourceIdx;
  17532. next += base64Vlq.encode(mapping.originalLine - 1 - previousOriginalLine);
  17533. previousOriginalLine = mapping.originalLine - 1;
  17534. next += base64Vlq.encode(mapping.originalColumn - previousOriginalColumn);
  17535. previousOriginalColumn = mapping.originalColumn;
  17536. if (mapping.name != null) {
  17537. nameIdx = this._names.indexOf(mapping.name);
  17538. next += base64Vlq.encode(nameIdx - previousName);
  17539. previousName = nameIdx;
  17540. }
  17541. }
  17542. result += next;
  17543. }
  17544. return result;
  17545. };
  17546. SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
  17547. return aSources.map(function (source) {
  17548. if (!this._sourcesContents) {
  17549. return null;
  17550. }
  17551. if (aSourceRoot != null) {
  17552. source = util.relative(aSourceRoot, source);
  17553. }
  17554. var key = util.toSetString(source);
  17555. return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
  17556. }, this);
  17557. };
  17558. SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() {
  17559. var map = {
  17560. version: this._version,
  17561. sources: this._sources.toArray(),
  17562. names: this._names.toArray(),
  17563. mappings: this._serializeMappings()
  17564. };
  17565. if (this._file != null) {
  17566. map.file = this._file;
  17567. }
  17568. if (this._sourceRoot != null) {
  17569. map.sourceRoot = this._sourceRoot;
  17570. }
  17571. if (this._sourcesContents) {
  17572. map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
  17573. }
  17574. return map;
  17575. };
  17576. SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
  17577. return JSON.stringify(this.toJSON());
  17578. };
  17579. var SourceMapGenerator_1 = SourceMapGenerator;
  17580. var sourceMapGenerator = {
  17581. SourceMapGenerator: SourceMapGenerator_1
  17582. };
  17583. var binarySearch = createCommonjsModule(function (module, exports) {
  17584. exports.GREATEST_LOWER_BOUND = 1;
  17585. exports.LEAST_UPPER_BOUND = 2;
  17586. function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
  17587. var mid = Math.floor((aHigh - aLow) / 2) + aLow;
  17588. var cmp = aCompare(aNeedle, aHaystack[mid], true);
  17589. if (cmp === 0) {
  17590. return mid;
  17591. } else if (cmp > 0) {
  17592. if (aHigh - mid > 1) {
  17593. return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
  17594. }
  17595. if (aBias == exports.LEAST_UPPER_BOUND) {
  17596. return aHigh < aHaystack.length ? aHigh : -1;
  17597. } else {
  17598. return mid;
  17599. }
  17600. } else {
  17601. if (mid - aLow > 1) {
  17602. return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
  17603. }
  17604. if (aBias == exports.LEAST_UPPER_BOUND) {
  17605. return mid;
  17606. } else {
  17607. return aLow < 0 ? -1 : aLow;
  17608. }
  17609. }
  17610. }
  17611. exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
  17612. if (aHaystack.length === 0) {
  17613. return -1;
  17614. }
  17615. var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias || exports.GREATEST_LOWER_BOUND);
  17616. if (index < 0) {
  17617. return -1;
  17618. }
  17619. while (index - 1 >= 0) {
  17620. if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
  17621. break;
  17622. }
  17623. --index;
  17624. }
  17625. return index;
  17626. };
  17627. });
  17628. var binarySearch_1 = binarySearch.GREATEST_LOWER_BOUND;
  17629. var binarySearch_2 = binarySearch.LEAST_UPPER_BOUND;
  17630. var binarySearch_3 = binarySearch.search;
  17631. function swap(ary, x, y) {
  17632. var temp = ary[x];
  17633. ary[x] = ary[y];
  17634. ary[y] = temp;
  17635. }
  17636. function randomIntInRange(low, high) {
  17637. return Math.round(low + Math.random() * (high - low));
  17638. }
  17639. function doQuickSort(ary, comparator, p, r) {
  17640. if (p < r) {
  17641. var pivotIndex = randomIntInRange(p, r);
  17642. var i = p - 1;
  17643. swap(ary, pivotIndex, r);
  17644. var pivot = ary[r];
  17645. for (var j = p; j < r; j++) {
  17646. if (comparator(ary[j], pivot) <= 0) {
  17647. i += 1;
  17648. swap(ary, i, j);
  17649. }
  17650. }
  17651. swap(ary, i + 1, j);
  17652. var q = i + 1;
  17653. doQuickSort(ary, comparator, p, q - 1);
  17654. doQuickSort(ary, comparator, q + 1, r);
  17655. }
  17656. }
  17657. var quickSort_1 = function (ary, comparator) {
  17658. doQuickSort(ary, comparator, 0, ary.length - 1);
  17659. };
  17660. var quickSort = {
  17661. quickSort: quickSort_1
  17662. };
  17663. var ArraySet$2 = arraySet.ArraySet;
  17664. var quickSort$1 = quickSort.quickSort;
  17665. function SourceMapConsumer(aSourceMap, aSourceMapURL) {
  17666. var sourceMap = aSourceMap;
  17667. if (typeof aSourceMap === 'string') {
  17668. sourceMap = util.parseSourceMapInput(aSourceMap);
  17669. }
  17670. return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);
  17671. }
  17672. SourceMapConsumer.fromSourceMap = function (aSourceMap, aSourceMapURL) {
  17673. return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);
  17674. };
  17675. SourceMapConsumer.prototype._version = 3;
  17676. SourceMapConsumer.prototype.__generatedMappings = null;
  17677. Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
  17678. configurable: true,
  17679. enumerable: true,
  17680. get: function get() {
  17681. if (!this.__generatedMappings) {
  17682. this._parseMappings(this._mappings, this.sourceRoot);
  17683. }
  17684. return this.__generatedMappings;
  17685. }
  17686. });
  17687. SourceMapConsumer.prototype.__originalMappings = null;
  17688. Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
  17689. configurable: true,
  17690. enumerable: true,
  17691. get: function get() {
  17692. if (!this.__originalMappings) {
  17693. this._parseMappings(this._mappings, this.sourceRoot);
  17694. }
  17695. return this.__originalMappings;
  17696. }
  17697. });
  17698. SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
  17699. var c = aStr.charAt(index);
  17700. return c === ";" || c === ",";
  17701. };
  17702. SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
  17703. throw new Error("Subclasses must implement _parseMappings");
  17704. };
  17705. SourceMapConsumer.GENERATED_ORDER = 1;
  17706. SourceMapConsumer.ORIGINAL_ORDER = 2;
  17707. SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
  17708. SourceMapConsumer.LEAST_UPPER_BOUND = 2;
  17709. SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
  17710. var context = aContext || null;
  17711. var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
  17712. var mappings;
  17713. switch (order) {
  17714. case SourceMapConsumer.GENERATED_ORDER:
  17715. mappings = this._generatedMappings;
  17716. break;
  17717. case SourceMapConsumer.ORIGINAL_ORDER:
  17718. mappings = this._originalMappings;
  17719. break;
  17720. default:
  17721. throw new Error("Unknown order of iteration.");
  17722. }
  17723. var sourceRoot = this.sourceRoot;
  17724. mappings.map(function (mapping) {
  17725. var source = mapping.source === null ? null : this._sources.at(mapping.source);
  17726. source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);
  17727. return {
  17728. source: source,
  17729. generatedLine: mapping.generatedLine,
  17730. generatedColumn: mapping.generatedColumn,
  17731. originalLine: mapping.originalLine,
  17732. originalColumn: mapping.originalColumn,
  17733. name: mapping.name === null ? null : this._names.at(mapping.name)
  17734. };
  17735. }, this).forEach(aCallback, context);
  17736. };
  17737. SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
  17738. var line = util.getArg(aArgs, 'line');
  17739. var needle = {
  17740. source: util.getArg(aArgs, 'source'),
  17741. originalLine: line,
  17742. originalColumn: util.getArg(aArgs, 'column', 0)
  17743. };
  17744. needle.source = this._findSourceIndex(needle.source);
  17745. if (needle.source < 0) {
  17746. return [];
  17747. }
  17748. var mappings = [];
  17749. var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, binarySearch.LEAST_UPPER_BOUND);
  17750. if (index >= 0) {
  17751. var mapping = this._originalMappings[index];
  17752. if (aArgs.column === undefined) {
  17753. var originalLine = mapping.originalLine;
  17754. while (mapping && mapping.originalLine === originalLine) {
  17755. mappings.push({
  17756. line: util.getArg(mapping, 'generatedLine', null),
  17757. column: util.getArg(mapping, 'generatedColumn', null),
  17758. lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
  17759. });
  17760. mapping = this._originalMappings[++index];
  17761. }
  17762. } else {
  17763. var originalColumn = mapping.originalColumn;
  17764. while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) {
  17765. mappings.push({
  17766. line: util.getArg(mapping, 'generatedLine', null),
  17767. column: util.getArg(mapping, 'generatedColumn', null),
  17768. lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
  17769. });
  17770. mapping = this._originalMappings[++index];
  17771. }
  17772. }
  17773. }
  17774. return mappings;
  17775. };
  17776. var SourceMapConsumer_1 = SourceMapConsumer;
  17777. function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {
  17778. var sourceMap = aSourceMap;
  17779. if (typeof aSourceMap === 'string') {
  17780. sourceMap = util.parseSourceMapInput(aSourceMap);
  17781. }
  17782. var version = util.getArg(sourceMap, 'version');
  17783. var sources = util.getArg(sourceMap, 'sources');
  17784. var names = util.getArg(sourceMap, 'names', []);
  17785. var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
  17786. var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
  17787. var mappings = util.getArg(sourceMap, 'mappings');
  17788. var file = util.getArg(sourceMap, 'file', null);
  17789. if (version != this._version) {
  17790. throw new Error('Unsupported version: ' + version);
  17791. }
  17792. if (sourceRoot) {
  17793. sourceRoot = util.normalize(sourceRoot);
  17794. }
  17795. sources = sources.map(String).map(util.normalize).map(function (source) {
  17796. return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) ? util.relative(sourceRoot, source) : source;
  17797. });
  17798. this._names = ArraySet$2.fromArray(names.map(String), true);
  17799. this._sources = ArraySet$2.fromArray(sources, true);
  17800. this._absoluteSources = this._sources.toArray().map(function (s) {
  17801. return util.computeSourceURL(sourceRoot, s, aSourceMapURL);
  17802. });
  17803. this.sourceRoot = sourceRoot;
  17804. this.sourcesContent = sourcesContent;
  17805. this._mappings = mappings;
  17806. this._sourceMapURL = aSourceMapURL;
  17807. this.file = file;
  17808. }
  17809. BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
  17810. BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
  17811. BasicSourceMapConsumer.prototype._findSourceIndex = function (aSource) {
  17812. var relativeSource = aSource;
  17813. if (this.sourceRoot != null) {
  17814. relativeSource = util.relative(this.sourceRoot, relativeSource);
  17815. }
  17816. if (this._sources.has(relativeSource)) {
  17817. return this._sources.indexOf(relativeSource);
  17818. }
  17819. var i;
  17820. for (i = 0; i < this._absoluteSources.length; ++i) {
  17821. if (this._absoluteSources[i] == aSource) {
  17822. return i;
  17823. }
  17824. }
  17825. return -1;
  17826. };
  17827. BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {
  17828. var smc = Object.create(BasicSourceMapConsumer.prototype);
  17829. var names = smc._names = ArraySet$2.fromArray(aSourceMap._names.toArray(), true);
  17830. var sources = smc._sources = ArraySet$2.fromArray(aSourceMap._sources.toArray(), true);
  17831. smc.sourceRoot = aSourceMap._sourceRoot;
  17832. smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot);
  17833. smc.file = aSourceMap._file;
  17834. smc._sourceMapURL = aSourceMapURL;
  17835. smc._absoluteSources = smc._sources.toArray().map(function (s) {
  17836. return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);
  17837. });
  17838. var generatedMappings = aSourceMap._mappings.toArray().slice();
  17839. var destGeneratedMappings = smc.__generatedMappings = [];
  17840. var destOriginalMappings = smc.__originalMappings = [];
  17841. for (var i = 0, length = generatedMappings.length; i < length; i++) {
  17842. var srcMapping = generatedMappings[i];
  17843. var destMapping = new Mapping();
  17844. destMapping.generatedLine = srcMapping.generatedLine;
  17845. destMapping.generatedColumn = srcMapping.generatedColumn;
  17846. if (srcMapping.source) {
  17847. destMapping.source = sources.indexOf(srcMapping.source);
  17848. destMapping.originalLine = srcMapping.originalLine;
  17849. destMapping.originalColumn = srcMapping.originalColumn;
  17850. if (srcMapping.name) {
  17851. destMapping.name = names.indexOf(srcMapping.name);
  17852. }
  17853. destOriginalMappings.push(destMapping);
  17854. }
  17855. destGeneratedMappings.push(destMapping);
  17856. }
  17857. quickSort$1(smc.__originalMappings, util.compareByOriginalPositions);
  17858. return smc;
  17859. };
  17860. BasicSourceMapConsumer.prototype._version = 3;
  17861. Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {
  17862. get: function get() {
  17863. return this._absoluteSources.slice();
  17864. }
  17865. });
  17866. function Mapping() {
  17867. this.generatedLine = 0;
  17868. this.generatedColumn = 0;
  17869. this.source = null;
  17870. this.originalLine = null;
  17871. this.originalColumn = null;
  17872. this.name = null;
  17873. }
  17874. BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
  17875. var generatedLine = 1;
  17876. var previousGeneratedColumn = 0;
  17877. var previousOriginalLine = 0;
  17878. var previousOriginalColumn = 0;
  17879. var previousSource = 0;
  17880. var previousName = 0;
  17881. var length = aStr.length;
  17882. var index = 0;
  17883. var cachedSegments = {};
  17884. var temp = {};
  17885. var originalMappings = [];
  17886. var generatedMappings = [];
  17887. var mapping, str, segment, end, value;
  17888. while (index < length) {
  17889. if (aStr.charAt(index) === ';') {
  17890. generatedLine++;
  17891. index++;
  17892. previousGeneratedColumn = 0;
  17893. } else if (aStr.charAt(index) === ',') {
  17894. index++;
  17895. } else {
  17896. mapping = new Mapping();
  17897. mapping.generatedLine = generatedLine;
  17898. for (end = index; end < length; end++) {
  17899. if (this._charIsMappingSeparator(aStr, end)) {
  17900. break;
  17901. }
  17902. }
  17903. str = aStr.slice(index, end);
  17904. segment = cachedSegments[str];
  17905. if (segment) {
  17906. index += str.length;
  17907. } else {
  17908. segment = [];
  17909. while (index < end) {
  17910. base64Vlq.decode(aStr, index, temp);
  17911. value = temp.value;
  17912. index = temp.rest;
  17913. segment.push(value);
  17914. }
  17915. if (segment.length === 2) {
  17916. throw new Error('Found a source, but no line and column');
  17917. }
  17918. if (segment.length === 3) {
  17919. throw new Error('Found a source and line, but no column');
  17920. }
  17921. cachedSegments[str] = segment;
  17922. }
  17923. mapping.generatedColumn = previousGeneratedColumn + segment[0];
  17924. previousGeneratedColumn = mapping.generatedColumn;
  17925. if (segment.length > 1) {
  17926. mapping.source = previousSource + segment[1];
  17927. previousSource += segment[1];
  17928. mapping.originalLine = previousOriginalLine + segment[2];
  17929. previousOriginalLine = mapping.originalLine;
  17930. mapping.originalLine += 1;
  17931. mapping.originalColumn = previousOriginalColumn + segment[3];
  17932. previousOriginalColumn = mapping.originalColumn;
  17933. if (segment.length > 4) {
  17934. mapping.name = previousName + segment[4];
  17935. previousName += segment[4];
  17936. }
  17937. }
  17938. generatedMappings.push(mapping);
  17939. if (typeof mapping.originalLine === 'number') {
  17940. originalMappings.push(mapping);
  17941. }
  17942. }
  17943. }
  17944. quickSort$1(generatedMappings, util.compareByGeneratedPositionsDeflated);
  17945. this.__generatedMappings = generatedMappings;
  17946. quickSort$1(originalMappings, util.compareByOriginalPositions);
  17947. this.__originalMappings = originalMappings;
  17948. };
  17949. BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) {
  17950. if (aNeedle[aLineName] <= 0) {
  17951. throw new TypeError('Line must be greater than or equal to 1, got ' + aNeedle[aLineName]);
  17952. }
  17953. if (aNeedle[aColumnName] < 0) {
  17954. throw new TypeError('Column must be greater than or equal to 0, got ' + aNeedle[aColumnName]);
  17955. }
  17956. return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
  17957. };
  17958. BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {
  17959. for (var index = 0; index < this._generatedMappings.length; ++index) {
  17960. var mapping = this._generatedMappings[index];
  17961. if (index + 1 < this._generatedMappings.length) {
  17962. var nextMapping = this._generatedMappings[index + 1];
  17963. if (mapping.generatedLine === nextMapping.generatedLine) {
  17964. mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
  17965. continue;
  17966. }
  17967. }
  17968. mapping.lastGeneratedColumn = Infinity;
  17969. }
  17970. };
  17971. BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
  17972. var needle = {
  17973. generatedLine: util.getArg(aArgs, 'line'),
  17974. generatedColumn: util.getArg(aArgs, 'column')
  17975. };
  17976. var index = this._findMapping(needle, this._generatedMappings, "generatedLine", "generatedColumn", util.compareByGeneratedPositionsDeflated, util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND));
  17977. if (index >= 0) {
  17978. var mapping = this._generatedMappings[index];
  17979. if (mapping.generatedLine === needle.generatedLine) {
  17980. var source = util.getArg(mapping, 'source', null);
  17981. if (source !== null) {
  17982. source = this._sources.at(source);
  17983. source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);
  17984. }
  17985. var name = util.getArg(mapping, 'name', null);
  17986. if (name !== null) {
  17987. name = this._names.at(name);
  17988. }
  17989. return {
  17990. source: source,
  17991. line: util.getArg(mapping, 'originalLine', null),
  17992. column: util.getArg(mapping, 'originalColumn', null),
  17993. name: name
  17994. };
  17995. }
  17996. }
  17997. return {
  17998. source: null,
  17999. line: null,
  18000. column: null,
  18001. name: null
  18002. };
  18003. };
  18004. BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() {
  18005. if (!this.sourcesContent) {
  18006. return false;
  18007. }
  18008. return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function (sc) {
  18009. return sc == null;
  18010. });
  18011. };
  18012. BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
  18013. if (!this.sourcesContent) {
  18014. return null;
  18015. }
  18016. var index = this._findSourceIndex(aSource);
  18017. if (index >= 0) {
  18018. return this.sourcesContent[index];
  18019. }
  18020. var relativeSource = aSource;
  18021. if (this.sourceRoot != null) {
  18022. relativeSource = util.relative(this.sourceRoot, relativeSource);
  18023. }
  18024. var url;
  18025. if (this.sourceRoot != null && (url = util.urlParse(this.sourceRoot))) {
  18026. var fileUriAbsPath = relativeSource.replace(/^file:\/\//, "");
  18027. if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) {
  18028. return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
  18029. }
  18030. if ((!url.path || url.path == "/") && this._sources.has("/" + relativeSource)) {
  18031. return this.sourcesContent[this._sources.indexOf("/" + relativeSource)];
  18032. }
  18033. }
  18034. if (nullOnMissing) {
  18035. return null;
  18036. } else {
  18037. throw new Error('"' + relativeSource + '" is not in the SourceMap.');
  18038. }
  18039. };
  18040. BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
  18041. var source = util.getArg(aArgs, 'source');
  18042. source = this._findSourceIndex(source);
  18043. if (source < 0) {
  18044. return {
  18045. line: null,
  18046. column: null,
  18047. lastColumn: null
  18048. };
  18049. }
  18050. var needle = {
  18051. source: source,
  18052. originalLine: util.getArg(aArgs, 'line'),
  18053. originalColumn: util.getArg(aArgs, 'column')
  18054. };
  18055. var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util.compareByOriginalPositions, util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND));
  18056. if (index >= 0) {
  18057. var mapping = this._originalMappings[index];
  18058. if (mapping.source === needle.source) {
  18059. return {
  18060. line: util.getArg(mapping, 'generatedLine', null),
  18061. column: util.getArg(mapping, 'generatedColumn', null),
  18062. lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
  18063. };
  18064. }
  18065. }
  18066. return {
  18067. line: null,
  18068. column: null,
  18069. lastColumn: null
  18070. };
  18071. };
  18072. var BasicSourceMapConsumer_1 = BasicSourceMapConsumer;
  18073. function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {
  18074. var sourceMap = aSourceMap;
  18075. if (typeof aSourceMap === 'string') {
  18076. sourceMap = util.parseSourceMapInput(aSourceMap);
  18077. }
  18078. var version = util.getArg(sourceMap, 'version');
  18079. var sections = util.getArg(sourceMap, 'sections');
  18080. if (version != this._version) {
  18081. throw new Error('Unsupported version: ' + version);
  18082. }
  18083. this._sources = new ArraySet$2();
  18084. this._names = new ArraySet$2();
  18085. var lastOffset = {
  18086. line: -1,
  18087. column: 0
  18088. };
  18089. this._sections = sections.map(function (s) {
  18090. if (s.url) {
  18091. throw new Error('Support for url field in sections not implemented.');
  18092. }
  18093. var offset = util.getArg(s, 'offset');
  18094. var offsetLine = util.getArg(offset, 'line');
  18095. var offsetColumn = util.getArg(offset, 'column');
  18096. if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) {
  18097. throw new Error('Section offsets must be ordered and non-overlapping.');
  18098. }
  18099. lastOffset = offset;
  18100. return {
  18101. generatedOffset: {
  18102. generatedLine: offsetLine + 1,
  18103. generatedColumn: offsetColumn + 1
  18104. },
  18105. consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL)
  18106. };
  18107. });
  18108. }
  18109. IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
  18110. IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
  18111. IndexedSourceMapConsumer.prototype._version = 3;
  18112. Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {
  18113. get: function get() {
  18114. var sources = [];
  18115. for (var i = 0; i < this._sections.length; i++) {
  18116. for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
  18117. sources.push(this._sections[i].consumer.sources[j]);
  18118. }
  18119. }
  18120. return sources;
  18121. }
  18122. });
  18123. IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
  18124. var needle = {
  18125. generatedLine: util.getArg(aArgs, 'line'),
  18126. generatedColumn: util.getArg(aArgs, 'column')
  18127. };
  18128. var sectionIndex = binarySearch.search(needle, this._sections, function (needle, section) {
  18129. var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
  18130. if (cmp) {
  18131. return cmp;
  18132. }
  18133. return needle.generatedColumn - section.generatedOffset.generatedColumn;
  18134. });
  18135. var section = this._sections[sectionIndex];
  18136. if (!section) {
  18137. return {
  18138. source: null,
  18139. line: null,
  18140. column: null,
  18141. name: null
  18142. };
  18143. }
  18144. return section.consumer.originalPositionFor({
  18145. line: needle.generatedLine - (section.generatedOffset.generatedLine - 1),
  18146. column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
  18147. bias: aArgs.bias
  18148. });
  18149. };
  18150. IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() {
  18151. return this._sections.every(function (s) {
  18152. return s.consumer.hasContentsOfAllSources();
  18153. });
  18154. };
  18155. IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
  18156. for (var i = 0; i < this._sections.length; i++) {
  18157. var section = this._sections[i];
  18158. var content = section.consumer.sourceContentFor(aSource, true);
  18159. if (content) {
  18160. return content;
  18161. }
  18162. }
  18163. if (nullOnMissing) {
  18164. return null;
  18165. } else {
  18166. throw new Error('"' + aSource + '" is not in the SourceMap.');
  18167. }
  18168. };
  18169. IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
  18170. for (var i = 0; i < this._sections.length; i++) {
  18171. var section = this._sections[i];
  18172. if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) {
  18173. continue;
  18174. }
  18175. var generatedPosition = section.consumer.generatedPositionFor(aArgs);
  18176. if (generatedPosition) {
  18177. var ret = {
  18178. line: generatedPosition.line + (section.generatedOffset.generatedLine - 1),
  18179. column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0)
  18180. };
  18181. return ret;
  18182. }
  18183. }
  18184. return {
  18185. line: null,
  18186. column: null
  18187. };
  18188. };
  18189. IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
  18190. this.__generatedMappings = [];
  18191. this.__originalMappings = [];
  18192. for (var i = 0; i < this._sections.length; i++) {
  18193. var section = this._sections[i];
  18194. var sectionMappings = section.consumer._generatedMappings;
  18195. for (var j = 0; j < sectionMappings.length; j++) {
  18196. var mapping = sectionMappings[j];
  18197. var source = section.consumer._sources.at(mapping.source);
  18198. source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);
  18199. this._sources.add(source);
  18200. source = this._sources.indexOf(source);
  18201. var name = null;
  18202. if (mapping.name) {
  18203. name = section.consumer._names.at(mapping.name);
  18204. this._names.add(name);
  18205. name = this._names.indexOf(name);
  18206. }
  18207. var adjustedMapping = {
  18208. source: source,
  18209. generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1),
  18210. generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
  18211. originalLine: mapping.originalLine,
  18212. originalColumn: mapping.originalColumn,
  18213. name: name
  18214. };
  18215. this.__generatedMappings.push(adjustedMapping);
  18216. if (typeof adjustedMapping.originalLine === 'number') {
  18217. this.__originalMappings.push(adjustedMapping);
  18218. }
  18219. }
  18220. }
  18221. quickSort$1(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
  18222. quickSort$1(this.__originalMappings, util.compareByOriginalPositions);
  18223. };
  18224. var IndexedSourceMapConsumer_1 = IndexedSourceMapConsumer;
  18225. var sourceMapConsumer = {
  18226. SourceMapConsumer: SourceMapConsumer_1,
  18227. BasicSourceMapConsumer: BasicSourceMapConsumer_1,
  18228. IndexedSourceMapConsumer: IndexedSourceMapConsumer_1
  18229. };
  18230. var SourceMapGenerator$1 = sourceMapGenerator.SourceMapGenerator;
  18231. var REGEX_NEWLINE = /(\r?\n)/;
  18232. var NEWLINE_CODE = 10;
  18233. var isSourceNode = "$$$isSourceNode$$$";
  18234. function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
  18235. this.children = [];
  18236. this.sourceContents = {};
  18237. this.line = aLine == null ? null : aLine;
  18238. this.column = aColumn == null ? null : aColumn;
  18239. this.source = aSource == null ? null : aSource;
  18240. this.name = aName == null ? null : aName;
  18241. this[isSourceNode] = true;
  18242. if (aChunks != null) this.add(aChunks);
  18243. }
  18244. SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
  18245. var node = new SourceNode();
  18246. var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
  18247. var remainingLinesIndex = 0;
  18248. var shiftNextLine = function shiftNextLine() {
  18249. var lineContents = getNextLine();
  18250. var newLine = getNextLine() || "";
  18251. return lineContents + newLine;
  18252. function getNextLine() {
  18253. return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : undefined;
  18254. }
  18255. };
  18256. var lastGeneratedLine = 1,
  18257. lastGeneratedColumn = 0;
  18258. var lastMapping = null;
  18259. aSourceMapConsumer.eachMapping(function (mapping) {
  18260. if (lastMapping !== null) {
  18261. if (lastGeneratedLine < mapping.generatedLine) {
  18262. addMappingWithCode(lastMapping, shiftNextLine());
  18263. lastGeneratedLine++;
  18264. lastGeneratedColumn = 0;
  18265. } else {
  18266. var nextLine = remainingLines[remainingLinesIndex] || '';
  18267. var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);
  18268. remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);
  18269. lastGeneratedColumn = mapping.generatedColumn;
  18270. addMappingWithCode(lastMapping, code);
  18271. lastMapping = mapping;
  18272. return;
  18273. }
  18274. }
  18275. while (lastGeneratedLine < mapping.generatedLine) {
  18276. node.add(shiftNextLine());
  18277. lastGeneratedLine++;
  18278. }
  18279. if (lastGeneratedColumn < mapping.generatedColumn) {
  18280. var nextLine = remainingLines[remainingLinesIndex] || '';
  18281. node.add(nextLine.substr(0, mapping.generatedColumn));
  18282. remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
  18283. lastGeneratedColumn = mapping.generatedColumn;
  18284. }
  18285. lastMapping = mapping;
  18286. }, this);
  18287. if (remainingLinesIndex < remainingLines.length) {
  18288. if (lastMapping) {
  18289. addMappingWithCode(lastMapping, shiftNextLine());
  18290. }
  18291. node.add(remainingLines.splice(remainingLinesIndex).join(""));
  18292. }
  18293. aSourceMapConsumer.sources.forEach(function (sourceFile) {
  18294. var content = aSourceMapConsumer.sourceContentFor(sourceFile);
  18295. if (content != null) {
  18296. if (aRelativePath != null) {
  18297. sourceFile = util.join(aRelativePath, sourceFile);
  18298. }
  18299. node.setSourceContent(sourceFile, content);
  18300. }
  18301. });
  18302. return node;
  18303. function addMappingWithCode(mapping, code) {
  18304. if (mapping === null || mapping.source === undefined) {
  18305. node.add(code);
  18306. } else {
  18307. var source = aRelativePath ? util.join(aRelativePath, mapping.source) : mapping.source;
  18308. node.add(new SourceNode(mapping.originalLine, mapping.originalColumn, source, code, mapping.name));
  18309. }
  18310. }
  18311. };
  18312. SourceNode.prototype.add = function SourceNode_add(aChunk) {
  18313. if (Array.isArray(aChunk)) {
  18314. aChunk.forEach(function (chunk) {
  18315. this.add(chunk);
  18316. }, this);
  18317. } else if (aChunk[isSourceNode] || typeof aChunk === "string") {
  18318. if (aChunk) {
  18319. this.children.push(aChunk);
  18320. }
  18321. } else {
  18322. throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
  18323. }
  18324. return this;
  18325. };
  18326. SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
  18327. if (Array.isArray(aChunk)) {
  18328. for (var i = aChunk.length - 1; i >= 0; i--) {
  18329. this.prepend(aChunk[i]);
  18330. }
  18331. } else if (aChunk[isSourceNode] || typeof aChunk === "string") {
  18332. this.children.unshift(aChunk);
  18333. } else {
  18334. throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
  18335. }
  18336. return this;
  18337. };
  18338. SourceNode.prototype.walk = function SourceNode_walk(aFn) {
  18339. var chunk;
  18340. for (var i = 0, len = this.children.length; i < len; i++) {
  18341. chunk = this.children[i];
  18342. if (chunk[isSourceNode]) {
  18343. chunk.walk(aFn);
  18344. } else {
  18345. if (chunk !== '') {
  18346. aFn(chunk, {
  18347. source: this.source,
  18348. line: this.line,
  18349. column: this.column,
  18350. name: this.name
  18351. });
  18352. }
  18353. }
  18354. }
  18355. };
  18356. SourceNode.prototype.join = function SourceNode_join(aSep) {
  18357. var newChildren;
  18358. var i;
  18359. var len = this.children.length;
  18360. if (len > 0) {
  18361. newChildren = [];
  18362. for (i = 0; i < len - 1; i++) {
  18363. newChildren.push(this.children[i]);
  18364. newChildren.push(aSep);
  18365. }
  18366. newChildren.push(this.children[i]);
  18367. this.children = newChildren;
  18368. }
  18369. return this;
  18370. };
  18371. SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
  18372. var lastChild = this.children[this.children.length - 1];
  18373. if (lastChild[isSourceNode]) {
  18374. lastChild.replaceRight(aPattern, aReplacement);
  18375. } else if (typeof lastChild === 'string') {
  18376. this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
  18377. } else {
  18378. this.children.push(''.replace(aPattern, aReplacement));
  18379. }
  18380. return this;
  18381. };
  18382. SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
  18383. this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
  18384. };
  18385. SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {
  18386. for (var i = 0, len = this.children.length; i < len; i++) {
  18387. if (this.children[i][isSourceNode]) {
  18388. this.children[i].walkSourceContents(aFn);
  18389. }
  18390. }
  18391. var sources = Object.keys(this.sourceContents);
  18392. for (var i = 0, len = sources.length; i < len; i++) {
  18393. aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
  18394. }
  18395. };
  18396. SourceNode.prototype.toString = function SourceNode_toString() {
  18397. var str = "";
  18398. this.walk(function (chunk) {
  18399. str += chunk;
  18400. });
  18401. return str;
  18402. };
  18403. SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
  18404. var generated = {
  18405. code: "",
  18406. line: 1,
  18407. column: 0
  18408. };
  18409. var map = new SourceMapGenerator$1(aArgs);
  18410. var sourceMappingActive = false;
  18411. var lastOriginalSource = null;
  18412. var lastOriginalLine = null;
  18413. var lastOriginalColumn = null;
  18414. var lastOriginalName = null;
  18415. this.walk(function (chunk, original) {
  18416. generated.code += chunk;
  18417. if (original.source !== null && original.line !== null && original.column !== null) {
  18418. if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {
  18419. map.addMapping({
  18420. source: original.source,
  18421. original: {
  18422. line: original.line,
  18423. column: original.column
  18424. },
  18425. generated: {
  18426. line: generated.line,
  18427. column: generated.column
  18428. },
  18429. name: original.name
  18430. });
  18431. }
  18432. lastOriginalSource = original.source;
  18433. lastOriginalLine = original.line;
  18434. lastOriginalColumn = original.column;
  18435. lastOriginalName = original.name;
  18436. sourceMappingActive = true;
  18437. } else if (sourceMappingActive) {
  18438. map.addMapping({
  18439. generated: {
  18440. line: generated.line,
  18441. column: generated.column
  18442. }
  18443. });
  18444. lastOriginalSource = null;
  18445. sourceMappingActive = false;
  18446. }
  18447. for (var idx = 0, length = chunk.length; idx < length; idx++) {
  18448. if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
  18449. generated.line++;
  18450. generated.column = 0;
  18451. if (idx + 1 === length) {
  18452. lastOriginalSource = null;
  18453. sourceMappingActive = false;
  18454. } else if (sourceMappingActive) {
  18455. map.addMapping({
  18456. source: original.source,
  18457. original: {
  18458. line: original.line,
  18459. column: original.column
  18460. },
  18461. generated: {
  18462. line: generated.line,
  18463. column: generated.column
  18464. },
  18465. name: original.name
  18466. });
  18467. }
  18468. } else {
  18469. generated.column++;
  18470. }
  18471. }
  18472. });
  18473. this.walkSourceContents(function (sourceFile, sourceContent) {
  18474. map.setSourceContent(sourceFile, sourceContent);
  18475. });
  18476. return {
  18477. code: generated.code,
  18478. map: map
  18479. };
  18480. };
  18481. var SourceNode_1 = SourceNode;
  18482. var sourceNode = {
  18483. SourceNode: SourceNode_1
  18484. };
  18485. var SourceMapGenerator$2 = sourceMapGenerator.SourceMapGenerator;
  18486. var SourceMapConsumer$1 = sourceMapConsumer.SourceMapConsumer;
  18487. var SourceNode$1 = sourceNode.SourceNode;
  18488. var sourceMap = {
  18489. SourceMapGenerator: SourceMapGenerator$2,
  18490. SourceMapConsumer: SourceMapConsumer$1,
  18491. SourceNode: SourceNode$1
  18492. };
  18493. var SourceMap = function () {
  18494. function SourceMap(opts, code) {
  18495. this._cachedMap = null;
  18496. this._code = code;
  18497. this._opts = opts;
  18498. this._rawMappings = [];
  18499. }
  18500. var _proto = SourceMap.prototype;
  18501. _proto.get = function get() {
  18502. if (!this._cachedMap) {
  18503. var map = this._cachedMap = new sourceMap.SourceMapGenerator({
  18504. sourceRoot: this._opts.sourceRoot
  18505. });
  18506. var code = this._code;
  18507. if (typeof code === "string") {
  18508. map.setSourceContent(this._opts.sourceFileName.replace(/\\/g, "/"), code);
  18509. } else if (typeof code === "object") {
  18510. Object.keys(code).forEach(function (sourceFileName) {
  18511. map.setSourceContent(sourceFileName.replace(/\\/g, "/"), code[sourceFileName]);
  18512. });
  18513. }
  18514. this._rawMappings.forEach(function (mapping) {
  18515. return map.addMapping(mapping);
  18516. }, map);
  18517. }
  18518. return this._cachedMap.toJSON();
  18519. };
  18520. _proto.getRawMappings = function getRawMappings() {
  18521. return this._rawMappings.slice();
  18522. };
  18523. _proto.mark = function mark(generatedLine, generatedColumn, line, column, identifierName, filename, force) {
  18524. if (this._lastGenLine !== generatedLine && line === null) return;
  18525. if (!force && this._lastGenLine === generatedLine && this._lastSourceLine === line && this._lastSourceColumn === column) {
  18526. return;
  18527. }
  18528. this._cachedMap = null;
  18529. this._lastGenLine = generatedLine;
  18530. this._lastSourceLine = line;
  18531. this._lastSourceColumn = column;
  18532. this._rawMappings.push({
  18533. name: identifierName || undefined,
  18534. generated: {
  18535. line: generatedLine,
  18536. column: generatedColumn
  18537. },
  18538. source: line == null ? undefined : (filename || this._opts.sourceFileName).replace(/\\/g, "/"),
  18539. original: line == null ? undefined : {
  18540. line: line,
  18541. column: column
  18542. }
  18543. });
  18544. };
  18545. return SourceMap;
  18546. }();
  18547. function isInteger(value) {
  18548. return typeof value == 'number' && value == toInteger_1(value);
  18549. }
  18550. var isInteger_1 = isInteger;
  18551. var SPACES_RE = /^[ \t]+$/;
  18552. var Buffer = function () {
  18553. function Buffer(map) {
  18554. this._map = null;
  18555. this._buf = [];
  18556. this._last = "";
  18557. this._queue = [];
  18558. this._position = {
  18559. line: 1,
  18560. column: 0
  18561. };
  18562. this._sourcePosition = {
  18563. identifierName: null,
  18564. line: null,
  18565. column: null,
  18566. filename: null
  18567. };
  18568. this._disallowedPop = null;
  18569. this._map = map;
  18570. }
  18571. var _proto = Buffer.prototype;
  18572. _proto.get = function get() {
  18573. this._flush();
  18574. var map = this._map;
  18575. var result = {
  18576. code: this._buf.join("").trimRight(),
  18577. map: null,
  18578. rawMappings: map && map.getRawMappings()
  18579. };
  18580. if (map) {
  18581. Object.defineProperty(result, "map", {
  18582. configurable: true,
  18583. enumerable: true,
  18584. get: function get() {
  18585. return this.map = map.get();
  18586. },
  18587. set: function set(value) {
  18588. Object.defineProperty(this, "map", {
  18589. value: value,
  18590. writable: true
  18591. });
  18592. }
  18593. });
  18594. }
  18595. return result;
  18596. };
  18597. _proto.append = function append(str) {
  18598. this._flush();
  18599. var _this$_sourcePosition = this._sourcePosition,
  18600. line = _this$_sourcePosition.line,
  18601. column = _this$_sourcePosition.column,
  18602. filename = _this$_sourcePosition.filename,
  18603. identifierName = _this$_sourcePosition.identifierName,
  18604. force = _this$_sourcePosition.force;
  18605. this._append(str, line, column, identifierName, filename, force);
  18606. };
  18607. _proto.queue = function queue(str) {
  18608. if (str === "\n") {
  18609. while (this._queue.length > 0 && SPACES_RE.test(this._queue[0][0])) {
  18610. this._queue.shift();
  18611. }
  18612. }
  18613. var _this$_sourcePosition2 = this._sourcePosition,
  18614. line = _this$_sourcePosition2.line,
  18615. column = _this$_sourcePosition2.column,
  18616. filename = _this$_sourcePosition2.filename,
  18617. identifierName = _this$_sourcePosition2.identifierName,
  18618. force = _this$_sourcePosition2.force;
  18619. this._queue.unshift([str, line, column, identifierName, filename, force]);
  18620. };
  18621. _proto._flush = function _flush() {
  18622. var item;
  18623. while (item = this._queue.pop()) {
  18624. this._append.apply(this, item);
  18625. }
  18626. };
  18627. _proto._append = function _append(str, line, column, identifierName, filename, force) {
  18628. if (this._map && str[0] !== "\n") {
  18629. this._map.mark(this._position.line, this._position.column, line, column, identifierName, filename, force);
  18630. }
  18631. this._buf.push(str);
  18632. this._last = str[str.length - 1];
  18633. for (var i = 0; i < str.length; i++) {
  18634. if (str[i] === "\n") {
  18635. this._position.line++;
  18636. this._position.column = 0;
  18637. } else {
  18638. this._position.column++;
  18639. }
  18640. }
  18641. };
  18642. _proto.removeTrailingNewline = function removeTrailingNewline() {
  18643. if (this._queue.length > 0 && this._queue[0][0] === "\n") {
  18644. this._queue.shift();
  18645. }
  18646. };
  18647. _proto.removeLastSemicolon = function removeLastSemicolon() {
  18648. if (this._queue.length > 0 && this._queue[0][0] === ";") {
  18649. this._queue.shift();
  18650. }
  18651. };
  18652. _proto.endsWith = function endsWith(suffix) {
  18653. if (suffix.length === 1) {
  18654. var last;
  18655. if (this._queue.length > 0) {
  18656. var str = this._queue[0][0];
  18657. last = str[str.length - 1];
  18658. } else {
  18659. last = this._last;
  18660. }
  18661. return last === suffix;
  18662. }
  18663. var end = this._last + this._queue.reduce(function (acc, item) {
  18664. return item[0] + acc;
  18665. }, "");
  18666. if (suffix.length <= end.length) {
  18667. return end.slice(-suffix.length) === suffix;
  18668. }
  18669. return false;
  18670. };
  18671. _proto.hasContent = function hasContent() {
  18672. return this._queue.length > 0 || !!this._last;
  18673. };
  18674. _proto.exactSource = function exactSource(loc, cb) {
  18675. this.source("start", loc, true);
  18676. cb();
  18677. this.source("end", loc);
  18678. this._disallowPop("start", loc);
  18679. };
  18680. _proto.source = function source(prop, loc, force) {
  18681. if (prop && !loc) return;
  18682. this._normalizePosition(prop, loc, this._sourcePosition, force);
  18683. };
  18684. _proto.withSource = function withSource(prop, loc, cb) {
  18685. if (!this._map) return cb();
  18686. var originalLine = this._sourcePosition.line;
  18687. var originalColumn = this._sourcePosition.column;
  18688. var originalFilename = this._sourcePosition.filename;
  18689. var originalIdentifierName = this._sourcePosition.identifierName;
  18690. this.source(prop, loc);
  18691. cb();
  18692. 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)) {
  18693. this._sourcePosition.line = originalLine;
  18694. this._sourcePosition.column = originalColumn;
  18695. this._sourcePosition.filename = originalFilename;
  18696. this._sourcePosition.identifierName = originalIdentifierName;
  18697. this._sourcePosition.force = false;
  18698. this._disallowedPop = null;
  18699. }
  18700. };
  18701. _proto._disallowPop = function _disallowPop(prop, loc) {
  18702. if (prop && !loc) return;
  18703. this._disallowedPop = this._normalizePosition(prop, loc);
  18704. };
  18705. _proto._normalizePosition = function _normalizePosition(prop, loc, targetObj, force) {
  18706. var pos = loc ? loc[prop] : null;
  18707. if (targetObj === undefined) {
  18708. targetObj = {
  18709. identifierName: null,
  18710. line: null,
  18711. column: null,
  18712. filename: null,
  18713. force: false
  18714. };
  18715. }
  18716. var origLine = targetObj.line;
  18717. var origColumn = targetObj.column;
  18718. var origFilename = targetObj.filename;
  18719. targetObj.identifierName = prop === "start" && loc && loc.identifierName || null;
  18720. targetObj.line = pos ? pos.line : null;
  18721. targetObj.column = pos ? pos.column : null;
  18722. targetObj.filename = loc && loc.filename || null;
  18723. if (force || targetObj.line !== origLine || targetObj.column !== origColumn || targetObj.filename !== origFilename) {
  18724. targetObj.force = force;
  18725. }
  18726. return targetObj;
  18727. };
  18728. _proto.getCurrentColumn = function getCurrentColumn() {
  18729. var extra = this._queue.reduce(function (acc, item) {
  18730. return item[0] + acc;
  18731. }, "");
  18732. var lastIndex = extra.lastIndexOf("\n");
  18733. return lastIndex === -1 ? this._position.column + extra.length : extra.length - 1 - lastIndex;
  18734. };
  18735. _proto.getCurrentLine = function getCurrentLine() {
  18736. var extra = this._queue.reduce(function (acc, item) {
  18737. return item[0] + acc;
  18738. }, "");
  18739. var count = 0;
  18740. for (var i = 0; i < extra.length; i++) {
  18741. if (extra[i] === "\n") count++;
  18742. }
  18743. return this._position.line + count;
  18744. };
  18745. return Buffer;
  18746. }();
  18747. function crawl(node, state) {
  18748. if (state === void 0) {
  18749. state = {};
  18750. }
  18751. if (isMemberExpression(node)) {
  18752. crawl(node.object, state);
  18753. if (node.computed) crawl(node.property, state);
  18754. } else if (isBinary(node) || isAssignmentExpression(node)) {
  18755. crawl(node.left, state);
  18756. crawl(node.right, state);
  18757. } else if (isCallExpression(node)) {
  18758. state.hasCall = true;
  18759. crawl(node.callee, state);
  18760. } else if (isFunction(node)) {
  18761. state.hasFunction = true;
  18762. } else if (isIdentifier(node)) {
  18763. state.hasHelper = state.hasHelper || isHelper(node.callee);
  18764. }
  18765. return state;
  18766. }
  18767. function isHelper(node) {
  18768. if (isMemberExpression(node)) {
  18769. return isHelper(node.object) || isHelper(node.property);
  18770. } else if (isIdentifier(node)) {
  18771. return node.name === "require" || node.name[0] === "_";
  18772. } else if (isCallExpression(node)) {
  18773. return isHelper(node.callee);
  18774. } else if (isBinary(node) || isAssignmentExpression(node)) {
  18775. return isIdentifier(node.left) && isHelper(node.left) || isHelper(node.right);
  18776. } else {
  18777. return false;
  18778. }
  18779. }
  18780. function isType$1(node) {
  18781. return isLiteral(node) || isObjectExpression(node) || isArrayExpression(node) || isIdentifier(node) || isMemberExpression(node);
  18782. }
  18783. var nodes = {
  18784. AssignmentExpression: function AssignmentExpression(node) {
  18785. var state = crawl(node.right);
  18786. if (state.hasCall && state.hasHelper || state.hasFunction) {
  18787. return {
  18788. before: state.hasFunction,
  18789. after: true
  18790. };
  18791. }
  18792. },
  18793. SwitchCase: function SwitchCase(node, parent) {
  18794. return {
  18795. before: node.consequent.length || parent.cases[0] === node,
  18796. after: !node.consequent.length && parent.cases[parent.cases.length - 1] === node
  18797. };
  18798. },
  18799. LogicalExpression: function LogicalExpression(node) {
  18800. if (isFunction(node.left) || isFunction(node.right)) {
  18801. return {
  18802. after: true
  18803. };
  18804. }
  18805. },
  18806. Literal: function Literal(node) {
  18807. if (node.value === "use strict") {
  18808. return {
  18809. after: true
  18810. };
  18811. }
  18812. },
  18813. CallExpression: function CallExpression(node) {
  18814. if (isFunction(node.callee) || isHelper(node)) {
  18815. return {
  18816. before: true,
  18817. after: true
  18818. };
  18819. }
  18820. },
  18821. VariableDeclaration: function VariableDeclaration(node) {
  18822. for (var i = 0; i < node.declarations.length; i++) {
  18823. var declar = node.declarations[i];
  18824. var enabled = isHelper(declar.id) && !isType$1(declar.init);
  18825. if (!enabled) {
  18826. var state = crawl(declar.init);
  18827. enabled = isHelper(declar.init) && state.hasCall || state.hasFunction;
  18828. }
  18829. if (enabled) {
  18830. return {
  18831. before: true,
  18832. after: true
  18833. };
  18834. }
  18835. }
  18836. },
  18837. IfStatement: function IfStatement(node) {
  18838. if (isBlockStatement(node.consequent)) {
  18839. return {
  18840. before: true,
  18841. after: true
  18842. };
  18843. }
  18844. }
  18845. };
  18846. nodes.ObjectProperty = nodes.ObjectTypeProperty = nodes.ObjectMethod = function (node, parent) {
  18847. if (parent.properties[0] === node) {
  18848. return {
  18849. before: true
  18850. };
  18851. }
  18852. };
  18853. nodes.ObjectTypeCallProperty = function (node, parent) {
  18854. if (parent.callProperties[0] === node && (!parent.properties || !parent.properties.length)) {
  18855. return {
  18856. before: true
  18857. };
  18858. }
  18859. };
  18860. nodes.ObjectTypeIndexer = function (node, parent) {
  18861. if (parent.indexers[0] === node && (!parent.properties || !parent.properties.length) && (!parent.callProperties || !parent.callProperties.length)) {
  18862. return {
  18863. before: true
  18864. };
  18865. }
  18866. };
  18867. nodes.ObjectTypeInternalSlot = function (node, parent) {
  18868. if (parent.internalSlots[0] === node && (!parent.properties || !parent.properties.length) && (!parent.callProperties || !parent.callProperties.length) && (!parent.indexers || !parent.indexers.length)) {
  18869. return {
  18870. before: true
  18871. };
  18872. }
  18873. };
  18874. var list = {
  18875. VariableDeclaration: function VariableDeclaration(node) {
  18876. return node.declarations.map(function (decl) {
  18877. return decl.init;
  18878. });
  18879. },
  18880. ArrayExpression: function ArrayExpression(node) {
  18881. return node.elements;
  18882. },
  18883. ObjectExpression: function ObjectExpression(node) {
  18884. return node.properties;
  18885. }
  18886. };
  18887. [["Function", true], ["Class", true], ["Loop", true], ["LabeledStatement", true], ["SwitchStatement", true], ["TryStatement", true]].forEach(function (_ref) {
  18888. var type = _ref[0],
  18889. amounts = _ref[1];
  18890. if (typeof amounts === "boolean") {
  18891. amounts = {
  18892. after: amounts,
  18893. before: amounts
  18894. };
  18895. }
  18896. [type].concat(FLIPPED_ALIAS_KEYS[type] || []).forEach(function (type) {
  18897. nodes[type] = function () {
  18898. return amounts;
  18899. };
  18900. });
  18901. });
  18902. var PRECEDENCE = {
  18903. "||": 0,
  18904. "&&": 1,
  18905. "|": 2,
  18906. "^": 3,
  18907. "&": 4,
  18908. "==": 5,
  18909. "===": 5,
  18910. "!=": 5,
  18911. "!==": 5,
  18912. "<": 6,
  18913. ">": 6,
  18914. "<=": 6,
  18915. ">=": 6,
  18916. "in": 6,
  18917. "instanceof": 6,
  18918. ">>": 7,
  18919. "<<": 7,
  18920. ">>>": 7,
  18921. "+": 8,
  18922. "-": 8,
  18923. "*": 9,
  18924. "/": 9,
  18925. "%": 9,
  18926. "**": 10
  18927. };
  18928. var isClassExtendsClause = function isClassExtendsClause(node, parent) {
  18929. return (isClassDeclaration(parent) || isClassExpression(parent)) && parent.superClass === node;
  18930. };
  18931. function NullableTypeAnnotation$1(node, parent) {
  18932. return isArrayTypeAnnotation(parent);
  18933. }
  18934. function FunctionTypeAnnotation$1(node, parent, printStack) {
  18935. return isUnionTypeAnnotation(parent) || isIntersectionTypeAnnotation(parent) || isArrayTypeAnnotation(parent) || isTypeAnnotation(parent) && isArrowFunctionExpression(printStack[printStack.length - 3]);
  18936. }
  18937. function UpdateExpression$1(node, parent) {
  18938. return isMemberExpression(parent, {
  18939. object: node
  18940. }) || isCallExpression(parent, {
  18941. callee: node
  18942. }) || isNewExpression(parent, {
  18943. callee: node
  18944. }) || isClassExtendsClause(node, parent);
  18945. }
  18946. function ObjectExpression$1(node, parent, printStack) {
  18947. return isFirstInStatement(printStack, {
  18948. considerArrow: true
  18949. });
  18950. }
  18951. function DoExpression$1(node, parent, printStack) {
  18952. return isFirstInStatement(printStack);
  18953. }
  18954. function Binary(node, parent) {
  18955. if (node.operator === "**" && isBinaryExpression(parent, {
  18956. operator: "**"
  18957. })) {
  18958. return parent.left === node;
  18959. }
  18960. if (isClassExtendsClause(node, parent)) {
  18961. return true;
  18962. }
  18963. if ((isCallExpression(parent) || isNewExpression(parent)) && parent.callee === node || isUnaryLike(parent) || isMemberExpression(parent) && parent.object === node || isAwaitExpression(parent)) {
  18964. return true;
  18965. }
  18966. if (isBinary(parent)) {
  18967. var parentOp = parent.operator;
  18968. var parentPos = PRECEDENCE[parentOp];
  18969. var nodeOp = node.operator;
  18970. var nodePos = PRECEDENCE[nodeOp];
  18971. if (parentPos === nodePos && parent.right === node && !isLogicalExpression(parent) || parentPos > nodePos) {
  18972. return true;
  18973. }
  18974. }
  18975. return false;
  18976. }
  18977. function UnionTypeAnnotation$1(node, parent) {
  18978. return isArrayTypeAnnotation(parent) || isNullableTypeAnnotation(parent) || isIntersectionTypeAnnotation(parent) || isUnionTypeAnnotation(parent);
  18979. }
  18980. function TSAsExpression$1() {
  18981. return true;
  18982. }
  18983. function TSTypeAssertion$1() {
  18984. return true;
  18985. }
  18986. function TSUnionType$1(node, parent) {
  18987. return isTSArrayType(parent) || isTSOptionalType(parent) || isTSIntersectionType(parent) || isTSUnionType(parent) || isTSRestType(parent);
  18988. }
  18989. function BinaryExpression$1(node, parent) {
  18990. return node.operator === "in" && (isVariableDeclarator(parent) || isFor(parent));
  18991. }
  18992. function SequenceExpression$1(node, parent) {
  18993. 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) {
  18994. return false;
  18995. }
  18996. return true;
  18997. }
  18998. function YieldExpression$1(node, parent) {
  18999. return isBinary(parent) || isUnaryLike(parent) || isCallExpression(parent) || isMemberExpression(parent) || isNewExpression(parent) || isAwaitExpression(parent) && isYieldExpression(node) || isConditionalExpression(parent) && node === parent.test || isClassExtendsClause(node, parent);
  19000. }
  19001. function ClassExpression$1(node, parent, printStack) {
  19002. return isFirstInStatement(printStack, {
  19003. considerDefaultExports: true
  19004. });
  19005. }
  19006. function UnaryLike(node, parent) {
  19007. return isMemberExpression(parent, {
  19008. object: node
  19009. }) || isCallExpression(parent, {
  19010. callee: node
  19011. }) || isNewExpression(parent, {
  19012. callee: node
  19013. }) || isBinaryExpression(parent, {
  19014. operator: "**",
  19015. left: node
  19016. }) || isClassExtendsClause(node, parent);
  19017. }
  19018. function FunctionExpression$1(node, parent, printStack) {
  19019. return isFirstInStatement(printStack, {
  19020. considerDefaultExports: true
  19021. });
  19022. }
  19023. function ArrowFunctionExpression$1(node, parent) {
  19024. return isExportDeclaration(parent) || ConditionalExpression$1(node, parent);
  19025. }
  19026. function ConditionalExpression$1(node, parent) {
  19027. if (isUnaryLike(parent) || isBinary(parent) || isConditionalExpression(parent, {
  19028. test: node
  19029. }) || isAwaitExpression(parent) || isOptionalMemberExpression(parent) || isTaggedTemplateExpression(parent) || isTSTypeAssertion(parent) || isTSAsExpression(parent)) {
  19030. return true;
  19031. }
  19032. return UnaryLike(node, parent);
  19033. }
  19034. function OptionalMemberExpression$1(node, parent) {
  19035. return isCallExpression(parent) || isMemberExpression(parent);
  19036. }
  19037. function AssignmentExpression$1(node) {
  19038. if (isObjectPattern(node.left)) {
  19039. return true;
  19040. } else {
  19041. return ConditionalExpression$1.apply(void 0, arguments);
  19042. }
  19043. }
  19044. function NewExpression$1(node, parent) {
  19045. return isClassExtendsClause(node, parent);
  19046. }
  19047. function isFirstInStatement(printStack, _temp) {
  19048. var _ref = _temp === void 0 ? {} : _temp,
  19049. _ref$considerArrow = _ref.considerArrow,
  19050. considerArrow = _ref$considerArrow === void 0 ? false : _ref$considerArrow,
  19051. _ref$considerDefaultE = _ref.considerDefaultExports,
  19052. considerDefaultExports = _ref$considerDefaultE === void 0 ? false : _ref$considerDefaultE;
  19053. var i = printStack.length - 1;
  19054. var node = printStack[i];
  19055. i--;
  19056. var parent = printStack[i];
  19057. while (i > 0) {
  19058. if (isExpressionStatement(parent, {
  19059. expression: node
  19060. }) || isTaggedTemplateExpression(parent) || considerDefaultExports && isExportDefaultDeclaration(parent, {
  19061. declaration: node
  19062. }) || considerArrow && isArrowFunctionExpression(parent, {
  19063. body: node
  19064. })) {
  19065. return true;
  19066. }
  19067. if (isCallExpression(parent, {
  19068. callee: node
  19069. }) || isSequenceExpression(parent) && parent.expressions[0] === node || isMemberExpression(parent, {
  19070. object: node
  19071. }) || isConditional(parent, {
  19072. test: node
  19073. }) || isBinary(parent, {
  19074. left: node
  19075. }) || isAssignmentExpression(parent, {
  19076. left: node
  19077. })) {
  19078. node = parent;
  19079. i--;
  19080. parent = printStack[i];
  19081. } else {
  19082. return false;
  19083. }
  19084. }
  19085. return false;
  19086. }
  19087. var parens = /*#__PURE__*/Object.freeze({
  19088. __proto__: null,
  19089. NullableTypeAnnotation: NullableTypeAnnotation$1,
  19090. FunctionTypeAnnotation: FunctionTypeAnnotation$1,
  19091. UpdateExpression: UpdateExpression$1,
  19092. ObjectExpression: ObjectExpression$1,
  19093. DoExpression: DoExpression$1,
  19094. Binary: Binary,
  19095. UnionTypeAnnotation: UnionTypeAnnotation$1,
  19096. IntersectionTypeAnnotation: UnionTypeAnnotation$1,
  19097. TSAsExpression: TSAsExpression$1,
  19098. TSTypeAssertion: TSTypeAssertion$1,
  19099. TSUnionType: TSUnionType$1,
  19100. TSIntersectionType: TSUnionType$1,
  19101. BinaryExpression: BinaryExpression$1,
  19102. SequenceExpression: SequenceExpression$1,
  19103. YieldExpression: YieldExpression$1,
  19104. AwaitExpression: YieldExpression$1,
  19105. ClassExpression: ClassExpression$1,
  19106. UnaryLike: UnaryLike,
  19107. FunctionExpression: FunctionExpression$1,
  19108. ArrowFunctionExpression: ArrowFunctionExpression$1,
  19109. ConditionalExpression: ConditionalExpression$1,
  19110. OptionalMemberExpression: OptionalMemberExpression$1,
  19111. AssignmentExpression: AssignmentExpression$1,
  19112. NewExpression: NewExpression$1
  19113. });
  19114. function expandAliases(obj) {
  19115. var newObj = {};
  19116. function add(type, func) {
  19117. var fn = newObj[type];
  19118. newObj[type] = fn ? function (node, parent, stack) {
  19119. var result = fn(node, parent, stack);
  19120. return result == null ? func(node, parent, stack) : result;
  19121. } : func;
  19122. }
  19123. for (var _i = 0, _Object$keys = Object.keys(obj); _i < _Object$keys.length; _i++) {
  19124. var type = _Object$keys[_i];
  19125. var aliases = FLIPPED_ALIAS_KEYS[type];
  19126. if (aliases) {
  19127. for (var _iterator = aliases, _isArray = Array.isArray(_iterator), _i2 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  19128. var _ref;
  19129. if (_isArray) {
  19130. if (_i2 >= _iterator.length) break;
  19131. _ref = _iterator[_i2++];
  19132. } else {
  19133. _i2 = _iterator.next();
  19134. if (_i2.done) break;
  19135. _ref = _i2.value;
  19136. }
  19137. var alias = _ref;
  19138. add(alias, obj[type]);
  19139. }
  19140. } else {
  19141. add(type, obj[type]);
  19142. }
  19143. }
  19144. return newObj;
  19145. }
  19146. var expandedParens = expandAliases(parens);
  19147. var expandedWhitespaceNodes = expandAliases(nodes);
  19148. var expandedWhitespaceList = expandAliases(list);
  19149. function find(obj, node, parent, printStack) {
  19150. var fn = obj[node.type];
  19151. return fn ? fn(node, parent, printStack) : null;
  19152. }
  19153. function isOrHasCallExpression(node) {
  19154. if (isCallExpression(node)) {
  19155. return true;
  19156. }
  19157. if (isMemberExpression(node)) {
  19158. return isOrHasCallExpression(node.object) || !node.computed && isOrHasCallExpression(node.property);
  19159. } else {
  19160. return false;
  19161. }
  19162. }
  19163. function needsWhitespace(node, parent, type) {
  19164. if (!node) return 0;
  19165. if (isExpressionStatement(node)) {
  19166. node = node.expression;
  19167. }
  19168. var linesInfo = find(expandedWhitespaceNodes, node, parent);
  19169. if (!linesInfo) {
  19170. var items = find(expandedWhitespaceList, node, parent);
  19171. if (items) {
  19172. for (var i = 0; i < items.length; i++) {
  19173. linesInfo = needsWhitespace(items[i], node, type);
  19174. if (linesInfo) break;
  19175. }
  19176. }
  19177. }
  19178. if (typeof linesInfo === "object" && linesInfo !== null) {
  19179. return linesInfo[type] || 0;
  19180. }
  19181. return 0;
  19182. }
  19183. function needsWhitespaceBefore(node, parent) {
  19184. return needsWhitespace(node, parent, "before");
  19185. }
  19186. function needsWhitespaceAfter(node, parent) {
  19187. return needsWhitespace(node, parent, "after");
  19188. }
  19189. function needsParens(node, parent, printStack) {
  19190. if (!parent) return false;
  19191. if (isNewExpression(parent) && parent.callee === node) {
  19192. if (isOrHasCallExpression(node)) return true;
  19193. }
  19194. if (isLogicalExpression(node) && parent.operator === "??") return true;
  19195. return find(expandedParens, node, parent, printStack);
  19196. }
  19197. function TaggedTemplateExpression$1(node) {
  19198. this.print(node.tag, node);
  19199. this.print(node.typeParameters, node);
  19200. this.print(node.quasi, node);
  19201. }
  19202. function TemplateElement$1(node, parent) {
  19203. var isFirst = parent.quasis[0] === node;
  19204. var isLast = parent.quasis[parent.quasis.length - 1] === node;
  19205. var value = (isFirst ? "`" : "}") + node.value.raw + (isLast ? "`" : "${");
  19206. this.token(value);
  19207. }
  19208. function TemplateLiteral$1(node) {
  19209. var quasis = node.quasis;
  19210. for (var i = 0; i < quasis.length; i++) {
  19211. this.print(quasis[i], node);
  19212. if (i + 1 < quasis.length) {
  19213. this.print(node.expressions[i], node);
  19214. }
  19215. }
  19216. }
  19217. function UnaryExpression$1(node) {
  19218. if (node.operator === "void" || node.operator === "delete" || node.operator === "typeof" || node.operator === "throw") {
  19219. this.word(node.operator);
  19220. this.space();
  19221. } else {
  19222. this.token(node.operator);
  19223. }
  19224. this.print(node.argument, node);
  19225. }
  19226. function DoExpression$2(node) {
  19227. this.word("do");
  19228. this.space();
  19229. this.print(node.body, node);
  19230. }
  19231. function ParenthesizedExpression$1(node) {
  19232. this.token("(");
  19233. this.print(node.expression, node);
  19234. this.token(")");
  19235. }
  19236. function UpdateExpression$2(node) {
  19237. if (node.prefix) {
  19238. this.token(node.operator);
  19239. this.print(node.argument, node);
  19240. } else {
  19241. this.startTerminatorless(true);
  19242. this.print(node.argument, node);
  19243. this.endTerminatorless();
  19244. this.token(node.operator);
  19245. }
  19246. }
  19247. function ConditionalExpression$2(node) {
  19248. this.print(node.test, node);
  19249. this.space();
  19250. this.token("?");
  19251. this.space();
  19252. this.print(node.consequent, node);
  19253. this.space();
  19254. this.token(":");
  19255. this.space();
  19256. this.print(node.alternate, node);
  19257. }
  19258. function NewExpression$2(node, parent) {
  19259. this.word("new");
  19260. this.space();
  19261. this.print(node.callee, node);
  19262. if (this.format.minified && node.arguments.length === 0 && !node.optional && !isCallExpression(parent, {
  19263. callee: node
  19264. }) && !isMemberExpression(parent) && !isNewExpression(parent)) {
  19265. return;
  19266. }
  19267. this.print(node.typeArguments, node);
  19268. this.print(node.typeParameters, node);
  19269. if (node.optional) {
  19270. this.token("?.");
  19271. }
  19272. this.token("(");
  19273. this.printList(node.arguments, node);
  19274. this.token(")");
  19275. }
  19276. function SequenceExpression$2(node) {
  19277. this.printList(node.expressions, node);
  19278. }
  19279. function ThisExpression$1() {
  19280. this.word("this");
  19281. }
  19282. function Super$1() {
  19283. this.word("super");
  19284. }
  19285. function Decorator$1(node) {
  19286. this.token("@");
  19287. this.print(node.expression, node);
  19288. this.newline();
  19289. }
  19290. function OptionalMemberExpression$2(node) {
  19291. this.print(node.object, node);
  19292. if (!node.computed && isMemberExpression(node.property)) {
  19293. throw new TypeError("Got a MemberExpression for MemberExpression property");
  19294. }
  19295. var computed = node.computed;
  19296. if (isLiteral(node.property) && typeof node.property.value === "number") {
  19297. computed = true;
  19298. }
  19299. if (node.optional) {
  19300. this.token("?.");
  19301. }
  19302. if (computed) {
  19303. this.token("[");
  19304. this.print(node.property, node);
  19305. this.token("]");
  19306. } else {
  19307. if (!node.optional) {
  19308. this.token(".");
  19309. }
  19310. this.print(node.property, node);
  19311. }
  19312. }
  19313. function OptionalCallExpression$1(node) {
  19314. this.print(node.callee, node);
  19315. this.print(node.typeArguments, node);
  19316. this.print(node.typeParameters, node);
  19317. if (node.optional) {
  19318. this.token("?.");
  19319. }
  19320. this.token("(");
  19321. this.printList(node.arguments, node);
  19322. this.token(")");
  19323. }
  19324. function CallExpression$1(node) {
  19325. this.print(node.callee, node);
  19326. this.print(node.typeArguments, node);
  19327. this.print(node.typeParameters, node);
  19328. this.token("(");
  19329. this.printList(node.arguments, node);
  19330. this.token(")");
  19331. }
  19332. function Import$1() {
  19333. this.word("import");
  19334. }
  19335. function buildYieldAwait(keyword) {
  19336. return function (node) {
  19337. this.word(keyword);
  19338. if (node.delegate) {
  19339. this.token("*");
  19340. }
  19341. if (node.argument) {
  19342. this.space();
  19343. var terminatorState = this.startTerminatorless();
  19344. this.print(node.argument, node);
  19345. this.endTerminatorless(terminatorState);
  19346. }
  19347. };
  19348. }
  19349. var YieldExpression$2 = buildYieldAwait("yield");
  19350. var AwaitExpression$1 = buildYieldAwait("await");
  19351. function EmptyStatement$1() {
  19352. this.semicolon(true);
  19353. }
  19354. function ExpressionStatement$1(node) {
  19355. this.print(node.expression, node);
  19356. this.semicolon();
  19357. }
  19358. function AssignmentPattern$1(node) {
  19359. this.print(node.left, node);
  19360. if (node.left.optional) this.token("?");
  19361. this.print(node.left.typeAnnotation, node);
  19362. this.space();
  19363. this.token("=");
  19364. this.space();
  19365. this.print(node.right, node);
  19366. }
  19367. function AssignmentExpression$2(node, parent) {
  19368. var parens = this.inForStatementInitCounter && node.operator === "in" && !needsParens(node, parent);
  19369. if (parens) {
  19370. this.token("(");
  19371. }
  19372. this.print(node.left, node);
  19373. this.space();
  19374. if (node.operator === "in" || node.operator === "instanceof") {
  19375. this.word(node.operator);
  19376. } else {
  19377. this.token(node.operator);
  19378. }
  19379. this.space();
  19380. this.print(node.right, node);
  19381. if (parens) {
  19382. this.token(")");
  19383. }
  19384. }
  19385. function BindExpression$1(node) {
  19386. this.print(node.object, node);
  19387. this.token("::");
  19388. this.print(node.callee, node);
  19389. }
  19390. function MemberExpression$1(node) {
  19391. this.print(node.object, node);
  19392. if (!node.computed && isMemberExpression(node.property)) {
  19393. throw new TypeError("Got a MemberExpression for MemberExpression property");
  19394. }
  19395. var computed = node.computed;
  19396. if (isLiteral(node.property) && typeof node.property.value === "number") {
  19397. computed = true;
  19398. }
  19399. if (computed) {
  19400. this.token("[");
  19401. this.print(node.property, node);
  19402. this.token("]");
  19403. } else {
  19404. this.token(".");
  19405. this.print(node.property, node);
  19406. }
  19407. }
  19408. function MetaProperty$1(node) {
  19409. this.print(node.meta, node);
  19410. this.token(".");
  19411. this.print(node.property, node);
  19412. }
  19413. function PrivateName$1(node) {
  19414. this.token("#");
  19415. this.print(node.id, node);
  19416. }
  19417. function V8IntrinsicIdentifier$1(node) {
  19418. this.token("%");
  19419. this.word(node.name);
  19420. }
  19421. function WithStatement$1(node) {
  19422. this.word("with");
  19423. this.space();
  19424. this.token("(");
  19425. this.print(node.object, node);
  19426. this.token(")");
  19427. this.printBlock(node);
  19428. }
  19429. function IfStatement$1(node) {
  19430. this.word("if");
  19431. this.space();
  19432. this.token("(");
  19433. this.print(node.test, node);
  19434. this.token(")");
  19435. this.space();
  19436. var needsBlock = node.alternate && isIfStatement(getLastStatement(node.consequent));
  19437. if (needsBlock) {
  19438. this.token("{");
  19439. this.newline();
  19440. this.indent();
  19441. }
  19442. this.printAndIndentOnComments(node.consequent, node);
  19443. if (needsBlock) {
  19444. this.dedent();
  19445. this.newline();
  19446. this.token("}");
  19447. }
  19448. if (node.alternate) {
  19449. if (this.endsWith("}")) this.space();
  19450. this.word("else");
  19451. this.space();
  19452. this.printAndIndentOnComments(node.alternate, node);
  19453. }
  19454. }
  19455. function getLastStatement(statement) {
  19456. if (!isStatement(statement.body)) return statement;
  19457. return getLastStatement(statement.body);
  19458. }
  19459. function ForStatement$1(node) {
  19460. this.word("for");
  19461. this.space();
  19462. this.token("(");
  19463. this.inForStatementInitCounter++;
  19464. this.print(node.init, node);
  19465. this.inForStatementInitCounter--;
  19466. this.token(";");
  19467. if (node.test) {
  19468. this.space();
  19469. this.print(node.test, node);
  19470. }
  19471. this.token(";");
  19472. if (node.update) {
  19473. this.space();
  19474. this.print(node.update, node);
  19475. }
  19476. this.token(")");
  19477. this.printBlock(node);
  19478. }
  19479. function WhileStatement$1(node) {
  19480. this.word("while");
  19481. this.space();
  19482. this.token("(");
  19483. this.print(node.test, node);
  19484. this.token(")");
  19485. this.printBlock(node);
  19486. }
  19487. var buildForXStatement = function buildForXStatement(op) {
  19488. return function (node) {
  19489. this.word("for");
  19490. this.space();
  19491. if (op === "of" && node["await"]) {
  19492. this.word("await");
  19493. this.space();
  19494. }
  19495. this.token("(");
  19496. this.print(node.left, node);
  19497. this.space();
  19498. this.word(op);
  19499. this.space();
  19500. this.print(node.right, node);
  19501. this.token(")");
  19502. this.printBlock(node);
  19503. };
  19504. };
  19505. var ForInStatement$1 = buildForXStatement("in");
  19506. var ForOfStatement$1 = buildForXStatement("of");
  19507. function DoWhileStatement$1(node) {
  19508. this.word("do");
  19509. this.space();
  19510. this.print(node.body, node);
  19511. this.space();
  19512. this.word("while");
  19513. this.space();
  19514. this.token("(");
  19515. this.print(node.test, node);
  19516. this.token(")");
  19517. this.semicolon();
  19518. }
  19519. function buildLabelStatement(prefix, key) {
  19520. if (key === void 0) {
  19521. key = "label";
  19522. }
  19523. return function (node) {
  19524. this.word(prefix);
  19525. var label = node[key];
  19526. if (label) {
  19527. this.space();
  19528. var isLabel = key == "label";
  19529. var terminatorState = this.startTerminatorless(isLabel);
  19530. this.print(label, node);
  19531. this.endTerminatorless(terminatorState);
  19532. }
  19533. this.semicolon();
  19534. };
  19535. }
  19536. var ContinueStatement$1 = buildLabelStatement("continue");
  19537. var ReturnStatement$1 = buildLabelStatement("return", "argument");
  19538. var BreakStatement$1 = buildLabelStatement("break");
  19539. var ThrowStatement$1 = buildLabelStatement("throw", "argument");
  19540. function LabeledStatement$1(node) {
  19541. this.print(node.label, node);
  19542. this.token(":");
  19543. this.space();
  19544. this.print(node.body, node);
  19545. }
  19546. function TryStatement$1(node) {
  19547. this.word("try");
  19548. this.space();
  19549. this.print(node.block, node);
  19550. this.space();
  19551. if (node.handlers) {
  19552. this.print(node.handlers[0], node);
  19553. } else {
  19554. this.print(node.handler, node);
  19555. }
  19556. if (node.finalizer) {
  19557. this.space();
  19558. this.word("finally");
  19559. this.space();
  19560. this.print(node.finalizer, node);
  19561. }
  19562. }
  19563. function CatchClause$1(node) {
  19564. this.word("catch");
  19565. this.space();
  19566. if (node.param) {
  19567. this.token("(");
  19568. this.print(node.param, node);
  19569. this.token(")");
  19570. this.space();
  19571. }
  19572. this.print(node.body, node);
  19573. }
  19574. function SwitchStatement$1(node) {
  19575. this.word("switch");
  19576. this.space();
  19577. this.token("(");
  19578. this.print(node.discriminant, node);
  19579. this.token(")");
  19580. this.space();
  19581. this.token("{");
  19582. this.printSequence(node.cases, node, {
  19583. indent: true,
  19584. addNewlines: function addNewlines(leading, cas) {
  19585. if (!leading && node.cases[node.cases.length - 1] === cas) return -1;
  19586. }
  19587. });
  19588. this.token("}");
  19589. }
  19590. function SwitchCase$1(node) {
  19591. if (node.test) {
  19592. this.word("case");
  19593. this.space();
  19594. this.print(node.test, node);
  19595. this.token(":");
  19596. } else {
  19597. this.word("default");
  19598. this.token(":");
  19599. }
  19600. if (node.consequent.length) {
  19601. this.newline();
  19602. this.printSequence(node.consequent, node, {
  19603. indent: true
  19604. });
  19605. }
  19606. }
  19607. function DebuggerStatement$1() {
  19608. this.word("debugger");
  19609. this.semicolon();
  19610. }
  19611. function variableDeclarationIndent() {
  19612. this.token(",");
  19613. this.newline();
  19614. if (this.endsWith("\n")) for (var i = 0; i < 4; i++) {
  19615. this.space(true);
  19616. }
  19617. }
  19618. function constDeclarationIndent() {
  19619. this.token(",");
  19620. this.newline();
  19621. if (this.endsWith("\n")) for (var i = 0; i < 6; i++) {
  19622. this.space(true);
  19623. }
  19624. }
  19625. function VariableDeclaration$1(node, parent) {
  19626. if (node.declare) {
  19627. this.word("declare");
  19628. this.space();
  19629. }
  19630. this.word(node.kind);
  19631. this.space();
  19632. var hasInits = false;
  19633. if (!isFor(parent)) {
  19634. for (var _i = 0, _arr = node.declarations; _i < _arr.length; _i++) {
  19635. var declar = _arr[_i];
  19636. if (declar.init) {
  19637. hasInits = true;
  19638. }
  19639. }
  19640. }
  19641. var separator;
  19642. if (hasInits) {
  19643. separator = node.kind === "const" ? constDeclarationIndent : variableDeclarationIndent;
  19644. }
  19645. this.printList(node.declarations, node, {
  19646. separator: separator
  19647. });
  19648. if (isFor(parent)) {
  19649. if (parent.left === node || parent.init === node) return;
  19650. }
  19651. this.semicolon();
  19652. }
  19653. function VariableDeclarator$1(node) {
  19654. this.print(node.id, node);
  19655. if (node.definite) this.token("!");
  19656. this.print(node.id.typeAnnotation, node);
  19657. if (node.init) {
  19658. this.space();
  19659. this.token("=");
  19660. this.space();
  19661. this.print(node.init, node);
  19662. }
  19663. }
  19664. function ClassDeclaration$1(node, parent) {
  19665. if (!this.format.decoratorsBeforeExport || !isExportDefaultDeclaration(parent) && !isExportNamedDeclaration(parent)) {
  19666. this.printJoin(node.decorators, node);
  19667. }
  19668. if (node.declare) {
  19669. this.word("declare");
  19670. this.space();
  19671. }
  19672. if (node["abstract"]) {
  19673. this.word("abstract");
  19674. this.space();
  19675. }
  19676. this.word("class");
  19677. if (node.id) {
  19678. this.space();
  19679. this.print(node.id, node);
  19680. }
  19681. this.print(node.typeParameters, node);
  19682. if (node.superClass) {
  19683. this.space();
  19684. this.word("extends");
  19685. this.space();
  19686. this.print(node.superClass, node);
  19687. this.print(node.superTypeParameters, node);
  19688. }
  19689. if (node["implements"]) {
  19690. this.space();
  19691. this.word("implements");
  19692. this.space();
  19693. this.printList(node["implements"], node);
  19694. }
  19695. this.space();
  19696. this.print(node.body, node);
  19697. }
  19698. function ClassBody$1(node) {
  19699. this.token("{");
  19700. this.printInnerComments(node);
  19701. if (node.body.length === 0) {
  19702. this.token("}");
  19703. } else {
  19704. this.newline();
  19705. this.indent();
  19706. this.printSequence(node.body, node);
  19707. this.dedent();
  19708. if (!this.endsWith("\n")) this.newline();
  19709. this.rightBrace();
  19710. }
  19711. }
  19712. function ClassProperty$1(node) {
  19713. this.printJoin(node.decorators, node);
  19714. this.tsPrintClassMemberModifiers(node, true);
  19715. if (node.computed) {
  19716. this.token("[");
  19717. this.print(node.key, node);
  19718. this.token("]");
  19719. } else {
  19720. this._variance(node);
  19721. this.print(node.key, node);
  19722. }
  19723. if (node.optional) {
  19724. this.token("?");
  19725. }
  19726. if (node.definite) {
  19727. this.token("!");
  19728. }
  19729. this.print(node.typeAnnotation, node);
  19730. if (node.value) {
  19731. this.space();
  19732. this.token("=");
  19733. this.space();
  19734. this.print(node.value, node);
  19735. }
  19736. this.semicolon();
  19737. }
  19738. function ClassPrivateProperty$1(node) {
  19739. if (node["static"]) {
  19740. this.word("static");
  19741. this.space();
  19742. }
  19743. this.print(node.key, node);
  19744. this.print(node.typeAnnotation, node);
  19745. if (node.value) {
  19746. this.space();
  19747. this.token("=");
  19748. this.space();
  19749. this.print(node.value, node);
  19750. }
  19751. this.semicolon();
  19752. }
  19753. function ClassMethod$1(node) {
  19754. this._classMethodHead(node);
  19755. this.space();
  19756. this.print(node.body, node);
  19757. }
  19758. function ClassPrivateMethod$1(node) {
  19759. this._classMethodHead(node);
  19760. this.space();
  19761. this.print(node.body, node);
  19762. }
  19763. function _classMethodHead(node) {
  19764. this.printJoin(node.decorators, node);
  19765. this.tsPrintClassMemberModifiers(node, false);
  19766. this._methodHead(node);
  19767. }
  19768. function _params(node) {
  19769. this.print(node.typeParameters, node);
  19770. this.token("(");
  19771. this._parameters(node.params, node);
  19772. this.token(")");
  19773. this.print(node.returnType, node);
  19774. }
  19775. function _parameters(parameters, parent) {
  19776. for (var i = 0; i < parameters.length; i++) {
  19777. this._param(parameters[i], parent);
  19778. if (i < parameters.length - 1) {
  19779. this.token(",");
  19780. this.space();
  19781. }
  19782. }
  19783. }
  19784. function _param(parameter, parent) {
  19785. this.printJoin(parameter.decorators, parameter);
  19786. this.print(parameter, parent);
  19787. if (parameter.optional) this.token("?");
  19788. this.print(parameter.typeAnnotation, parameter);
  19789. }
  19790. function _methodHead(node) {
  19791. var kind = node.kind;
  19792. var key = node.key;
  19793. if (kind === "get" || kind === "set") {
  19794. this.word(kind);
  19795. this.space();
  19796. }
  19797. if (node.async) {
  19798. this.word("async");
  19799. this.space();
  19800. }
  19801. if (kind === "method" || kind === "init") {
  19802. if (node.generator) {
  19803. this.token("*");
  19804. }
  19805. }
  19806. if (node.computed) {
  19807. this.token("[");
  19808. this.print(key, node);
  19809. this.token("]");
  19810. } else {
  19811. this.print(key, node);
  19812. }
  19813. if (node.optional) {
  19814. this.token("?");
  19815. }
  19816. this._params(node);
  19817. }
  19818. function _predicate(node) {
  19819. if (node.predicate) {
  19820. if (!node.returnType) {
  19821. this.token(":");
  19822. }
  19823. this.space();
  19824. this.print(node.predicate, node);
  19825. }
  19826. }
  19827. function _functionHead(node) {
  19828. if (node.async) {
  19829. this.word("async");
  19830. this.space();
  19831. }
  19832. this.word("function");
  19833. if (node.generator) this.token("*");
  19834. this.space();
  19835. if (node.id) {
  19836. this.print(node.id, node);
  19837. }
  19838. this._params(node);
  19839. this._predicate(node);
  19840. }
  19841. function FunctionExpression$2(node) {
  19842. this._functionHead(node);
  19843. this.space();
  19844. this.print(node.body, node);
  19845. }
  19846. function ArrowFunctionExpression$2(node) {
  19847. if (node.async) {
  19848. this.word("async");
  19849. this.space();
  19850. }
  19851. var firstParam = node.params[0];
  19852. if (node.params.length === 1 && isIdentifier(firstParam) && !hasTypes(node, firstParam)) {
  19853. if (this.format.retainLines && node.loc && node.body.loc && node.loc.start.line < node.body.loc.start.line) {
  19854. this.token("(");
  19855. if (firstParam.loc && firstParam.loc.start.line > node.loc.start.line) {
  19856. this.indent();
  19857. this.print(firstParam, node);
  19858. this.dedent();
  19859. this._catchUp("start", node.body.loc);
  19860. } else {
  19861. this.print(firstParam, node);
  19862. }
  19863. this.token(")");
  19864. } else {
  19865. this.print(firstParam, node);
  19866. }
  19867. } else {
  19868. this._params(node);
  19869. }
  19870. this._predicate(node);
  19871. this.space();
  19872. this.token("=>");
  19873. this.space();
  19874. this.print(node.body, node);
  19875. }
  19876. function hasTypes(node, param) {
  19877. return node.typeParameters || node.returnType || param.typeAnnotation || param.optional || param.trailingComments;
  19878. }
  19879. function ImportSpecifier$1(node) {
  19880. if (node.importKind === "type" || node.importKind === "typeof") {
  19881. this.word(node.importKind);
  19882. this.space();
  19883. }
  19884. this.print(node.imported, node);
  19885. if (node.local && node.local.name !== node.imported.name) {
  19886. this.space();
  19887. this.word("as");
  19888. this.space();
  19889. this.print(node.local, node);
  19890. }
  19891. }
  19892. function ImportDefaultSpecifier$1(node) {
  19893. this.print(node.local, node);
  19894. }
  19895. function ExportDefaultSpecifier$1(node) {
  19896. this.print(node.exported, node);
  19897. }
  19898. function ExportSpecifier$1(node) {
  19899. this.print(node.local, node);
  19900. if (node.exported && node.local.name !== node.exported.name) {
  19901. this.space();
  19902. this.word("as");
  19903. this.space();
  19904. this.print(node.exported, node);
  19905. }
  19906. }
  19907. function ExportNamespaceSpecifier$1(node) {
  19908. this.token("*");
  19909. this.space();
  19910. this.word("as");
  19911. this.space();
  19912. this.print(node.exported, node);
  19913. }
  19914. function ExportAllDeclaration$1(node) {
  19915. this.word("export");
  19916. this.space();
  19917. if (node.exportKind === "type") {
  19918. this.word("type");
  19919. this.space();
  19920. }
  19921. this.token("*");
  19922. this.space();
  19923. this.word("from");
  19924. this.space();
  19925. this.print(node.source, node);
  19926. this.semicolon();
  19927. }
  19928. function ExportNamedDeclaration$1(node) {
  19929. if (this.format.decoratorsBeforeExport && isClassDeclaration(node.declaration)) {
  19930. this.printJoin(node.declaration.decorators, node);
  19931. }
  19932. this.word("export");
  19933. this.space();
  19934. ExportDeclaration.apply(this, arguments);
  19935. }
  19936. function ExportDefaultDeclaration$1(node) {
  19937. if (this.format.decoratorsBeforeExport && isClassDeclaration(node.declaration)) {
  19938. this.printJoin(node.declaration.decorators, node);
  19939. }
  19940. this.word("export");
  19941. this.space();
  19942. this.word("default");
  19943. this.space();
  19944. ExportDeclaration.apply(this, arguments);
  19945. }
  19946. function ExportDeclaration(node) {
  19947. if (node.declaration) {
  19948. var declar = node.declaration;
  19949. this.print(declar, node);
  19950. if (!isStatement(declar)) this.semicolon();
  19951. } else {
  19952. if (node.exportKind === "type") {
  19953. this.word("type");
  19954. this.space();
  19955. }
  19956. var specifiers = node.specifiers.slice(0);
  19957. var hasSpecial = false;
  19958. while (true) {
  19959. var first = specifiers[0];
  19960. if (isExportDefaultSpecifier(first) || isExportNamespaceSpecifier(first)) {
  19961. hasSpecial = true;
  19962. this.print(specifiers.shift(), node);
  19963. if (specifiers.length) {
  19964. this.token(",");
  19965. this.space();
  19966. }
  19967. } else {
  19968. break;
  19969. }
  19970. }
  19971. if (specifiers.length || !specifiers.length && !hasSpecial) {
  19972. this.token("{");
  19973. if (specifiers.length) {
  19974. this.space();
  19975. this.printList(specifiers, node);
  19976. this.space();
  19977. }
  19978. this.token("}");
  19979. }
  19980. if (node.source) {
  19981. this.space();
  19982. this.word("from");
  19983. this.space();
  19984. this.print(node.source, node);
  19985. }
  19986. this.semicolon();
  19987. }
  19988. }
  19989. function ImportDeclaration$1(node) {
  19990. this.word("import");
  19991. this.space();
  19992. if (node.importKind === "type" || node.importKind === "typeof") {
  19993. this.word(node.importKind);
  19994. this.space();
  19995. }
  19996. var specifiers = node.specifiers.slice(0);
  19997. if (specifiers && specifiers.length) {
  19998. while (true) {
  19999. var first = specifiers[0];
  20000. if (isImportDefaultSpecifier(first) || isImportNamespaceSpecifier(first)) {
  20001. this.print(specifiers.shift(), node);
  20002. if (specifiers.length) {
  20003. this.token(",");
  20004. this.space();
  20005. }
  20006. } else {
  20007. break;
  20008. }
  20009. }
  20010. if (specifiers.length) {
  20011. this.token("{");
  20012. this.space();
  20013. this.printList(specifiers, node);
  20014. this.space();
  20015. this.token("}");
  20016. }
  20017. this.space();
  20018. this.word("from");
  20019. this.space();
  20020. }
  20021. this.print(node.source, node);
  20022. this.semicolon();
  20023. }
  20024. function ImportNamespaceSpecifier$1(node) {
  20025. this.token("*");
  20026. this.space();
  20027. this.word("as");
  20028. this.space();
  20029. this.print(node.local, node);
  20030. }
  20031. var lookup = [];
  20032. var revLookup = [];
  20033. var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;
  20034. var inited = false;
  20035. function init() {
  20036. inited = true;
  20037. var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
  20038. for (var i = 0, len = code.length; i < len; ++i) {
  20039. lookup[i] = code[i];
  20040. revLookup[code.charCodeAt(i)] = i;
  20041. }
  20042. revLookup['-'.charCodeAt(0)] = 62;
  20043. revLookup['_'.charCodeAt(0)] = 63;
  20044. }
  20045. function toByteArray(b64) {
  20046. if (!inited) {
  20047. init();
  20048. }
  20049. var i, j, l, tmp, placeHolders, arr;
  20050. var len = b64.length;
  20051. if (len % 4 > 0) {
  20052. throw new Error('Invalid string. Length must be a multiple of 4');
  20053. }
  20054. placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0;
  20055. arr = new Arr(len * 3 / 4 - placeHolders);
  20056. l = placeHolders > 0 ? len - 4 : len;
  20057. var L = 0;
  20058. for (i = 0, j = 0; i < l; i += 4, j += 3) {
  20059. tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];
  20060. arr[L++] = tmp >> 16 & 0xFF;
  20061. arr[L++] = tmp >> 8 & 0xFF;
  20062. arr[L++] = tmp & 0xFF;
  20063. }
  20064. if (placeHolders === 2) {
  20065. tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;
  20066. arr[L++] = tmp & 0xFF;
  20067. } else if (placeHolders === 1) {
  20068. tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;
  20069. arr[L++] = tmp >> 8 & 0xFF;
  20070. arr[L++] = tmp & 0xFF;
  20071. }
  20072. return arr;
  20073. }
  20074. function tripletToBase64(num) {
  20075. return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F];
  20076. }
  20077. function encodeChunk(uint8, start, end) {
  20078. var tmp;
  20079. var output = [];
  20080. for (var i = start; i < end; i += 3) {
  20081. tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + uint8[i + 2];
  20082. output.push(tripletToBase64(tmp));
  20083. }
  20084. return output.join('');
  20085. }
  20086. function fromByteArray(uint8) {
  20087. if (!inited) {
  20088. init();
  20089. }
  20090. var tmp;
  20091. var len = uint8.length;
  20092. var extraBytes = len % 3;
  20093. var output = '';
  20094. var parts = [];
  20095. var maxChunkLength = 16383;
  20096. for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
  20097. parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));
  20098. }
  20099. if (extraBytes === 1) {
  20100. tmp = uint8[len - 1];
  20101. output += lookup[tmp >> 2];
  20102. output += lookup[tmp << 4 & 0x3F];
  20103. output += '==';
  20104. } else if (extraBytes === 2) {
  20105. tmp = (uint8[len - 2] << 8) + uint8[len - 1];
  20106. output += lookup[tmp >> 10];
  20107. output += lookup[tmp >> 4 & 0x3F];
  20108. output += lookup[tmp << 2 & 0x3F];
  20109. output += '=';
  20110. }
  20111. parts.push(output);
  20112. return parts.join('');
  20113. }
  20114. function read(buffer, offset, isLE, mLen, nBytes) {
  20115. var e, m;
  20116. var eLen = nBytes * 8 - mLen - 1;
  20117. var eMax = (1 << eLen) - 1;
  20118. var eBias = eMax >> 1;
  20119. var nBits = -7;
  20120. var i = isLE ? nBytes - 1 : 0;
  20121. var d = isLE ? -1 : 1;
  20122. var s = buffer[offset + i];
  20123. i += d;
  20124. e = s & (1 << -nBits) - 1;
  20125. s >>= -nBits;
  20126. nBits += eLen;
  20127. for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
  20128. m = e & (1 << -nBits) - 1;
  20129. e >>= -nBits;
  20130. nBits += mLen;
  20131. for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
  20132. if (e === 0) {
  20133. e = 1 - eBias;
  20134. } else if (e === eMax) {
  20135. return m ? NaN : (s ? -1 : 1) * Infinity;
  20136. } else {
  20137. m = m + Math.pow(2, mLen);
  20138. e = e - eBias;
  20139. }
  20140. return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
  20141. }
  20142. function write(buffer, value, offset, isLE, mLen, nBytes) {
  20143. var e, m, c;
  20144. var eLen = nBytes * 8 - mLen - 1;
  20145. var eMax = (1 << eLen) - 1;
  20146. var eBias = eMax >> 1;
  20147. var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
  20148. var i = isLE ? 0 : nBytes - 1;
  20149. var d = isLE ? 1 : -1;
  20150. var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
  20151. value = Math.abs(value);
  20152. if (isNaN(value) || value === Infinity) {
  20153. m = isNaN(value) ? 1 : 0;
  20154. e = eMax;
  20155. } else {
  20156. e = Math.floor(Math.log(value) / Math.LN2);
  20157. if (value * (c = Math.pow(2, -e)) < 1) {
  20158. e--;
  20159. c *= 2;
  20160. }
  20161. if (e + eBias >= 1) {
  20162. value += rt / c;
  20163. } else {
  20164. value += rt * Math.pow(2, 1 - eBias);
  20165. }
  20166. if (value * c >= 2) {
  20167. e++;
  20168. c /= 2;
  20169. }
  20170. if (e + eBias >= eMax) {
  20171. m = 0;
  20172. e = eMax;
  20173. } else if (e + eBias >= 1) {
  20174. m = (value * c - 1) * Math.pow(2, mLen);
  20175. e = e + eBias;
  20176. } else {
  20177. m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
  20178. e = 0;
  20179. }
  20180. }
  20181. for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
  20182. e = e << mLen | m;
  20183. eLen += mLen;
  20184. for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
  20185. buffer[offset + i - d] |= s * 128;
  20186. }
  20187. var toString$1 = {}.toString;
  20188. var isArray$1 = Array.isArray || function (arr) {
  20189. return toString$1.call(arr) == '[object Array]';
  20190. };
  20191. var INSPECT_MAX_BYTES = 50;
  20192. Buffer$1.TYPED_ARRAY_SUPPORT = global$1.TYPED_ARRAY_SUPPORT !== undefined ? global$1.TYPED_ARRAY_SUPPORT : true;
  20193. var _kMaxLength = kMaxLength();
  20194. function kMaxLength() {
  20195. return Buffer$1.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff;
  20196. }
  20197. function createBuffer(that, length) {
  20198. if (kMaxLength() < length) {
  20199. throw new RangeError('Invalid typed array length');
  20200. }
  20201. if (Buffer$1.TYPED_ARRAY_SUPPORT) {
  20202. that = new Uint8Array(length);
  20203. that.__proto__ = Buffer$1.prototype;
  20204. } else {
  20205. if (that === null) {
  20206. that = new Buffer$1(length);
  20207. }
  20208. that.length = length;
  20209. }
  20210. return that;
  20211. }
  20212. function Buffer$1(arg, encodingOrOffset, length) {
  20213. if (!Buffer$1.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer$1)) {
  20214. return new Buffer$1(arg, encodingOrOffset, length);
  20215. }
  20216. if (typeof arg === 'number') {
  20217. if (typeof encodingOrOffset === 'string') {
  20218. throw new Error('If encoding is specified then the first argument must be a string');
  20219. }
  20220. return allocUnsafe(this, arg);
  20221. }
  20222. return from(this, arg, encodingOrOffset, length);
  20223. }
  20224. Buffer$1.poolSize = 8192;
  20225. Buffer$1._augment = function (arr) {
  20226. arr.__proto__ = Buffer$1.prototype;
  20227. return arr;
  20228. };
  20229. function from(that, value, encodingOrOffset, length) {
  20230. if (typeof value === 'number') {
  20231. throw new TypeError('"value" argument must not be a number');
  20232. }
  20233. if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
  20234. return fromArrayBuffer(that, value, encodingOrOffset, length);
  20235. }
  20236. if (typeof value === 'string') {
  20237. return fromString(that, value, encodingOrOffset);
  20238. }
  20239. return fromObject(that, value);
  20240. }
  20241. Buffer$1.from = function (value, encodingOrOffset, length) {
  20242. return from(null, value, encodingOrOffset, length);
  20243. };
  20244. if (Buffer$1.TYPED_ARRAY_SUPPORT) {
  20245. Buffer$1.prototype.__proto__ = Uint8Array.prototype;
  20246. Buffer$1.__proto__ = Uint8Array;
  20247. }
  20248. function assertSize(size) {
  20249. if (typeof size !== 'number') {
  20250. throw new TypeError('"size" argument must be a number');
  20251. } else if (size < 0) {
  20252. throw new RangeError('"size" argument must not be negative');
  20253. }
  20254. }
  20255. function alloc(that, size, fill, encoding) {
  20256. assertSize(size);
  20257. if (size <= 0) {
  20258. return createBuffer(that, size);
  20259. }
  20260. if (fill !== undefined) {
  20261. return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill);
  20262. }
  20263. return createBuffer(that, size);
  20264. }
  20265. Buffer$1.alloc = function (size, fill, encoding) {
  20266. return alloc(null, size, fill, encoding);
  20267. };
  20268. function allocUnsafe(that, size) {
  20269. assertSize(size);
  20270. that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);
  20271. if (!Buffer$1.TYPED_ARRAY_SUPPORT) {
  20272. for (var i = 0; i < size; ++i) {
  20273. that[i] = 0;
  20274. }
  20275. }
  20276. return that;
  20277. }
  20278. Buffer$1.allocUnsafe = function (size) {
  20279. return allocUnsafe(null, size);
  20280. };
  20281. Buffer$1.allocUnsafeSlow = function (size) {
  20282. return allocUnsafe(null, size);
  20283. };
  20284. function fromString(that, string, encoding) {
  20285. if (typeof encoding !== 'string' || encoding === '') {
  20286. encoding = 'utf8';
  20287. }
  20288. if (!Buffer$1.isEncoding(encoding)) {
  20289. throw new TypeError('"encoding" must be a valid string encoding');
  20290. }
  20291. var length = byteLength(string, encoding) | 0;
  20292. that = createBuffer(that, length);
  20293. var actual = that.write(string, encoding);
  20294. if (actual !== length) {
  20295. that = that.slice(0, actual);
  20296. }
  20297. return that;
  20298. }
  20299. function fromArrayLike(that, array) {
  20300. var length = array.length < 0 ? 0 : checked(array.length) | 0;
  20301. that = createBuffer(that, length);
  20302. for (var i = 0; i < length; i += 1) {
  20303. that[i] = array[i] & 255;
  20304. }
  20305. return that;
  20306. }
  20307. function fromArrayBuffer(that, array, byteOffset, length) {
  20308. array.byteLength;
  20309. if (byteOffset < 0 || array.byteLength < byteOffset) {
  20310. throw new RangeError('\'offset\' is out of bounds');
  20311. }
  20312. if (array.byteLength < byteOffset + (length || 0)) {
  20313. throw new RangeError('\'length\' is out of bounds');
  20314. }
  20315. if (byteOffset === undefined && length === undefined) {
  20316. array = new Uint8Array(array);
  20317. } else if (length === undefined) {
  20318. array = new Uint8Array(array, byteOffset);
  20319. } else {
  20320. array = new Uint8Array(array, byteOffset, length);
  20321. }
  20322. if (Buffer$1.TYPED_ARRAY_SUPPORT) {
  20323. that = array;
  20324. that.__proto__ = Buffer$1.prototype;
  20325. } else {
  20326. that = fromArrayLike(that, array);
  20327. }
  20328. return that;
  20329. }
  20330. function fromObject(that, obj) {
  20331. if (internalIsBuffer(obj)) {
  20332. var len = checked(obj.length) | 0;
  20333. that = createBuffer(that, len);
  20334. if (that.length === 0) {
  20335. return that;
  20336. }
  20337. obj.copy(that, 0, 0, len);
  20338. return that;
  20339. }
  20340. if (obj) {
  20341. if (typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer || 'length' in obj) {
  20342. if (typeof obj.length !== 'number' || isnan(obj.length)) {
  20343. return createBuffer(that, 0);
  20344. }
  20345. return fromArrayLike(that, obj);
  20346. }
  20347. if (obj.type === 'Buffer' && isArray$1(obj.data)) {
  20348. return fromArrayLike(that, obj.data);
  20349. }
  20350. }
  20351. throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.');
  20352. }
  20353. function checked(length) {
  20354. if (length >= kMaxLength()) {
  20355. throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes');
  20356. }
  20357. return length | 0;
  20358. }
  20359. function SlowBuffer(length) {
  20360. if (+length != length) {
  20361. length = 0;
  20362. }
  20363. return Buffer$1.alloc(+length);
  20364. }
  20365. Buffer$1.isBuffer = isBuffer;
  20366. function internalIsBuffer(b) {
  20367. return !!(b != null && b._isBuffer);
  20368. }
  20369. Buffer$1.compare = function compare(a, b) {
  20370. if (!internalIsBuffer(a) || !internalIsBuffer(b)) {
  20371. throw new TypeError('Arguments must be Buffers');
  20372. }
  20373. if (a === b) return 0;
  20374. var x = a.length;
  20375. var y = b.length;
  20376. for (var i = 0, len = Math.min(x, y); i < len; ++i) {
  20377. if (a[i] !== b[i]) {
  20378. x = a[i];
  20379. y = b[i];
  20380. break;
  20381. }
  20382. }
  20383. if (x < y) return -1;
  20384. if (y < x) return 1;
  20385. return 0;
  20386. };
  20387. Buffer$1.isEncoding = function isEncoding(encoding) {
  20388. switch (String(encoding).toLowerCase()) {
  20389. case 'hex':
  20390. case 'utf8':
  20391. case 'utf-8':
  20392. case 'ascii':
  20393. case 'latin1':
  20394. case 'binary':
  20395. case 'base64':
  20396. case 'ucs2':
  20397. case 'ucs-2':
  20398. case 'utf16le':
  20399. case 'utf-16le':
  20400. return true;
  20401. default:
  20402. return false;
  20403. }
  20404. };
  20405. Buffer$1.concat = function concat(list, length) {
  20406. if (!isArray$1(list)) {
  20407. throw new TypeError('"list" argument must be an Array of Buffers');
  20408. }
  20409. if (list.length === 0) {
  20410. return Buffer$1.alloc(0);
  20411. }
  20412. var i;
  20413. if (length === undefined) {
  20414. length = 0;
  20415. for (i = 0; i < list.length; ++i) {
  20416. length += list[i].length;
  20417. }
  20418. }
  20419. var buffer = Buffer$1.allocUnsafe(length);
  20420. var pos = 0;
  20421. for (i = 0; i < list.length; ++i) {
  20422. var buf = list[i];
  20423. if (!internalIsBuffer(buf)) {
  20424. throw new TypeError('"list" argument must be an Array of Buffers');
  20425. }
  20426. buf.copy(buffer, pos);
  20427. pos += buf.length;
  20428. }
  20429. return buffer;
  20430. };
  20431. function byteLength(string, encoding) {
  20432. if (internalIsBuffer(string)) {
  20433. return string.length;
  20434. }
  20435. if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
  20436. return string.byteLength;
  20437. }
  20438. if (typeof string !== 'string') {
  20439. string = '' + string;
  20440. }
  20441. var len = string.length;
  20442. if (len === 0) return 0;
  20443. var loweredCase = false;
  20444. for (;;) {
  20445. switch (encoding) {
  20446. case 'ascii':
  20447. case 'latin1':
  20448. case 'binary':
  20449. return len;
  20450. case 'utf8':
  20451. case 'utf-8':
  20452. case undefined:
  20453. return utf8ToBytes(string).length;
  20454. case 'ucs2':
  20455. case 'ucs-2':
  20456. case 'utf16le':
  20457. case 'utf-16le':
  20458. return len * 2;
  20459. case 'hex':
  20460. return len >>> 1;
  20461. case 'base64':
  20462. return base64ToBytes(string).length;
  20463. default:
  20464. if (loweredCase) return utf8ToBytes(string).length;
  20465. encoding = ('' + encoding).toLowerCase();
  20466. loweredCase = true;
  20467. }
  20468. }
  20469. }
  20470. Buffer$1.byteLength = byteLength;
  20471. function slowToString(encoding, start, end) {
  20472. var loweredCase = false;
  20473. if (start === undefined || start < 0) {
  20474. start = 0;
  20475. }
  20476. if (start > this.length) {
  20477. return '';
  20478. }
  20479. if (end === undefined || end > this.length) {
  20480. end = this.length;
  20481. }
  20482. if (end <= 0) {
  20483. return '';
  20484. }
  20485. end >>>= 0;
  20486. start >>>= 0;
  20487. if (end <= start) {
  20488. return '';
  20489. }
  20490. if (!encoding) encoding = 'utf8';
  20491. while (true) {
  20492. switch (encoding) {
  20493. case 'hex':
  20494. return hexSlice(this, start, end);
  20495. case 'utf8':
  20496. case 'utf-8':
  20497. return utf8Slice(this, start, end);
  20498. case 'ascii':
  20499. return asciiSlice(this, start, end);
  20500. case 'latin1':
  20501. case 'binary':
  20502. return latin1Slice(this, start, end);
  20503. case 'base64':
  20504. return base64Slice(this, start, end);
  20505. case 'ucs2':
  20506. case 'ucs-2':
  20507. case 'utf16le':
  20508. case 'utf-16le':
  20509. return utf16leSlice(this, start, end);
  20510. default:
  20511. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
  20512. encoding = (encoding + '').toLowerCase();
  20513. loweredCase = true;
  20514. }
  20515. }
  20516. }
  20517. Buffer$1.prototype._isBuffer = true;
  20518. function swap$1(b, n, m) {
  20519. var i = b[n];
  20520. b[n] = b[m];
  20521. b[m] = i;
  20522. }
  20523. Buffer$1.prototype.swap16 = function swap16() {
  20524. var len = this.length;
  20525. if (len % 2 !== 0) {
  20526. throw new RangeError('Buffer size must be a multiple of 16-bits');
  20527. }
  20528. for (var i = 0; i < len; i += 2) {
  20529. swap$1(this, i, i + 1);
  20530. }
  20531. return this;
  20532. };
  20533. Buffer$1.prototype.swap32 = function swap32() {
  20534. var len = this.length;
  20535. if (len % 4 !== 0) {
  20536. throw new RangeError('Buffer size must be a multiple of 32-bits');
  20537. }
  20538. for (var i = 0; i < len; i += 4) {
  20539. swap$1(this, i, i + 3);
  20540. swap$1(this, i + 1, i + 2);
  20541. }
  20542. return this;
  20543. };
  20544. Buffer$1.prototype.swap64 = function swap64() {
  20545. var len = this.length;
  20546. if (len % 8 !== 0) {
  20547. throw new RangeError('Buffer size must be a multiple of 64-bits');
  20548. }
  20549. for (var i = 0; i < len; i += 8) {
  20550. swap$1(this, i, i + 7);
  20551. swap$1(this, i + 1, i + 6);
  20552. swap$1(this, i + 2, i + 5);
  20553. swap$1(this, i + 3, i + 4);
  20554. }
  20555. return this;
  20556. };
  20557. Buffer$1.prototype.toString = function toString() {
  20558. var length = this.length | 0;
  20559. if (length === 0) return '';
  20560. if (arguments.length === 0) return utf8Slice(this, 0, length);
  20561. return slowToString.apply(this, arguments);
  20562. };
  20563. Buffer$1.prototype.equals = function equals(b) {
  20564. if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer');
  20565. if (this === b) return true;
  20566. return Buffer$1.compare(this, b) === 0;
  20567. };
  20568. Buffer$1.prototype.inspect = function inspect() {
  20569. var str = '';
  20570. var max = INSPECT_MAX_BYTES;
  20571. if (this.length > 0) {
  20572. str = this.toString('hex', 0, max).match(/.{2}/g).join(' ');
  20573. if (this.length > max) str += ' ... ';
  20574. }
  20575. return '<Buffer ' + str + '>';
  20576. };
  20577. Buffer$1.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {
  20578. if (!internalIsBuffer(target)) {
  20579. throw new TypeError('Argument must be a Buffer');
  20580. }
  20581. if (start === undefined) {
  20582. start = 0;
  20583. }
  20584. if (end === undefined) {
  20585. end = target ? target.length : 0;
  20586. }
  20587. if (thisStart === undefined) {
  20588. thisStart = 0;
  20589. }
  20590. if (thisEnd === undefined) {
  20591. thisEnd = this.length;
  20592. }
  20593. if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
  20594. throw new RangeError('out of range index');
  20595. }
  20596. if (thisStart >= thisEnd && start >= end) {
  20597. return 0;
  20598. }
  20599. if (thisStart >= thisEnd) {
  20600. return -1;
  20601. }
  20602. if (start >= end) {
  20603. return 1;
  20604. }
  20605. start >>>= 0;
  20606. end >>>= 0;
  20607. thisStart >>>= 0;
  20608. thisEnd >>>= 0;
  20609. if (this === target) return 0;
  20610. var x = thisEnd - thisStart;
  20611. var y = end - start;
  20612. var len = Math.min(x, y);
  20613. var thisCopy = this.slice(thisStart, thisEnd);
  20614. var targetCopy = target.slice(start, end);
  20615. for (var i = 0; i < len; ++i) {
  20616. if (thisCopy[i] !== targetCopy[i]) {
  20617. x = thisCopy[i];
  20618. y = targetCopy[i];
  20619. break;
  20620. }
  20621. }
  20622. if (x < y) return -1;
  20623. if (y < x) return 1;
  20624. return 0;
  20625. };
  20626. function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
  20627. if (buffer.length === 0) return -1;
  20628. if (typeof byteOffset === 'string') {
  20629. encoding = byteOffset;
  20630. byteOffset = 0;
  20631. } else if (byteOffset > 0x7fffffff) {
  20632. byteOffset = 0x7fffffff;
  20633. } else if (byteOffset < -0x80000000) {
  20634. byteOffset = -0x80000000;
  20635. }
  20636. byteOffset = +byteOffset;
  20637. if (isNaN(byteOffset)) {
  20638. byteOffset = dir ? 0 : buffer.length - 1;
  20639. }
  20640. if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
  20641. if (byteOffset >= buffer.length) {
  20642. if (dir) return -1;else byteOffset = buffer.length - 1;
  20643. } else if (byteOffset < 0) {
  20644. if (dir) byteOffset = 0;else return -1;
  20645. }
  20646. if (typeof val === 'string') {
  20647. val = Buffer$1.from(val, encoding);
  20648. }
  20649. if (internalIsBuffer(val)) {
  20650. if (val.length === 0) {
  20651. return -1;
  20652. }
  20653. return arrayIndexOf(buffer, val, byteOffset, encoding, dir);
  20654. } else if (typeof val === 'number') {
  20655. val = val & 0xFF;
  20656. if (Buffer$1.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') {
  20657. if (dir) {
  20658. return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);
  20659. } else {
  20660. return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);
  20661. }
  20662. }
  20663. return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);
  20664. }
  20665. throw new TypeError('val must be string, number or Buffer');
  20666. }
  20667. function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
  20668. var indexSize = 1;
  20669. var arrLength = arr.length;
  20670. var valLength = val.length;
  20671. if (encoding !== undefined) {
  20672. encoding = String(encoding).toLowerCase();
  20673. if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') {
  20674. if (arr.length < 2 || val.length < 2) {
  20675. return -1;
  20676. }
  20677. indexSize = 2;
  20678. arrLength /= 2;
  20679. valLength /= 2;
  20680. byteOffset /= 2;
  20681. }
  20682. }
  20683. function read(buf, i) {
  20684. if (indexSize === 1) {
  20685. return buf[i];
  20686. } else {
  20687. return buf.readUInt16BE(i * indexSize);
  20688. }
  20689. }
  20690. var i;
  20691. if (dir) {
  20692. var foundIndex = -1;
  20693. for (i = byteOffset; i < arrLength; i++) {
  20694. if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
  20695. if (foundIndex === -1) foundIndex = i;
  20696. if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
  20697. } else {
  20698. if (foundIndex !== -1) i -= i - foundIndex;
  20699. foundIndex = -1;
  20700. }
  20701. }
  20702. } else {
  20703. if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
  20704. for (i = byteOffset; i >= 0; i--) {
  20705. var found = true;
  20706. for (var j = 0; j < valLength; j++) {
  20707. if (read(arr, i + j) !== read(val, j)) {
  20708. found = false;
  20709. break;
  20710. }
  20711. }
  20712. if (found) return i;
  20713. }
  20714. }
  20715. return -1;
  20716. }
  20717. Buffer$1.prototype.includes = function includes(val, byteOffset, encoding) {
  20718. return this.indexOf(val, byteOffset, encoding) !== -1;
  20719. };
  20720. Buffer$1.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
  20721. return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
  20722. };
  20723. Buffer$1.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
  20724. return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
  20725. };
  20726. function hexWrite(buf, string, offset, length) {
  20727. offset = Number(offset) || 0;
  20728. var remaining = buf.length - offset;
  20729. if (!length) {
  20730. length = remaining;
  20731. } else {
  20732. length = Number(length);
  20733. if (length > remaining) {
  20734. length = remaining;
  20735. }
  20736. }
  20737. var strLen = string.length;
  20738. if (strLen % 2 !== 0) throw new TypeError('Invalid hex string');
  20739. if (length > strLen / 2) {
  20740. length = strLen / 2;
  20741. }
  20742. for (var i = 0; i < length; ++i) {
  20743. var parsed = parseInt(string.substr(i * 2, 2), 16);
  20744. if (isNaN(parsed)) return i;
  20745. buf[offset + i] = parsed;
  20746. }
  20747. return i;
  20748. }
  20749. function utf8Write(buf, string, offset, length) {
  20750. return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
  20751. }
  20752. function asciiWrite(buf, string, offset, length) {
  20753. return blitBuffer(asciiToBytes(string), buf, offset, length);
  20754. }
  20755. function latin1Write(buf, string, offset, length) {
  20756. return asciiWrite(buf, string, offset, length);
  20757. }
  20758. function base64Write(buf, string, offset, length) {
  20759. return blitBuffer(base64ToBytes(string), buf, offset, length);
  20760. }
  20761. function ucs2Write(buf, string, offset, length) {
  20762. return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
  20763. }
  20764. Buffer$1.prototype.write = function write(string, offset, length, encoding) {
  20765. if (offset === undefined) {
  20766. encoding = 'utf8';
  20767. length = this.length;
  20768. offset = 0;
  20769. } else if (length === undefined && typeof offset === 'string') {
  20770. encoding = offset;
  20771. length = this.length;
  20772. offset = 0;
  20773. } else if (isFinite(offset)) {
  20774. offset = offset | 0;
  20775. if (isFinite(length)) {
  20776. length = length | 0;
  20777. if (encoding === undefined) encoding = 'utf8';
  20778. } else {
  20779. encoding = length;
  20780. length = undefined;
  20781. }
  20782. } else {
  20783. throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');
  20784. }
  20785. var remaining = this.length - offset;
  20786. if (length === undefined || length > remaining) length = remaining;
  20787. if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
  20788. throw new RangeError('Attempt to write outside buffer bounds');
  20789. }
  20790. if (!encoding) encoding = 'utf8';
  20791. var loweredCase = false;
  20792. for (;;) {
  20793. switch (encoding) {
  20794. case 'hex':
  20795. return hexWrite(this, string, offset, length);
  20796. case 'utf8':
  20797. case 'utf-8':
  20798. return utf8Write(this, string, offset, length);
  20799. case 'ascii':
  20800. return asciiWrite(this, string, offset, length);
  20801. case 'latin1':
  20802. case 'binary':
  20803. return latin1Write(this, string, offset, length);
  20804. case 'base64':
  20805. return base64Write(this, string, offset, length);
  20806. case 'ucs2':
  20807. case 'ucs-2':
  20808. case 'utf16le':
  20809. case 'utf-16le':
  20810. return ucs2Write(this, string, offset, length);
  20811. default:
  20812. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
  20813. encoding = ('' + encoding).toLowerCase();
  20814. loweredCase = true;
  20815. }
  20816. }
  20817. };
  20818. Buffer$1.prototype.toJSON = function toJSON() {
  20819. return {
  20820. type: 'Buffer',
  20821. data: Array.prototype.slice.call(this._arr || this, 0)
  20822. };
  20823. };
  20824. function base64Slice(buf, start, end) {
  20825. if (start === 0 && end === buf.length) {
  20826. return fromByteArray(buf);
  20827. } else {
  20828. return fromByteArray(buf.slice(start, end));
  20829. }
  20830. }
  20831. function utf8Slice(buf, start, end) {
  20832. end = Math.min(buf.length, end);
  20833. var res = [];
  20834. var i = start;
  20835. while (i < end) {
  20836. var firstByte = buf[i];
  20837. var codePoint = null;
  20838. var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;
  20839. if (i + bytesPerSequence <= end) {
  20840. var secondByte, thirdByte, fourthByte, tempCodePoint;
  20841. switch (bytesPerSequence) {
  20842. case 1:
  20843. if (firstByte < 0x80) {
  20844. codePoint = firstByte;
  20845. }
  20846. break;
  20847. case 2:
  20848. secondByte = buf[i + 1];
  20849. if ((secondByte & 0xC0) === 0x80) {
  20850. tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F;
  20851. if (tempCodePoint > 0x7F) {
  20852. codePoint = tempCodePoint;
  20853. }
  20854. }
  20855. break;
  20856. case 3:
  20857. secondByte = buf[i + 1];
  20858. thirdByte = buf[i + 2];
  20859. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
  20860. tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F;
  20861. if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
  20862. codePoint = tempCodePoint;
  20863. }
  20864. }
  20865. break;
  20866. case 4:
  20867. secondByte = buf[i + 1];
  20868. thirdByte = buf[i + 2];
  20869. fourthByte = buf[i + 3];
  20870. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
  20871. tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F;
  20872. if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
  20873. codePoint = tempCodePoint;
  20874. }
  20875. }
  20876. }
  20877. }
  20878. if (codePoint === null) {
  20879. codePoint = 0xFFFD;
  20880. bytesPerSequence = 1;
  20881. } else if (codePoint > 0xFFFF) {
  20882. codePoint -= 0x10000;
  20883. res.push(codePoint >>> 10 & 0x3FF | 0xD800);
  20884. codePoint = 0xDC00 | codePoint & 0x3FF;
  20885. }
  20886. res.push(codePoint);
  20887. i += bytesPerSequence;
  20888. }
  20889. return decodeCodePointsArray(res);
  20890. }
  20891. var MAX_ARGUMENTS_LENGTH = 0x1000;
  20892. function decodeCodePointsArray(codePoints) {
  20893. var len = codePoints.length;
  20894. if (len <= MAX_ARGUMENTS_LENGTH) {
  20895. return String.fromCharCode.apply(String, codePoints);
  20896. }
  20897. var res = '';
  20898. var i = 0;
  20899. while (i < len) {
  20900. res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));
  20901. }
  20902. return res;
  20903. }
  20904. function asciiSlice(buf, start, end) {
  20905. var ret = '';
  20906. end = Math.min(buf.length, end);
  20907. for (var i = start; i < end; ++i) {
  20908. ret += String.fromCharCode(buf[i] & 0x7F);
  20909. }
  20910. return ret;
  20911. }
  20912. function latin1Slice(buf, start, end) {
  20913. var ret = '';
  20914. end = Math.min(buf.length, end);
  20915. for (var i = start; i < end; ++i) {
  20916. ret += String.fromCharCode(buf[i]);
  20917. }
  20918. return ret;
  20919. }
  20920. function hexSlice(buf, start, end) {
  20921. var len = buf.length;
  20922. if (!start || start < 0) start = 0;
  20923. if (!end || end < 0 || end > len) end = len;
  20924. var out = '';
  20925. for (var i = start; i < end; ++i) {
  20926. out += toHex(buf[i]);
  20927. }
  20928. return out;
  20929. }
  20930. function utf16leSlice(buf, start, end) {
  20931. var bytes = buf.slice(start, end);
  20932. var res = '';
  20933. for (var i = 0; i < bytes.length; i += 2) {
  20934. res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
  20935. }
  20936. return res;
  20937. }
  20938. Buffer$1.prototype.slice = function slice(start, end) {
  20939. var len = this.length;
  20940. start = ~~start;
  20941. end = end === undefined ? len : ~~end;
  20942. if (start < 0) {
  20943. start += len;
  20944. if (start < 0) start = 0;
  20945. } else if (start > len) {
  20946. start = len;
  20947. }
  20948. if (end < 0) {
  20949. end += len;
  20950. if (end < 0) end = 0;
  20951. } else if (end > len) {
  20952. end = len;
  20953. }
  20954. if (end < start) end = start;
  20955. var newBuf;
  20956. if (Buffer$1.TYPED_ARRAY_SUPPORT) {
  20957. newBuf = this.subarray(start, end);
  20958. newBuf.__proto__ = Buffer$1.prototype;
  20959. } else {
  20960. var sliceLen = end - start;
  20961. newBuf = new Buffer$1(sliceLen, undefined);
  20962. for (var i = 0; i < sliceLen; ++i) {
  20963. newBuf[i] = this[i + start];
  20964. }
  20965. }
  20966. return newBuf;
  20967. };
  20968. function checkOffset(offset, ext, length) {
  20969. if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');
  20970. if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');
  20971. }
  20972. Buffer$1.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {
  20973. offset = offset | 0;
  20974. byteLength = byteLength | 0;
  20975. if (!noAssert) checkOffset(offset, byteLength, this.length);
  20976. var val = this[offset];
  20977. var mul = 1;
  20978. var i = 0;
  20979. while (++i < byteLength && (mul *= 0x100)) {
  20980. val += this[offset + i] * mul;
  20981. }
  20982. return val;
  20983. };
  20984. Buffer$1.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {
  20985. offset = offset | 0;
  20986. byteLength = byteLength | 0;
  20987. if (!noAssert) {
  20988. checkOffset(offset, byteLength, this.length);
  20989. }
  20990. var val = this[offset + --byteLength];
  20991. var mul = 1;
  20992. while (byteLength > 0 && (mul *= 0x100)) {
  20993. val += this[offset + --byteLength] * mul;
  20994. }
  20995. return val;
  20996. };
  20997. Buffer$1.prototype.readUInt8 = function readUInt8(offset, noAssert) {
  20998. if (!noAssert) checkOffset(offset, 1, this.length);
  20999. return this[offset];
  21000. };
  21001. Buffer$1.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
  21002. if (!noAssert) checkOffset(offset, 2, this.length);
  21003. return this[offset] | this[offset + 1] << 8;
  21004. };
  21005. Buffer$1.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
  21006. if (!noAssert) checkOffset(offset, 2, this.length);
  21007. return this[offset] << 8 | this[offset + 1];
  21008. };
  21009. Buffer$1.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
  21010. if (!noAssert) checkOffset(offset, 4, this.length);
  21011. return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;
  21012. };
  21013. Buffer$1.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
  21014. if (!noAssert) checkOffset(offset, 4, this.length);
  21015. return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
  21016. };
  21017. Buffer$1.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {
  21018. offset = offset | 0;
  21019. byteLength = byteLength | 0;
  21020. if (!noAssert) checkOffset(offset, byteLength, this.length);
  21021. var val = this[offset];
  21022. var mul = 1;
  21023. var i = 0;
  21024. while (++i < byteLength && (mul *= 0x100)) {
  21025. val += this[offset + i] * mul;
  21026. }
  21027. mul *= 0x80;
  21028. if (val >= mul) val -= Math.pow(2, 8 * byteLength);
  21029. return val;
  21030. };
  21031. Buffer$1.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {
  21032. offset = offset | 0;
  21033. byteLength = byteLength | 0;
  21034. if (!noAssert) checkOffset(offset, byteLength, this.length);
  21035. var i = byteLength;
  21036. var mul = 1;
  21037. var val = this[offset + --i];
  21038. while (i > 0 && (mul *= 0x100)) {
  21039. val += this[offset + --i] * mul;
  21040. }
  21041. mul *= 0x80;
  21042. if (val >= mul) val -= Math.pow(2, 8 * byteLength);
  21043. return val;
  21044. };
  21045. Buffer$1.prototype.readInt8 = function readInt8(offset, noAssert) {
  21046. if (!noAssert) checkOffset(offset, 1, this.length);
  21047. if (!(this[offset] & 0x80)) return this[offset];
  21048. return (0xff - this[offset] + 1) * -1;
  21049. };
  21050. Buffer$1.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
  21051. if (!noAssert) checkOffset(offset, 2, this.length);
  21052. var val = this[offset] | this[offset + 1] << 8;
  21053. return val & 0x8000 ? val | 0xFFFF0000 : val;
  21054. };
  21055. Buffer$1.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
  21056. if (!noAssert) checkOffset(offset, 2, this.length);
  21057. var val = this[offset + 1] | this[offset] << 8;
  21058. return val & 0x8000 ? val | 0xFFFF0000 : val;
  21059. };
  21060. Buffer$1.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
  21061. if (!noAssert) checkOffset(offset, 4, this.length);
  21062. return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
  21063. };
  21064. Buffer$1.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
  21065. if (!noAssert) checkOffset(offset, 4, this.length);
  21066. return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
  21067. };
  21068. Buffer$1.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
  21069. if (!noAssert) checkOffset(offset, 4, this.length);
  21070. return read(this, offset, true, 23, 4);
  21071. };
  21072. Buffer$1.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
  21073. if (!noAssert) checkOffset(offset, 4, this.length);
  21074. return read(this, offset, false, 23, 4);
  21075. };
  21076. Buffer$1.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
  21077. if (!noAssert) checkOffset(offset, 8, this.length);
  21078. return read(this, offset, true, 52, 8);
  21079. };
  21080. Buffer$1.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
  21081. if (!noAssert) checkOffset(offset, 8, this.length);
  21082. return read(this, offset, false, 52, 8);
  21083. };
  21084. function checkInt(buf, value, offset, ext, max, min) {
  21085. if (!internalIsBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
  21086. if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
  21087. if (offset + ext > buf.length) throw new RangeError('Index out of range');
  21088. }
  21089. Buffer$1.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {
  21090. value = +value;
  21091. offset = offset | 0;
  21092. byteLength = byteLength | 0;
  21093. if (!noAssert) {
  21094. var maxBytes = Math.pow(2, 8 * byteLength) - 1;
  21095. checkInt(this, value, offset, byteLength, maxBytes, 0);
  21096. }
  21097. var mul = 1;
  21098. var i = 0;
  21099. this[offset] = value & 0xFF;
  21100. while (++i < byteLength && (mul *= 0x100)) {
  21101. this[offset + i] = value / mul & 0xFF;
  21102. }
  21103. return offset + byteLength;
  21104. };
  21105. Buffer$1.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {
  21106. value = +value;
  21107. offset = offset | 0;
  21108. byteLength = byteLength | 0;
  21109. if (!noAssert) {
  21110. var maxBytes = Math.pow(2, 8 * byteLength) - 1;
  21111. checkInt(this, value, offset, byteLength, maxBytes, 0);
  21112. }
  21113. var i = byteLength - 1;
  21114. var mul = 1;
  21115. this[offset + i] = value & 0xFF;
  21116. while (--i >= 0 && (mul *= 0x100)) {
  21117. this[offset + i] = value / mul & 0xFF;
  21118. }
  21119. return offset + byteLength;
  21120. };
  21121. Buffer$1.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
  21122. value = +value;
  21123. offset = offset | 0;
  21124. if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);
  21125. if (!Buffer$1.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
  21126. this[offset] = value & 0xff;
  21127. return offset + 1;
  21128. };
  21129. function objectWriteUInt16(buf, value, offset, littleEndian) {
  21130. if (value < 0) value = 0xffff + value + 1;
  21131. for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
  21132. buf[offset + i] = (value & 0xff << 8 * (littleEndian ? i : 1 - i)) >>> (littleEndian ? i : 1 - i) * 8;
  21133. }
  21134. }
  21135. Buffer$1.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
  21136. value = +value;
  21137. offset = offset | 0;
  21138. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
  21139. if (Buffer$1.TYPED_ARRAY_SUPPORT) {
  21140. this[offset] = value & 0xff;
  21141. this[offset + 1] = value >>> 8;
  21142. } else {
  21143. objectWriteUInt16(this, value, offset, true);
  21144. }
  21145. return offset + 2;
  21146. };
  21147. Buffer$1.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
  21148. value = +value;
  21149. offset = offset | 0;
  21150. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
  21151. if (Buffer$1.TYPED_ARRAY_SUPPORT) {
  21152. this[offset] = value >>> 8;
  21153. this[offset + 1] = value & 0xff;
  21154. } else {
  21155. objectWriteUInt16(this, value, offset, false);
  21156. }
  21157. return offset + 2;
  21158. };
  21159. function objectWriteUInt32(buf, value, offset, littleEndian) {
  21160. if (value < 0) value = 0xffffffff + value + 1;
  21161. for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
  21162. buf[offset + i] = value >>> (littleEndian ? i : 3 - i) * 8 & 0xff;
  21163. }
  21164. }
  21165. Buffer$1.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
  21166. value = +value;
  21167. offset = offset | 0;
  21168. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
  21169. if (Buffer$1.TYPED_ARRAY_SUPPORT) {
  21170. this[offset + 3] = value >>> 24;
  21171. this[offset + 2] = value >>> 16;
  21172. this[offset + 1] = value >>> 8;
  21173. this[offset] = value & 0xff;
  21174. } else {
  21175. objectWriteUInt32(this, value, offset, true);
  21176. }
  21177. return offset + 4;
  21178. };
  21179. Buffer$1.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
  21180. value = +value;
  21181. offset = offset | 0;
  21182. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
  21183. if (Buffer$1.TYPED_ARRAY_SUPPORT) {
  21184. this[offset] = value >>> 24;
  21185. this[offset + 1] = value >>> 16;
  21186. this[offset + 2] = value >>> 8;
  21187. this[offset + 3] = value & 0xff;
  21188. } else {
  21189. objectWriteUInt32(this, value, offset, false);
  21190. }
  21191. return offset + 4;
  21192. };
  21193. Buffer$1.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {
  21194. value = +value;
  21195. offset = offset | 0;
  21196. if (!noAssert) {
  21197. var limit = Math.pow(2, 8 * byteLength - 1);
  21198. checkInt(this, value, offset, byteLength, limit - 1, -limit);
  21199. }
  21200. var i = 0;
  21201. var mul = 1;
  21202. var sub = 0;
  21203. this[offset] = value & 0xFF;
  21204. while (++i < byteLength && (mul *= 0x100)) {
  21205. if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
  21206. sub = 1;
  21207. }
  21208. this[offset + i] = (value / mul >> 0) - sub & 0xFF;
  21209. }
  21210. return offset + byteLength;
  21211. };
  21212. Buffer$1.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {
  21213. value = +value;
  21214. offset = offset | 0;
  21215. if (!noAssert) {
  21216. var limit = Math.pow(2, 8 * byteLength - 1);
  21217. checkInt(this, value, offset, byteLength, limit - 1, -limit);
  21218. }
  21219. var i = byteLength - 1;
  21220. var mul = 1;
  21221. var sub = 0;
  21222. this[offset + i] = value & 0xFF;
  21223. while (--i >= 0 && (mul *= 0x100)) {
  21224. if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
  21225. sub = 1;
  21226. }
  21227. this[offset + i] = (value / mul >> 0) - sub & 0xFF;
  21228. }
  21229. return offset + byteLength;
  21230. };
  21231. Buffer$1.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
  21232. value = +value;
  21233. offset = offset | 0;
  21234. if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);
  21235. if (!Buffer$1.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
  21236. if (value < 0) value = 0xff + value + 1;
  21237. this[offset] = value & 0xff;
  21238. return offset + 1;
  21239. };
  21240. Buffer$1.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
  21241. value = +value;
  21242. offset = offset | 0;
  21243. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
  21244. if (Buffer$1.TYPED_ARRAY_SUPPORT) {
  21245. this[offset] = value & 0xff;
  21246. this[offset + 1] = value >>> 8;
  21247. } else {
  21248. objectWriteUInt16(this, value, offset, true);
  21249. }
  21250. return offset + 2;
  21251. };
  21252. Buffer$1.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
  21253. value = +value;
  21254. offset = offset | 0;
  21255. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
  21256. if (Buffer$1.TYPED_ARRAY_SUPPORT) {
  21257. this[offset] = value >>> 8;
  21258. this[offset + 1] = value & 0xff;
  21259. } else {
  21260. objectWriteUInt16(this, value, offset, false);
  21261. }
  21262. return offset + 2;
  21263. };
  21264. Buffer$1.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
  21265. value = +value;
  21266. offset = offset | 0;
  21267. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
  21268. if (Buffer$1.TYPED_ARRAY_SUPPORT) {
  21269. this[offset] = value & 0xff;
  21270. this[offset + 1] = value >>> 8;
  21271. this[offset + 2] = value >>> 16;
  21272. this[offset + 3] = value >>> 24;
  21273. } else {
  21274. objectWriteUInt32(this, value, offset, true);
  21275. }
  21276. return offset + 4;
  21277. };
  21278. Buffer$1.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
  21279. value = +value;
  21280. offset = offset | 0;
  21281. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
  21282. if (value < 0) value = 0xffffffff + value + 1;
  21283. if (Buffer$1.TYPED_ARRAY_SUPPORT) {
  21284. this[offset] = value >>> 24;
  21285. this[offset + 1] = value >>> 16;
  21286. this[offset + 2] = value >>> 8;
  21287. this[offset + 3] = value & 0xff;
  21288. } else {
  21289. objectWriteUInt32(this, value, offset, false);
  21290. }
  21291. return offset + 4;
  21292. };
  21293. function checkIEEE754(buf, value, offset, ext, max, min) {
  21294. if (offset + ext > buf.length) throw new RangeError('Index out of range');
  21295. if (offset < 0) throw new RangeError('Index out of range');
  21296. }
  21297. function writeFloat(buf, value, offset, littleEndian, noAssert) {
  21298. if (!noAssert) {
  21299. checkIEEE754(buf, value, offset, 4);
  21300. }
  21301. write(buf, value, offset, littleEndian, 23, 4);
  21302. return offset + 4;
  21303. }
  21304. Buffer$1.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {
  21305. return writeFloat(this, value, offset, true, noAssert);
  21306. };
  21307. Buffer$1.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {
  21308. return writeFloat(this, value, offset, false, noAssert);
  21309. };
  21310. function writeDouble(buf, value, offset, littleEndian, noAssert) {
  21311. if (!noAssert) {
  21312. checkIEEE754(buf, value, offset, 8);
  21313. }
  21314. write(buf, value, offset, littleEndian, 52, 8);
  21315. return offset + 8;
  21316. }
  21317. Buffer$1.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {
  21318. return writeDouble(this, value, offset, true, noAssert);
  21319. };
  21320. Buffer$1.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {
  21321. return writeDouble(this, value, offset, false, noAssert);
  21322. };
  21323. Buffer$1.prototype.copy = function copy(target, targetStart, start, end) {
  21324. if (!start) start = 0;
  21325. if (!end && end !== 0) end = this.length;
  21326. if (targetStart >= target.length) targetStart = target.length;
  21327. if (!targetStart) targetStart = 0;
  21328. if (end > 0 && end < start) end = start;
  21329. if (end === start) return 0;
  21330. if (target.length === 0 || this.length === 0) return 0;
  21331. if (targetStart < 0) {
  21332. throw new RangeError('targetStart out of bounds');
  21333. }
  21334. if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds');
  21335. if (end < 0) throw new RangeError('sourceEnd out of bounds');
  21336. if (end > this.length) end = this.length;
  21337. if (target.length - targetStart < end - start) {
  21338. end = target.length - targetStart + start;
  21339. }
  21340. var len = end - start;
  21341. var i;
  21342. if (this === target && start < targetStart && targetStart < end) {
  21343. for (i = len - 1; i >= 0; --i) {
  21344. target[i + targetStart] = this[i + start];
  21345. }
  21346. } else if (len < 1000 || !Buffer$1.TYPED_ARRAY_SUPPORT) {
  21347. for (i = 0; i < len; ++i) {
  21348. target[i + targetStart] = this[i + start];
  21349. }
  21350. } else {
  21351. Uint8Array.prototype.set.call(target, this.subarray(start, start + len), targetStart);
  21352. }
  21353. return len;
  21354. };
  21355. Buffer$1.prototype.fill = function fill(val, start, end, encoding) {
  21356. if (typeof val === 'string') {
  21357. if (typeof start === 'string') {
  21358. encoding = start;
  21359. start = 0;
  21360. end = this.length;
  21361. } else if (typeof end === 'string') {
  21362. encoding = end;
  21363. end = this.length;
  21364. }
  21365. if (val.length === 1) {
  21366. var code = val.charCodeAt(0);
  21367. if (code < 256) {
  21368. val = code;
  21369. }
  21370. }
  21371. if (encoding !== undefined && typeof encoding !== 'string') {
  21372. throw new TypeError('encoding must be a string');
  21373. }
  21374. if (typeof encoding === 'string' && !Buffer$1.isEncoding(encoding)) {
  21375. throw new TypeError('Unknown encoding: ' + encoding);
  21376. }
  21377. } else if (typeof val === 'number') {
  21378. val = val & 255;
  21379. }
  21380. if (start < 0 || this.length < start || this.length < end) {
  21381. throw new RangeError('Out of range index');
  21382. }
  21383. if (end <= start) {
  21384. return this;
  21385. }
  21386. start = start >>> 0;
  21387. end = end === undefined ? this.length : end >>> 0;
  21388. if (!val) val = 0;
  21389. var i;
  21390. if (typeof val === 'number') {
  21391. for (i = start; i < end; ++i) {
  21392. this[i] = val;
  21393. }
  21394. } else {
  21395. var bytes = internalIsBuffer(val) ? val : utf8ToBytes(new Buffer$1(val, encoding).toString());
  21396. var len = bytes.length;
  21397. for (i = 0; i < end - start; ++i) {
  21398. this[i + start] = bytes[i % len];
  21399. }
  21400. }
  21401. return this;
  21402. };
  21403. var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g;
  21404. function base64clean(str) {
  21405. str = stringtrim(str).replace(INVALID_BASE64_RE, '');
  21406. if (str.length < 2) return '';
  21407. while (str.length % 4 !== 0) {
  21408. str = str + '=';
  21409. }
  21410. return str;
  21411. }
  21412. function stringtrim(str) {
  21413. if (str.trim) return str.trim();
  21414. return str.replace(/^\s+|\s+$/g, '');
  21415. }
  21416. function toHex(n) {
  21417. if (n < 16) return '0' + n.toString(16);
  21418. return n.toString(16);
  21419. }
  21420. function utf8ToBytes(string, units) {
  21421. units = units || Infinity;
  21422. var codePoint;
  21423. var length = string.length;
  21424. var leadSurrogate = null;
  21425. var bytes = [];
  21426. for (var i = 0; i < length; ++i) {
  21427. codePoint = string.charCodeAt(i);
  21428. if (codePoint > 0xD7FF && codePoint < 0xE000) {
  21429. if (!leadSurrogate) {
  21430. if (codePoint > 0xDBFF) {
  21431. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
  21432. continue;
  21433. } else if (i + 1 === length) {
  21434. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
  21435. continue;
  21436. }
  21437. leadSurrogate = codePoint;
  21438. continue;
  21439. }
  21440. if (codePoint < 0xDC00) {
  21441. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
  21442. leadSurrogate = codePoint;
  21443. continue;
  21444. }
  21445. codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;
  21446. } else if (leadSurrogate) {
  21447. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
  21448. }
  21449. leadSurrogate = null;
  21450. if (codePoint < 0x80) {
  21451. if ((units -= 1) < 0) break;
  21452. bytes.push(codePoint);
  21453. } else if (codePoint < 0x800) {
  21454. if ((units -= 2) < 0) break;
  21455. bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80);
  21456. } else if (codePoint < 0x10000) {
  21457. if ((units -= 3) < 0) break;
  21458. bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
  21459. } else if (codePoint < 0x110000) {
  21460. if ((units -= 4) < 0) break;
  21461. bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
  21462. } else {
  21463. throw new Error('Invalid code point');
  21464. }
  21465. }
  21466. return bytes;
  21467. }
  21468. function asciiToBytes(str) {
  21469. var byteArray = [];
  21470. for (var i = 0; i < str.length; ++i) {
  21471. byteArray.push(str.charCodeAt(i) & 0xFF);
  21472. }
  21473. return byteArray;
  21474. }
  21475. function utf16leToBytes(str, units) {
  21476. var c, hi, lo;
  21477. var byteArray = [];
  21478. for (var i = 0; i < str.length; ++i) {
  21479. if ((units -= 2) < 0) break;
  21480. c = str.charCodeAt(i);
  21481. hi = c >> 8;
  21482. lo = c % 256;
  21483. byteArray.push(lo);
  21484. byteArray.push(hi);
  21485. }
  21486. return byteArray;
  21487. }
  21488. function base64ToBytes(str) {
  21489. return toByteArray(base64clean(str));
  21490. }
  21491. function blitBuffer(src, dst, offset, length) {
  21492. for (var i = 0; i < length; ++i) {
  21493. if (i + offset >= dst.length || i >= src.length) break;
  21494. dst[i + offset] = src[i];
  21495. }
  21496. return i;
  21497. }
  21498. function isnan(val) {
  21499. return val !== val;
  21500. }
  21501. function isBuffer(obj) {
  21502. return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj));
  21503. }
  21504. function isFastBuffer(obj) {
  21505. return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj);
  21506. }
  21507. function isSlowBuffer(obj) {
  21508. return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0));
  21509. }
  21510. var bufferEs6 = /*#__PURE__*/Object.freeze({
  21511. __proto__: null,
  21512. INSPECT_MAX_BYTES: INSPECT_MAX_BYTES,
  21513. kMaxLength: _kMaxLength,
  21514. Buffer: Buffer$1,
  21515. SlowBuffer: SlowBuffer,
  21516. isBuffer: isBuffer
  21517. });
  21518. var object = {};
  21519. var hasOwnProperty$c = object.hasOwnProperty;
  21520. var forOwn = function forOwn(object, callback) {
  21521. for (var key in object) {
  21522. if (hasOwnProperty$c.call(object, key)) {
  21523. callback(key, object[key]);
  21524. }
  21525. }
  21526. };
  21527. var extend = function extend(destination, source) {
  21528. if (!source) {
  21529. return destination;
  21530. }
  21531. forOwn(source, function (key, value) {
  21532. destination[key] = value;
  21533. });
  21534. return destination;
  21535. };
  21536. var forEach = function forEach(array, callback) {
  21537. var length = array.length;
  21538. var index = -1;
  21539. while (++index < length) {
  21540. callback(array[index]);
  21541. }
  21542. };
  21543. var toString$2 = object.toString;
  21544. var isArray$2 = Array.isArray;
  21545. var isBuffer$1 = isBuffer;
  21546. var isObject$1 = function isObject(value) {
  21547. return toString$2.call(value) == '[object Object]';
  21548. };
  21549. var isString$1 = function isString(value) {
  21550. return typeof value == 'string' || toString$2.call(value) == '[object String]';
  21551. };
  21552. var isNumber = function isNumber(value) {
  21553. return typeof value == 'number' || toString$2.call(value) == '[object Number]';
  21554. };
  21555. var isFunction$2 = function isFunction(value) {
  21556. return typeof value == 'function';
  21557. };
  21558. var isMap$1 = function isMap(value) {
  21559. return toString$2.call(value) == '[object Map]';
  21560. };
  21561. var isSet$1 = function isSet(value) {
  21562. return toString$2.call(value) == '[object Set]';
  21563. };
  21564. var singleEscapes = {
  21565. '"': '\\"',
  21566. '\'': '\\\'',
  21567. '\\': '\\\\',
  21568. '\b': '\\b',
  21569. '\f': '\\f',
  21570. '\n': '\\n',
  21571. '\r': '\\r',
  21572. '\t': '\\t'
  21573. };
  21574. var regexSingleEscape = /["'\\\b\f\n\r\t]/;
  21575. var regexDigit = /[0-9]/;
  21576. var regexWhitelist = /[ !#-&\(-\[\]-_a-~]/;
  21577. var jsesc = function jsesc(argument, options) {
  21578. var increaseIndentation = function increaseIndentation() {
  21579. oldIndent = indent;
  21580. ++options.indentLevel;
  21581. indent = options.indent.repeat(options.indentLevel);
  21582. };
  21583. var defaults = {
  21584. 'escapeEverything': false,
  21585. 'minimal': false,
  21586. 'isScriptContext': false,
  21587. 'quotes': 'single',
  21588. 'wrap': false,
  21589. 'es6': false,
  21590. 'json': false,
  21591. 'compact': true,
  21592. 'lowercaseHex': false,
  21593. 'numbers': 'decimal',
  21594. 'indent': '\t',
  21595. 'indentLevel': 0,
  21596. '__inline1__': false,
  21597. '__inline2__': false
  21598. };
  21599. var json = options && options.json;
  21600. if (json) {
  21601. defaults.quotes = 'double';
  21602. defaults.wrap = true;
  21603. }
  21604. options = extend(defaults, options);
  21605. if (options.quotes != 'single' && options.quotes != 'double' && options.quotes != 'backtick') {
  21606. options.quotes = 'single';
  21607. }
  21608. var quote = options.quotes == 'double' ? '"' : options.quotes == 'backtick' ? '`' : '\'';
  21609. var compact = options.compact;
  21610. var lowercaseHex = options.lowercaseHex;
  21611. var indent = options.indent.repeat(options.indentLevel);
  21612. var oldIndent = '';
  21613. var inline1 = options.__inline1__;
  21614. var inline2 = options.__inline2__;
  21615. var newLine = compact ? '' : '\n';
  21616. var result;
  21617. var isEmpty = true;
  21618. var useBinNumbers = options.numbers == 'binary';
  21619. var useOctNumbers = options.numbers == 'octal';
  21620. var useDecNumbers = options.numbers == 'decimal';
  21621. var useHexNumbers = options.numbers == 'hexadecimal';
  21622. if (json && argument && isFunction$2(argument.toJSON)) {
  21623. argument = argument.toJSON();
  21624. }
  21625. if (!isString$1(argument)) {
  21626. if (isMap$1(argument)) {
  21627. if (argument.size == 0) {
  21628. return 'new Map()';
  21629. }
  21630. if (!compact) {
  21631. options.__inline1__ = true;
  21632. options.__inline2__ = false;
  21633. }
  21634. return 'new Map(' + jsesc(Array.from(argument), options) + ')';
  21635. }
  21636. if (isSet$1(argument)) {
  21637. if (argument.size == 0) {
  21638. return 'new Set()';
  21639. }
  21640. return 'new Set(' + jsesc(Array.from(argument), options) + ')';
  21641. }
  21642. if (isBuffer$1(argument)) {
  21643. if (argument.length == 0) {
  21644. return 'Buffer.from([])';
  21645. }
  21646. return 'Buffer.from(' + jsesc(Array.from(argument), options) + ')';
  21647. }
  21648. if (isArray$2(argument)) {
  21649. result = [];
  21650. options.wrap = true;
  21651. if (inline1) {
  21652. options.__inline1__ = false;
  21653. options.__inline2__ = true;
  21654. }
  21655. if (!inline2) {
  21656. increaseIndentation();
  21657. }
  21658. forEach(argument, function (value) {
  21659. isEmpty = false;
  21660. if (inline2) {
  21661. options.__inline2__ = false;
  21662. }
  21663. result.push((compact || inline2 ? '' : indent) + jsesc(value, options));
  21664. });
  21665. if (isEmpty) {
  21666. return '[]';
  21667. }
  21668. if (inline2) {
  21669. return '[' + result.join(', ') + ']';
  21670. }
  21671. return '[' + newLine + result.join(',' + newLine) + newLine + (compact ? '' : oldIndent) + ']';
  21672. } else if (isNumber(argument)) {
  21673. if (json) {
  21674. return JSON.stringify(argument);
  21675. }
  21676. if (useDecNumbers) {
  21677. return String(argument);
  21678. }
  21679. if (useHexNumbers) {
  21680. var hexadecimal = argument.toString(16);
  21681. if (!lowercaseHex) {
  21682. hexadecimal = hexadecimal.toUpperCase();
  21683. }
  21684. return '0x' + hexadecimal;
  21685. }
  21686. if (useBinNumbers) {
  21687. return '0b' + argument.toString(2);
  21688. }
  21689. if (useOctNumbers) {
  21690. return '0o' + argument.toString(8);
  21691. }
  21692. } else if (!isObject$1(argument)) {
  21693. if (json) {
  21694. return JSON.stringify(argument) || 'null';
  21695. }
  21696. return String(argument);
  21697. } else {
  21698. result = [];
  21699. options.wrap = true;
  21700. increaseIndentation();
  21701. forOwn(argument, function (key, value) {
  21702. isEmpty = false;
  21703. result.push((compact ? '' : indent) + jsesc(key, options) + ':' + (compact ? '' : ' ') + jsesc(value, options));
  21704. });
  21705. if (isEmpty) {
  21706. return '{}';
  21707. }
  21708. return '{' + newLine + result.join(',' + newLine) + newLine + (compact ? '' : oldIndent) + '}';
  21709. }
  21710. }
  21711. var string = argument;
  21712. var index = -1;
  21713. var length = string.length;
  21714. result = '';
  21715. while (++index < length) {
  21716. var character = string.charAt(index);
  21717. if (options.es6) {
  21718. var first = string.charCodeAt(index);
  21719. if (first >= 0xD800 && first <= 0xDBFF && length > index + 1) {
  21720. var second = string.charCodeAt(index + 1);
  21721. if (second >= 0xDC00 && second <= 0xDFFF) {
  21722. var codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
  21723. var _hexadecimal2 = codePoint.toString(16);
  21724. if (!lowercaseHex) {
  21725. _hexadecimal2 = _hexadecimal2.toUpperCase();
  21726. }
  21727. result += "\\u{" + _hexadecimal2 + '}';
  21728. ++index;
  21729. continue;
  21730. }
  21731. }
  21732. }
  21733. if (!options.escapeEverything) {
  21734. if (regexWhitelist.test(character)) {
  21735. result += character;
  21736. continue;
  21737. }
  21738. if (character == '"') {
  21739. result += quote == character ? '\\"' : character;
  21740. continue;
  21741. }
  21742. if (character == '`') {
  21743. result += quote == character ? '\\`' : character;
  21744. continue;
  21745. }
  21746. if (character == '\'') {
  21747. result += quote == character ? '\\\'' : character;
  21748. continue;
  21749. }
  21750. }
  21751. if (character == '\0' && !json && !regexDigit.test(string.charAt(index + 1))) {
  21752. result += '\\0';
  21753. continue;
  21754. }
  21755. if (regexSingleEscape.test(character)) {
  21756. result += singleEscapes[character];
  21757. continue;
  21758. }
  21759. var charCode = character.charCodeAt(0);
  21760. if (options.minimal && charCode != 0x2028 && charCode != 0x2029) {
  21761. result += character;
  21762. continue;
  21763. }
  21764. var _hexadecimal = charCode.toString(16);
  21765. if (!lowercaseHex) {
  21766. _hexadecimal = _hexadecimal.toUpperCase();
  21767. }
  21768. var longhand = _hexadecimal.length > 2 || json;
  21769. var escaped = '\\' + (longhand ? 'u' : 'x') + ('0000' + _hexadecimal).slice(longhand ? -4 : -2);
  21770. result += escaped;
  21771. continue;
  21772. }
  21773. if (options.wrap) {
  21774. result = quote + result + quote;
  21775. }
  21776. if (quote == '`') {
  21777. result = result.replace(/\$\{/g, '\\\$\{');
  21778. }
  21779. if (options.isScriptContext) {
  21780. return result.replace(/<\/(script|style)/gi, '<\\/$1').replace(/<!--/g, json ? "\\u003C!--" : '\\x3C!--');
  21781. }
  21782. return result;
  21783. };
  21784. jsesc.version = '2.5.2';
  21785. var jsesc_1 = jsesc;
  21786. function Identifier$1(node) {
  21787. var _this = this;
  21788. this.exactSource(node.loc, function () {
  21789. _this.word(node.name);
  21790. });
  21791. }
  21792. function ArgumentPlaceholder$1() {
  21793. this.token("?");
  21794. }
  21795. function RestElement$1(node) {
  21796. this.token("...");
  21797. this.print(node.argument, node);
  21798. }
  21799. function ObjectExpression$2(node) {
  21800. var props = node.properties;
  21801. this.token("{");
  21802. this.printInnerComments(node);
  21803. if (props.length) {
  21804. this.space();
  21805. this.printList(props, node, {
  21806. indent: true,
  21807. statement: true
  21808. });
  21809. this.space();
  21810. }
  21811. this.token("}");
  21812. }
  21813. function ObjectMethod$1(node) {
  21814. this.printJoin(node.decorators, node);
  21815. this._methodHead(node);
  21816. this.space();
  21817. this.print(node.body, node);
  21818. }
  21819. function ObjectProperty$1(node) {
  21820. this.printJoin(node.decorators, node);
  21821. if (node.computed) {
  21822. this.token("[");
  21823. this.print(node.key, node);
  21824. this.token("]");
  21825. } else {
  21826. if (isAssignmentPattern(node.value) && isIdentifier(node.key) && node.key.name === node.value.left.name) {
  21827. this.print(node.value, node);
  21828. return;
  21829. }
  21830. this.print(node.key, node);
  21831. if (node.shorthand && isIdentifier(node.key) && isIdentifier(node.value) && node.key.name === node.value.name) {
  21832. return;
  21833. }
  21834. }
  21835. this.token(":");
  21836. this.space();
  21837. this.print(node.value, node);
  21838. }
  21839. function ArrayExpression$1(node) {
  21840. var elems = node.elements;
  21841. var len = elems.length;
  21842. this.token("[");
  21843. this.printInnerComments(node);
  21844. for (var i = 0; i < elems.length; i++) {
  21845. var elem = elems[i];
  21846. if (elem) {
  21847. if (i > 0) this.space();
  21848. this.print(elem, node);
  21849. if (i < len - 1) this.token(",");
  21850. } else {
  21851. this.token(",");
  21852. }
  21853. }
  21854. this.token("]");
  21855. }
  21856. function RegExpLiteral$1(node) {
  21857. this.word("/" + node.pattern + "/" + node.flags);
  21858. }
  21859. function BooleanLiteral$1(node) {
  21860. this.word(node.value ? "true" : "false");
  21861. }
  21862. function NullLiteral$1() {
  21863. this.word("null");
  21864. }
  21865. function NumericLiteral$1(node) {
  21866. var raw = this.getPossibleRaw(node);
  21867. var value = node.value + "";
  21868. if (raw == null) {
  21869. this.number(value);
  21870. } else if (this.format.minified) {
  21871. this.number(raw.length < value.length ? raw : value);
  21872. } else {
  21873. this.number(raw);
  21874. }
  21875. }
  21876. function StringLiteral$1(node) {
  21877. var raw = this.getPossibleRaw(node);
  21878. if (!this.format.minified && raw != null) {
  21879. this.token(raw);
  21880. return;
  21881. }
  21882. var opts = this.format.jsescOption;
  21883. if (this.format.jsonCompatibleStrings) {
  21884. opts.json = true;
  21885. }
  21886. var val = jsesc_1(node.value, opts);
  21887. return this.token(val);
  21888. }
  21889. function BigIntLiteral$1(node) {
  21890. var raw = this.getPossibleRaw(node);
  21891. if (!this.format.minified && raw != null) {
  21892. this.token(raw);
  21893. return;
  21894. }
  21895. this.token(node.value);
  21896. }
  21897. function PipelineTopicExpression$1(node) {
  21898. this.print(node.expression, node);
  21899. }
  21900. function PipelineBareFunction$1(node) {
  21901. this.print(node.callee, node);
  21902. }
  21903. function PipelinePrimaryTopicReference$1() {
  21904. this.token("#");
  21905. }
  21906. function AnyTypeAnnotation$1() {
  21907. this.word("any");
  21908. }
  21909. function ArrayTypeAnnotation$1(node) {
  21910. this.print(node.elementType, node);
  21911. this.token("[");
  21912. this.token("]");
  21913. }
  21914. function BooleanTypeAnnotation$1() {
  21915. this.word("boolean");
  21916. }
  21917. function BooleanLiteralTypeAnnotation$1(node) {
  21918. this.word(node.value ? "true" : "false");
  21919. }
  21920. function NullLiteralTypeAnnotation$1() {
  21921. this.word("null");
  21922. }
  21923. function DeclareClass$1(node, parent) {
  21924. if (!isDeclareExportDeclaration(parent)) {
  21925. this.word("declare");
  21926. this.space();
  21927. }
  21928. this.word("class");
  21929. this.space();
  21930. this._interfaceish(node);
  21931. }
  21932. function DeclareFunction$1(node, parent) {
  21933. if (!isDeclareExportDeclaration(parent)) {
  21934. this.word("declare");
  21935. this.space();
  21936. }
  21937. this.word("function");
  21938. this.space();
  21939. this.print(node.id, node);
  21940. this.print(node.id.typeAnnotation.typeAnnotation, node);
  21941. if (node.predicate) {
  21942. this.space();
  21943. this.print(node.predicate, node);
  21944. }
  21945. this.semicolon();
  21946. }
  21947. function InferredPredicate$1() {
  21948. this.token("%");
  21949. this.word("checks");
  21950. }
  21951. function DeclaredPredicate$1(node) {
  21952. this.token("%");
  21953. this.word("checks");
  21954. this.token("(");
  21955. this.print(node.value, node);
  21956. this.token(")");
  21957. }
  21958. function DeclareInterface$1(node) {
  21959. this.word("declare");
  21960. this.space();
  21961. this.InterfaceDeclaration(node);
  21962. }
  21963. function DeclareModule$1(node) {
  21964. this.word("declare");
  21965. this.space();
  21966. this.word("module");
  21967. this.space();
  21968. this.print(node.id, node);
  21969. this.space();
  21970. this.print(node.body, node);
  21971. }
  21972. function DeclareModuleExports$1(node) {
  21973. this.word("declare");
  21974. this.space();
  21975. this.word("module");
  21976. this.token(".");
  21977. this.word("exports");
  21978. this.print(node.typeAnnotation, node);
  21979. }
  21980. function DeclareTypeAlias$1(node) {
  21981. this.word("declare");
  21982. this.space();
  21983. this.TypeAlias(node);
  21984. }
  21985. function DeclareOpaqueType$1(node, parent) {
  21986. if (!isDeclareExportDeclaration(parent)) {
  21987. this.word("declare");
  21988. this.space();
  21989. }
  21990. this.OpaqueType(node);
  21991. }
  21992. function DeclareVariable$1(node, parent) {
  21993. if (!isDeclareExportDeclaration(parent)) {
  21994. this.word("declare");
  21995. this.space();
  21996. }
  21997. this.word("var");
  21998. this.space();
  21999. this.print(node.id, node);
  22000. this.print(node.id.typeAnnotation, node);
  22001. this.semicolon();
  22002. }
  22003. function DeclareExportDeclaration$1(node) {
  22004. this.word("declare");
  22005. this.space();
  22006. this.word("export");
  22007. this.space();
  22008. if (node["default"]) {
  22009. this.word("default");
  22010. this.space();
  22011. }
  22012. FlowExportDeclaration.apply(this, arguments);
  22013. }
  22014. function DeclareExportAllDeclaration$1() {
  22015. this.word("declare");
  22016. this.space();
  22017. ExportAllDeclaration$1.apply(this, arguments);
  22018. }
  22019. function EnumDeclaration$1(node) {
  22020. var id = node.id,
  22021. body = node.body;
  22022. this.word("enum");
  22023. this.space();
  22024. this.print(id, node);
  22025. this.print(body, node);
  22026. }
  22027. function enumExplicitType(context, name, hasExplicitType) {
  22028. if (hasExplicitType) {
  22029. context.space();
  22030. context.word("of");
  22031. context.space();
  22032. context.word(name);
  22033. }
  22034. context.space();
  22035. }
  22036. function enumBody(context, node) {
  22037. var members = node.members;
  22038. context.token("{");
  22039. context.indent();
  22040. context.newline();
  22041. for (var _iterator = members, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  22042. var _ref;
  22043. if (_isArray) {
  22044. if (_i >= _iterator.length) break;
  22045. _ref = _iterator[_i++];
  22046. } else {
  22047. _i = _iterator.next();
  22048. if (_i.done) break;
  22049. _ref = _i.value;
  22050. }
  22051. var member = _ref;
  22052. context.print(member, node);
  22053. context.newline();
  22054. }
  22055. context.dedent();
  22056. context.token("}");
  22057. }
  22058. function EnumBooleanBody$1(node) {
  22059. var explicitType = node.explicitType;
  22060. enumExplicitType(this, "boolean", explicitType);
  22061. enumBody(this, node);
  22062. }
  22063. function EnumNumberBody$1(node) {
  22064. var explicitType = node.explicitType;
  22065. enumExplicitType(this, "number", explicitType);
  22066. enumBody(this, node);
  22067. }
  22068. function EnumStringBody$1(node) {
  22069. var explicitType = node.explicitType;
  22070. enumExplicitType(this, "string", explicitType);
  22071. enumBody(this, node);
  22072. }
  22073. function EnumSymbolBody$1(node) {
  22074. enumExplicitType(this, "symbol", true);
  22075. enumBody(this, node);
  22076. }
  22077. function EnumDefaultedMember$1(node) {
  22078. var id = node.id;
  22079. this.print(id, node);
  22080. this.token(",");
  22081. }
  22082. function enumInitializedMember(context, node) {
  22083. var id = node.id,
  22084. init = node.init;
  22085. context.print(id, node);
  22086. context.space();
  22087. context.token("=");
  22088. context.space();
  22089. context.print(init, node);
  22090. context.token(",");
  22091. }
  22092. function EnumBooleanMember$1(node) {
  22093. enumInitializedMember(this, node);
  22094. }
  22095. function EnumNumberMember$1(node) {
  22096. enumInitializedMember(this, node);
  22097. }
  22098. function EnumStringMember$1(node) {
  22099. enumInitializedMember(this, node);
  22100. }
  22101. function FlowExportDeclaration(node) {
  22102. if (node.declaration) {
  22103. var declar = node.declaration;
  22104. this.print(declar, node);
  22105. if (!isStatement(declar)) this.semicolon();
  22106. } else {
  22107. this.token("{");
  22108. if (node.specifiers.length) {
  22109. this.space();
  22110. this.printList(node.specifiers, node);
  22111. this.space();
  22112. }
  22113. this.token("}");
  22114. if (node.source) {
  22115. this.space();
  22116. this.word("from");
  22117. this.space();
  22118. this.print(node.source, node);
  22119. }
  22120. this.semicolon();
  22121. }
  22122. }
  22123. function ExistsTypeAnnotation$1() {
  22124. this.token("*");
  22125. }
  22126. function FunctionTypeAnnotation$2(node, parent) {
  22127. this.print(node.typeParameters, node);
  22128. this.token("(");
  22129. this.printList(node.params, node);
  22130. if (node.rest) {
  22131. if (node.params.length) {
  22132. this.token(",");
  22133. this.space();
  22134. }
  22135. this.token("...");
  22136. this.print(node.rest, node);
  22137. }
  22138. this.token(")");
  22139. if (parent.type === "ObjectTypeCallProperty" || parent.type === "DeclareFunction" || parent.type === "ObjectTypeProperty" && parent.method) {
  22140. this.token(":");
  22141. } else {
  22142. this.space();
  22143. this.token("=>");
  22144. }
  22145. this.space();
  22146. this.print(node.returnType, node);
  22147. }
  22148. function FunctionTypeParam$1(node) {
  22149. this.print(node.name, node);
  22150. if (node.optional) this.token("?");
  22151. if (node.name) {
  22152. this.token(":");
  22153. this.space();
  22154. }
  22155. this.print(node.typeAnnotation, node);
  22156. }
  22157. function InterfaceExtends$1(node) {
  22158. this.print(node.id, node);
  22159. this.print(node.typeParameters, node);
  22160. }
  22161. function _interfaceish(node) {
  22162. this.print(node.id, node);
  22163. this.print(node.typeParameters, node);
  22164. if (node["extends"].length) {
  22165. this.space();
  22166. this.word("extends");
  22167. this.space();
  22168. this.printList(node["extends"], node);
  22169. }
  22170. if (node.mixins && node.mixins.length) {
  22171. this.space();
  22172. this.word("mixins");
  22173. this.space();
  22174. this.printList(node.mixins, node);
  22175. }
  22176. if (node["implements"] && node["implements"].length) {
  22177. this.space();
  22178. this.word("implements");
  22179. this.space();
  22180. this.printList(node["implements"], node);
  22181. }
  22182. this.space();
  22183. this.print(node.body, node);
  22184. }
  22185. function _variance(node) {
  22186. if (node.variance) {
  22187. if (node.variance.kind === "plus") {
  22188. this.token("+");
  22189. } else if (node.variance.kind === "minus") {
  22190. this.token("-");
  22191. }
  22192. }
  22193. }
  22194. function InterfaceDeclaration$1(node) {
  22195. this.word("interface");
  22196. this.space();
  22197. this._interfaceish(node);
  22198. }
  22199. function andSeparator() {
  22200. this.space();
  22201. this.token("&");
  22202. this.space();
  22203. }
  22204. function InterfaceTypeAnnotation$1(node) {
  22205. this.word("interface");
  22206. if (node["extends"] && node["extends"].length) {
  22207. this.space();
  22208. this.word("extends");
  22209. this.space();
  22210. this.printList(node["extends"], node);
  22211. }
  22212. this.space();
  22213. this.print(node.body, node);
  22214. }
  22215. function IntersectionTypeAnnotation$1(node) {
  22216. this.printJoin(node.types, node, {
  22217. separator: andSeparator
  22218. });
  22219. }
  22220. function MixedTypeAnnotation$1() {
  22221. this.word("mixed");
  22222. }
  22223. function EmptyTypeAnnotation$1() {
  22224. this.word("empty");
  22225. }
  22226. function NullableTypeAnnotation$2(node) {
  22227. this.token("?");
  22228. this.print(node.typeAnnotation, node);
  22229. }
  22230. function NumberTypeAnnotation$1() {
  22231. this.word("number");
  22232. }
  22233. function StringTypeAnnotation$1() {
  22234. this.word("string");
  22235. }
  22236. function ThisTypeAnnotation$1() {
  22237. this.word("this");
  22238. }
  22239. function TupleTypeAnnotation$1(node) {
  22240. this.token("[");
  22241. this.printList(node.types, node);
  22242. this.token("]");
  22243. }
  22244. function TypeofTypeAnnotation$1(node) {
  22245. this.word("typeof");
  22246. this.space();
  22247. this.print(node.argument, node);
  22248. }
  22249. function TypeAlias$1(node) {
  22250. this.word("type");
  22251. this.space();
  22252. this.print(node.id, node);
  22253. this.print(node.typeParameters, node);
  22254. this.space();
  22255. this.token("=");
  22256. this.space();
  22257. this.print(node.right, node);
  22258. this.semicolon();
  22259. }
  22260. function TypeAnnotation$1(node) {
  22261. this.token(":");
  22262. this.space();
  22263. if (node.optional) this.token("?");
  22264. this.print(node.typeAnnotation, node);
  22265. }
  22266. function TypeParameterInstantiation$1(node) {
  22267. this.token("<");
  22268. this.printList(node.params, node, {});
  22269. this.token(">");
  22270. }
  22271. function TypeParameter$1(node) {
  22272. this._variance(node);
  22273. this.word(node.name);
  22274. if (node.bound) {
  22275. this.print(node.bound, node);
  22276. }
  22277. if (node["default"]) {
  22278. this.space();
  22279. this.token("=");
  22280. this.space();
  22281. this.print(node["default"], node);
  22282. }
  22283. }
  22284. function OpaqueType$1(node) {
  22285. this.word("opaque");
  22286. this.space();
  22287. this.word("type");
  22288. this.space();
  22289. this.print(node.id, node);
  22290. this.print(node.typeParameters, node);
  22291. if (node.supertype) {
  22292. this.token(":");
  22293. this.space();
  22294. this.print(node.supertype, node);
  22295. }
  22296. if (node.impltype) {
  22297. this.space();
  22298. this.token("=");
  22299. this.space();
  22300. this.print(node.impltype, node);
  22301. }
  22302. this.semicolon();
  22303. }
  22304. function ObjectTypeAnnotation$1(node) {
  22305. var _this = this;
  22306. if (node.exact) {
  22307. this.token("{|");
  22308. } else {
  22309. this.token("{");
  22310. }
  22311. var props = node.properties.concat(node.callProperties || [], node.indexers || [], node.internalSlots || []);
  22312. if (props.length) {
  22313. this.space();
  22314. this.printJoin(props, node, {
  22315. addNewlines: function addNewlines(leading) {
  22316. if (leading && !props[0]) return 1;
  22317. },
  22318. indent: true,
  22319. statement: true,
  22320. iterator: function iterator() {
  22321. if (props.length !== 1 || node.inexact) {
  22322. _this.token(",");
  22323. _this.space();
  22324. }
  22325. }
  22326. });
  22327. this.space();
  22328. }
  22329. if (node.inexact) {
  22330. this.indent();
  22331. this.token("...");
  22332. if (props.length) {
  22333. this.newline();
  22334. }
  22335. this.dedent();
  22336. }
  22337. if (node.exact) {
  22338. this.token("|}");
  22339. } else {
  22340. this.token("}");
  22341. }
  22342. }
  22343. function ObjectTypeInternalSlot$1(node) {
  22344. if (node["static"]) {
  22345. this.word("static");
  22346. this.space();
  22347. }
  22348. this.token("[");
  22349. this.token("[");
  22350. this.print(node.id, node);
  22351. this.token("]");
  22352. this.token("]");
  22353. if (node.optional) this.token("?");
  22354. if (!node.method) {
  22355. this.token(":");
  22356. this.space();
  22357. }
  22358. this.print(node.value, node);
  22359. }
  22360. function ObjectTypeCallProperty$1(node) {
  22361. if (node["static"]) {
  22362. this.word("static");
  22363. this.space();
  22364. }
  22365. this.print(node.value, node);
  22366. }
  22367. function ObjectTypeIndexer$1(node) {
  22368. if (node["static"]) {
  22369. this.word("static");
  22370. this.space();
  22371. }
  22372. this._variance(node);
  22373. this.token("[");
  22374. if (node.id) {
  22375. this.print(node.id, node);
  22376. this.token(":");
  22377. this.space();
  22378. }
  22379. this.print(node.key, node);
  22380. this.token("]");
  22381. this.token(":");
  22382. this.space();
  22383. this.print(node.value, node);
  22384. }
  22385. function ObjectTypeProperty$1(node) {
  22386. if (node.proto) {
  22387. this.word("proto");
  22388. this.space();
  22389. }
  22390. if (node["static"]) {
  22391. this.word("static");
  22392. this.space();
  22393. }
  22394. this._variance(node);
  22395. this.print(node.key, node);
  22396. if (node.optional) this.token("?");
  22397. if (!node.method) {
  22398. this.token(":");
  22399. this.space();
  22400. }
  22401. this.print(node.value, node);
  22402. }
  22403. function ObjectTypeSpreadProperty$1(node) {
  22404. this.token("...");
  22405. this.print(node.argument, node);
  22406. }
  22407. function QualifiedTypeIdentifier$1(node) {
  22408. this.print(node.qualification, node);
  22409. this.token(".");
  22410. this.print(node.id, node);
  22411. }
  22412. function orSeparator() {
  22413. this.space();
  22414. this.token("|");
  22415. this.space();
  22416. }
  22417. function UnionTypeAnnotation$2(node) {
  22418. this.printJoin(node.types, node, {
  22419. separator: orSeparator
  22420. });
  22421. }
  22422. function TypeCastExpression$1(node) {
  22423. this.token("(");
  22424. this.print(node.expression, node);
  22425. this.print(node.typeAnnotation, node);
  22426. this.token(")");
  22427. }
  22428. function Variance$1(node) {
  22429. if (node.kind === "plus") {
  22430. this.token("+");
  22431. } else {
  22432. this.token("-");
  22433. }
  22434. }
  22435. function VoidTypeAnnotation$1() {
  22436. this.word("void");
  22437. }
  22438. function File$1(node) {
  22439. if (node.program) {
  22440. this.print(node.program.interpreter, node);
  22441. }
  22442. this.print(node.program, node);
  22443. }
  22444. function Program$1(node) {
  22445. this.printInnerComments(node, false);
  22446. this.printSequence(node.directives, node);
  22447. if (node.directives && node.directives.length) this.newline();
  22448. this.printSequence(node.body, node);
  22449. }
  22450. function BlockStatement$1(node) {
  22451. this.token("{");
  22452. this.printInnerComments(node);
  22453. var hasDirectives = node.directives && node.directives.length;
  22454. if (node.body.length || hasDirectives) {
  22455. this.newline();
  22456. this.printSequence(node.directives, node, {
  22457. indent: true
  22458. });
  22459. if (hasDirectives) this.newline();
  22460. this.printSequence(node.body, node, {
  22461. indent: true
  22462. });
  22463. this.removeTrailingNewline();
  22464. this.source("end", node.loc);
  22465. if (!this.endsWith("\n")) this.newline();
  22466. this.rightBrace();
  22467. } else {
  22468. this.source("end", node.loc);
  22469. this.token("}");
  22470. }
  22471. }
  22472. function Noop$1() {}
  22473. function Directive$1(node) {
  22474. this.print(node.value, node);
  22475. this.semicolon();
  22476. }
  22477. var unescapedSingleQuoteRE = /(?:^|[^\\])(?:\\\\)*'/;
  22478. var unescapedDoubleQuoteRE = /(?:^|[^\\])(?:\\\\)*"/;
  22479. function DirectiveLiteral$1(node) {
  22480. var raw = this.getPossibleRaw(node);
  22481. if (raw != null) {
  22482. this.token(raw);
  22483. return;
  22484. }
  22485. var value = node.value;
  22486. if (!unescapedDoubleQuoteRE.test(value)) {
  22487. this.token("\"" + value + "\"");
  22488. } else if (!unescapedSingleQuoteRE.test(value)) {
  22489. this.token("'" + value + "'");
  22490. } else {
  22491. throw new Error("Malformed AST: it is not possible to print a directive containing" + " both unescaped single and double quotes.");
  22492. }
  22493. }
  22494. function InterpreterDirective$1(node) {
  22495. this.token("#!" + node.value + "\n");
  22496. }
  22497. function Placeholder$1(node) {
  22498. this.token("%%");
  22499. this.print(node.name);
  22500. this.token("%%");
  22501. if (node.expectedNode === "Statement") {
  22502. this.semicolon();
  22503. }
  22504. }
  22505. function JSXAttribute$1(node) {
  22506. this.print(node.name, node);
  22507. if (node.value) {
  22508. this.token("=");
  22509. this.print(node.value, node);
  22510. }
  22511. }
  22512. function JSXIdentifier$1(node) {
  22513. this.word(node.name);
  22514. }
  22515. function JSXNamespacedName$1(node) {
  22516. this.print(node.namespace, node);
  22517. this.token(":");
  22518. this.print(node.name, node);
  22519. }
  22520. function JSXMemberExpression$1(node) {
  22521. this.print(node.object, node);
  22522. this.token(".");
  22523. this.print(node.property, node);
  22524. }
  22525. function JSXSpreadAttribute$1(node) {
  22526. this.token("{");
  22527. this.token("...");
  22528. this.print(node.argument, node);
  22529. this.token("}");
  22530. }
  22531. function JSXExpressionContainer$1(node) {
  22532. this.token("{");
  22533. this.print(node.expression, node);
  22534. this.token("}");
  22535. }
  22536. function JSXSpreadChild$1(node) {
  22537. this.token("{");
  22538. this.token("...");
  22539. this.print(node.expression, node);
  22540. this.token("}");
  22541. }
  22542. function JSXText$1(node) {
  22543. var raw = this.getPossibleRaw(node);
  22544. if (raw != null) {
  22545. this.token(raw);
  22546. } else {
  22547. this.token(node.value);
  22548. }
  22549. }
  22550. function JSXElement$1(node) {
  22551. var open = node.openingElement;
  22552. this.print(open, node);
  22553. if (open.selfClosing) return;
  22554. this.indent();
  22555. for (var _i = 0, _arr = node.children; _i < _arr.length; _i++) {
  22556. var child = _arr[_i];
  22557. this.print(child, node);
  22558. }
  22559. this.dedent();
  22560. this.print(node.closingElement, node);
  22561. }
  22562. function spaceSeparator() {
  22563. this.space();
  22564. }
  22565. function JSXOpeningElement$1(node) {
  22566. this.token("<");
  22567. this.print(node.name, node);
  22568. this.print(node.typeParameters, node);
  22569. if (node.attributes.length > 0) {
  22570. this.space();
  22571. this.printJoin(node.attributes, node, {
  22572. separator: spaceSeparator
  22573. });
  22574. }
  22575. if (node.selfClosing) {
  22576. this.space();
  22577. this.token("/>");
  22578. } else {
  22579. this.token(">");
  22580. }
  22581. }
  22582. function JSXClosingElement$1(node) {
  22583. this.token("</");
  22584. this.print(node.name, node);
  22585. this.token(">");
  22586. }
  22587. function JSXEmptyExpression$1(node) {
  22588. this.printInnerComments(node);
  22589. }
  22590. function JSXFragment$1(node) {
  22591. this.print(node.openingFragment, node);
  22592. this.indent();
  22593. for (var _i2 = 0, _arr2 = node.children; _i2 < _arr2.length; _i2++) {
  22594. var child = _arr2[_i2];
  22595. this.print(child, node);
  22596. }
  22597. this.dedent();
  22598. this.print(node.closingFragment, node);
  22599. }
  22600. function JSXOpeningFragment$1() {
  22601. this.token("<");
  22602. this.token(">");
  22603. }
  22604. function JSXClosingFragment$1() {
  22605. this.token("</");
  22606. this.token(">");
  22607. }
  22608. function TSTypeAnnotation$1(node) {
  22609. this.token(":");
  22610. this.space();
  22611. if (node.optional) this.token("?");
  22612. this.print(node.typeAnnotation, node);
  22613. }
  22614. function TSTypeParameterInstantiation$1(node) {
  22615. this.token("<");
  22616. this.printList(node.params, node, {});
  22617. this.token(">");
  22618. }
  22619. function TSTypeParameter$1(node) {
  22620. this.word(node.name);
  22621. if (node.constraint) {
  22622. this.space();
  22623. this.word("extends");
  22624. this.space();
  22625. this.print(node.constraint, node);
  22626. }
  22627. if (node["default"]) {
  22628. this.space();
  22629. this.token("=");
  22630. this.space();
  22631. this.print(node["default"], node);
  22632. }
  22633. }
  22634. function TSParameterProperty$1(node) {
  22635. if (node.accessibility) {
  22636. this.word(node.accessibility);
  22637. this.space();
  22638. }
  22639. if (node.readonly) {
  22640. this.word("readonly");
  22641. this.space();
  22642. }
  22643. this._param(node.parameter);
  22644. }
  22645. function TSDeclareFunction$1(node) {
  22646. if (node.declare) {
  22647. this.word("declare");
  22648. this.space();
  22649. }
  22650. this._functionHead(node);
  22651. this.token(";");
  22652. }
  22653. function TSDeclareMethod$1(node) {
  22654. this._classMethodHead(node);
  22655. this.token(";");
  22656. }
  22657. function TSQualifiedName$1(node) {
  22658. this.print(node.left, node);
  22659. this.token(".");
  22660. this.print(node.right, node);
  22661. }
  22662. function TSCallSignatureDeclaration$1(node) {
  22663. this.tsPrintSignatureDeclarationBase(node);
  22664. this.token(";");
  22665. }
  22666. function TSConstructSignatureDeclaration$1(node) {
  22667. this.word("new");
  22668. this.space();
  22669. this.tsPrintSignatureDeclarationBase(node);
  22670. this.token(";");
  22671. }
  22672. function TSPropertySignature$1(node) {
  22673. var readonly = node.readonly,
  22674. initializer = node.initializer;
  22675. if (readonly) {
  22676. this.word("readonly");
  22677. this.space();
  22678. }
  22679. this.tsPrintPropertyOrMethodName(node);
  22680. this.print(node.typeAnnotation, node);
  22681. if (initializer) {
  22682. this.space();
  22683. this.token("=");
  22684. this.space();
  22685. this.print(initializer, node);
  22686. }
  22687. this.token(";");
  22688. }
  22689. function tsPrintPropertyOrMethodName(node) {
  22690. if (node.computed) {
  22691. this.token("[");
  22692. }
  22693. this.print(node.key, node);
  22694. if (node.computed) {
  22695. this.token("]");
  22696. }
  22697. if (node.optional) {
  22698. this.token("?");
  22699. }
  22700. }
  22701. function TSMethodSignature$1(node) {
  22702. this.tsPrintPropertyOrMethodName(node);
  22703. this.tsPrintSignatureDeclarationBase(node);
  22704. this.token(";");
  22705. }
  22706. function TSIndexSignature$1(node) {
  22707. var readonly = node.readonly;
  22708. if (readonly) {
  22709. this.word("readonly");
  22710. this.space();
  22711. }
  22712. this.token("[");
  22713. this._parameters(node.parameters, node);
  22714. this.token("]");
  22715. this.print(node.typeAnnotation, node);
  22716. this.token(";");
  22717. }
  22718. function TSAnyKeyword$1() {
  22719. this.word("any");
  22720. }
  22721. function TSBigIntKeyword$1() {
  22722. this.word("bigint");
  22723. }
  22724. function TSUnknownKeyword$1() {
  22725. this.word("unknown");
  22726. }
  22727. function TSNumberKeyword$1() {
  22728. this.word("number");
  22729. }
  22730. function TSObjectKeyword$1() {
  22731. this.word("object");
  22732. }
  22733. function TSBooleanKeyword$1() {
  22734. this.word("boolean");
  22735. }
  22736. function TSStringKeyword$1() {
  22737. this.word("string");
  22738. }
  22739. function TSSymbolKeyword$1() {
  22740. this.word("symbol");
  22741. }
  22742. function TSVoidKeyword$1() {
  22743. this.word("void");
  22744. }
  22745. function TSUndefinedKeyword$1() {
  22746. this.word("undefined");
  22747. }
  22748. function TSNullKeyword$1() {
  22749. this.word("null");
  22750. }
  22751. function TSNeverKeyword$1() {
  22752. this.word("never");
  22753. }
  22754. function TSThisType$1() {
  22755. this.word("this");
  22756. }
  22757. function TSFunctionType$1(node) {
  22758. this.tsPrintFunctionOrConstructorType(node);
  22759. }
  22760. function TSConstructorType$1(node) {
  22761. this.word("new");
  22762. this.space();
  22763. this.tsPrintFunctionOrConstructorType(node);
  22764. }
  22765. function tsPrintFunctionOrConstructorType(node) {
  22766. var typeParameters = node.typeParameters,
  22767. parameters = node.parameters;
  22768. this.print(typeParameters, node);
  22769. this.token("(");
  22770. this._parameters(parameters, node);
  22771. this.token(")");
  22772. this.space();
  22773. this.token("=>");
  22774. this.space();
  22775. this.print(node.typeAnnotation.typeAnnotation, node);
  22776. }
  22777. function TSTypeReference$1(node) {
  22778. this.print(node.typeName, node);
  22779. this.print(node.typeParameters, node);
  22780. }
  22781. function TSTypePredicate$1(node) {
  22782. if (node.asserts) {
  22783. this.word("asserts");
  22784. this.space();
  22785. }
  22786. this.print(node.parameterName);
  22787. if (node.typeAnnotation) {
  22788. this.space();
  22789. this.word("is");
  22790. this.space();
  22791. this.print(node.typeAnnotation.typeAnnotation);
  22792. }
  22793. }
  22794. function TSTypeQuery$1(node) {
  22795. this.word("typeof");
  22796. this.space();
  22797. this.print(node.exprName);
  22798. }
  22799. function TSTypeLiteral$1(node) {
  22800. this.tsPrintTypeLiteralOrInterfaceBody(node.members, node);
  22801. }
  22802. function tsPrintTypeLiteralOrInterfaceBody(members, node) {
  22803. this.tsPrintBraced(members, node);
  22804. }
  22805. function tsPrintBraced(members, node) {
  22806. this.token("{");
  22807. if (members.length) {
  22808. this.indent();
  22809. this.newline();
  22810. for (var _iterator = members, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  22811. var _ref;
  22812. if (_isArray) {
  22813. if (_i >= _iterator.length) break;
  22814. _ref = _iterator[_i++];
  22815. } else {
  22816. _i = _iterator.next();
  22817. if (_i.done) break;
  22818. _ref = _i.value;
  22819. }
  22820. var member = _ref;
  22821. this.print(member, node);
  22822. this.newline();
  22823. }
  22824. this.dedent();
  22825. this.rightBrace();
  22826. } else {
  22827. this.token("}");
  22828. }
  22829. }
  22830. function TSArrayType$1(node) {
  22831. this.print(node.elementType, node);
  22832. this.token("[]");
  22833. }
  22834. function TSTupleType$1(node) {
  22835. this.token("[");
  22836. this.printList(node.elementTypes, node);
  22837. this.token("]");
  22838. }
  22839. function TSOptionalType$1(node) {
  22840. this.print(node.typeAnnotation, node);
  22841. this.token("?");
  22842. }
  22843. function TSRestType$1(node) {
  22844. this.token("...");
  22845. this.print(node.typeAnnotation, node);
  22846. }
  22847. function TSUnionType$2(node) {
  22848. this.tsPrintUnionOrIntersectionType(node, "|");
  22849. }
  22850. function TSIntersectionType$1(node) {
  22851. this.tsPrintUnionOrIntersectionType(node, "&");
  22852. }
  22853. function tsPrintUnionOrIntersectionType(node, sep) {
  22854. this.printJoin(node.types, node, {
  22855. separator: function separator() {
  22856. this.space();
  22857. this.token(sep);
  22858. this.space();
  22859. }
  22860. });
  22861. }
  22862. function TSConditionalType$1(node) {
  22863. this.print(node.checkType);
  22864. this.space();
  22865. this.word("extends");
  22866. this.space();
  22867. this.print(node.extendsType);
  22868. this.space();
  22869. this.token("?");
  22870. this.space();
  22871. this.print(node.trueType);
  22872. this.space();
  22873. this.token(":");
  22874. this.space();
  22875. this.print(node.falseType);
  22876. }
  22877. function TSInferType$1(node) {
  22878. this.token("infer");
  22879. this.space();
  22880. this.print(node.typeParameter);
  22881. }
  22882. function TSParenthesizedType$1(node) {
  22883. this.token("(");
  22884. this.print(node.typeAnnotation, node);
  22885. this.token(")");
  22886. }
  22887. function TSTypeOperator$1(node) {
  22888. this.token(node.operator);
  22889. this.space();
  22890. this.print(node.typeAnnotation, node);
  22891. }
  22892. function TSIndexedAccessType$1(node) {
  22893. this.print(node.objectType, node);
  22894. this.token("[");
  22895. this.print(node.indexType, node);
  22896. this.token("]");
  22897. }
  22898. function TSMappedType$1(node) {
  22899. var readonly = node.readonly,
  22900. typeParameter = node.typeParameter,
  22901. optional = node.optional;
  22902. this.token("{");
  22903. this.space();
  22904. if (readonly) {
  22905. tokenIfPlusMinus(this, readonly);
  22906. this.word("readonly");
  22907. this.space();
  22908. }
  22909. this.token("[");
  22910. this.word(typeParameter.name);
  22911. this.space();
  22912. this.word("in");
  22913. this.space();
  22914. this.print(typeParameter.constraint, typeParameter);
  22915. this.token("]");
  22916. if (optional) {
  22917. tokenIfPlusMinus(this, optional);
  22918. this.token("?");
  22919. }
  22920. this.token(":");
  22921. this.space();
  22922. this.print(node.typeAnnotation, node);
  22923. this.space();
  22924. this.token("}");
  22925. }
  22926. function tokenIfPlusMinus(self, tok) {
  22927. if (tok !== true) {
  22928. self.token(tok);
  22929. }
  22930. }
  22931. function TSLiteralType$1(node) {
  22932. this.print(node.literal, node);
  22933. }
  22934. function TSExpressionWithTypeArguments$1(node) {
  22935. this.print(node.expression, node);
  22936. this.print(node.typeParameters, node);
  22937. }
  22938. function TSInterfaceDeclaration$1(node) {
  22939. var declare = node.declare,
  22940. id = node.id,
  22941. typeParameters = node.typeParameters,
  22942. extendz = node["extends"],
  22943. body = node.body;
  22944. if (declare) {
  22945. this.word("declare");
  22946. this.space();
  22947. }
  22948. this.word("interface");
  22949. this.space();
  22950. this.print(id, node);
  22951. this.print(typeParameters, node);
  22952. if (extendz) {
  22953. this.space();
  22954. this.word("extends");
  22955. this.space();
  22956. this.printList(extendz, node);
  22957. }
  22958. this.space();
  22959. this.print(body, node);
  22960. }
  22961. function TSInterfaceBody$1(node) {
  22962. this.tsPrintTypeLiteralOrInterfaceBody(node.body, node);
  22963. }
  22964. function TSTypeAliasDeclaration$1(node) {
  22965. var declare = node.declare,
  22966. id = node.id,
  22967. typeParameters = node.typeParameters,
  22968. typeAnnotation = node.typeAnnotation;
  22969. if (declare) {
  22970. this.word("declare");
  22971. this.space();
  22972. }
  22973. this.word("type");
  22974. this.space();
  22975. this.print(id, node);
  22976. this.print(typeParameters, node);
  22977. this.space();
  22978. this.token("=");
  22979. this.space();
  22980. this.print(typeAnnotation, node);
  22981. this.token(";");
  22982. }
  22983. function TSAsExpression$2(node) {
  22984. var expression = node.expression,
  22985. typeAnnotation = node.typeAnnotation;
  22986. this.print(expression, node);
  22987. this.space();
  22988. this.word("as");
  22989. this.space();
  22990. this.print(typeAnnotation, node);
  22991. }
  22992. function TSTypeAssertion$2(node) {
  22993. var typeAnnotation = node.typeAnnotation,
  22994. expression = node.expression;
  22995. this.token("<");
  22996. this.print(typeAnnotation, node);
  22997. this.token(">");
  22998. this.space();
  22999. this.print(expression, node);
  23000. }
  23001. function TSEnumDeclaration$1(node) {
  23002. var declare = node.declare,
  23003. isConst = node["const"],
  23004. id = node.id,
  23005. members = node.members;
  23006. if (declare) {
  23007. this.word("declare");
  23008. this.space();
  23009. }
  23010. if (isConst) {
  23011. this.word("const");
  23012. this.space();
  23013. }
  23014. this.word("enum");
  23015. this.space();
  23016. this.print(id, node);
  23017. this.space();
  23018. this.tsPrintBraced(members, node);
  23019. }
  23020. function TSEnumMember$1(node) {
  23021. var id = node.id,
  23022. initializer = node.initializer;
  23023. this.print(id, node);
  23024. if (initializer) {
  23025. this.space();
  23026. this.token("=");
  23027. this.space();
  23028. this.print(initializer, node);
  23029. }
  23030. this.token(",");
  23031. }
  23032. function TSModuleDeclaration$1(node) {
  23033. var declare = node.declare,
  23034. id = node.id;
  23035. if (declare) {
  23036. this.word("declare");
  23037. this.space();
  23038. }
  23039. if (!node.global) {
  23040. this.word(id.type === "Identifier" ? "namespace" : "module");
  23041. this.space();
  23042. }
  23043. this.print(id, node);
  23044. if (!node.body) {
  23045. this.token(";");
  23046. return;
  23047. }
  23048. var body = node.body;
  23049. while (body.type === "TSModuleDeclaration") {
  23050. this.token(".");
  23051. this.print(body.id, body);
  23052. body = body.body;
  23053. }
  23054. this.space();
  23055. this.print(body, node);
  23056. }
  23057. function TSModuleBlock$1(node) {
  23058. this.tsPrintBraced(node.body, node);
  23059. }
  23060. function TSImportType$1(node) {
  23061. var argument = node.argument,
  23062. qualifier = node.qualifier,
  23063. typeParameters = node.typeParameters;
  23064. this.word("import");
  23065. this.token("(");
  23066. this.print(argument, node);
  23067. this.token(")");
  23068. if (qualifier) {
  23069. this.token(".");
  23070. this.print(qualifier, node);
  23071. }
  23072. if (typeParameters) {
  23073. this.print(typeParameters, node);
  23074. }
  23075. }
  23076. function TSImportEqualsDeclaration$1(node) {
  23077. var isExport = node.isExport,
  23078. id = node.id,
  23079. moduleReference = node.moduleReference;
  23080. if (isExport) {
  23081. this.word("export");
  23082. this.space();
  23083. }
  23084. this.word("import");
  23085. this.space();
  23086. this.print(id, node);
  23087. this.space();
  23088. this.token("=");
  23089. this.space();
  23090. this.print(moduleReference, node);
  23091. this.token(";");
  23092. }
  23093. function TSExternalModuleReference$1(node) {
  23094. this.token("require(");
  23095. this.print(node.expression, node);
  23096. this.token(")");
  23097. }
  23098. function TSNonNullExpression$1(node) {
  23099. this.print(node.expression, node);
  23100. this.token("!");
  23101. }
  23102. function TSExportAssignment$1(node) {
  23103. this.word("export");
  23104. this.space();
  23105. this.token("=");
  23106. this.space();
  23107. this.print(node.expression, node);
  23108. this.token(";");
  23109. }
  23110. function TSNamespaceExportDeclaration$1(node) {
  23111. this.word("export");
  23112. this.space();
  23113. this.word("as");
  23114. this.space();
  23115. this.word("namespace");
  23116. this.space();
  23117. this.print(node.id, node);
  23118. }
  23119. function tsPrintSignatureDeclarationBase(node) {
  23120. var typeParameters = node.typeParameters,
  23121. parameters = node.parameters;
  23122. this.print(typeParameters, node);
  23123. this.token("(");
  23124. this._parameters(parameters, node);
  23125. this.token(")");
  23126. this.print(node.typeAnnotation, node);
  23127. }
  23128. function tsPrintClassMemberModifiers(node, isField) {
  23129. if (isField && node.declare) {
  23130. this.word("declare");
  23131. this.space();
  23132. }
  23133. if (node.accessibility) {
  23134. this.word(node.accessibility);
  23135. this.space();
  23136. }
  23137. if (node["static"]) {
  23138. this.word("static");
  23139. this.space();
  23140. }
  23141. if (node["abstract"]) {
  23142. this.word("abstract");
  23143. this.space();
  23144. }
  23145. if (isField && node.readonly) {
  23146. this.word("readonly");
  23147. this.space();
  23148. }
  23149. }
  23150. var generatorFunctions = /*#__PURE__*/Object.freeze({
  23151. __proto__: null,
  23152. TaggedTemplateExpression: TaggedTemplateExpression$1,
  23153. TemplateElement: TemplateElement$1,
  23154. TemplateLiteral: TemplateLiteral$1,
  23155. UnaryExpression: UnaryExpression$1,
  23156. DoExpression: DoExpression$2,
  23157. ParenthesizedExpression: ParenthesizedExpression$1,
  23158. UpdateExpression: UpdateExpression$2,
  23159. ConditionalExpression: ConditionalExpression$2,
  23160. NewExpression: NewExpression$2,
  23161. SequenceExpression: SequenceExpression$2,
  23162. ThisExpression: ThisExpression$1,
  23163. Super: Super$1,
  23164. Decorator: Decorator$1,
  23165. OptionalMemberExpression: OptionalMemberExpression$2,
  23166. OptionalCallExpression: OptionalCallExpression$1,
  23167. CallExpression: CallExpression$1,
  23168. Import: Import$1,
  23169. YieldExpression: YieldExpression$2,
  23170. AwaitExpression: AwaitExpression$1,
  23171. EmptyStatement: EmptyStatement$1,
  23172. ExpressionStatement: ExpressionStatement$1,
  23173. AssignmentPattern: AssignmentPattern$1,
  23174. AssignmentExpression: AssignmentExpression$2,
  23175. BindExpression: BindExpression$1,
  23176. BinaryExpression: AssignmentExpression$2,
  23177. LogicalExpression: AssignmentExpression$2,
  23178. MemberExpression: MemberExpression$1,
  23179. MetaProperty: MetaProperty$1,
  23180. PrivateName: PrivateName$1,
  23181. V8IntrinsicIdentifier: V8IntrinsicIdentifier$1,
  23182. WithStatement: WithStatement$1,
  23183. IfStatement: IfStatement$1,
  23184. ForStatement: ForStatement$1,
  23185. WhileStatement: WhileStatement$1,
  23186. ForInStatement: ForInStatement$1,
  23187. ForOfStatement: ForOfStatement$1,
  23188. DoWhileStatement: DoWhileStatement$1,
  23189. ContinueStatement: ContinueStatement$1,
  23190. ReturnStatement: ReturnStatement$1,
  23191. BreakStatement: BreakStatement$1,
  23192. ThrowStatement: ThrowStatement$1,
  23193. LabeledStatement: LabeledStatement$1,
  23194. TryStatement: TryStatement$1,
  23195. CatchClause: CatchClause$1,
  23196. SwitchStatement: SwitchStatement$1,
  23197. SwitchCase: SwitchCase$1,
  23198. DebuggerStatement: DebuggerStatement$1,
  23199. VariableDeclaration: VariableDeclaration$1,
  23200. VariableDeclarator: VariableDeclarator$1,
  23201. ClassDeclaration: ClassDeclaration$1,
  23202. ClassExpression: ClassDeclaration$1,
  23203. ClassBody: ClassBody$1,
  23204. ClassProperty: ClassProperty$1,
  23205. ClassPrivateProperty: ClassPrivateProperty$1,
  23206. ClassMethod: ClassMethod$1,
  23207. ClassPrivateMethod: ClassPrivateMethod$1,
  23208. _classMethodHead: _classMethodHead,
  23209. _params: _params,
  23210. _parameters: _parameters,
  23211. _param: _param,
  23212. _methodHead: _methodHead,
  23213. _predicate: _predicate,
  23214. _functionHead: _functionHead,
  23215. FunctionExpression: FunctionExpression$2,
  23216. FunctionDeclaration: FunctionExpression$2,
  23217. ArrowFunctionExpression: ArrowFunctionExpression$2,
  23218. ImportSpecifier: ImportSpecifier$1,
  23219. ImportDefaultSpecifier: ImportDefaultSpecifier$1,
  23220. ExportDefaultSpecifier: ExportDefaultSpecifier$1,
  23221. ExportSpecifier: ExportSpecifier$1,
  23222. ExportNamespaceSpecifier: ExportNamespaceSpecifier$1,
  23223. ExportAllDeclaration: ExportAllDeclaration$1,
  23224. ExportNamedDeclaration: ExportNamedDeclaration$1,
  23225. ExportDefaultDeclaration: ExportDefaultDeclaration$1,
  23226. ImportDeclaration: ImportDeclaration$1,
  23227. ImportNamespaceSpecifier: ImportNamespaceSpecifier$1,
  23228. Identifier: Identifier$1,
  23229. ArgumentPlaceholder: ArgumentPlaceholder$1,
  23230. RestElement: RestElement$1,
  23231. SpreadElement: RestElement$1,
  23232. ObjectExpression: ObjectExpression$2,
  23233. ObjectPattern: ObjectExpression$2,
  23234. ObjectMethod: ObjectMethod$1,
  23235. ObjectProperty: ObjectProperty$1,
  23236. ArrayExpression: ArrayExpression$1,
  23237. ArrayPattern: ArrayExpression$1,
  23238. RegExpLiteral: RegExpLiteral$1,
  23239. BooleanLiteral: BooleanLiteral$1,
  23240. NullLiteral: NullLiteral$1,
  23241. NumericLiteral: NumericLiteral$1,
  23242. StringLiteral: StringLiteral$1,
  23243. BigIntLiteral: BigIntLiteral$1,
  23244. PipelineTopicExpression: PipelineTopicExpression$1,
  23245. PipelineBareFunction: PipelineBareFunction$1,
  23246. PipelinePrimaryTopicReference: PipelinePrimaryTopicReference$1,
  23247. AnyTypeAnnotation: AnyTypeAnnotation$1,
  23248. ArrayTypeAnnotation: ArrayTypeAnnotation$1,
  23249. BooleanTypeAnnotation: BooleanTypeAnnotation$1,
  23250. BooleanLiteralTypeAnnotation: BooleanLiteralTypeAnnotation$1,
  23251. NullLiteralTypeAnnotation: NullLiteralTypeAnnotation$1,
  23252. DeclareClass: DeclareClass$1,
  23253. DeclareFunction: DeclareFunction$1,
  23254. InferredPredicate: InferredPredicate$1,
  23255. DeclaredPredicate: DeclaredPredicate$1,
  23256. DeclareInterface: DeclareInterface$1,
  23257. DeclareModule: DeclareModule$1,
  23258. DeclareModuleExports: DeclareModuleExports$1,
  23259. DeclareTypeAlias: DeclareTypeAlias$1,
  23260. DeclareOpaqueType: DeclareOpaqueType$1,
  23261. DeclareVariable: DeclareVariable$1,
  23262. DeclareExportDeclaration: DeclareExportDeclaration$1,
  23263. DeclareExportAllDeclaration: DeclareExportAllDeclaration$1,
  23264. EnumDeclaration: EnumDeclaration$1,
  23265. EnumBooleanBody: EnumBooleanBody$1,
  23266. EnumNumberBody: EnumNumberBody$1,
  23267. EnumStringBody: EnumStringBody$1,
  23268. EnumSymbolBody: EnumSymbolBody$1,
  23269. EnumDefaultedMember: EnumDefaultedMember$1,
  23270. EnumBooleanMember: EnumBooleanMember$1,
  23271. EnumNumberMember: EnumNumberMember$1,
  23272. EnumStringMember: EnumStringMember$1,
  23273. ExistsTypeAnnotation: ExistsTypeAnnotation$1,
  23274. FunctionTypeAnnotation: FunctionTypeAnnotation$2,
  23275. FunctionTypeParam: FunctionTypeParam$1,
  23276. InterfaceExtends: InterfaceExtends$1,
  23277. ClassImplements: InterfaceExtends$1,
  23278. GenericTypeAnnotation: InterfaceExtends$1,
  23279. _interfaceish: _interfaceish,
  23280. _variance: _variance,
  23281. InterfaceDeclaration: InterfaceDeclaration$1,
  23282. InterfaceTypeAnnotation: InterfaceTypeAnnotation$1,
  23283. IntersectionTypeAnnotation: IntersectionTypeAnnotation$1,
  23284. MixedTypeAnnotation: MixedTypeAnnotation$1,
  23285. EmptyTypeAnnotation: EmptyTypeAnnotation$1,
  23286. NullableTypeAnnotation: NullableTypeAnnotation$2,
  23287. NumberTypeAnnotation: NumberTypeAnnotation$1,
  23288. StringTypeAnnotation: StringTypeAnnotation$1,
  23289. ThisTypeAnnotation: ThisTypeAnnotation$1,
  23290. TupleTypeAnnotation: TupleTypeAnnotation$1,
  23291. TypeofTypeAnnotation: TypeofTypeAnnotation$1,
  23292. TypeAlias: TypeAlias$1,
  23293. TypeAnnotation: TypeAnnotation$1,
  23294. TypeParameterInstantiation: TypeParameterInstantiation$1,
  23295. TypeParameterDeclaration: TypeParameterInstantiation$1,
  23296. TypeParameter: TypeParameter$1,
  23297. OpaqueType: OpaqueType$1,
  23298. ObjectTypeAnnotation: ObjectTypeAnnotation$1,
  23299. ObjectTypeInternalSlot: ObjectTypeInternalSlot$1,
  23300. ObjectTypeCallProperty: ObjectTypeCallProperty$1,
  23301. ObjectTypeIndexer: ObjectTypeIndexer$1,
  23302. ObjectTypeProperty: ObjectTypeProperty$1,
  23303. ObjectTypeSpreadProperty: ObjectTypeSpreadProperty$1,
  23304. QualifiedTypeIdentifier: QualifiedTypeIdentifier$1,
  23305. UnionTypeAnnotation: UnionTypeAnnotation$2,
  23306. TypeCastExpression: TypeCastExpression$1,
  23307. Variance: Variance$1,
  23308. VoidTypeAnnotation: VoidTypeAnnotation$1,
  23309. NumberLiteralTypeAnnotation: NumericLiteral$1,
  23310. StringLiteralTypeAnnotation: StringLiteral$1,
  23311. File: File$1,
  23312. Program: Program$1,
  23313. BlockStatement: BlockStatement$1,
  23314. Noop: Noop$1,
  23315. Directive: Directive$1,
  23316. DirectiveLiteral: DirectiveLiteral$1,
  23317. InterpreterDirective: InterpreterDirective$1,
  23318. Placeholder: Placeholder$1,
  23319. JSXAttribute: JSXAttribute$1,
  23320. JSXIdentifier: JSXIdentifier$1,
  23321. JSXNamespacedName: JSXNamespacedName$1,
  23322. JSXMemberExpression: JSXMemberExpression$1,
  23323. JSXSpreadAttribute: JSXSpreadAttribute$1,
  23324. JSXExpressionContainer: JSXExpressionContainer$1,
  23325. JSXSpreadChild: JSXSpreadChild$1,
  23326. JSXText: JSXText$1,
  23327. JSXElement: JSXElement$1,
  23328. JSXOpeningElement: JSXOpeningElement$1,
  23329. JSXClosingElement: JSXClosingElement$1,
  23330. JSXEmptyExpression: JSXEmptyExpression$1,
  23331. JSXFragment: JSXFragment$1,
  23332. JSXOpeningFragment: JSXOpeningFragment$1,
  23333. JSXClosingFragment: JSXClosingFragment$1,
  23334. TSTypeAnnotation: TSTypeAnnotation$1,
  23335. TSTypeParameterInstantiation: TSTypeParameterInstantiation$1,
  23336. TSTypeParameterDeclaration: TSTypeParameterInstantiation$1,
  23337. TSTypeParameter: TSTypeParameter$1,
  23338. TSParameterProperty: TSParameterProperty$1,
  23339. TSDeclareFunction: TSDeclareFunction$1,
  23340. TSDeclareMethod: TSDeclareMethod$1,
  23341. TSQualifiedName: TSQualifiedName$1,
  23342. TSCallSignatureDeclaration: TSCallSignatureDeclaration$1,
  23343. TSConstructSignatureDeclaration: TSConstructSignatureDeclaration$1,
  23344. TSPropertySignature: TSPropertySignature$1,
  23345. tsPrintPropertyOrMethodName: tsPrintPropertyOrMethodName,
  23346. TSMethodSignature: TSMethodSignature$1,
  23347. TSIndexSignature: TSIndexSignature$1,
  23348. TSAnyKeyword: TSAnyKeyword$1,
  23349. TSBigIntKeyword: TSBigIntKeyword$1,
  23350. TSUnknownKeyword: TSUnknownKeyword$1,
  23351. TSNumberKeyword: TSNumberKeyword$1,
  23352. TSObjectKeyword: TSObjectKeyword$1,
  23353. TSBooleanKeyword: TSBooleanKeyword$1,
  23354. TSStringKeyword: TSStringKeyword$1,
  23355. TSSymbolKeyword: TSSymbolKeyword$1,
  23356. TSVoidKeyword: TSVoidKeyword$1,
  23357. TSUndefinedKeyword: TSUndefinedKeyword$1,
  23358. TSNullKeyword: TSNullKeyword$1,
  23359. TSNeverKeyword: TSNeverKeyword$1,
  23360. TSThisType: TSThisType$1,
  23361. TSFunctionType: TSFunctionType$1,
  23362. TSConstructorType: TSConstructorType$1,
  23363. tsPrintFunctionOrConstructorType: tsPrintFunctionOrConstructorType,
  23364. TSTypeReference: TSTypeReference$1,
  23365. TSTypePredicate: TSTypePredicate$1,
  23366. TSTypeQuery: TSTypeQuery$1,
  23367. TSTypeLiteral: TSTypeLiteral$1,
  23368. tsPrintTypeLiteralOrInterfaceBody: tsPrintTypeLiteralOrInterfaceBody,
  23369. tsPrintBraced: tsPrintBraced,
  23370. TSArrayType: TSArrayType$1,
  23371. TSTupleType: TSTupleType$1,
  23372. TSOptionalType: TSOptionalType$1,
  23373. TSRestType: TSRestType$1,
  23374. TSUnionType: TSUnionType$2,
  23375. TSIntersectionType: TSIntersectionType$1,
  23376. tsPrintUnionOrIntersectionType: tsPrintUnionOrIntersectionType,
  23377. TSConditionalType: TSConditionalType$1,
  23378. TSInferType: TSInferType$1,
  23379. TSParenthesizedType: TSParenthesizedType$1,
  23380. TSTypeOperator: TSTypeOperator$1,
  23381. TSIndexedAccessType: TSIndexedAccessType$1,
  23382. TSMappedType: TSMappedType$1,
  23383. TSLiteralType: TSLiteralType$1,
  23384. TSExpressionWithTypeArguments: TSExpressionWithTypeArguments$1,
  23385. TSInterfaceDeclaration: TSInterfaceDeclaration$1,
  23386. TSInterfaceBody: TSInterfaceBody$1,
  23387. TSTypeAliasDeclaration: TSTypeAliasDeclaration$1,
  23388. TSAsExpression: TSAsExpression$2,
  23389. TSTypeAssertion: TSTypeAssertion$2,
  23390. TSEnumDeclaration: TSEnumDeclaration$1,
  23391. TSEnumMember: TSEnumMember$1,
  23392. TSModuleDeclaration: TSModuleDeclaration$1,
  23393. TSModuleBlock: TSModuleBlock$1,
  23394. TSImportType: TSImportType$1,
  23395. TSImportEqualsDeclaration: TSImportEqualsDeclaration$1,
  23396. TSExternalModuleReference: TSExternalModuleReference$1,
  23397. TSNonNullExpression: TSNonNullExpression$1,
  23398. TSExportAssignment: TSExportAssignment$1,
  23399. TSNamespaceExportDeclaration: TSNamespaceExportDeclaration$1,
  23400. tsPrintSignatureDeclarationBase: tsPrintSignatureDeclarationBase,
  23401. tsPrintClassMemberModifiers: tsPrintClassMemberModifiers
  23402. });
  23403. var SCIENTIFIC_NOTATION = /e/i;
  23404. var ZERO_DECIMAL_INTEGER = /\.0+$/;
  23405. var NON_DECIMAL_LITERAL = /^0[box]/;
  23406. var Printer = function () {
  23407. function Printer(format, map) {
  23408. this.inForStatementInitCounter = 0;
  23409. this._printStack = [];
  23410. this._indent = 0;
  23411. this._insideAux = false;
  23412. this._printedCommentStarts = {};
  23413. this._parenPushNewlineState = null;
  23414. this._noLineTerminator = false;
  23415. this._printAuxAfterOnNextUserNode = false;
  23416. this._printedComments = new WeakSet();
  23417. this._endsWithInteger = false;
  23418. this._endsWithWord = false;
  23419. this.format = format || {};
  23420. this._buf = new Buffer(map);
  23421. }
  23422. var _proto = Printer.prototype;
  23423. _proto.generate = function generate(ast) {
  23424. this.print(ast);
  23425. this._maybeAddAuxComment();
  23426. return this._buf.get();
  23427. };
  23428. _proto.indent = function indent() {
  23429. if (this.format.compact || this.format.concise) return;
  23430. this._indent++;
  23431. };
  23432. _proto.dedent = function dedent() {
  23433. if (this.format.compact || this.format.concise) return;
  23434. this._indent--;
  23435. };
  23436. _proto.semicolon = function semicolon(force) {
  23437. if (force === void 0) {
  23438. force = false;
  23439. }
  23440. this._maybeAddAuxComment();
  23441. this._append(";", !force);
  23442. };
  23443. _proto.rightBrace = function rightBrace() {
  23444. if (this.format.minified) {
  23445. this._buf.removeLastSemicolon();
  23446. }
  23447. this.token("}");
  23448. };
  23449. _proto.space = function space(force) {
  23450. if (force === void 0) {
  23451. force = false;
  23452. }
  23453. if (this.format.compact) return;
  23454. if (this._buf.hasContent() && !this.endsWith(" ") && !this.endsWith("\n") || force) {
  23455. this._space();
  23456. }
  23457. };
  23458. _proto.word = function word(str) {
  23459. if (this._endsWithWord || this.endsWith("/") && str.indexOf("/") === 0) {
  23460. this._space();
  23461. }
  23462. this._maybeAddAuxComment();
  23463. this._append(str);
  23464. this._endsWithWord = true;
  23465. };
  23466. _proto.number = function number(str) {
  23467. this.word(str);
  23468. this._endsWithInteger = isInteger_1(+str) && !NON_DECIMAL_LITERAL.test(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str[str.length - 1] !== ".";
  23469. };
  23470. _proto.token = function token(str) {
  23471. if (str === "--" && this.endsWith("!") || str[0] === "+" && this.endsWith("+") || str[0] === "-" && this.endsWith("-") || str[0] === "." && this._endsWithInteger) {
  23472. this._space();
  23473. }
  23474. this._maybeAddAuxComment();
  23475. this._append(str);
  23476. };
  23477. _proto.newline = function newline(i) {
  23478. if (this.format.retainLines || this.format.compact) return;
  23479. if (this.format.concise) {
  23480. this.space();
  23481. return;
  23482. }
  23483. if (this.endsWith("\n\n")) return;
  23484. if (typeof i !== "number") i = 1;
  23485. i = Math.min(2, i);
  23486. if (this.endsWith("{\n") || this.endsWith(":\n")) i--;
  23487. if (i <= 0) return;
  23488. for (var j = 0; j < i; j++) {
  23489. this._newline();
  23490. }
  23491. };
  23492. _proto.endsWith = function endsWith(str) {
  23493. return this._buf.endsWith(str);
  23494. };
  23495. _proto.removeTrailingNewline = function removeTrailingNewline() {
  23496. this._buf.removeTrailingNewline();
  23497. };
  23498. _proto.exactSource = function exactSource(loc, cb) {
  23499. this._catchUp("start", loc);
  23500. this._buf.exactSource(loc, cb);
  23501. };
  23502. _proto.source = function source(prop, loc) {
  23503. this._catchUp(prop, loc);
  23504. this._buf.source(prop, loc);
  23505. };
  23506. _proto.withSource = function withSource(prop, loc, cb) {
  23507. this._catchUp(prop, loc);
  23508. this._buf.withSource(prop, loc, cb);
  23509. };
  23510. _proto._space = function _space() {
  23511. this._append(" ", true);
  23512. };
  23513. _proto._newline = function _newline() {
  23514. this._append("\n", true);
  23515. };
  23516. _proto._append = function _append(str, queue) {
  23517. if (queue === void 0) {
  23518. queue = false;
  23519. }
  23520. this._maybeAddParen(str);
  23521. this._maybeIndent(str);
  23522. if (queue) this._buf.queue(str);else this._buf.append(str);
  23523. this._endsWithWord = false;
  23524. this._endsWithInteger = false;
  23525. };
  23526. _proto._maybeIndent = function _maybeIndent(str) {
  23527. if (this._indent && this.endsWith("\n") && str[0] !== "\n") {
  23528. this._buf.queue(this._getIndent());
  23529. }
  23530. };
  23531. _proto._maybeAddParen = function _maybeAddParen(str) {
  23532. var parenPushNewlineState = this._parenPushNewlineState;
  23533. if (!parenPushNewlineState) return;
  23534. this._parenPushNewlineState = null;
  23535. var i;
  23536. for (i = 0; i < str.length && str[i] === " "; i++) {
  23537. continue;
  23538. }
  23539. if (i === str.length) return;
  23540. var cha = str[i];
  23541. if (cha !== "\n") {
  23542. if (cha !== "/") return;
  23543. if (i + 1 === str.length) return;
  23544. var chaPost = str[i + 1];
  23545. if (chaPost !== "/" && chaPost !== "*") return;
  23546. }
  23547. this.token("(");
  23548. this.indent();
  23549. parenPushNewlineState.printed = true;
  23550. };
  23551. _proto._catchUp = function _catchUp(prop, loc) {
  23552. if (!this.format.retainLines) return;
  23553. var pos = loc ? loc[prop] : null;
  23554. if (pos && pos.line !== null) {
  23555. var count = pos.line - this._buf.getCurrentLine();
  23556. for (var i = 0; i < count; i++) {
  23557. this._newline();
  23558. }
  23559. }
  23560. };
  23561. _proto._getIndent = function _getIndent() {
  23562. return repeat_1(this.format.indent.style, this._indent);
  23563. };
  23564. _proto.startTerminatorless = function startTerminatorless(isLabel) {
  23565. if (isLabel === void 0) {
  23566. isLabel = false;
  23567. }
  23568. if (isLabel) {
  23569. this._noLineTerminator = true;
  23570. return null;
  23571. } else {
  23572. return this._parenPushNewlineState = {
  23573. printed: false
  23574. };
  23575. }
  23576. };
  23577. _proto.endTerminatorless = function endTerminatorless(state) {
  23578. this._noLineTerminator = false;
  23579. if (state && state.printed) {
  23580. this.dedent();
  23581. this.newline();
  23582. this.token(")");
  23583. }
  23584. };
  23585. _proto.print = function print(node, parent) {
  23586. var _this = this;
  23587. if (!node) return;
  23588. var oldConcise = this.format.concise;
  23589. if (node._compact) {
  23590. this.format.concise = true;
  23591. }
  23592. var printMethod = this[node.type];
  23593. if (!printMethod) {
  23594. throw new ReferenceError("unknown node of type " + JSON.stringify(node.type) + " with constructor " + JSON.stringify(node && node.constructor.name));
  23595. }
  23596. this._printStack.push(node);
  23597. var oldInAux = this._insideAux;
  23598. this._insideAux = !node.loc;
  23599. this._maybeAddAuxComment(this._insideAux && !oldInAux);
  23600. var needsParens$1 = needsParens(node, parent, this._printStack);
  23601. if (this.format.retainFunctionParens && node.type === "FunctionExpression" && node.extra && node.extra.parenthesized) {
  23602. needsParens$1 = true;
  23603. }
  23604. if (needsParens$1) this.token("(");
  23605. this._printLeadingComments(node);
  23606. var loc = isProgram(node) || isFile(node) ? null : node.loc;
  23607. this.withSource("start", loc, function () {
  23608. printMethod.call(_this, node, parent);
  23609. });
  23610. this._printTrailingComments(node);
  23611. if (needsParens$1) this.token(")");
  23612. this._printStack.pop();
  23613. this.format.concise = oldConcise;
  23614. this._insideAux = oldInAux;
  23615. };
  23616. _proto._maybeAddAuxComment = function _maybeAddAuxComment(enteredPositionlessNode) {
  23617. if (enteredPositionlessNode) this._printAuxBeforeComment();
  23618. if (!this._insideAux) this._printAuxAfterComment();
  23619. };
  23620. _proto._printAuxBeforeComment = function _printAuxBeforeComment() {
  23621. if (this._printAuxAfterOnNextUserNode) return;
  23622. this._printAuxAfterOnNextUserNode = true;
  23623. var comment = this.format.auxiliaryCommentBefore;
  23624. if (comment) {
  23625. this._printComment({
  23626. type: "CommentBlock",
  23627. value: comment
  23628. });
  23629. }
  23630. };
  23631. _proto._printAuxAfterComment = function _printAuxAfterComment() {
  23632. if (!this._printAuxAfterOnNextUserNode) return;
  23633. this._printAuxAfterOnNextUserNode = false;
  23634. var comment = this.format.auxiliaryCommentAfter;
  23635. if (comment) {
  23636. this._printComment({
  23637. type: "CommentBlock",
  23638. value: comment
  23639. });
  23640. }
  23641. };
  23642. _proto.getPossibleRaw = function getPossibleRaw(node) {
  23643. var extra = node.extra;
  23644. if (extra && extra.raw != null && extra.rawValue != null && node.value === extra.rawValue) {
  23645. return extra.raw;
  23646. }
  23647. };
  23648. _proto.printJoin = function printJoin(nodes, parent, opts) {
  23649. if (opts === void 0) {
  23650. opts = {};
  23651. }
  23652. if (!nodes || !nodes.length) return;
  23653. if (opts.indent) this.indent();
  23654. var newlineOpts = {
  23655. addNewlines: opts.addNewlines
  23656. };
  23657. for (var i = 0; i < nodes.length; i++) {
  23658. var node = nodes[i];
  23659. if (!node) continue;
  23660. if (opts.statement) this._printNewline(true, node, parent, newlineOpts);
  23661. this.print(node, parent);
  23662. if (opts.iterator) {
  23663. opts.iterator(node, i);
  23664. }
  23665. if (opts.separator && i < nodes.length - 1) {
  23666. opts.separator.call(this);
  23667. }
  23668. if (opts.statement) this._printNewline(false, node, parent, newlineOpts);
  23669. }
  23670. if (opts.indent) this.dedent();
  23671. };
  23672. _proto.printAndIndentOnComments = function printAndIndentOnComments(node, parent) {
  23673. var indent = node.leadingComments && node.leadingComments.length > 0;
  23674. if (indent) this.indent();
  23675. this.print(node, parent);
  23676. if (indent) this.dedent();
  23677. };
  23678. _proto.printBlock = function printBlock(parent) {
  23679. var node = parent.body;
  23680. if (!isEmptyStatement(node)) {
  23681. this.space();
  23682. }
  23683. this.print(node, parent);
  23684. };
  23685. _proto._printTrailingComments = function _printTrailingComments(node) {
  23686. this._printComments(this._getComments(false, node));
  23687. };
  23688. _proto._printLeadingComments = function _printLeadingComments(node) {
  23689. this._printComments(this._getComments(true, node));
  23690. };
  23691. _proto.printInnerComments = function printInnerComments(node, indent) {
  23692. if (indent === void 0) {
  23693. indent = true;
  23694. }
  23695. if (!node.innerComments || !node.innerComments.length) return;
  23696. if (indent) this.indent();
  23697. this._printComments(node.innerComments);
  23698. if (indent) this.dedent();
  23699. };
  23700. _proto.printSequence = function printSequence(nodes, parent, opts) {
  23701. if (opts === void 0) {
  23702. opts = {};
  23703. }
  23704. opts.statement = true;
  23705. return this.printJoin(nodes, parent, opts);
  23706. };
  23707. _proto.printList = function printList(items, parent, opts) {
  23708. if (opts === void 0) {
  23709. opts = {};
  23710. }
  23711. if (opts.separator == null) {
  23712. opts.separator = commaSeparator;
  23713. }
  23714. return this.printJoin(items, parent, opts);
  23715. };
  23716. _proto._printNewline = function _printNewline(leading, node, parent, opts) {
  23717. if (this.format.retainLines || this.format.compact) return;
  23718. if (this.format.concise) {
  23719. this.space();
  23720. return;
  23721. }
  23722. var lines = 0;
  23723. if (this._buf.hasContent()) {
  23724. if (!leading) lines++;
  23725. if (opts.addNewlines) lines += opts.addNewlines(leading, node) || 0;
  23726. var needs = leading ? needsWhitespaceBefore : needsWhitespaceAfter;
  23727. if (needs(node, parent)) lines++;
  23728. }
  23729. this.newline(lines);
  23730. };
  23731. _proto._getComments = function _getComments(leading, node) {
  23732. return node && (leading ? node.leadingComments : node.trailingComments) || [];
  23733. };
  23734. _proto._printComment = function _printComment(comment) {
  23735. var _this2 = this;
  23736. if (!this.format.shouldPrintComment(comment.value)) return;
  23737. if (comment.ignore) return;
  23738. if (this._printedComments.has(comment)) return;
  23739. this._printedComments.add(comment);
  23740. if (comment.start != null) {
  23741. if (this._printedCommentStarts[comment.start]) return;
  23742. this._printedCommentStarts[comment.start] = true;
  23743. }
  23744. var isBlockComment = comment.type === "CommentBlock";
  23745. this.newline(this._buf.hasContent() && !this._noLineTerminator && isBlockComment ? 1 : 0);
  23746. if (!this.endsWith("[") && !this.endsWith("{")) this.space();
  23747. var val = !isBlockComment && !this._noLineTerminator ? "//" + comment.value + "\n" : "/*" + comment.value + "*/";
  23748. if (isBlockComment && this.format.indent.adjustMultilineComment) {
  23749. var offset = comment.loc && comment.loc.start.column;
  23750. if (offset) {
  23751. var newlineRegex = new RegExp("\\n\\s{1," + offset + "}", "g");
  23752. val = val.replace(newlineRegex, "\n");
  23753. }
  23754. var indentSize = Math.max(this._getIndent().length, this._buf.getCurrentColumn());
  23755. val = val.replace(/\n(?!$)/g, "\n" + repeat_1(" ", indentSize));
  23756. }
  23757. if (this.endsWith("/")) this._space();
  23758. this.withSource("start", comment.loc, function () {
  23759. _this2._append(val);
  23760. });
  23761. this.newline(isBlockComment && !this._noLineTerminator ? 1 : 0);
  23762. };
  23763. _proto._printComments = function _printComments(comments) {
  23764. if (!comments || !comments.length) return;
  23765. for (var _iterator = comments, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  23766. var _ref;
  23767. if (_isArray) {
  23768. if (_i >= _iterator.length) break;
  23769. _ref = _iterator[_i++];
  23770. } else {
  23771. _i = _iterator.next();
  23772. if (_i.done) break;
  23773. _ref = _i.value;
  23774. }
  23775. var _comment = _ref;
  23776. this._printComment(_comment);
  23777. }
  23778. };
  23779. return Printer;
  23780. }();
  23781. Object.assign(Printer.prototype, generatorFunctions);
  23782. function commaSeparator() {
  23783. this.token(",");
  23784. this.space();
  23785. }
  23786. var Generator = function (_Printer) {
  23787. _inheritsLoose(Generator, _Printer);
  23788. function Generator(ast, opts, code) {
  23789. var _this;
  23790. if (opts === void 0) {
  23791. opts = {};
  23792. }
  23793. var format = normalizeOptions(code, opts);
  23794. var map = opts.sourceMaps ? new SourceMap(opts, code) : null;
  23795. _this = _Printer.call(this, format, map) || this;
  23796. _this.ast = ast;
  23797. return _this;
  23798. }
  23799. var _proto = Generator.prototype;
  23800. _proto.generate = function generate() {
  23801. return _Printer.prototype.generate.call(this, this.ast);
  23802. };
  23803. return Generator;
  23804. }(Printer);
  23805. function normalizeOptions(code, opts) {
  23806. var format = {
  23807. auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
  23808. auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
  23809. shouldPrintComment: opts.shouldPrintComment,
  23810. retainLines: opts.retainLines,
  23811. retainFunctionParens: opts.retainFunctionParens,
  23812. comments: opts.comments == null || opts.comments,
  23813. compact: opts.compact,
  23814. minified: opts.minified,
  23815. concise: opts.concise,
  23816. jsonCompatibleStrings: opts.jsonCompatibleStrings,
  23817. indent: {
  23818. adjustMultilineComment: true,
  23819. style: " ",
  23820. base: 0
  23821. },
  23822. decoratorsBeforeExport: !!opts.decoratorsBeforeExport,
  23823. jsescOption: Object.assign({
  23824. quotes: "double",
  23825. wrap: true
  23826. }, opts.jsescOption)
  23827. };
  23828. if (format.minified) {
  23829. format.compact = true;
  23830. format.shouldPrintComment = format.shouldPrintComment || function () {
  23831. return format.comments;
  23832. };
  23833. } else {
  23834. format.shouldPrintComment = format.shouldPrintComment || function (value) {
  23835. return format.comments || value.indexOf("@license") >= 0 || value.indexOf("@preserve") >= 0;
  23836. };
  23837. }
  23838. if (format.compact === "auto") {
  23839. format.compact = code.length > 500000;
  23840. if (format.compact) {
  23841. console.error("[BABEL] Note: The code generator has deoptimised the styling of " + (opts.filename + " as it exceeds the max of " + "500KB" + "."));
  23842. }
  23843. }
  23844. if (format.compact) {
  23845. format.indent.adjustMultilineComment = false;
  23846. }
  23847. return format;
  23848. }
  23849. function generateCode (ast, opts, code) {
  23850. var gen = new Generator(ast, opts, code);
  23851. return gen.generate();
  23852. }
  23853. function findParent(callback) {
  23854. var path = this;
  23855. while (path = path.parentPath) {
  23856. if (callback(path)) return path;
  23857. }
  23858. return null;
  23859. }
  23860. function find$1(callback) {
  23861. var path = this;
  23862. do {
  23863. if (callback(path)) return path;
  23864. } while (path = path.parentPath);
  23865. return null;
  23866. }
  23867. function getFunctionParent() {
  23868. return this.findParent(function (p) {
  23869. return p.isFunction();
  23870. });
  23871. }
  23872. function getStatementParent() {
  23873. var path = this;
  23874. do {
  23875. if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
  23876. break;
  23877. } else {
  23878. path = path.parentPath;
  23879. }
  23880. } while (path);
  23881. if (path && (path.isProgram() || path.isFile())) {
  23882. throw new Error("File/Program node, we can't possibly find a statement parent to this");
  23883. }
  23884. return path;
  23885. }
  23886. function getEarliestCommonAncestorFrom(paths) {
  23887. return this.getDeepestCommonAncestorFrom(paths, function (deepest, i, ancestries) {
  23888. var earliest;
  23889. var keys = VISITOR_KEYS[deepest.type];
  23890. for (var _i = 0, _arr = ancestries; _i < _arr.length; _i++) {
  23891. var ancestry = _arr[_i];
  23892. var path = ancestry[i + 1];
  23893. if (!earliest) {
  23894. earliest = path;
  23895. continue;
  23896. }
  23897. if (path.listKey && earliest.listKey === path.listKey) {
  23898. if (path.key < earliest.key) {
  23899. earliest = path;
  23900. continue;
  23901. }
  23902. }
  23903. var earliestKeyIndex = keys.indexOf(earliest.parentKey);
  23904. var currentKeyIndex = keys.indexOf(path.parentKey);
  23905. if (earliestKeyIndex > currentKeyIndex) {
  23906. earliest = path;
  23907. }
  23908. }
  23909. return earliest;
  23910. });
  23911. }
  23912. function getDeepestCommonAncestorFrom(paths, filter) {
  23913. var _this = this;
  23914. if (!paths.length) {
  23915. return this;
  23916. }
  23917. if (paths.length === 1) {
  23918. return paths[0];
  23919. }
  23920. var minDepth = Infinity;
  23921. var lastCommonIndex, lastCommon;
  23922. var ancestries = paths.map(function (path) {
  23923. var ancestry = [];
  23924. do {
  23925. ancestry.unshift(path);
  23926. } while ((path = path.parentPath) && path !== _this);
  23927. if (ancestry.length < minDepth) {
  23928. minDepth = ancestry.length;
  23929. }
  23930. return ancestry;
  23931. });
  23932. var first = ancestries[0];
  23933. depthLoop: for (var i = 0; i < minDepth; i++) {
  23934. var shouldMatch = first[i];
  23935. for (var _i2 = 0, _arr2 = ancestries; _i2 < _arr2.length; _i2++) {
  23936. var ancestry = _arr2[_i2];
  23937. if (ancestry[i] !== shouldMatch) {
  23938. break depthLoop;
  23939. }
  23940. }
  23941. lastCommonIndex = i;
  23942. lastCommon = shouldMatch;
  23943. }
  23944. if (lastCommon) {
  23945. if (filter) {
  23946. return filter(lastCommon, lastCommonIndex, ancestries);
  23947. } else {
  23948. return lastCommon;
  23949. }
  23950. } else {
  23951. throw new Error("Couldn't find intersection");
  23952. }
  23953. }
  23954. function getAncestry() {
  23955. var path = this;
  23956. var paths = [];
  23957. do {
  23958. paths.push(path);
  23959. } while (path = path.parentPath);
  23960. return paths;
  23961. }
  23962. function isAncestor(maybeDescendant) {
  23963. return maybeDescendant.isDescendant(this);
  23964. }
  23965. function isDescendant(maybeAncestor) {
  23966. return !!this.findParent(function (parent) {
  23967. return parent === maybeAncestor;
  23968. });
  23969. }
  23970. function inType() {
  23971. var path = this;
  23972. while (path) {
  23973. for (var _i3 = 0, _arr3 = arguments; _i3 < _arr3.length; _i3++) {
  23974. var type = _arr3[_i3];
  23975. if (path.node.type === type) return true;
  23976. }
  23977. path = path.parentPath;
  23978. }
  23979. return false;
  23980. }
  23981. var NodePath_ancestry = /*#__PURE__*/Object.freeze({
  23982. __proto__: null,
  23983. findParent: findParent,
  23984. find: find$1,
  23985. getFunctionParent: getFunctionParent,
  23986. getStatementParent: getStatementParent,
  23987. getEarliestCommonAncestorFrom: getEarliestCommonAncestorFrom,
  23988. getDeepestCommonAncestorFrom: getDeepestCommonAncestorFrom,
  23989. getAncestry: getAncestry,
  23990. isAncestor: isAncestor,
  23991. isDescendant: isDescendant,
  23992. inType: inType
  23993. });
  23994. function infererReference (node) {
  23995. if (!this.isReferenced()) return;
  23996. var binding = this.scope.getBinding(node.name);
  23997. if (binding) {
  23998. if (binding.identifier.typeAnnotation) {
  23999. return binding.identifier.typeAnnotation;
  24000. } else {
  24001. return getTypeAnnotationBindingConstantViolations(binding, this, node.name);
  24002. }
  24003. }
  24004. if (node.name === "undefined") {
  24005. return VoidTypeAnnotation();
  24006. } else if (node.name === "NaN" || node.name === "Infinity") {
  24007. return NumberTypeAnnotation();
  24008. } else if (node.name === "arguments") ;
  24009. }
  24010. function getTypeAnnotationBindingConstantViolations(binding, path, name) {
  24011. var types = [];
  24012. var functionConstantViolations = [];
  24013. var constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations);
  24014. var testType = getConditionalAnnotation(binding, path, name);
  24015. if (testType) {
  24016. var testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement);
  24017. constantViolations = constantViolations.filter(function (path) {
  24018. return testConstantViolations.indexOf(path) < 0;
  24019. });
  24020. types.push(testType.typeAnnotation);
  24021. }
  24022. if (constantViolations.length) {
  24023. constantViolations = constantViolations.concat(functionConstantViolations);
  24024. for (var _i = 0, _arr = constantViolations; _i < _arr.length; _i++) {
  24025. var violation = _arr[_i];
  24026. types.push(violation.getTypeAnnotation());
  24027. }
  24028. }
  24029. if (types.length) {
  24030. return createUnionTypeAnnotation(types);
  24031. }
  24032. }
  24033. function getConstantViolationsBefore(binding, path, functions) {
  24034. var violations = binding.constantViolations.slice();
  24035. violations.unshift(binding.path);
  24036. return violations.filter(function (violation) {
  24037. violation = violation.resolve();
  24038. var status = violation._guessExecutionStatusRelativeTo(path);
  24039. if (functions && status === "unknown") functions.push(violation);
  24040. return status === "before";
  24041. });
  24042. }
  24043. function inferAnnotationFromBinaryExpression(name, path) {
  24044. var operator = path.node.operator;
  24045. var right = path.get("right").resolve();
  24046. var left = path.get("left").resolve();
  24047. var target;
  24048. if (left.isIdentifier({
  24049. name: name
  24050. })) {
  24051. target = right;
  24052. } else if (right.isIdentifier({
  24053. name: name
  24054. })) {
  24055. target = left;
  24056. }
  24057. if (target) {
  24058. if (operator === "===") {
  24059. return target.getTypeAnnotation();
  24060. }
  24061. if (BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
  24062. return NumberTypeAnnotation();
  24063. }
  24064. return;
  24065. }
  24066. if (operator !== "===" && operator !== "==") return;
  24067. var typeofPath;
  24068. var typePath;
  24069. if (left.isUnaryExpression({
  24070. operator: "typeof"
  24071. })) {
  24072. typeofPath = left;
  24073. typePath = right;
  24074. } else if (right.isUnaryExpression({
  24075. operator: "typeof"
  24076. })) {
  24077. typeofPath = right;
  24078. typePath = left;
  24079. }
  24080. if (!typeofPath) return;
  24081. if (!typeofPath.get("argument").isIdentifier({
  24082. name: name
  24083. })) return;
  24084. typePath = typePath.resolve();
  24085. if (!typePath.isLiteral()) return;
  24086. var typeValue = typePath.node.value;
  24087. if (typeof typeValue !== "string") return;
  24088. return createTypeAnnotationBasedOnTypeof(typeValue);
  24089. }
  24090. function getParentConditionalPath(binding, path, name) {
  24091. var parentPath;
  24092. while (parentPath = path.parentPath) {
  24093. if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) {
  24094. if (path.key === "test") {
  24095. return;
  24096. }
  24097. return parentPath;
  24098. }
  24099. if (parentPath.isFunction()) {
  24100. if (parentPath.parentPath.scope.getBinding(name) !== binding) return;
  24101. }
  24102. path = parentPath;
  24103. }
  24104. }
  24105. function getConditionalAnnotation(binding, path, name) {
  24106. var ifStatement = getParentConditionalPath(binding, path, name);
  24107. if (!ifStatement) return;
  24108. var test = ifStatement.get("test");
  24109. var paths = [test];
  24110. var types = [];
  24111. for (var i = 0; i < paths.length; i++) {
  24112. var _path = paths[i];
  24113. if (_path.isLogicalExpression()) {
  24114. if (_path.node.operator === "&&") {
  24115. paths.push(_path.get("left"));
  24116. paths.push(_path.get("right"));
  24117. }
  24118. } else if (_path.isBinaryExpression()) {
  24119. var type = inferAnnotationFromBinaryExpression(name, _path);
  24120. if (type) types.push(type);
  24121. }
  24122. }
  24123. if (types.length) {
  24124. return {
  24125. typeAnnotation: createUnionTypeAnnotation(types),
  24126. ifStatement: ifStatement
  24127. };
  24128. }
  24129. return getConditionalAnnotation(ifStatement, name);
  24130. }
  24131. function VariableDeclarator$2() {
  24132. var id = this.get("id");
  24133. if (!id.isIdentifier()) return;
  24134. var init = this.get("init");
  24135. var type = init.getTypeAnnotation();
  24136. if (type && type.type === "AnyTypeAnnotation") {
  24137. if (init.isCallExpression() && init.get("callee").isIdentifier({
  24138. name: "Array"
  24139. }) && !init.scope.hasBinding("Array", true)) {
  24140. type = ArrayExpression$2();
  24141. }
  24142. }
  24143. return type;
  24144. }
  24145. function TypeCastExpression$2(node) {
  24146. return node.typeAnnotation;
  24147. }
  24148. TypeCastExpression$2.validParent = true;
  24149. function NewExpression$3(node) {
  24150. if (this.get("callee").isIdentifier()) {
  24151. return GenericTypeAnnotation(node.callee);
  24152. }
  24153. }
  24154. function TemplateLiteral$2() {
  24155. return StringTypeAnnotation();
  24156. }
  24157. function UnaryExpression$2(node) {
  24158. var operator = node.operator;
  24159. if (operator === "void") {
  24160. return VoidTypeAnnotation();
  24161. } else if (NUMBER_UNARY_OPERATORS.indexOf(operator) >= 0) {
  24162. return NumberTypeAnnotation();
  24163. } else if (STRING_UNARY_OPERATORS.indexOf(operator) >= 0) {
  24164. return StringTypeAnnotation();
  24165. } else if (BOOLEAN_UNARY_OPERATORS.indexOf(operator) >= 0) {
  24166. return BooleanTypeAnnotation();
  24167. }
  24168. }
  24169. function BinaryExpression$2(node) {
  24170. var operator = node.operator;
  24171. if (NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
  24172. return NumberTypeAnnotation();
  24173. } else if (BOOLEAN_BINARY_OPERATORS.indexOf(operator) >= 0) {
  24174. return BooleanTypeAnnotation();
  24175. } else if (operator === "+") {
  24176. var right = this.get("right");
  24177. var left = this.get("left");
  24178. if (left.isBaseType("number") && right.isBaseType("number")) {
  24179. return NumberTypeAnnotation();
  24180. } else if (left.isBaseType("string") || right.isBaseType("string")) {
  24181. return StringTypeAnnotation();
  24182. }
  24183. return UnionTypeAnnotation([StringTypeAnnotation(), NumberTypeAnnotation()]);
  24184. }
  24185. }
  24186. function LogicalExpression$1() {
  24187. return createUnionTypeAnnotation([this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation()]);
  24188. }
  24189. function ConditionalExpression$3() {
  24190. return createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation()]);
  24191. }
  24192. function SequenceExpression$3() {
  24193. return this.get("expressions").pop().getTypeAnnotation();
  24194. }
  24195. function ParenthesizedExpression$2() {
  24196. return this.get("expression").getTypeAnnotation();
  24197. }
  24198. function AssignmentExpression$3() {
  24199. return this.get("right").getTypeAnnotation();
  24200. }
  24201. function UpdateExpression$3(node) {
  24202. var operator = node.operator;
  24203. if (operator === "++" || operator === "--") {
  24204. return NumberTypeAnnotation();
  24205. }
  24206. }
  24207. function StringLiteral$2() {
  24208. return StringTypeAnnotation();
  24209. }
  24210. function NumericLiteral$2() {
  24211. return NumberTypeAnnotation();
  24212. }
  24213. function BooleanLiteral$2() {
  24214. return BooleanTypeAnnotation();
  24215. }
  24216. function NullLiteral$2() {
  24217. return NullLiteralTypeAnnotation();
  24218. }
  24219. function RegExpLiteral$2() {
  24220. return GenericTypeAnnotation(Identifier("RegExp"));
  24221. }
  24222. function ObjectExpression$3() {
  24223. return GenericTypeAnnotation(Identifier("Object"));
  24224. }
  24225. function ArrayExpression$2() {
  24226. return GenericTypeAnnotation(Identifier("Array"));
  24227. }
  24228. function RestElement$2() {
  24229. return ArrayExpression$2();
  24230. }
  24231. RestElement$2.validParent = true;
  24232. function Func() {
  24233. return GenericTypeAnnotation(Identifier("Function"));
  24234. }
  24235. var isArrayFrom = buildMatchMemberExpression("Array.from");
  24236. var isObjectKeys = buildMatchMemberExpression("Object.keys");
  24237. var isObjectValues = buildMatchMemberExpression("Object.values");
  24238. var isObjectEntries = buildMatchMemberExpression("Object.entries");
  24239. function CallExpression$2() {
  24240. var callee = this.node.callee;
  24241. if (isObjectKeys(callee)) {
  24242. return ArrayTypeAnnotation(StringTypeAnnotation());
  24243. } else if (isArrayFrom(callee) || isObjectValues(callee)) {
  24244. return ArrayTypeAnnotation(AnyTypeAnnotation());
  24245. } else if (isObjectEntries(callee)) {
  24246. return ArrayTypeAnnotation(TupleTypeAnnotation([StringTypeAnnotation(), AnyTypeAnnotation()]));
  24247. }
  24248. return resolveCall(this.get("callee"));
  24249. }
  24250. function TaggedTemplateExpression$2() {
  24251. return resolveCall(this.get("tag"));
  24252. }
  24253. function resolveCall(callee) {
  24254. callee = callee.resolve();
  24255. if (callee.isFunction()) {
  24256. if (callee.is("async")) {
  24257. if (callee.is("generator")) {
  24258. return GenericTypeAnnotation(Identifier("AsyncIterator"));
  24259. } else {
  24260. return GenericTypeAnnotation(Identifier("Promise"));
  24261. }
  24262. } else {
  24263. if (callee.node.returnType) {
  24264. return callee.node.returnType;
  24265. }
  24266. }
  24267. }
  24268. }
  24269. var inferers = /*#__PURE__*/Object.freeze({
  24270. __proto__: null,
  24271. VariableDeclarator: VariableDeclarator$2,
  24272. TypeCastExpression: TypeCastExpression$2,
  24273. NewExpression: NewExpression$3,
  24274. TemplateLiteral: TemplateLiteral$2,
  24275. UnaryExpression: UnaryExpression$2,
  24276. BinaryExpression: BinaryExpression$2,
  24277. LogicalExpression: LogicalExpression$1,
  24278. ConditionalExpression: ConditionalExpression$3,
  24279. SequenceExpression: SequenceExpression$3,
  24280. ParenthesizedExpression: ParenthesizedExpression$2,
  24281. AssignmentExpression: AssignmentExpression$3,
  24282. UpdateExpression: UpdateExpression$3,
  24283. StringLiteral: StringLiteral$2,
  24284. NumericLiteral: NumericLiteral$2,
  24285. BooleanLiteral: BooleanLiteral$2,
  24286. NullLiteral: NullLiteral$2,
  24287. RegExpLiteral: RegExpLiteral$2,
  24288. ObjectExpression: ObjectExpression$3,
  24289. ArrayExpression: ArrayExpression$2,
  24290. RestElement: RestElement$2,
  24291. FunctionExpression: Func,
  24292. ArrowFunctionExpression: Func,
  24293. FunctionDeclaration: Func,
  24294. ClassExpression: Func,
  24295. ClassDeclaration: Func,
  24296. CallExpression: CallExpression$2,
  24297. TaggedTemplateExpression: TaggedTemplateExpression$2,
  24298. Identifier: infererReference
  24299. });
  24300. function getTypeAnnotation() {
  24301. if (this.typeAnnotation) return this.typeAnnotation;
  24302. var type = this._getTypeAnnotation() || AnyTypeAnnotation();
  24303. if (isTypeAnnotation(type)) type = type.typeAnnotation;
  24304. return this.typeAnnotation = type;
  24305. }
  24306. function _getTypeAnnotation() {
  24307. var node = this.node;
  24308. if (!node) {
  24309. if (this.key === "init" && this.parentPath.isVariableDeclarator()) {
  24310. var declar = this.parentPath.parentPath;
  24311. var declarParent = declar.parentPath;
  24312. if (declar.key === "left" && declarParent.isForInStatement()) {
  24313. return StringTypeAnnotation();
  24314. }
  24315. if (declar.key === "left" && declarParent.isForOfStatement()) {
  24316. return AnyTypeAnnotation();
  24317. }
  24318. return VoidTypeAnnotation();
  24319. } else {
  24320. return;
  24321. }
  24322. }
  24323. if (node.typeAnnotation) {
  24324. return node.typeAnnotation;
  24325. }
  24326. var inferer = inferers[node.type];
  24327. if (inferer) {
  24328. return inferer.call(this, node);
  24329. }
  24330. inferer = inferers[this.parentPath.type];
  24331. if (inferer && inferer.validParent) {
  24332. return this.parentPath.getTypeAnnotation();
  24333. }
  24334. }
  24335. function isBaseType(baseName, soft) {
  24336. return _isBaseType(baseName, this.getTypeAnnotation(), soft);
  24337. }
  24338. function _isBaseType(baseName, type, soft) {
  24339. if (baseName === "string") {
  24340. return isStringTypeAnnotation(type);
  24341. } else if (baseName === "number") {
  24342. return isNumberTypeAnnotation(type);
  24343. } else if (baseName === "boolean") {
  24344. return isBooleanTypeAnnotation(type);
  24345. } else if (baseName === "any") {
  24346. return isAnyTypeAnnotation(type);
  24347. } else if (baseName === "mixed") {
  24348. return isMixedTypeAnnotation(type);
  24349. } else if (baseName === "empty") {
  24350. return isEmptyTypeAnnotation(type);
  24351. } else if (baseName === "void") {
  24352. return isVoidTypeAnnotation(type);
  24353. } else {
  24354. if (soft) {
  24355. return false;
  24356. } else {
  24357. throw new Error("Unknown base type " + baseName);
  24358. }
  24359. }
  24360. }
  24361. function couldBeBaseType(name) {
  24362. var type = this.getTypeAnnotation();
  24363. if (isAnyTypeAnnotation(type)) return true;
  24364. if (isUnionTypeAnnotation(type)) {
  24365. for (var _i = 0, _arr = type.types; _i < _arr.length; _i++) {
  24366. var type2 = _arr[_i];
  24367. if (isAnyTypeAnnotation(type2) || _isBaseType(name, type2, true)) {
  24368. return true;
  24369. }
  24370. }
  24371. return false;
  24372. } else {
  24373. return _isBaseType(name, type, true);
  24374. }
  24375. }
  24376. function baseTypeStrictlyMatches(right) {
  24377. var left = this.getTypeAnnotation();
  24378. right = right.getTypeAnnotation();
  24379. if (!isAnyTypeAnnotation(left) && isFlowBaseAnnotation(left)) {
  24380. return right.type === left.type;
  24381. }
  24382. }
  24383. function isGenericType(genericName) {
  24384. var type = this.getTypeAnnotation();
  24385. return isGenericTypeAnnotation(type) && isIdentifier(type.id, {
  24386. name: genericName
  24387. });
  24388. }
  24389. var NodePath_inference = /*#__PURE__*/Object.freeze({
  24390. __proto__: null,
  24391. getTypeAnnotation: getTypeAnnotation,
  24392. _getTypeAnnotation: _getTypeAnnotation,
  24393. isBaseType: isBaseType,
  24394. couldBeBaseType: couldBeBaseType,
  24395. baseTypeStrictlyMatches: baseTypeStrictlyMatches,
  24396. isGenericType: isGenericType
  24397. });
  24398. var jsTokens = createCommonjsModule(function (module, exports) {
  24399. Object.defineProperty(exports, "__esModule", {
  24400. value: true
  24401. });
  24402. exports["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;
  24403. exports.matchToToken = function (match) {
  24404. var token = {
  24405. type: "invalid",
  24406. value: match[0],
  24407. closed: undefined
  24408. };
  24409. 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";
  24410. return token;
  24411. };
  24412. });
  24413. var jsTokens$1 = unwrapExports(jsTokens);
  24414. var jsTokens_1 = jsTokens.matchToToken;
  24415. var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
  24416. var escapeStringRegexp = function (str) {
  24417. if (typeof str !== 'string') {
  24418. throw new TypeError('Expected a string');
  24419. }
  24420. return str.replace(matchOperatorsRe, '\\$&');
  24421. };
  24422. var colorName = {
  24423. "aliceblue": [240, 248, 255],
  24424. "antiquewhite": [250, 235, 215],
  24425. "aqua": [0, 255, 255],
  24426. "aquamarine": [127, 255, 212],
  24427. "azure": [240, 255, 255],
  24428. "beige": [245, 245, 220],
  24429. "bisque": [255, 228, 196],
  24430. "black": [0, 0, 0],
  24431. "blanchedalmond": [255, 235, 205],
  24432. "blue": [0, 0, 255],
  24433. "blueviolet": [138, 43, 226],
  24434. "brown": [165, 42, 42],
  24435. "burlywood": [222, 184, 135],
  24436. "cadetblue": [95, 158, 160],
  24437. "chartreuse": [127, 255, 0],
  24438. "chocolate": [210, 105, 30],
  24439. "coral": [255, 127, 80],
  24440. "cornflowerblue": [100, 149, 237],
  24441. "cornsilk": [255, 248, 220],
  24442. "crimson": [220, 20, 60],
  24443. "cyan": [0, 255, 255],
  24444. "darkblue": [0, 0, 139],
  24445. "darkcyan": [0, 139, 139],
  24446. "darkgoldenrod": [184, 134, 11],
  24447. "darkgray": [169, 169, 169],
  24448. "darkgreen": [0, 100, 0],
  24449. "darkgrey": [169, 169, 169],
  24450. "darkkhaki": [189, 183, 107],
  24451. "darkmagenta": [139, 0, 139],
  24452. "darkolivegreen": [85, 107, 47],
  24453. "darkorange": [255, 140, 0],
  24454. "darkorchid": [153, 50, 204],
  24455. "darkred": [139, 0, 0],
  24456. "darksalmon": [233, 150, 122],
  24457. "darkseagreen": [143, 188, 143],
  24458. "darkslateblue": [72, 61, 139],
  24459. "darkslategray": [47, 79, 79],
  24460. "darkslategrey": [47, 79, 79],
  24461. "darkturquoise": [0, 206, 209],
  24462. "darkviolet": [148, 0, 211],
  24463. "deeppink": [255, 20, 147],
  24464. "deepskyblue": [0, 191, 255],
  24465. "dimgray": [105, 105, 105],
  24466. "dimgrey": [105, 105, 105],
  24467. "dodgerblue": [30, 144, 255],
  24468. "firebrick": [178, 34, 34],
  24469. "floralwhite": [255, 250, 240],
  24470. "forestgreen": [34, 139, 34],
  24471. "fuchsia": [255, 0, 255],
  24472. "gainsboro": [220, 220, 220],
  24473. "ghostwhite": [248, 248, 255],
  24474. "gold": [255, 215, 0],
  24475. "goldenrod": [218, 165, 32],
  24476. "gray": [128, 128, 128],
  24477. "green": [0, 128, 0],
  24478. "greenyellow": [173, 255, 47],
  24479. "grey": [128, 128, 128],
  24480. "honeydew": [240, 255, 240],
  24481. "hotpink": [255, 105, 180],
  24482. "indianred": [205, 92, 92],
  24483. "indigo": [75, 0, 130],
  24484. "ivory": [255, 255, 240],
  24485. "khaki": [240, 230, 140],
  24486. "lavender": [230, 230, 250],
  24487. "lavenderblush": [255, 240, 245],
  24488. "lawngreen": [124, 252, 0],
  24489. "lemonchiffon": [255, 250, 205],
  24490. "lightblue": [173, 216, 230],
  24491. "lightcoral": [240, 128, 128],
  24492. "lightcyan": [224, 255, 255],
  24493. "lightgoldenrodyellow": [250, 250, 210],
  24494. "lightgray": [211, 211, 211],
  24495. "lightgreen": [144, 238, 144],
  24496. "lightgrey": [211, 211, 211],
  24497. "lightpink": [255, 182, 193],
  24498. "lightsalmon": [255, 160, 122],
  24499. "lightseagreen": [32, 178, 170],
  24500. "lightskyblue": [135, 206, 250],
  24501. "lightslategray": [119, 136, 153],
  24502. "lightslategrey": [119, 136, 153],
  24503. "lightsteelblue": [176, 196, 222],
  24504. "lightyellow": [255, 255, 224],
  24505. "lime": [0, 255, 0],
  24506. "limegreen": [50, 205, 50],
  24507. "linen": [250, 240, 230],
  24508. "magenta": [255, 0, 255],
  24509. "maroon": [128, 0, 0],
  24510. "mediumaquamarine": [102, 205, 170],
  24511. "mediumblue": [0, 0, 205],
  24512. "mediumorchid": [186, 85, 211],
  24513. "mediumpurple": [147, 112, 219],
  24514. "mediumseagreen": [60, 179, 113],
  24515. "mediumslateblue": [123, 104, 238],
  24516. "mediumspringgreen": [0, 250, 154],
  24517. "mediumturquoise": [72, 209, 204],
  24518. "mediumvioletred": [199, 21, 133],
  24519. "midnightblue": [25, 25, 112],
  24520. "mintcream": [245, 255, 250],
  24521. "mistyrose": [255, 228, 225],
  24522. "moccasin": [255, 228, 181],
  24523. "navajowhite": [255, 222, 173],
  24524. "navy": [0, 0, 128],
  24525. "oldlace": [253, 245, 230],
  24526. "olive": [128, 128, 0],
  24527. "olivedrab": [107, 142, 35],
  24528. "orange": [255, 165, 0],
  24529. "orangered": [255, 69, 0],
  24530. "orchid": [218, 112, 214],
  24531. "palegoldenrod": [238, 232, 170],
  24532. "palegreen": [152, 251, 152],
  24533. "paleturquoise": [175, 238, 238],
  24534. "palevioletred": [219, 112, 147],
  24535. "papayawhip": [255, 239, 213],
  24536. "peachpuff": [255, 218, 185],
  24537. "peru": [205, 133, 63],
  24538. "pink": [255, 192, 203],
  24539. "plum": [221, 160, 221],
  24540. "powderblue": [176, 224, 230],
  24541. "purple": [128, 0, 128],
  24542. "rebeccapurple": [102, 51, 153],
  24543. "red": [255, 0, 0],
  24544. "rosybrown": [188, 143, 143],
  24545. "royalblue": [65, 105, 225],
  24546. "saddlebrown": [139, 69, 19],
  24547. "salmon": [250, 128, 114],
  24548. "sandybrown": [244, 164, 96],
  24549. "seagreen": [46, 139, 87],
  24550. "seashell": [255, 245, 238],
  24551. "sienna": [160, 82, 45],
  24552. "silver": [192, 192, 192],
  24553. "skyblue": [135, 206, 235],
  24554. "slateblue": [106, 90, 205],
  24555. "slategray": [112, 128, 144],
  24556. "slategrey": [112, 128, 144],
  24557. "snow": [255, 250, 250],
  24558. "springgreen": [0, 255, 127],
  24559. "steelblue": [70, 130, 180],
  24560. "tan": [210, 180, 140],
  24561. "teal": [0, 128, 128],
  24562. "thistle": [216, 191, 216],
  24563. "tomato": [255, 99, 71],
  24564. "turquoise": [64, 224, 208],
  24565. "violet": [238, 130, 238],
  24566. "wheat": [245, 222, 179],
  24567. "white": [255, 255, 255],
  24568. "whitesmoke": [245, 245, 245],
  24569. "yellow": [255, 255, 0],
  24570. "yellowgreen": [154, 205, 50]
  24571. };
  24572. var conversions = createCommonjsModule(function (module) {
  24573. var reverseKeywords = {};
  24574. for (var key in colorName) {
  24575. if (colorName.hasOwnProperty(key)) {
  24576. reverseKeywords[colorName[key]] = key;
  24577. }
  24578. }
  24579. var convert = module.exports = {
  24580. rgb: {
  24581. channels: 3,
  24582. labels: 'rgb'
  24583. },
  24584. hsl: {
  24585. channels: 3,
  24586. labels: 'hsl'
  24587. },
  24588. hsv: {
  24589. channels: 3,
  24590. labels: 'hsv'
  24591. },
  24592. hwb: {
  24593. channels: 3,
  24594. labels: 'hwb'
  24595. },
  24596. cmyk: {
  24597. channels: 4,
  24598. labels: 'cmyk'
  24599. },
  24600. xyz: {
  24601. channels: 3,
  24602. labels: 'xyz'
  24603. },
  24604. lab: {
  24605. channels: 3,
  24606. labels: 'lab'
  24607. },
  24608. lch: {
  24609. channels: 3,
  24610. labels: 'lch'
  24611. },
  24612. hex: {
  24613. channels: 1,
  24614. labels: ['hex']
  24615. },
  24616. keyword: {
  24617. channels: 1,
  24618. labels: ['keyword']
  24619. },
  24620. ansi16: {
  24621. channels: 1,
  24622. labels: ['ansi16']
  24623. },
  24624. ansi256: {
  24625. channels: 1,
  24626. labels: ['ansi256']
  24627. },
  24628. hcg: {
  24629. channels: 3,
  24630. labels: ['h', 'c', 'g']
  24631. },
  24632. apple: {
  24633. channels: 3,
  24634. labels: ['r16', 'g16', 'b16']
  24635. },
  24636. gray: {
  24637. channels: 1,
  24638. labels: ['gray']
  24639. }
  24640. };
  24641. for (var model in convert) {
  24642. if (convert.hasOwnProperty(model)) {
  24643. if (!('channels' in convert[model])) {
  24644. throw new Error('missing channels property: ' + model);
  24645. }
  24646. if (!('labels' in convert[model])) {
  24647. throw new Error('missing channel labels property: ' + model);
  24648. }
  24649. if (convert[model].labels.length !== convert[model].channels) {
  24650. throw new Error('channel and label counts mismatch: ' + model);
  24651. }
  24652. var channels = convert[model].channels;
  24653. var labels = convert[model].labels;
  24654. delete convert[model].channels;
  24655. delete convert[model].labels;
  24656. Object.defineProperty(convert[model], 'channels', {
  24657. value: channels
  24658. });
  24659. Object.defineProperty(convert[model], 'labels', {
  24660. value: labels
  24661. });
  24662. }
  24663. }
  24664. convert.rgb.hsl = function (rgb) {
  24665. var r = rgb[0] / 255;
  24666. var g = rgb[1] / 255;
  24667. var b = rgb[2] / 255;
  24668. var min = Math.min(r, g, b);
  24669. var max = Math.max(r, g, b);
  24670. var delta = max - min;
  24671. var h;
  24672. var s;
  24673. var l;
  24674. if (max === min) {
  24675. h = 0;
  24676. } else if (r === max) {
  24677. h = (g - b) / delta;
  24678. } else if (g === max) {
  24679. h = 2 + (b - r) / delta;
  24680. } else if (b === max) {
  24681. h = 4 + (r - g) / delta;
  24682. }
  24683. h = Math.min(h * 60, 360);
  24684. if (h < 0) {
  24685. h += 360;
  24686. }
  24687. l = (min + max) / 2;
  24688. if (max === min) {
  24689. s = 0;
  24690. } else if (l <= 0.5) {
  24691. s = delta / (max + min);
  24692. } else {
  24693. s = delta / (2 - max - min);
  24694. }
  24695. return [h, s * 100, l * 100];
  24696. };
  24697. convert.rgb.hsv = function (rgb) {
  24698. var rdif;
  24699. var gdif;
  24700. var bdif;
  24701. var h;
  24702. var s;
  24703. var r = rgb[0] / 255;
  24704. var g = rgb[1] / 255;
  24705. var b = rgb[2] / 255;
  24706. var v = Math.max(r, g, b);
  24707. var diff = v - Math.min(r, g, b);
  24708. var diffc = function diffc(c) {
  24709. return (v - c) / 6 / diff + 1 / 2;
  24710. };
  24711. if (diff === 0) {
  24712. h = s = 0;
  24713. } else {
  24714. s = diff / v;
  24715. rdif = diffc(r);
  24716. gdif = diffc(g);
  24717. bdif = diffc(b);
  24718. if (r === v) {
  24719. h = bdif - gdif;
  24720. } else if (g === v) {
  24721. h = 1 / 3 + rdif - bdif;
  24722. } else if (b === v) {
  24723. h = 2 / 3 + gdif - rdif;
  24724. }
  24725. if (h < 0) {
  24726. h += 1;
  24727. } else if (h > 1) {
  24728. h -= 1;
  24729. }
  24730. }
  24731. return [h * 360, s * 100, v * 100];
  24732. };
  24733. convert.rgb.hwb = function (rgb) {
  24734. var r = rgb[0];
  24735. var g = rgb[1];
  24736. var b = rgb[2];
  24737. var h = convert.rgb.hsl(rgb)[0];
  24738. var w = 1 / 255 * Math.min(r, Math.min(g, b));
  24739. b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
  24740. return [h, w * 100, b * 100];
  24741. };
  24742. convert.rgb.cmyk = function (rgb) {
  24743. var r = rgb[0] / 255;
  24744. var g = rgb[1] / 255;
  24745. var b = rgb[2] / 255;
  24746. var c;
  24747. var m;
  24748. var y;
  24749. var k;
  24750. k = Math.min(1 - r, 1 - g, 1 - b);
  24751. c = (1 - r - k) / (1 - k) || 0;
  24752. m = (1 - g - k) / (1 - k) || 0;
  24753. y = (1 - b - k) / (1 - k) || 0;
  24754. return [c * 100, m * 100, y * 100, k * 100];
  24755. };
  24756. function comparativeDistance(x, y) {
  24757. return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2);
  24758. }
  24759. convert.rgb.keyword = function (rgb) {
  24760. var reversed = reverseKeywords[rgb];
  24761. if (reversed) {
  24762. return reversed;
  24763. }
  24764. var currentClosestDistance = Infinity;
  24765. var currentClosestKeyword;
  24766. for (var keyword in colorName) {
  24767. if (colorName.hasOwnProperty(keyword)) {
  24768. var value = colorName[keyword];
  24769. var distance = comparativeDistance(rgb, value);
  24770. if (distance < currentClosestDistance) {
  24771. currentClosestDistance = distance;
  24772. currentClosestKeyword = keyword;
  24773. }
  24774. }
  24775. }
  24776. return currentClosestKeyword;
  24777. };
  24778. convert.keyword.rgb = function (keyword) {
  24779. return colorName[keyword];
  24780. };
  24781. convert.rgb.xyz = function (rgb) {
  24782. var r = rgb[0] / 255;
  24783. var g = rgb[1] / 255;
  24784. var b = rgb[2] / 255;
  24785. r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92;
  24786. g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92;
  24787. b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92;
  24788. var x = r * 0.4124 + g * 0.3576 + b * 0.1805;
  24789. var y = r * 0.2126 + g * 0.7152 + b * 0.0722;
  24790. var z = r * 0.0193 + g * 0.1192 + b * 0.9505;
  24791. return [x * 100, y * 100, z * 100];
  24792. };
  24793. convert.rgb.lab = function (rgb) {
  24794. var xyz = convert.rgb.xyz(rgb);
  24795. var x = xyz[0];
  24796. var y = xyz[1];
  24797. var z = xyz[2];
  24798. var l;
  24799. var a;
  24800. var b;
  24801. x /= 95.047;
  24802. y /= 100;
  24803. z /= 108.883;
  24804. x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
  24805. y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
  24806. z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
  24807. l = 116 * y - 16;
  24808. a = 500 * (x - y);
  24809. b = 200 * (y - z);
  24810. return [l, a, b];
  24811. };
  24812. convert.hsl.rgb = function (hsl) {
  24813. var h = hsl[0] / 360;
  24814. var s = hsl[1] / 100;
  24815. var l = hsl[2] / 100;
  24816. var t1;
  24817. var t2;
  24818. var t3;
  24819. var rgb;
  24820. var val;
  24821. if (s === 0) {
  24822. val = l * 255;
  24823. return [val, val, val];
  24824. }
  24825. if (l < 0.5) {
  24826. t2 = l * (1 + s);
  24827. } else {
  24828. t2 = l + s - l * s;
  24829. }
  24830. t1 = 2 * l - t2;
  24831. rgb = [0, 0, 0];
  24832. for (var i = 0; i < 3; i++) {
  24833. t3 = h + 1 / 3 * -(i - 1);
  24834. if (t3 < 0) {
  24835. t3++;
  24836. }
  24837. if (t3 > 1) {
  24838. t3--;
  24839. }
  24840. if (6 * t3 < 1) {
  24841. val = t1 + (t2 - t1) * 6 * t3;
  24842. } else if (2 * t3 < 1) {
  24843. val = t2;
  24844. } else if (3 * t3 < 2) {
  24845. val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
  24846. } else {
  24847. val = t1;
  24848. }
  24849. rgb[i] = val * 255;
  24850. }
  24851. return rgb;
  24852. };
  24853. convert.hsl.hsv = function (hsl) {
  24854. var h = hsl[0];
  24855. var s = hsl[1] / 100;
  24856. var l = hsl[2] / 100;
  24857. var smin = s;
  24858. var lmin = Math.max(l, 0.01);
  24859. var sv;
  24860. var v;
  24861. l *= 2;
  24862. s *= l <= 1 ? l : 2 - l;
  24863. smin *= lmin <= 1 ? lmin : 2 - lmin;
  24864. v = (l + s) / 2;
  24865. sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
  24866. return [h, sv * 100, v * 100];
  24867. };
  24868. convert.hsv.rgb = function (hsv) {
  24869. var h = hsv[0] / 60;
  24870. var s = hsv[1] / 100;
  24871. var v = hsv[2] / 100;
  24872. var hi = Math.floor(h) % 6;
  24873. var f = h - Math.floor(h);
  24874. var p = 255 * v * (1 - s);
  24875. var q = 255 * v * (1 - s * f);
  24876. var t = 255 * v * (1 - s * (1 - f));
  24877. v *= 255;
  24878. switch (hi) {
  24879. case 0:
  24880. return [v, t, p];
  24881. case 1:
  24882. return [q, v, p];
  24883. case 2:
  24884. return [p, v, t];
  24885. case 3:
  24886. return [p, q, v];
  24887. case 4:
  24888. return [t, p, v];
  24889. case 5:
  24890. return [v, p, q];
  24891. }
  24892. };
  24893. convert.hsv.hsl = function (hsv) {
  24894. var h = hsv[0];
  24895. var s = hsv[1] / 100;
  24896. var v = hsv[2] / 100;
  24897. var vmin = Math.max(v, 0.01);
  24898. var lmin;
  24899. var sl;
  24900. var l;
  24901. l = (2 - s) * v;
  24902. lmin = (2 - s) * vmin;
  24903. sl = s * vmin;
  24904. sl /= lmin <= 1 ? lmin : 2 - lmin;
  24905. sl = sl || 0;
  24906. l /= 2;
  24907. return [h, sl * 100, l * 100];
  24908. };
  24909. convert.hwb.rgb = function (hwb) {
  24910. var h = hwb[0] / 360;
  24911. var wh = hwb[1] / 100;
  24912. var bl = hwb[2] / 100;
  24913. var ratio = wh + bl;
  24914. var i;
  24915. var v;
  24916. var f;
  24917. var n;
  24918. if (ratio > 1) {
  24919. wh /= ratio;
  24920. bl /= ratio;
  24921. }
  24922. i = Math.floor(6 * h);
  24923. v = 1 - bl;
  24924. f = 6 * h - i;
  24925. if ((i & 0x01) !== 0) {
  24926. f = 1 - f;
  24927. }
  24928. n = wh + f * (v - wh);
  24929. var r;
  24930. var g;
  24931. var b;
  24932. switch (i) {
  24933. default:
  24934. case 6:
  24935. case 0:
  24936. r = v;
  24937. g = n;
  24938. b = wh;
  24939. break;
  24940. case 1:
  24941. r = n;
  24942. g = v;
  24943. b = wh;
  24944. break;
  24945. case 2:
  24946. r = wh;
  24947. g = v;
  24948. b = n;
  24949. break;
  24950. case 3:
  24951. r = wh;
  24952. g = n;
  24953. b = v;
  24954. break;
  24955. case 4:
  24956. r = n;
  24957. g = wh;
  24958. b = v;
  24959. break;
  24960. case 5:
  24961. r = v;
  24962. g = wh;
  24963. b = n;
  24964. break;
  24965. }
  24966. return [r * 255, g * 255, b * 255];
  24967. };
  24968. convert.cmyk.rgb = function (cmyk) {
  24969. var c = cmyk[0] / 100;
  24970. var m = cmyk[1] / 100;
  24971. var y = cmyk[2] / 100;
  24972. var k = cmyk[3] / 100;
  24973. var r;
  24974. var g;
  24975. var b;
  24976. r = 1 - Math.min(1, c * (1 - k) + k);
  24977. g = 1 - Math.min(1, m * (1 - k) + k);
  24978. b = 1 - Math.min(1, y * (1 - k) + k);
  24979. return [r * 255, g * 255, b * 255];
  24980. };
  24981. convert.xyz.rgb = function (xyz) {
  24982. var x = xyz[0] / 100;
  24983. var y = xyz[1] / 100;
  24984. var z = xyz[2] / 100;
  24985. var r;
  24986. var g;
  24987. var b;
  24988. r = x * 3.2406 + y * -1.5372 + z * -0.4986;
  24989. g = x * -0.9689 + y * 1.8758 + z * 0.0415;
  24990. b = x * 0.0557 + y * -0.2040 + z * 1.0570;
  24991. r = r > 0.0031308 ? 1.055 * Math.pow(r, 1.0 / 2.4) - 0.055 : r * 12.92;
  24992. g = g > 0.0031308 ? 1.055 * Math.pow(g, 1.0 / 2.4) - 0.055 : g * 12.92;
  24993. b = b > 0.0031308 ? 1.055 * Math.pow(b, 1.0 / 2.4) - 0.055 : b * 12.92;
  24994. r = Math.min(Math.max(0, r), 1);
  24995. g = Math.min(Math.max(0, g), 1);
  24996. b = Math.min(Math.max(0, b), 1);
  24997. return [r * 255, g * 255, b * 255];
  24998. };
  24999. convert.xyz.lab = function (xyz) {
  25000. var x = xyz[0];
  25001. var y = xyz[1];
  25002. var z = xyz[2];
  25003. var l;
  25004. var a;
  25005. var b;
  25006. x /= 95.047;
  25007. y /= 100;
  25008. z /= 108.883;
  25009. x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
  25010. y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
  25011. z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
  25012. l = 116 * y - 16;
  25013. a = 500 * (x - y);
  25014. b = 200 * (y - z);
  25015. return [l, a, b];
  25016. };
  25017. convert.lab.xyz = function (lab) {
  25018. var l = lab[0];
  25019. var a = lab[1];
  25020. var b = lab[2];
  25021. var x;
  25022. var y;
  25023. var z;
  25024. y = (l + 16) / 116;
  25025. x = a / 500 + y;
  25026. z = y - b / 200;
  25027. var y2 = Math.pow(y, 3);
  25028. var x2 = Math.pow(x, 3);
  25029. var z2 = Math.pow(z, 3);
  25030. y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
  25031. x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
  25032. z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
  25033. x *= 95.047;
  25034. y *= 100;
  25035. z *= 108.883;
  25036. return [x, y, z];
  25037. };
  25038. convert.lab.lch = function (lab) {
  25039. var l = lab[0];
  25040. var a = lab[1];
  25041. var b = lab[2];
  25042. var hr;
  25043. var h;
  25044. var c;
  25045. hr = Math.atan2(b, a);
  25046. h = hr * 360 / 2 / Math.PI;
  25047. if (h < 0) {
  25048. h += 360;
  25049. }
  25050. c = Math.sqrt(a * a + b * b);
  25051. return [l, c, h];
  25052. };
  25053. convert.lch.lab = function (lch) {
  25054. var l = lch[0];
  25055. var c = lch[1];
  25056. var h = lch[2];
  25057. var a;
  25058. var b;
  25059. var hr;
  25060. hr = h / 360 * 2 * Math.PI;
  25061. a = c * Math.cos(hr);
  25062. b = c * Math.sin(hr);
  25063. return [l, a, b];
  25064. };
  25065. convert.rgb.ansi16 = function (args) {
  25066. var r = args[0];
  25067. var g = args[1];
  25068. var b = args[2];
  25069. var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2];
  25070. value = Math.round(value / 50);
  25071. if (value === 0) {
  25072. return 30;
  25073. }
  25074. var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
  25075. if (value === 2) {
  25076. ansi += 60;
  25077. }
  25078. return ansi;
  25079. };
  25080. convert.hsv.ansi16 = function (args) {
  25081. return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
  25082. };
  25083. convert.rgb.ansi256 = function (args) {
  25084. var r = args[0];
  25085. var g = args[1];
  25086. var b = args[2];
  25087. if (r === g && g === b) {
  25088. if (r < 8) {
  25089. return 16;
  25090. }
  25091. if (r > 248) {
  25092. return 231;
  25093. }
  25094. return Math.round((r - 8) / 247 * 24) + 232;
  25095. }
  25096. var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
  25097. return ansi;
  25098. };
  25099. convert.ansi16.rgb = function (args) {
  25100. var color = args % 10;
  25101. if (color === 0 || color === 7) {
  25102. if (args > 50) {
  25103. color += 3.5;
  25104. }
  25105. color = color / 10.5 * 255;
  25106. return [color, color, color];
  25107. }
  25108. var mult = (~~(args > 50) + 1) * 0.5;
  25109. var r = (color & 1) * mult * 255;
  25110. var g = (color >> 1 & 1) * mult * 255;
  25111. var b = (color >> 2 & 1) * mult * 255;
  25112. return [r, g, b];
  25113. };
  25114. convert.ansi256.rgb = function (args) {
  25115. if (args >= 232) {
  25116. var c = (args - 232) * 10 + 8;
  25117. return [c, c, c];
  25118. }
  25119. args -= 16;
  25120. var rem;
  25121. var r = Math.floor(args / 36) / 5 * 255;
  25122. var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
  25123. var b = rem % 6 / 5 * 255;
  25124. return [r, g, b];
  25125. };
  25126. convert.rgb.hex = function (args) {
  25127. var integer = ((Math.round(args[0]) & 0xFF) << 16) + ((Math.round(args[1]) & 0xFF) << 8) + (Math.round(args[2]) & 0xFF);
  25128. var string = integer.toString(16).toUpperCase();
  25129. return '000000'.substring(string.length) + string;
  25130. };
  25131. convert.hex.rgb = function (args) {
  25132. var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
  25133. if (!match) {
  25134. return [0, 0, 0];
  25135. }
  25136. var colorString = match[0];
  25137. if (match[0].length === 3) {
  25138. colorString = colorString.split('').map(function (_char) {
  25139. return _char + _char;
  25140. }).join('');
  25141. }
  25142. var integer = parseInt(colorString, 16);
  25143. var r = integer >> 16 & 0xFF;
  25144. var g = integer >> 8 & 0xFF;
  25145. var b = integer & 0xFF;
  25146. return [r, g, b];
  25147. };
  25148. convert.rgb.hcg = function (rgb) {
  25149. var r = rgb[0] / 255;
  25150. var g = rgb[1] / 255;
  25151. var b = rgb[2] / 255;
  25152. var max = Math.max(Math.max(r, g), b);
  25153. var min = Math.min(Math.min(r, g), b);
  25154. var chroma = max - min;
  25155. var grayscale;
  25156. var hue;
  25157. if (chroma < 1) {
  25158. grayscale = min / (1 - chroma);
  25159. } else {
  25160. grayscale = 0;
  25161. }
  25162. if (chroma <= 0) {
  25163. hue = 0;
  25164. } else if (max === r) {
  25165. hue = (g - b) / chroma % 6;
  25166. } else if (max === g) {
  25167. hue = 2 + (b - r) / chroma;
  25168. } else {
  25169. hue = 4 + (r - g) / chroma + 4;
  25170. }
  25171. hue /= 6;
  25172. hue %= 1;
  25173. return [hue * 360, chroma * 100, grayscale * 100];
  25174. };
  25175. convert.hsl.hcg = function (hsl) {
  25176. var s = hsl[1] / 100;
  25177. var l = hsl[2] / 100;
  25178. var c = 1;
  25179. var f = 0;
  25180. if (l < 0.5) {
  25181. c = 2.0 * s * l;
  25182. } else {
  25183. c = 2.0 * s * (1.0 - l);
  25184. }
  25185. if (c < 1.0) {
  25186. f = (l - 0.5 * c) / (1.0 - c);
  25187. }
  25188. return [hsl[0], c * 100, f * 100];
  25189. };
  25190. convert.hsv.hcg = function (hsv) {
  25191. var s = hsv[1] / 100;
  25192. var v = hsv[2] / 100;
  25193. var c = s * v;
  25194. var f = 0;
  25195. if (c < 1.0) {
  25196. f = (v - c) / (1 - c);
  25197. }
  25198. return [hsv[0], c * 100, f * 100];
  25199. };
  25200. convert.hcg.rgb = function (hcg) {
  25201. var h = hcg[0] / 360;
  25202. var c = hcg[1] / 100;
  25203. var g = hcg[2] / 100;
  25204. if (c === 0.0) {
  25205. return [g * 255, g * 255, g * 255];
  25206. }
  25207. var pure = [0, 0, 0];
  25208. var hi = h % 1 * 6;
  25209. var v = hi % 1;
  25210. var w = 1 - v;
  25211. var mg = 0;
  25212. switch (Math.floor(hi)) {
  25213. case 0:
  25214. pure[0] = 1;
  25215. pure[1] = v;
  25216. pure[2] = 0;
  25217. break;
  25218. case 1:
  25219. pure[0] = w;
  25220. pure[1] = 1;
  25221. pure[2] = 0;
  25222. break;
  25223. case 2:
  25224. pure[0] = 0;
  25225. pure[1] = 1;
  25226. pure[2] = v;
  25227. break;
  25228. case 3:
  25229. pure[0] = 0;
  25230. pure[1] = w;
  25231. pure[2] = 1;
  25232. break;
  25233. case 4:
  25234. pure[0] = v;
  25235. pure[1] = 0;
  25236. pure[2] = 1;
  25237. break;
  25238. default:
  25239. pure[0] = 1;
  25240. pure[1] = 0;
  25241. pure[2] = w;
  25242. }
  25243. mg = (1.0 - c) * g;
  25244. return [(c * pure[0] + mg) * 255, (c * pure[1] + mg) * 255, (c * pure[2] + mg) * 255];
  25245. };
  25246. convert.hcg.hsv = function (hcg) {
  25247. var c = hcg[1] / 100;
  25248. var g = hcg[2] / 100;
  25249. var v = c + g * (1.0 - c);
  25250. var f = 0;
  25251. if (v > 0.0) {
  25252. f = c / v;
  25253. }
  25254. return [hcg[0], f * 100, v * 100];
  25255. };
  25256. convert.hcg.hsl = function (hcg) {
  25257. var c = hcg[1] / 100;
  25258. var g = hcg[2] / 100;
  25259. var l = g * (1.0 - c) + 0.5 * c;
  25260. var s = 0;
  25261. if (l > 0.0 && l < 0.5) {
  25262. s = c / (2 * l);
  25263. } else if (l >= 0.5 && l < 1.0) {
  25264. s = c / (2 * (1 - l));
  25265. }
  25266. return [hcg[0], s * 100, l * 100];
  25267. };
  25268. convert.hcg.hwb = function (hcg) {
  25269. var c = hcg[1] / 100;
  25270. var g = hcg[2] / 100;
  25271. var v = c + g * (1.0 - c);
  25272. return [hcg[0], (v - c) * 100, (1 - v) * 100];
  25273. };
  25274. convert.hwb.hcg = function (hwb) {
  25275. var w = hwb[1] / 100;
  25276. var b = hwb[2] / 100;
  25277. var v = 1 - b;
  25278. var c = v - w;
  25279. var g = 0;
  25280. if (c < 1) {
  25281. g = (v - c) / (1 - c);
  25282. }
  25283. return [hwb[0], c * 100, g * 100];
  25284. };
  25285. convert.apple.rgb = function (apple) {
  25286. return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
  25287. };
  25288. convert.rgb.apple = function (rgb) {
  25289. return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
  25290. };
  25291. convert.gray.rgb = function (args) {
  25292. return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
  25293. };
  25294. convert.gray.hsl = convert.gray.hsv = function (args) {
  25295. return [0, 0, args[0]];
  25296. };
  25297. convert.gray.hwb = function (gray) {
  25298. return [0, 100, gray[0]];
  25299. };
  25300. convert.gray.cmyk = function (gray) {
  25301. return [0, 0, 0, gray[0]];
  25302. };
  25303. convert.gray.lab = function (gray) {
  25304. return [gray[0], 0, 0];
  25305. };
  25306. convert.gray.hex = function (gray) {
  25307. var val = Math.round(gray[0] / 100 * 255) & 0xFF;
  25308. var integer = (val << 16) + (val << 8) + val;
  25309. var string = integer.toString(16).toUpperCase();
  25310. return '000000'.substring(string.length) + string;
  25311. };
  25312. convert.rgb.gray = function (rgb) {
  25313. var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
  25314. return [val / 255 * 100];
  25315. };
  25316. });
  25317. var conversions_1 = conversions.rgb;
  25318. var conversions_2 = conversions.hsl;
  25319. var conversions_3 = conversions.hsv;
  25320. var conversions_4 = conversions.hwb;
  25321. var conversions_5 = conversions.cmyk;
  25322. var conversions_6 = conversions.xyz;
  25323. var conversions_7 = conversions.lab;
  25324. var conversions_8 = conversions.lch;
  25325. var conversions_9 = conversions.hex;
  25326. var conversions_10 = conversions.keyword;
  25327. var conversions_11 = conversions.ansi16;
  25328. var conversions_12 = conversions.ansi256;
  25329. var conversions_13 = conversions.hcg;
  25330. var conversions_14 = conversions.apple;
  25331. var conversions_15 = conversions.gray;
  25332. function buildGraph() {
  25333. var graph = {};
  25334. var models = Object.keys(conversions);
  25335. for (var len = models.length, i = 0; i < len; i++) {
  25336. graph[models[i]] = {
  25337. distance: -1,
  25338. parent: null
  25339. };
  25340. }
  25341. return graph;
  25342. }
  25343. function deriveBFS(fromModel) {
  25344. var graph = buildGraph();
  25345. var queue = [fromModel];
  25346. graph[fromModel].distance = 0;
  25347. while (queue.length) {
  25348. var current = queue.pop();
  25349. var adjacents = Object.keys(conversions[current]);
  25350. for (var len = adjacents.length, i = 0; i < len; i++) {
  25351. var adjacent = adjacents[i];
  25352. var node = graph[adjacent];
  25353. if (node.distance === -1) {
  25354. node.distance = graph[current].distance + 1;
  25355. node.parent = current;
  25356. queue.unshift(adjacent);
  25357. }
  25358. }
  25359. }
  25360. return graph;
  25361. }
  25362. function link(from, to) {
  25363. return function (args) {
  25364. return to(from(args));
  25365. };
  25366. }
  25367. function wrapConversion(toModel, graph) {
  25368. var path = [graph[toModel].parent, toModel];
  25369. var fn = conversions[graph[toModel].parent][toModel];
  25370. var cur = graph[toModel].parent;
  25371. while (graph[cur].parent) {
  25372. path.unshift(graph[cur].parent);
  25373. fn = link(conversions[graph[cur].parent][cur], fn);
  25374. cur = graph[cur].parent;
  25375. }
  25376. fn.conversion = path;
  25377. return fn;
  25378. }
  25379. var route = function (fromModel) {
  25380. var graph = deriveBFS(fromModel);
  25381. var conversion = {};
  25382. var models = Object.keys(graph);
  25383. for (var len = models.length, i = 0; i < len; i++) {
  25384. var toModel = models[i];
  25385. var node = graph[toModel];
  25386. if (node.parent === null) {
  25387. continue;
  25388. }
  25389. conversion[toModel] = wrapConversion(toModel, graph);
  25390. }
  25391. return conversion;
  25392. };
  25393. var convert = {};
  25394. var models = Object.keys(conversions);
  25395. function wrapRaw(fn) {
  25396. var wrappedFn = function wrappedFn(args) {
  25397. if (args === undefined || args === null) {
  25398. return args;
  25399. }
  25400. if (arguments.length > 1) {
  25401. args = Array.prototype.slice.call(arguments);
  25402. }
  25403. return fn(args);
  25404. };
  25405. if ('conversion' in fn) {
  25406. wrappedFn.conversion = fn.conversion;
  25407. }
  25408. return wrappedFn;
  25409. }
  25410. function wrapRounded(fn) {
  25411. var wrappedFn = function wrappedFn(args) {
  25412. if (args === undefined || args === null) {
  25413. return args;
  25414. }
  25415. if (arguments.length > 1) {
  25416. args = Array.prototype.slice.call(arguments);
  25417. }
  25418. var result = fn(args);
  25419. if (typeof result === 'object') {
  25420. for (var len = result.length, i = 0; i < len; i++) {
  25421. result[i] = Math.round(result[i]);
  25422. }
  25423. }
  25424. return result;
  25425. };
  25426. if ('conversion' in fn) {
  25427. wrappedFn.conversion = fn.conversion;
  25428. }
  25429. return wrappedFn;
  25430. }
  25431. models.forEach(function (fromModel) {
  25432. convert[fromModel] = {};
  25433. Object.defineProperty(convert[fromModel], 'channels', {
  25434. value: conversions[fromModel].channels
  25435. });
  25436. Object.defineProperty(convert[fromModel], 'labels', {
  25437. value: conversions[fromModel].labels
  25438. });
  25439. var routes = route(fromModel);
  25440. var routeModels = Object.keys(routes);
  25441. routeModels.forEach(function (toModel) {
  25442. var fn = routes[toModel];
  25443. convert[fromModel][toModel] = wrapRounded(fn);
  25444. convert[fromModel][toModel].raw = wrapRaw(fn);
  25445. });
  25446. });
  25447. var colorConvert = convert;
  25448. var ansiStyles = createCommonjsModule(function (module) {
  25449. var wrapAnsi16 = function wrapAnsi16(fn, offset) {
  25450. return function () {
  25451. var code = fn.apply(colorConvert, arguments);
  25452. return "\x1B[" + (code + offset) + "m";
  25453. };
  25454. };
  25455. var wrapAnsi256 = function wrapAnsi256(fn, offset) {
  25456. return function () {
  25457. var code = fn.apply(colorConvert, arguments);
  25458. return "\x1B[" + (38 + offset) + ";5;" + code + "m";
  25459. };
  25460. };
  25461. var wrapAnsi16m = function wrapAnsi16m(fn, offset) {
  25462. return function () {
  25463. var rgb = fn.apply(colorConvert, arguments);
  25464. return "\x1B[" + (38 + offset) + ";2;" + rgb[0] + ";" + rgb[1] + ";" + rgb[2] + "m";
  25465. };
  25466. };
  25467. function assembleStyles() {
  25468. var codes = new Map();
  25469. var styles = {
  25470. modifier: {
  25471. reset: [0, 0],
  25472. bold: [1, 22],
  25473. dim: [2, 22],
  25474. italic: [3, 23],
  25475. underline: [4, 24],
  25476. inverse: [7, 27],
  25477. hidden: [8, 28],
  25478. strikethrough: [9, 29]
  25479. },
  25480. color: {
  25481. black: [30, 39],
  25482. red: [31, 39],
  25483. green: [32, 39],
  25484. yellow: [33, 39],
  25485. blue: [34, 39],
  25486. magenta: [35, 39],
  25487. cyan: [36, 39],
  25488. white: [37, 39],
  25489. gray: [90, 39],
  25490. redBright: [91, 39],
  25491. greenBright: [92, 39],
  25492. yellowBright: [93, 39],
  25493. blueBright: [94, 39],
  25494. magentaBright: [95, 39],
  25495. cyanBright: [96, 39],
  25496. whiteBright: [97, 39]
  25497. },
  25498. bgColor: {
  25499. bgBlack: [40, 49],
  25500. bgRed: [41, 49],
  25501. bgGreen: [42, 49],
  25502. bgYellow: [43, 49],
  25503. bgBlue: [44, 49],
  25504. bgMagenta: [45, 49],
  25505. bgCyan: [46, 49],
  25506. bgWhite: [47, 49],
  25507. bgBlackBright: [100, 49],
  25508. bgRedBright: [101, 49],
  25509. bgGreenBright: [102, 49],
  25510. bgYellowBright: [103, 49],
  25511. bgBlueBright: [104, 49],
  25512. bgMagentaBright: [105, 49],
  25513. bgCyanBright: [106, 49],
  25514. bgWhiteBright: [107, 49]
  25515. }
  25516. };
  25517. styles.color.grey = styles.color.gray;
  25518. for (var _i = 0, _Object$keys = Object.keys(styles); _i < _Object$keys.length; _i++) {
  25519. var groupName = _Object$keys[_i];
  25520. var group = styles[groupName];
  25521. for (var _i3 = 0, _Object$keys3 = Object.keys(group); _i3 < _Object$keys3.length; _i3++) {
  25522. var styleName = _Object$keys3[_i3];
  25523. var style = group[styleName];
  25524. styles[styleName] = {
  25525. open: "\x1B[" + style[0] + "m",
  25526. close: "\x1B[" + style[1] + "m"
  25527. };
  25528. group[styleName] = styles[styleName];
  25529. codes.set(style[0], style[1]);
  25530. }
  25531. Object.defineProperty(styles, groupName, {
  25532. value: group,
  25533. enumerable: false
  25534. });
  25535. Object.defineProperty(styles, 'codes', {
  25536. value: codes,
  25537. enumerable: false
  25538. });
  25539. }
  25540. var ansi2ansi = function ansi2ansi(n) {
  25541. return n;
  25542. };
  25543. var rgb2rgb = function rgb2rgb(r, g, b) {
  25544. return [r, g, b];
  25545. };
  25546. styles.color.close = "\x1B[39m";
  25547. styles.bgColor.close = "\x1B[49m";
  25548. styles.color.ansi = {
  25549. ansi: wrapAnsi16(ansi2ansi, 0)
  25550. };
  25551. styles.color.ansi256 = {
  25552. ansi256: wrapAnsi256(ansi2ansi, 0)
  25553. };
  25554. styles.color.ansi16m = {
  25555. rgb: wrapAnsi16m(rgb2rgb, 0)
  25556. };
  25557. styles.bgColor.ansi = {
  25558. ansi: wrapAnsi16(ansi2ansi, 10)
  25559. };
  25560. styles.bgColor.ansi256 = {
  25561. ansi256: wrapAnsi256(ansi2ansi, 10)
  25562. };
  25563. styles.bgColor.ansi16m = {
  25564. rgb: wrapAnsi16m(rgb2rgb, 10)
  25565. };
  25566. for (var _i2 = 0, _Object$keys2 = Object.keys(colorConvert); _i2 < _Object$keys2.length; _i2++) {
  25567. var key = _Object$keys2[_i2];
  25568. if (typeof colorConvert[key] !== 'object') {
  25569. continue;
  25570. }
  25571. var suite = colorConvert[key];
  25572. if (key === 'ansi16') {
  25573. key = 'ansi';
  25574. }
  25575. if ('ansi16' in suite) {
  25576. styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
  25577. styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
  25578. }
  25579. if ('ansi256' in suite) {
  25580. styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
  25581. styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
  25582. }
  25583. if ('rgb' in suite) {
  25584. styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
  25585. styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
  25586. }
  25587. }
  25588. return styles;
  25589. }
  25590. Object.defineProperty(module, 'exports', {
  25591. enumerable: true,
  25592. get: assembleStyles
  25593. });
  25594. });
  25595. var browser$3 = {
  25596. stdout: false,
  25597. stderr: false
  25598. };
  25599. var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
  25600. var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
  25601. var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
  25602. var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
  25603. var ESCAPES = new Map([['n', '\n'], ['r', '\r'], ['t', '\t'], ['b', '\b'], ['f', '\f'], ['v', '\v'], ['0', '\0'], ['\\', '\\'], ['e', "\x1B"], ['a', "\x07"]]);
  25604. function unescape(c) {
  25605. if (c[0] === 'u' && c.length === 5 || c[0] === 'x' && c.length === 3) {
  25606. return String.fromCharCode(parseInt(c.slice(1), 16));
  25607. }
  25608. return ESCAPES.get(c) || c;
  25609. }
  25610. function parseArguments(name, args) {
  25611. var results = [];
  25612. var chunks = args.trim().split(/\s*,\s*/g);
  25613. var matches;
  25614. for (var _iterator = chunks, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  25615. var _ref;
  25616. if (_isArray) {
  25617. if (_i >= _iterator.length) break;
  25618. _ref = _iterator[_i++];
  25619. } else {
  25620. _i = _iterator.next();
  25621. if (_i.done) break;
  25622. _ref = _i.value;
  25623. }
  25624. var chunk = _ref;
  25625. if (!isNaN(chunk)) {
  25626. results.push(Number(chunk));
  25627. } else if (matches = chunk.match(STRING_REGEX)) {
  25628. results.push(matches[2].replace(ESCAPE_REGEX, function (m, escape, chr) {
  25629. return escape ? unescape(escape) : chr;
  25630. }));
  25631. } else {
  25632. throw new Error("Invalid Chalk template style argument: " + chunk + " (in style '" + name + "')");
  25633. }
  25634. }
  25635. return results;
  25636. }
  25637. function parseStyle(style) {
  25638. STYLE_REGEX.lastIndex = 0;
  25639. var results = [];
  25640. var matches;
  25641. while ((matches = STYLE_REGEX.exec(style)) !== null) {
  25642. var name = matches[1];
  25643. if (matches[2]) {
  25644. var args = parseArguments(name, matches[2]);
  25645. results.push([name].concat(args));
  25646. } else {
  25647. results.push([name]);
  25648. }
  25649. }
  25650. return results;
  25651. }
  25652. function buildStyle(chalk, styles) {
  25653. var enabled = {};
  25654. for (var _iterator2 = styles, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  25655. var _ref2;
  25656. if (_isArray2) {
  25657. if (_i2 >= _iterator2.length) break;
  25658. _ref2 = _iterator2[_i2++];
  25659. } else {
  25660. _i2 = _iterator2.next();
  25661. if (_i2.done) break;
  25662. _ref2 = _i2.value;
  25663. }
  25664. var layer = _ref2;
  25665. for (var _iterator3 = layer.styles, _isArray3 = Array.isArray(_iterator3), _i4 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
  25666. var _ref3;
  25667. if (_isArray3) {
  25668. if (_i4 >= _iterator3.length) break;
  25669. _ref3 = _iterator3[_i4++];
  25670. } else {
  25671. _i4 = _iterator3.next();
  25672. if (_i4.done) break;
  25673. _ref3 = _i4.value;
  25674. }
  25675. var style = _ref3;
  25676. enabled[style[0]] = layer.inverse ? null : style.slice(1);
  25677. }
  25678. }
  25679. var current = chalk;
  25680. for (var _i3 = 0, _Object$keys = Object.keys(enabled); _i3 < _Object$keys.length; _i3++) {
  25681. var styleName = _Object$keys[_i3];
  25682. if (Array.isArray(enabled[styleName])) {
  25683. if (!(styleName in current)) {
  25684. throw new Error("Unknown Chalk style: " + styleName);
  25685. }
  25686. if (enabled[styleName].length > 0) {
  25687. current = current[styleName].apply(current, enabled[styleName]);
  25688. } else {
  25689. current = current[styleName];
  25690. }
  25691. }
  25692. }
  25693. return current;
  25694. }
  25695. var templates = function (chalk, tmp) {
  25696. var styles = [];
  25697. var chunks = [];
  25698. var chunk = [];
  25699. tmp.replace(TEMPLATE_REGEX, function (m, escapeChar, inverse, style, close, chr) {
  25700. if (escapeChar) {
  25701. chunk.push(unescape(escapeChar));
  25702. } else if (style) {
  25703. var str = chunk.join('');
  25704. chunk = [];
  25705. chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
  25706. styles.push({
  25707. inverse: inverse,
  25708. styles: parseStyle(style)
  25709. });
  25710. } else if (close) {
  25711. if (styles.length === 0) {
  25712. throw new Error('Found extraneous } in Chalk template literal');
  25713. }
  25714. chunks.push(buildStyle(chalk, styles)(chunk.join('')));
  25715. chunk = [];
  25716. styles.pop();
  25717. } else {
  25718. chunk.push(chr);
  25719. }
  25720. });
  25721. chunks.push(chunk.join(''));
  25722. if (styles.length > 0) {
  25723. var errMsg = "Chalk template literal is missing " + styles.length + " closing bracket" + (styles.length === 1 ? '' : 's') + " (`}`)";
  25724. throw new Error(errMsg);
  25725. }
  25726. return chunks.join('');
  25727. };
  25728. var chalk = createCommonjsModule(function (module) {
  25729. var stdoutColor = browser$3.stdout;
  25730. var isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm');
  25731. var levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m'];
  25732. var skipModels = new Set(['gray']);
  25733. var styles = Object.create(null);
  25734. function applyOptions(obj, options) {
  25735. options = options || {};
  25736. var scLevel = 0;
  25737. obj.level = options.level === undefined ? scLevel : options.level;
  25738. obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0;
  25739. }
  25740. function Chalk(options) {
  25741. if (!this || !(this instanceof Chalk) || this.template) {
  25742. var chalk = {};
  25743. applyOptions(chalk, options);
  25744. chalk.template = function () {
  25745. var args = [].slice.call(arguments);
  25746. return chalkTag.apply(null, [chalk.template].concat(args));
  25747. };
  25748. Object.setPrototypeOf(chalk, Chalk.prototype);
  25749. Object.setPrototypeOf(chalk.template, chalk);
  25750. chalk.template.constructor = Chalk;
  25751. return chalk.template;
  25752. }
  25753. applyOptions(this, options);
  25754. }
  25755. if (isSimpleWindowsTerm) {
  25756. ansiStyles.blue.open = "\x1B[94m";
  25757. }
  25758. var _loop = function _loop() {
  25759. var key = _Object$keys[_i];
  25760. ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
  25761. styles[key] = {
  25762. get: function get() {
  25763. var codes = ansiStyles[key];
  25764. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
  25765. }
  25766. };
  25767. };
  25768. for (var _i = 0, _Object$keys = Object.keys(ansiStyles); _i < _Object$keys.length; _i++) {
  25769. _loop();
  25770. }
  25771. styles.visible = {
  25772. get: function get() {
  25773. return build.call(this, this._styles || [], true, 'visible');
  25774. }
  25775. };
  25776. ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');
  25777. var _loop2 = function _loop2() {
  25778. var model = _Object$keys2[_i2];
  25779. if (skipModels.has(model)) {
  25780. return "continue";
  25781. }
  25782. styles[model] = {
  25783. get: function get() {
  25784. var level = this.level;
  25785. return function () {
  25786. var open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
  25787. var codes = {
  25788. open: open,
  25789. close: ansiStyles.color.close,
  25790. closeRe: ansiStyles.color.closeRe
  25791. };
  25792. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
  25793. };
  25794. }
  25795. };
  25796. };
  25797. for (var _i2 = 0, _Object$keys2 = Object.keys(ansiStyles.color.ansi); _i2 < _Object$keys2.length; _i2++) {
  25798. var _ret = _loop2();
  25799. if (_ret === "continue") continue;
  25800. }
  25801. ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g');
  25802. var _loop3 = function _loop3() {
  25803. var model = _Object$keys3[_i3];
  25804. if (skipModels.has(model)) {
  25805. return "continue";
  25806. }
  25807. var bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
  25808. styles[bgModel] = {
  25809. get: function get() {
  25810. var level = this.level;
  25811. return function () {
  25812. var open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
  25813. var codes = {
  25814. open: open,
  25815. close: ansiStyles.bgColor.close,
  25816. closeRe: ansiStyles.bgColor.closeRe
  25817. };
  25818. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
  25819. };
  25820. }
  25821. };
  25822. };
  25823. for (var _i3 = 0, _Object$keys3 = Object.keys(ansiStyles.bgColor.ansi); _i3 < _Object$keys3.length; _i3++) {
  25824. var _ret2 = _loop3();
  25825. if (_ret2 === "continue") continue;
  25826. }
  25827. var proto = Object.defineProperties(function () {}, styles);
  25828. function build(_styles, _empty, key) {
  25829. var builder = function builder() {
  25830. return applyStyle.apply(builder, arguments);
  25831. };
  25832. builder._styles = _styles;
  25833. builder._empty = _empty;
  25834. var self = this;
  25835. Object.defineProperty(builder, 'level', {
  25836. enumerable: true,
  25837. get: function get() {
  25838. return self.level;
  25839. },
  25840. set: function set(level) {
  25841. self.level = level;
  25842. }
  25843. });
  25844. Object.defineProperty(builder, 'enabled', {
  25845. enumerable: true,
  25846. get: function get() {
  25847. return self.enabled;
  25848. },
  25849. set: function set(enabled) {
  25850. self.enabled = enabled;
  25851. }
  25852. });
  25853. builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey';
  25854. builder.__proto__ = proto;
  25855. return builder;
  25856. }
  25857. function applyStyle() {
  25858. var args = arguments;
  25859. var argsLen = args.length;
  25860. var str = String(arguments[0]);
  25861. if (argsLen === 0) {
  25862. return '';
  25863. }
  25864. if (argsLen > 1) {
  25865. for (var a = 1; a < argsLen; a++) {
  25866. str += ' ' + args[a];
  25867. }
  25868. }
  25869. if (!this.enabled || this.level <= 0 || !str) {
  25870. return this._empty ? '' : str;
  25871. }
  25872. var originalDim = ansiStyles.dim.open;
  25873. if (isSimpleWindowsTerm && this.hasGrey) {
  25874. ansiStyles.dim.open = '';
  25875. }
  25876. for (var _iterator = this._styles.slice().reverse(), _isArray = Array.isArray(_iterator), _i4 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  25877. var _ref;
  25878. if (_isArray) {
  25879. if (_i4 >= _iterator.length) break;
  25880. _ref = _iterator[_i4++];
  25881. } else {
  25882. _i4 = _iterator.next();
  25883. if (_i4.done) break;
  25884. _ref = _i4.value;
  25885. }
  25886. var code = _ref;
  25887. str = code.open + str.replace(code.closeRe, code.open) + code.close;
  25888. str = str.replace(/\r?\n/g, code.close + "$&" + code.open);
  25889. }
  25890. ansiStyles.dim.open = originalDim;
  25891. return str;
  25892. }
  25893. function chalkTag(chalk, strings) {
  25894. if (!Array.isArray(strings)) {
  25895. return [].slice.call(arguments, 1).join(' ');
  25896. }
  25897. var args = [].slice.call(arguments, 2);
  25898. var parts = [strings.raw[0]];
  25899. for (var i = 1; i < strings.length; i++) {
  25900. parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&'));
  25901. parts.push(String(strings.raw[i]));
  25902. }
  25903. return templates(chalk, parts.join(''));
  25904. }
  25905. Object.defineProperties(Chalk.prototype, styles);
  25906. module.exports = Chalk();
  25907. module.exports.supportsColor = stdoutColor;
  25908. module.exports["default"] = module.exports;
  25909. });
  25910. var chalk_1 = chalk.supportsColor;
  25911. function getDefs(chalk) {
  25912. return {
  25913. keyword: chalk.cyan,
  25914. capitalized: chalk.yellow,
  25915. jsx_tag: chalk.yellow,
  25916. punctuator: chalk.yellow,
  25917. number: chalk.magenta,
  25918. string: chalk.green,
  25919. regex: chalk.magenta,
  25920. comment: chalk.grey,
  25921. invalid: chalk.white.bgRed.bold
  25922. };
  25923. }
  25924. var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
  25925. var JSX_TAG = /^[a-z][\w-]*$/i;
  25926. var BRACKET = /^[()[\]{}]$/;
  25927. function getTokenType(match) {
  25928. var _match$slice = match.slice(-2),
  25929. offset = _match$slice[0],
  25930. text = _match$slice[1];
  25931. var token = jsTokens_1(match);
  25932. if (token.type === "name") {
  25933. if (utils.keyword.isReservedWordES6(token.value)) {
  25934. return "keyword";
  25935. }
  25936. if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == "</")) {
  25937. return "jsx_tag";
  25938. }
  25939. if (token.value[0] !== token.value[0].toLowerCase()) {
  25940. return "capitalized";
  25941. }
  25942. }
  25943. if (token.type === "punctuator" && BRACKET.test(token.value)) {
  25944. return "bracket";
  25945. }
  25946. if (token.type === "invalid" && (token.value === "@" || token.value === "#")) {
  25947. return "punctuator";
  25948. }
  25949. return token.type;
  25950. }
  25951. function highlightTokens(defs, text) {
  25952. return text.replace(jsTokens$1, function () {
  25953. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  25954. args[_key] = arguments[_key];
  25955. }
  25956. var type = getTokenType(args);
  25957. var colorize = defs[type];
  25958. if (colorize) {
  25959. return args[0].split(NEWLINE).map(function (str) {
  25960. return colorize(str);
  25961. }).join("\n");
  25962. } else {
  25963. return args[0];
  25964. }
  25965. });
  25966. }
  25967. function shouldHighlight(options) {
  25968. return chalk.supportsColor || options.forceColor;
  25969. }
  25970. function getChalk(options) {
  25971. var chalk$1 = chalk;
  25972. if (options.forceColor) {
  25973. chalk$1 = new chalk.constructor({
  25974. enabled: true,
  25975. level: 1
  25976. });
  25977. }
  25978. return chalk$1;
  25979. }
  25980. function highlight(code, options) {
  25981. if (options === void 0) {
  25982. options = {};
  25983. }
  25984. if (shouldHighlight(options)) {
  25985. var chalk = getChalk(options);
  25986. var defs = getDefs(chalk);
  25987. return highlightTokens(defs, code);
  25988. } else {
  25989. return code;
  25990. }
  25991. }
  25992. function getDefs$1(chalk) {
  25993. return {
  25994. gutter: chalk.grey,
  25995. marker: chalk.red.bold,
  25996. message: chalk.red.bold
  25997. };
  25998. }
  25999. var NEWLINE$1 = /\r\n|[\n\r\u2028\u2029]/;
  26000. function getMarkerLines(loc, source, opts) {
  26001. var startLoc = Object.assign({
  26002. column: 0,
  26003. line: -1
  26004. }, loc.start);
  26005. var endLoc = Object.assign({}, startLoc, {}, loc.end);
  26006. var _ref = opts || {},
  26007. _ref$linesAbove = _ref.linesAbove,
  26008. linesAbove = _ref$linesAbove === void 0 ? 2 : _ref$linesAbove,
  26009. _ref$linesBelow = _ref.linesBelow,
  26010. linesBelow = _ref$linesBelow === void 0 ? 3 : _ref$linesBelow;
  26011. var startLine = startLoc.line;
  26012. var startColumn = startLoc.column;
  26013. var endLine = endLoc.line;
  26014. var endColumn = endLoc.column;
  26015. var start = Math.max(startLine - (linesAbove + 1), 0);
  26016. var end = Math.min(source.length, endLine + linesBelow);
  26017. if (startLine === -1) {
  26018. start = 0;
  26019. }
  26020. if (endLine === -1) {
  26021. end = source.length;
  26022. }
  26023. var lineDiff = endLine - startLine;
  26024. var markerLines = {};
  26025. if (lineDiff) {
  26026. for (var i = 0; i <= lineDiff; i++) {
  26027. var lineNumber = i + startLine;
  26028. if (!startColumn) {
  26029. markerLines[lineNumber] = true;
  26030. } else if (i === 0) {
  26031. var sourceLength = source[lineNumber - 1].length;
  26032. markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
  26033. } else if (i === lineDiff) {
  26034. markerLines[lineNumber] = [0, endColumn];
  26035. } else {
  26036. var _sourceLength = source[lineNumber - i].length;
  26037. markerLines[lineNumber] = [0, _sourceLength];
  26038. }
  26039. }
  26040. } else {
  26041. if (startColumn === endColumn) {
  26042. if (startColumn) {
  26043. markerLines[startLine] = [startColumn, 0];
  26044. } else {
  26045. markerLines[startLine] = true;
  26046. }
  26047. } else {
  26048. markerLines[startLine] = [startColumn, endColumn - startColumn];
  26049. }
  26050. }
  26051. return {
  26052. start: start,
  26053. end: end,
  26054. markerLines: markerLines
  26055. };
  26056. }
  26057. function codeFrameColumns(rawLines, loc, opts) {
  26058. if (opts === void 0) {
  26059. opts = {};
  26060. }
  26061. var highlighted = (opts.highlightCode || opts.forceColor) && shouldHighlight(opts);
  26062. var chalk = getChalk(opts);
  26063. var defs = getDefs$1(chalk);
  26064. var maybeHighlight = function maybeHighlight(chalkFn, string) {
  26065. return highlighted ? chalkFn(string) : string;
  26066. };
  26067. var lines = rawLines.split(NEWLINE$1);
  26068. var _getMarkerLines = getMarkerLines(loc, lines, opts),
  26069. start = _getMarkerLines.start,
  26070. end = _getMarkerLines.end,
  26071. markerLines = _getMarkerLines.markerLines;
  26072. var hasColumns = loc.start && typeof loc.start.column === "number";
  26073. var numberMaxWidth = String(end).length;
  26074. var highlightedLines = highlighted ? highlight(rawLines, opts) : rawLines;
  26075. var frame = highlightedLines.split(NEWLINE$1).slice(start, end).map(function (line, index) {
  26076. var number = start + 1 + index;
  26077. var paddedNumber = (" " + number).slice(-numberMaxWidth);
  26078. var gutter = " " + paddedNumber + " | ";
  26079. var hasMarker = markerLines[number];
  26080. var lastMarkerLine = !markerLines[number + 1];
  26081. if (hasMarker) {
  26082. var markerLine = "";
  26083. if (Array.isArray(hasMarker)) {
  26084. var markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
  26085. var numberOfMarkers = hasMarker[1] || 1;
  26086. markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
  26087. if (lastMarkerLine && opts.message) {
  26088. markerLine += " " + maybeHighlight(defs.message, opts.message);
  26089. }
  26090. }
  26091. return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join("");
  26092. } else {
  26093. return " " + maybeHighlight(defs.gutter, gutter) + line;
  26094. }
  26095. }).join("\n");
  26096. if (opts.message && !hasColumns) {
  26097. frame = "" + " ".repeat(numberMaxWidth + 1) + opts.message + "\n" + frame;
  26098. }
  26099. if (highlighted) {
  26100. return chalk.reset(frame);
  26101. } else {
  26102. return frame;
  26103. }
  26104. }
  26105. var beforeExpr = true;
  26106. var startsExpr = true;
  26107. var isLoop$1 = true;
  26108. var isAssign = true;
  26109. var prefix = true;
  26110. var postfix = true;
  26111. var TokenType = function TokenType(label, conf) {
  26112. if (conf === void 0) {
  26113. conf = {};
  26114. }
  26115. this.label = label;
  26116. this.keyword = conf.keyword;
  26117. this.beforeExpr = !!conf.beforeExpr;
  26118. this.startsExpr = !!conf.startsExpr;
  26119. this.rightAssociative = !!conf.rightAssociative;
  26120. this.isLoop = !!conf.isLoop;
  26121. this.isAssign = !!conf.isAssign;
  26122. this.prefix = !!conf.prefix;
  26123. this.postfix = !!conf.postfix;
  26124. this.binop = conf.binop != null ? conf.binop : null;
  26125. this.updateContext = null;
  26126. };
  26127. var keywords = new Map();
  26128. function createKeyword(name, options) {
  26129. if (options === void 0) {
  26130. options = {};
  26131. }
  26132. options.keyword = name;
  26133. var token = new TokenType(name, options);
  26134. keywords.set(name, token);
  26135. return token;
  26136. }
  26137. function createBinop(name, binop) {
  26138. return new TokenType(name, {
  26139. beforeExpr: beforeExpr,
  26140. binop: binop
  26141. });
  26142. }
  26143. var types = {
  26144. num: new TokenType("num", {
  26145. startsExpr: startsExpr
  26146. }),
  26147. bigint: new TokenType("bigint", {
  26148. startsExpr: startsExpr
  26149. }),
  26150. regexp: new TokenType("regexp", {
  26151. startsExpr: startsExpr
  26152. }),
  26153. string: new TokenType("string", {
  26154. startsExpr: startsExpr
  26155. }),
  26156. name: new TokenType("name", {
  26157. startsExpr: startsExpr
  26158. }),
  26159. eof: new TokenType("eof"),
  26160. bracketL: new TokenType("[", {
  26161. beforeExpr: beforeExpr,
  26162. startsExpr: startsExpr
  26163. }),
  26164. bracketR: new TokenType("]"),
  26165. braceL: new TokenType("{", {
  26166. beforeExpr: beforeExpr,
  26167. startsExpr: startsExpr
  26168. }),
  26169. braceBarL: new TokenType("{|", {
  26170. beforeExpr: beforeExpr,
  26171. startsExpr: startsExpr
  26172. }),
  26173. braceR: new TokenType("}"),
  26174. braceBarR: new TokenType("|}"),
  26175. parenL: new TokenType("(", {
  26176. beforeExpr: beforeExpr,
  26177. startsExpr: startsExpr
  26178. }),
  26179. parenR: new TokenType(")"),
  26180. comma: new TokenType(",", {
  26181. beforeExpr: beforeExpr
  26182. }),
  26183. semi: new TokenType(";", {
  26184. beforeExpr: beforeExpr
  26185. }),
  26186. colon: new TokenType(":", {
  26187. beforeExpr: beforeExpr
  26188. }),
  26189. doubleColon: new TokenType("::", {
  26190. beforeExpr: beforeExpr
  26191. }),
  26192. dot: new TokenType("."),
  26193. question: new TokenType("?", {
  26194. beforeExpr: beforeExpr
  26195. }),
  26196. questionDot: new TokenType("?."),
  26197. arrow: new TokenType("=>", {
  26198. beforeExpr: beforeExpr
  26199. }),
  26200. template: new TokenType("template"),
  26201. ellipsis: new TokenType("...", {
  26202. beforeExpr: beforeExpr
  26203. }),
  26204. backQuote: new TokenType("`", {
  26205. startsExpr: startsExpr
  26206. }),
  26207. dollarBraceL: new TokenType("${", {
  26208. beforeExpr: beforeExpr,
  26209. startsExpr: startsExpr
  26210. }),
  26211. at: new TokenType("@"),
  26212. hash: new TokenType("#", {
  26213. startsExpr: startsExpr
  26214. }),
  26215. interpreterDirective: new TokenType("#!..."),
  26216. eq: new TokenType("=", {
  26217. beforeExpr: beforeExpr,
  26218. isAssign: isAssign
  26219. }),
  26220. assign: new TokenType("_=", {
  26221. beforeExpr: beforeExpr,
  26222. isAssign: isAssign
  26223. }),
  26224. incDec: new TokenType("++/--", {
  26225. prefix: prefix,
  26226. postfix: postfix,
  26227. startsExpr: startsExpr
  26228. }),
  26229. bang: new TokenType("!", {
  26230. beforeExpr: beforeExpr,
  26231. prefix: prefix,
  26232. startsExpr: startsExpr
  26233. }),
  26234. tilde: new TokenType("~", {
  26235. beforeExpr: beforeExpr,
  26236. prefix: prefix,
  26237. startsExpr: startsExpr
  26238. }),
  26239. pipeline: createBinop("|>", 0),
  26240. nullishCoalescing: createBinop("??", 1),
  26241. logicalOR: createBinop("||", 2),
  26242. logicalAND: createBinop("&&", 3),
  26243. bitwiseOR: createBinop("|", 4),
  26244. bitwiseXOR: createBinop("^", 5),
  26245. bitwiseAND: createBinop("&", 6),
  26246. equality: createBinop("==/!=/===/!==", 7),
  26247. relational: createBinop("</>/<=/>=", 8),
  26248. bitShift: createBinop("<</>>/>>>", 9),
  26249. plusMin: new TokenType("+/-", {
  26250. beforeExpr: beforeExpr,
  26251. binop: 10,
  26252. prefix: prefix,
  26253. startsExpr: startsExpr
  26254. }),
  26255. modulo: new TokenType("%", {
  26256. beforeExpr: beforeExpr,
  26257. binop: 11,
  26258. startsExpr: startsExpr
  26259. }),
  26260. star: createBinop("*", 11),
  26261. slash: createBinop("/", 11),
  26262. exponent: new TokenType("**", {
  26263. beforeExpr: beforeExpr,
  26264. binop: 12,
  26265. rightAssociative: true
  26266. }),
  26267. _break: createKeyword("break"),
  26268. _case: createKeyword("case", {
  26269. beforeExpr: beforeExpr
  26270. }),
  26271. _catch: createKeyword("catch"),
  26272. _continue: createKeyword("continue"),
  26273. _debugger: createKeyword("debugger"),
  26274. _default: createKeyword("default", {
  26275. beforeExpr: beforeExpr
  26276. }),
  26277. _do: createKeyword("do", {
  26278. isLoop: isLoop$1,
  26279. beforeExpr: beforeExpr
  26280. }),
  26281. _else: createKeyword("else", {
  26282. beforeExpr: beforeExpr
  26283. }),
  26284. _finally: createKeyword("finally"),
  26285. _for: createKeyword("for", {
  26286. isLoop: isLoop$1
  26287. }),
  26288. _function: createKeyword("function", {
  26289. startsExpr: startsExpr
  26290. }),
  26291. _if: createKeyword("if"),
  26292. _return: createKeyword("return", {
  26293. beforeExpr: beforeExpr
  26294. }),
  26295. _switch: createKeyword("switch"),
  26296. _throw: createKeyword("throw", {
  26297. beforeExpr: beforeExpr,
  26298. prefix: prefix,
  26299. startsExpr: startsExpr
  26300. }),
  26301. _try: createKeyword("try"),
  26302. _var: createKeyword("var"),
  26303. _const: createKeyword("const"),
  26304. _while: createKeyword("while", {
  26305. isLoop: isLoop$1
  26306. }),
  26307. _with: createKeyword("with"),
  26308. _new: createKeyword("new", {
  26309. beforeExpr: beforeExpr,
  26310. startsExpr: startsExpr
  26311. }),
  26312. _this: createKeyword("this", {
  26313. startsExpr: startsExpr
  26314. }),
  26315. _super: createKeyword("super", {
  26316. startsExpr: startsExpr
  26317. }),
  26318. _class: createKeyword("class", {
  26319. startsExpr: startsExpr
  26320. }),
  26321. _extends: createKeyword("extends", {
  26322. beforeExpr: beforeExpr
  26323. }),
  26324. _export: createKeyword("export"),
  26325. _import: createKeyword("import", {
  26326. startsExpr: startsExpr
  26327. }),
  26328. _null: createKeyword("null", {
  26329. startsExpr: startsExpr
  26330. }),
  26331. _true: createKeyword("true", {
  26332. startsExpr: startsExpr
  26333. }),
  26334. _false: createKeyword("false", {
  26335. startsExpr: startsExpr
  26336. }),
  26337. _in: createKeyword("in", {
  26338. beforeExpr: beforeExpr,
  26339. binop: 8
  26340. }),
  26341. _instanceof: createKeyword("instanceof", {
  26342. beforeExpr: beforeExpr,
  26343. binop: 8
  26344. }),
  26345. _typeof: createKeyword("typeof", {
  26346. beforeExpr: beforeExpr,
  26347. prefix: prefix,
  26348. startsExpr: startsExpr
  26349. }),
  26350. _void: createKeyword("void", {
  26351. beforeExpr: beforeExpr,
  26352. prefix: prefix,
  26353. startsExpr: startsExpr
  26354. }),
  26355. _delete: createKeyword("delete", {
  26356. beforeExpr: beforeExpr,
  26357. prefix: prefix,
  26358. startsExpr: startsExpr
  26359. })
  26360. };
  26361. var SCOPE_OTHER = 0,
  26362. SCOPE_PROGRAM = 1,
  26363. SCOPE_FUNCTION = 2,
  26364. SCOPE_ASYNC = 4,
  26365. SCOPE_GENERATOR = 8,
  26366. SCOPE_ARROW = 16,
  26367. SCOPE_SIMPLE_CATCH = 32,
  26368. SCOPE_SUPER = 64,
  26369. SCOPE_DIRECT_SUPER = 128,
  26370. SCOPE_CLASS = 256,
  26371. SCOPE_TS_MODULE = 512,
  26372. SCOPE_VAR = SCOPE_PROGRAM | SCOPE_FUNCTION | SCOPE_TS_MODULE;
  26373. function functionFlags(isAsync, isGenerator) {
  26374. return SCOPE_FUNCTION | (isAsync ? SCOPE_ASYNC : 0) | (isGenerator ? SCOPE_GENERATOR : 0);
  26375. }
  26376. var BIND_KIND_VALUE = 1,
  26377. BIND_KIND_TYPE = 2,
  26378. BIND_SCOPE_VAR = 4,
  26379. BIND_SCOPE_LEXICAL = 8,
  26380. BIND_SCOPE_FUNCTION = 16,
  26381. BIND_FLAGS_NONE = 64,
  26382. BIND_FLAGS_CLASS = 128,
  26383. BIND_FLAGS_TS_ENUM = 256,
  26384. BIND_FLAGS_TS_CONST_ENUM = 512,
  26385. BIND_FLAGS_TS_EXPORT_ONLY = 1024;
  26386. var BIND_CLASS = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_CLASS,
  26387. BIND_LEXICAL = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | 0,
  26388. BIND_VAR = BIND_KIND_VALUE | 0 | BIND_SCOPE_VAR | 0,
  26389. BIND_FUNCTION = BIND_KIND_VALUE | 0 | BIND_SCOPE_FUNCTION | 0,
  26390. BIND_TS_INTERFACE = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_CLASS,
  26391. BIND_TS_TYPE = 0 | BIND_KIND_TYPE | 0 | 0,
  26392. BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM,
  26393. BIND_TS_AMBIENT = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY,
  26394. BIND_NONE = 0 | 0 | 0 | BIND_FLAGS_NONE,
  26395. BIND_OUTSIDE = BIND_KIND_VALUE | 0 | 0 | BIND_FLAGS_NONE,
  26396. BIND_TS_CONST_ENUM = BIND_TS_ENUM | BIND_FLAGS_TS_CONST_ENUM,
  26397. BIND_TS_NAMESPACE = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY;
  26398. var CLASS_ELEMENT_FLAG_STATIC = 4,
  26399. CLASS_ELEMENT_KIND_GETTER = 2,
  26400. CLASS_ELEMENT_KIND_SETTER = 1,
  26401. CLASS_ELEMENT_KIND_ACCESSOR = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_KIND_SETTER;
  26402. var CLASS_ELEMENT_STATIC_GETTER = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_FLAG_STATIC,
  26403. CLASS_ELEMENT_STATIC_SETTER = CLASS_ELEMENT_KIND_SETTER | CLASS_ELEMENT_FLAG_STATIC,
  26404. CLASS_ELEMENT_INSTANCE_GETTER = CLASS_ELEMENT_KIND_GETTER,
  26405. CLASS_ELEMENT_INSTANCE_SETTER = CLASS_ELEMENT_KIND_SETTER,
  26406. CLASS_ELEMENT_OTHER = 0;
  26407. function isSimpleProperty(node) {
  26408. return node != null && node.type === "Property" && node.kind === "init" && node.method === false;
  26409. }
  26410. var estree = (function (superClass) {
  26411. return function (_superClass) {
  26412. _inheritsLoose(_class, _superClass);
  26413. function _class() {
  26414. return _superClass.apply(this, arguments) || this;
  26415. }
  26416. var _proto = _class.prototype;
  26417. _proto.estreeParseRegExpLiteral = function estreeParseRegExpLiteral(_ref) {
  26418. var pattern = _ref.pattern,
  26419. flags = _ref.flags;
  26420. var regex = null;
  26421. try {
  26422. regex = new RegExp(pattern, flags);
  26423. } catch (e) {}
  26424. var node = this.estreeParseLiteral(regex);
  26425. node.regex = {
  26426. pattern: pattern,
  26427. flags: flags
  26428. };
  26429. return node;
  26430. };
  26431. _proto.estreeParseBigIntLiteral = function estreeParseBigIntLiteral(value) {
  26432. var bigInt = typeof BigInt !== "undefined" ? BigInt(value) : null;
  26433. var node = this.estreeParseLiteral(bigInt);
  26434. node.bigint = String(node.value || value);
  26435. return node;
  26436. };
  26437. _proto.estreeParseLiteral = function estreeParseLiteral(value) {
  26438. return this.parseLiteral(value, "Literal");
  26439. };
  26440. _proto.directiveToStmt = function directiveToStmt(directive) {
  26441. var directiveLiteral = directive.value;
  26442. var stmt = this.startNodeAt(directive.start, directive.loc.start);
  26443. var expression = this.startNodeAt(directiveLiteral.start, directiveLiteral.loc.start);
  26444. expression.value = directiveLiteral.value;
  26445. expression.raw = directiveLiteral.extra.raw;
  26446. stmt.expression = this.finishNodeAt(expression, "Literal", directiveLiteral.end, directiveLiteral.loc.end);
  26447. stmt.directive = directiveLiteral.extra.raw.slice(1, -1);
  26448. return this.finishNodeAt(stmt, "ExpressionStatement", directive.end, directive.loc.end);
  26449. };
  26450. _proto.initFunction = function initFunction(node, isAsync) {
  26451. _superClass.prototype.initFunction.call(this, node, isAsync);
  26452. node.expression = false;
  26453. };
  26454. _proto.checkDeclaration = function checkDeclaration(node) {
  26455. if (isSimpleProperty(node)) {
  26456. this.checkDeclaration(node.value);
  26457. } else {
  26458. _superClass.prototype.checkDeclaration.call(this, node);
  26459. }
  26460. };
  26461. _proto.checkGetterSetterParams = function checkGetterSetterParams(method) {
  26462. var prop = method;
  26463. var paramCount = prop.kind === "get" ? 0 : 1;
  26464. var start = prop.start;
  26465. if (prop.value.params.length !== paramCount) {
  26466. if (prop.kind === "get") {
  26467. this.raise(start, "getter must not have any formal parameters");
  26468. } else {
  26469. this.raise(start, "setter must have exactly one formal parameter");
  26470. }
  26471. } else if (prop.kind === "set" && prop.value.params[0].type === "RestElement") {
  26472. this.raise(start, "setter function argument must not be a rest parameter");
  26473. }
  26474. };
  26475. _proto.checkLVal = function checkLVal(expr, bindingType, checkClashes, contextDescription, disallowLetBinding) {
  26476. var _this = this;
  26477. if (bindingType === void 0) {
  26478. bindingType = BIND_NONE;
  26479. }
  26480. switch (expr.type) {
  26481. case "ObjectPattern":
  26482. expr.properties.forEach(function (prop) {
  26483. _this.checkLVal(prop.type === "Property" ? prop.value : prop, bindingType, checkClashes, "object destructuring pattern", disallowLetBinding);
  26484. });
  26485. break;
  26486. default:
  26487. _superClass.prototype.checkLVal.call(this, expr, bindingType, checkClashes, contextDescription, disallowLetBinding);
  26488. }
  26489. };
  26490. _proto.checkDuplicatedProto = function checkDuplicatedProto(prop, protoRef) {
  26491. if (prop.type === "SpreadElement" || prop.computed || prop.method || prop.shorthand) {
  26492. return;
  26493. }
  26494. var key = prop.key;
  26495. var name = key.type === "Identifier" ? key.name : String(key.value);
  26496. if (name === "__proto__" && prop.kind === "init") {
  26497. if (protoRef.used && !protoRef.start) {
  26498. protoRef.start = key.start;
  26499. }
  26500. protoRef.used = true;
  26501. }
  26502. };
  26503. _proto.isValidDirective = function isValidDirective(stmt) {
  26504. return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && (!stmt.expression.extra || !stmt.expression.extra.parenthesized);
  26505. };
  26506. _proto.stmtToDirective = function stmtToDirective(stmt) {
  26507. var directive = _superClass.prototype.stmtToDirective.call(this, stmt);
  26508. var value = stmt.expression.value;
  26509. directive.value.value = value;
  26510. return directive;
  26511. };
  26512. _proto.parseBlockBody = function parseBlockBody(node, allowDirectives, topLevel, end) {
  26513. var _this2 = this;
  26514. _superClass.prototype.parseBlockBody.call(this, node, allowDirectives, topLevel, end);
  26515. var directiveStatements = node.directives.map(function (d) {
  26516. return _this2.directiveToStmt(d);
  26517. });
  26518. node.body = directiveStatements.concat(node.body);
  26519. delete node.directives;
  26520. };
  26521. _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  26522. this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true);
  26523. if (method.typeParameters) {
  26524. method.value.typeParameters = method.typeParameters;
  26525. delete method.typeParameters;
  26526. }
  26527. classBody.body.push(method);
  26528. };
  26529. _proto.parseExprAtom = function parseExprAtom(refShorthandDefaultPos) {
  26530. switch (this.state.type) {
  26531. case types.num:
  26532. case types.string:
  26533. return this.estreeParseLiteral(this.state.value);
  26534. case types.regexp:
  26535. return this.estreeParseRegExpLiteral(this.state.value);
  26536. case types.bigint:
  26537. return this.estreeParseBigIntLiteral(this.state.value);
  26538. case types._null:
  26539. return this.estreeParseLiteral(null);
  26540. case types._true:
  26541. return this.estreeParseLiteral(true);
  26542. case types._false:
  26543. return this.estreeParseLiteral(false);
  26544. default:
  26545. return _superClass.prototype.parseExprAtom.call(this, refShorthandDefaultPos);
  26546. }
  26547. };
  26548. _proto.parseLiteral = function parseLiteral(value, type, startPos, startLoc) {
  26549. var node = _superClass.prototype.parseLiteral.call(this, value, type, startPos, startLoc);
  26550. node.raw = node.extra.raw;
  26551. delete node.extra;
  26552. return node;
  26553. };
  26554. _proto.parseFunctionBody = function parseFunctionBody(node, allowExpression, isMethod) {
  26555. if (isMethod === void 0) {
  26556. isMethod = false;
  26557. }
  26558. _superClass.prototype.parseFunctionBody.call(this, node, allowExpression, isMethod);
  26559. node.expression = node.body.type !== "BlockStatement";
  26560. };
  26561. _proto.parseMethod = function parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope) {
  26562. if (inClassScope === void 0) {
  26563. inClassScope = false;
  26564. }
  26565. var funcNode = this.startNode();
  26566. funcNode.kind = node.kind;
  26567. funcNode = _superClass.prototype.parseMethod.call(this, funcNode, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope);
  26568. funcNode.type = "FunctionExpression";
  26569. delete funcNode.kind;
  26570. node.value = funcNode;
  26571. type = type === "ClassMethod" ? "MethodDefinition" : type;
  26572. return this.finishNode(node, type);
  26573. };
  26574. _proto.parseObjectMethod = function parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) {
  26575. var node = _superClass.prototype.parseObjectMethod.call(this, prop, isGenerator, isAsync, isPattern, containsEsc);
  26576. if (node) {
  26577. node.type = "Property";
  26578. if (node.kind === "method") node.kind = "init";
  26579. node.shorthand = false;
  26580. }
  26581. return node;
  26582. };
  26583. _proto.parseObjectProperty = function parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos) {
  26584. var node = _superClass.prototype.parseObjectProperty.call(this, prop, startPos, startLoc, isPattern, refShorthandDefaultPos);
  26585. if (node) {
  26586. node.kind = "init";
  26587. node.type = "Property";
  26588. }
  26589. return node;
  26590. };
  26591. _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) {
  26592. if (isSimpleProperty(node)) {
  26593. this.toAssignable(node.value, isBinding, contextDescription);
  26594. return node;
  26595. }
  26596. return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription);
  26597. };
  26598. _proto.toAssignableObjectExpressionProp = function toAssignableObjectExpressionProp(prop, isBinding, isLast) {
  26599. if (prop.kind === "get" || prop.kind === "set") {
  26600. throw this.raise(prop.key.start, "Object pattern can't contain getter or setter");
  26601. } else if (prop.method) {
  26602. throw this.raise(prop.key.start, "Object pattern can't contain methods");
  26603. } else {
  26604. _superClass.prototype.toAssignableObjectExpressionProp.call(this, prop, isBinding, isLast);
  26605. }
  26606. };
  26607. _proto.finishCallExpression = function finishCallExpression(node, optional) {
  26608. _superClass.prototype.finishCallExpression.call(this, node, optional);
  26609. if (node.callee.type === "Import") {
  26610. node.type = "ImportExpression";
  26611. node.source = node.arguments[0];
  26612. delete node.arguments;
  26613. delete node.callee;
  26614. }
  26615. return node;
  26616. };
  26617. _proto.toReferencedListDeep = function toReferencedListDeep(exprList, isParenthesizedExpr) {
  26618. if (!exprList) {
  26619. return;
  26620. }
  26621. _superClass.prototype.toReferencedListDeep.call(this, exprList, isParenthesizedExpr);
  26622. };
  26623. return _class;
  26624. }(superClass);
  26625. });
  26626. var lineBreak = /\r\n?|[\n\u2028\u2029]/;
  26627. var lineBreakG = new RegExp(lineBreak.source, "g");
  26628. function isNewLine(code) {
  26629. switch (code) {
  26630. case 10:
  26631. case 13:
  26632. case 8232:
  26633. case 8233:
  26634. return true;
  26635. default:
  26636. return false;
  26637. }
  26638. }
  26639. var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
  26640. function isWhitespace(code) {
  26641. switch (code) {
  26642. case 0x0009:
  26643. case 0x000b:
  26644. case 0x000c:
  26645. case 32:
  26646. case 160:
  26647. case 5760:
  26648. case 0x2000:
  26649. case 0x2001:
  26650. case 0x2002:
  26651. case 0x2003:
  26652. case 0x2004:
  26653. case 0x2005:
  26654. case 0x2006:
  26655. case 0x2007:
  26656. case 0x2008:
  26657. case 0x2009:
  26658. case 0x200a:
  26659. case 0x202f:
  26660. case 0x205f:
  26661. case 0x3000:
  26662. case 0xfeff:
  26663. return true;
  26664. default:
  26665. return false;
  26666. }
  26667. }
  26668. var TokContext = function TokContext(token, isExpr, preserveSpace, override) {
  26669. this.token = token;
  26670. this.isExpr = !!isExpr;
  26671. this.preserveSpace = !!preserveSpace;
  26672. this.override = override;
  26673. };
  26674. var types$1 = {
  26675. braceStatement: new TokContext("{", false),
  26676. braceExpression: new TokContext("{", true),
  26677. templateQuasi: new TokContext("${", false),
  26678. parenStatement: new TokContext("(", false),
  26679. parenExpression: new TokContext("(", true),
  26680. template: new TokContext("`", true, true, function (p) {
  26681. return p.readTmplToken();
  26682. }),
  26683. functionExpression: new TokContext("function", true),
  26684. functionStatement: new TokContext("function", false)
  26685. };
  26686. types.parenR.updateContext = types.braceR.updateContext = function () {
  26687. if (this.state.context.length === 1) {
  26688. this.state.exprAllowed = true;
  26689. return;
  26690. }
  26691. var out = this.state.context.pop();
  26692. if (out === types$1.braceStatement && this.curContext().token === "function") {
  26693. out = this.state.context.pop();
  26694. }
  26695. this.state.exprAllowed = !out.isExpr;
  26696. };
  26697. types.name.updateContext = function (prevType) {
  26698. var allowed = false;
  26699. if (prevType !== types.dot) {
  26700. if (this.state.value === "of" && !this.state.exprAllowed || this.state.value === "yield" && this.scope.inGenerator) {
  26701. allowed = true;
  26702. }
  26703. }
  26704. this.state.exprAllowed = allowed;
  26705. if (this.state.isIterator) {
  26706. this.state.isIterator = false;
  26707. }
  26708. };
  26709. types.braceL.updateContext = function (prevType) {
  26710. this.state.context.push(this.braceIsBlock(prevType) ? types$1.braceStatement : types$1.braceExpression);
  26711. this.state.exprAllowed = true;
  26712. };
  26713. types.dollarBraceL.updateContext = function () {
  26714. this.state.context.push(types$1.templateQuasi);
  26715. this.state.exprAllowed = true;
  26716. };
  26717. types.parenL.updateContext = function (prevType) {
  26718. var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while;
  26719. this.state.context.push(statementParens ? types$1.parenStatement : types$1.parenExpression);
  26720. this.state.exprAllowed = true;
  26721. };
  26722. types.incDec.updateContext = function () {};
  26723. types._function.updateContext = types._class.updateContext = function (prevType) {
  26724. if (prevType.beforeExpr && prevType !== types.semi && prevType !== types._else && !(prevType === types._return && lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start))) && !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat)) {
  26725. this.state.context.push(types$1.functionExpression);
  26726. } else {
  26727. this.state.context.push(types$1.functionStatement);
  26728. }
  26729. this.state.exprAllowed = false;
  26730. };
  26731. types.backQuote.updateContext = function () {
  26732. if (this.curContext() === types$1.template) {
  26733. this.state.context.pop();
  26734. } else {
  26735. this.state.context.push(types$1.template);
  26736. }
  26737. this.state.exprAllowed = false;
  26738. };
  26739. var reservedWords = {
  26740. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  26741. strictBind: ["eval", "arguments"]
  26742. };
  26743. var reservedWordsStrictSet = new Set(reservedWords.strict);
  26744. var reservedWordsStrictBindSet = new Set(reservedWords.strictBind);
  26745. var isReservedWord = function isReservedWord(word, inModule) {
  26746. return inModule && word === "await" || word === "enum";
  26747. };
  26748. function isStrictReservedWord(word, inModule) {
  26749. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  26750. }
  26751. function isStrictBindOnlyReservedWord(word) {
  26752. return reservedWordsStrictBindSet.has(word);
  26753. }
  26754. function isStrictBindReservedWord(word, inModule) {
  26755. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  26756. }
  26757. function isKeyword(word) {
  26758. return keywords.has(word);
  26759. }
  26760. var keywordRelationalOperator = /^in(stanceof)?$/;
  26761. 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-\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\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-\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-\uA7BF\uA7C2-\uA7C6\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-\uAB67\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";
  26762. 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\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-\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\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\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";
  26763. var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
  26764. var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
  26765. nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
  26766. 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, 477, 28, 11, 0, 9, 21, 155, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 12, 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, 0, 33, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 0, 161, 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, 270, 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, 754, 9486, 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, 42710, 42, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541];
  26767. 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, 525, 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, 4, 9, 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, 232, 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, 19723, 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, 792487, 239];
  26768. function isInAstralSet(code, set) {
  26769. var pos = 0x10000;
  26770. for (var i = 0, length = set.length; i < length; i += 2) {
  26771. pos += set[i];
  26772. if (pos > code) return false;
  26773. pos += set[i + 1];
  26774. if (pos >= code) return true;
  26775. }
  26776. return false;
  26777. }
  26778. function isIdentifierStart(code) {
  26779. if (code < 65) return code === 36;
  26780. if (code <= 90) return true;
  26781. if (code < 97) return code === 95;
  26782. if (code <= 122) return true;
  26783. if (code <= 0xffff) {
  26784. return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
  26785. }
  26786. return isInAstralSet(code, astralIdentifierStartCodes);
  26787. }
  26788. function isIteratorStart(current, next) {
  26789. return current === 64 && next === 64;
  26790. }
  26791. function isIdentifierChar(code) {
  26792. if (code < 48) return code === 36;
  26793. if (code < 58) return true;
  26794. if (code < 65) return false;
  26795. if (code <= 90) return true;
  26796. if (code < 97) return code === 95;
  26797. if (code <= 122) return true;
  26798. if (code <= 0xffff) {
  26799. return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
  26800. }
  26801. return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
  26802. }
  26803. var reservedTypes = new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]);
  26804. function isEsModuleType(bodyElement) {
  26805. return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration");
  26806. }
  26807. function hasTypeImportKind(node) {
  26808. return node.importKind === "type" || node.importKind === "typeof";
  26809. }
  26810. function isMaybeDefaultImport(state) {
  26811. return (state.type === types.name || !!state.type.keyword) && state.value !== "from";
  26812. }
  26813. var exportSuggestions = {
  26814. "const": "declare export var",
  26815. "let": "declare export var",
  26816. type: "export type",
  26817. "interface": "export interface"
  26818. };
  26819. function partition(list, test) {
  26820. var list1 = [];
  26821. var list2 = [];
  26822. for (var i = 0; i < list.length; i++) {
  26823. (test(list[i], i, list) ? list1 : list2).push(list[i]);
  26824. }
  26825. return [list1, list2];
  26826. }
  26827. var FLOW_PRAGMA_REGEX = /\*?\s*@((?:no)?flow)\b/;
  26828. var flow = (function (superClass) {
  26829. return function (_superClass) {
  26830. _inheritsLoose(_class, _superClass);
  26831. function _class(options, input) {
  26832. var _this;
  26833. _this = _superClass.call(this, options, input) || this;
  26834. _this.flowPragma = undefined;
  26835. return _this;
  26836. }
  26837. var _proto = _class.prototype;
  26838. _proto.shouldParseTypes = function shouldParseTypes() {
  26839. return this.getPluginOption("flow", "all") || this.flowPragma === "flow";
  26840. };
  26841. _proto.shouldParseEnums = function shouldParseEnums() {
  26842. return !!this.getPluginOption("flow", "enums");
  26843. };
  26844. _proto.finishToken = function finishToken(type, val) {
  26845. if (type !== types.string && type !== types.semi && type !== types.interpreterDirective) {
  26846. if (this.flowPragma === undefined) {
  26847. this.flowPragma = null;
  26848. }
  26849. }
  26850. return _superClass.prototype.finishToken.call(this, type, val);
  26851. };
  26852. _proto.addComment = function addComment(comment) {
  26853. if (this.flowPragma === undefined) {
  26854. var matches = FLOW_PRAGMA_REGEX.exec(comment.value);
  26855. if (!matches) ; else if (matches[1] === "flow") {
  26856. this.flowPragma = "flow";
  26857. } else if (matches[1] === "noflow") {
  26858. this.flowPragma = "noflow";
  26859. } else {
  26860. throw new Error("Unexpected flow pragma");
  26861. }
  26862. }
  26863. return _superClass.prototype.addComment.call(this, comment);
  26864. };
  26865. _proto.flowParseTypeInitialiser = function flowParseTypeInitialiser(tok) {
  26866. var oldInType = this.state.inType;
  26867. this.state.inType = true;
  26868. this.expect(tok || types.colon);
  26869. var type = this.flowParseType();
  26870. this.state.inType = oldInType;
  26871. return type;
  26872. };
  26873. _proto.flowParsePredicate = function flowParsePredicate() {
  26874. var node = this.startNode();
  26875. var moduloLoc = this.state.startLoc;
  26876. var moduloPos = this.state.start;
  26877. this.expect(types.modulo);
  26878. var checksLoc = this.state.startLoc;
  26879. this.expectContextual("checks");
  26880. if (moduloLoc.line !== checksLoc.line || moduloLoc.column !== checksLoc.column - 1) {
  26881. this.raise(moduloPos, "Spaces between ´%´ and ´checks´ are not allowed here.");
  26882. }
  26883. if (this.eat(types.parenL)) {
  26884. node.value = this.parseExpression();
  26885. this.expect(types.parenR);
  26886. return this.finishNode(node, "DeclaredPredicate");
  26887. } else {
  26888. return this.finishNode(node, "InferredPredicate");
  26889. }
  26890. };
  26891. _proto.flowParseTypeAndPredicateInitialiser = function flowParseTypeAndPredicateInitialiser() {
  26892. var oldInType = this.state.inType;
  26893. this.state.inType = true;
  26894. this.expect(types.colon);
  26895. var type = null;
  26896. var predicate = null;
  26897. if (this.match(types.modulo)) {
  26898. this.state.inType = oldInType;
  26899. predicate = this.flowParsePredicate();
  26900. } else {
  26901. type = this.flowParseType();
  26902. this.state.inType = oldInType;
  26903. if (this.match(types.modulo)) {
  26904. predicate = this.flowParsePredicate();
  26905. }
  26906. }
  26907. return [type, predicate];
  26908. };
  26909. _proto.flowParseDeclareClass = function flowParseDeclareClass(node) {
  26910. this.next();
  26911. this.flowParseInterfaceish(node, true);
  26912. return this.finishNode(node, "DeclareClass");
  26913. };
  26914. _proto.flowParseDeclareFunction = function flowParseDeclareFunction(node) {
  26915. this.next();
  26916. var id = node.id = this.parseIdentifier();
  26917. var typeNode = this.startNode();
  26918. var typeContainer = this.startNode();
  26919. if (this.isRelational("<")) {
  26920. typeNode.typeParameters = this.flowParseTypeParameterDeclaration();
  26921. } else {
  26922. typeNode.typeParameters = null;
  26923. }
  26924. this.expect(types.parenL);
  26925. var tmp = this.flowParseFunctionTypeParams();
  26926. typeNode.params = tmp.params;
  26927. typeNode.rest = tmp.rest;
  26928. this.expect(types.parenR);
  26929. var _this$flowParseTypeAn = this.flowParseTypeAndPredicateInitialiser();
  26930. typeNode.returnType = _this$flowParseTypeAn[0];
  26931. node.predicate = _this$flowParseTypeAn[1];
  26932. typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation");
  26933. id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation");
  26934. this.resetEndLocation(id);
  26935. this.semicolon();
  26936. return this.finishNode(node, "DeclareFunction");
  26937. };
  26938. _proto.flowParseDeclare = function flowParseDeclare(node, insideModule) {
  26939. if (this.match(types._class)) {
  26940. return this.flowParseDeclareClass(node);
  26941. } else if (this.match(types._function)) {
  26942. return this.flowParseDeclareFunction(node);
  26943. } else if (this.match(types._var)) {
  26944. return this.flowParseDeclareVariable(node);
  26945. } else if (this.eatContextual("module")) {
  26946. if (this.match(types.dot)) {
  26947. return this.flowParseDeclareModuleExports(node);
  26948. } else {
  26949. if (insideModule) {
  26950. this.raise(this.state.lastTokStart, "`declare module` cannot be used inside another `declare module`");
  26951. }
  26952. return this.flowParseDeclareModule(node);
  26953. }
  26954. } else if (this.isContextual("type")) {
  26955. return this.flowParseDeclareTypeAlias(node);
  26956. } else if (this.isContextual("opaque")) {
  26957. return this.flowParseDeclareOpaqueType(node);
  26958. } else if (this.isContextual("interface")) {
  26959. return this.flowParseDeclareInterface(node);
  26960. } else if (this.match(types._export)) {
  26961. return this.flowParseDeclareExportDeclaration(node, insideModule);
  26962. } else {
  26963. throw this.unexpected();
  26964. }
  26965. };
  26966. _proto.flowParseDeclareVariable = function flowParseDeclareVariable(node) {
  26967. this.next();
  26968. node.id = this.flowParseTypeAnnotatableIdentifier(true);
  26969. this.scope.declareName(node.id.name, BIND_VAR, node.id.start);
  26970. this.semicolon();
  26971. return this.finishNode(node, "DeclareVariable");
  26972. };
  26973. _proto.flowParseDeclareModule = function flowParseDeclareModule(node) {
  26974. var _this2 = this;
  26975. this.scope.enter(SCOPE_OTHER);
  26976. if (this.match(types.string)) {
  26977. node.id = this.parseExprAtom();
  26978. } else {
  26979. node.id = this.parseIdentifier();
  26980. }
  26981. var bodyNode = node.body = this.startNode();
  26982. var body = bodyNode.body = [];
  26983. this.expect(types.braceL);
  26984. while (!this.match(types.braceR)) {
  26985. var _bodyNode = this.startNode();
  26986. if (this.match(types._import)) {
  26987. this.next();
  26988. if (!this.isContextual("type") && !this.match(types._typeof)) {
  26989. this.raise(this.state.lastTokStart, "Imports within a `declare module` body must always be `import type` or `import typeof`");
  26990. }
  26991. this.parseImport(_bodyNode);
  26992. } else {
  26993. this.expectContextual("declare", "Only declares and type imports are allowed inside declare module");
  26994. _bodyNode = this.flowParseDeclare(_bodyNode, true);
  26995. }
  26996. body.push(_bodyNode);
  26997. }
  26998. this.scope.exit();
  26999. this.expect(types.braceR);
  27000. this.finishNode(bodyNode, "BlockStatement");
  27001. var kind = null;
  27002. var hasModuleExport = false;
  27003. var errorMessage = "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";
  27004. body.forEach(function (bodyElement) {
  27005. if (isEsModuleType(bodyElement)) {
  27006. if (kind === "CommonJS") {
  27007. _this2.raise(bodyElement.start, errorMessage);
  27008. }
  27009. kind = "ES";
  27010. } else if (bodyElement.type === "DeclareModuleExports") {
  27011. if (hasModuleExport) {
  27012. _this2.raise(bodyElement.start, "Duplicate `declare module.exports` statement");
  27013. }
  27014. if (kind === "ES") _this2.raise(bodyElement.start, errorMessage);
  27015. kind = "CommonJS";
  27016. hasModuleExport = true;
  27017. }
  27018. });
  27019. node.kind = kind || "CommonJS";
  27020. return this.finishNode(node, "DeclareModule");
  27021. };
  27022. _proto.flowParseDeclareExportDeclaration = function flowParseDeclareExportDeclaration(node, insideModule) {
  27023. this.expect(types._export);
  27024. if (this.eat(types._default)) {
  27025. if (this.match(types._function) || this.match(types._class)) {
  27026. node.declaration = this.flowParseDeclare(this.startNode());
  27027. } else {
  27028. node.declaration = this.flowParseType();
  27029. this.semicolon();
  27030. }
  27031. node["default"] = true;
  27032. return this.finishNode(node, "DeclareExportDeclaration");
  27033. } else {
  27034. if (this.match(types._const) || this.isLet() || (this.isContextual("type") || this.isContextual("interface")) && !insideModule) {
  27035. var label = this.state.value;
  27036. var suggestion = exportSuggestions[label];
  27037. this.unexpected(this.state.start, "`declare export " + label + "` is not supported. Use `" + suggestion + "` instead");
  27038. }
  27039. if (this.match(types._var) || this.match(types._function) || this.match(types._class) || this.isContextual("opaque")) {
  27040. node.declaration = this.flowParseDeclare(this.startNode());
  27041. node["default"] = false;
  27042. return this.finishNode(node, "DeclareExportDeclaration");
  27043. } else if (this.match(types.star) || this.match(types.braceL) || this.isContextual("interface") || this.isContextual("type") || this.isContextual("opaque")) {
  27044. node = this.parseExport(node);
  27045. if (node.type === "ExportNamedDeclaration") {
  27046. node.type = "ExportDeclaration";
  27047. node["default"] = false;
  27048. delete node.exportKind;
  27049. }
  27050. node.type = "Declare" + node.type;
  27051. return node;
  27052. }
  27053. }
  27054. throw this.unexpected();
  27055. };
  27056. _proto.flowParseDeclareModuleExports = function flowParseDeclareModuleExports(node) {
  27057. this.next();
  27058. this.expectContextual("exports");
  27059. node.typeAnnotation = this.flowParseTypeAnnotation();
  27060. this.semicolon();
  27061. return this.finishNode(node, "DeclareModuleExports");
  27062. };
  27063. _proto.flowParseDeclareTypeAlias = function flowParseDeclareTypeAlias(node) {
  27064. this.next();
  27065. this.flowParseTypeAlias(node);
  27066. node.type = "DeclareTypeAlias";
  27067. return node;
  27068. };
  27069. _proto.flowParseDeclareOpaqueType = function flowParseDeclareOpaqueType(node) {
  27070. this.next();
  27071. this.flowParseOpaqueType(node, true);
  27072. node.type = "DeclareOpaqueType";
  27073. return node;
  27074. };
  27075. _proto.flowParseDeclareInterface = function flowParseDeclareInterface(node) {
  27076. this.next();
  27077. this.flowParseInterfaceish(node);
  27078. return this.finishNode(node, "DeclareInterface");
  27079. };
  27080. _proto.flowParseInterfaceish = function flowParseInterfaceish(node, isClass) {
  27081. if (isClass === void 0) {
  27082. isClass = false;
  27083. }
  27084. node.id = this.flowParseRestrictedIdentifier(!isClass, true);
  27085. this.scope.declareName(node.id.name, isClass ? BIND_FUNCTION : BIND_LEXICAL, node.id.start);
  27086. if (this.isRelational("<")) {
  27087. node.typeParameters = this.flowParseTypeParameterDeclaration();
  27088. } else {
  27089. node.typeParameters = null;
  27090. }
  27091. node["extends"] = [];
  27092. node["implements"] = [];
  27093. node.mixins = [];
  27094. if (this.eat(types._extends)) {
  27095. do {
  27096. node["extends"].push(this.flowParseInterfaceExtends());
  27097. } while (!isClass && this.eat(types.comma));
  27098. }
  27099. if (this.isContextual("mixins")) {
  27100. this.next();
  27101. do {
  27102. node.mixins.push(this.flowParseInterfaceExtends());
  27103. } while (this.eat(types.comma));
  27104. }
  27105. if (this.isContextual("implements")) {
  27106. this.next();
  27107. do {
  27108. node["implements"].push(this.flowParseInterfaceExtends());
  27109. } while (this.eat(types.comma));
  27110. }
  27111. node.body = this.flowParseObjectType({
  27112. allowStatic: isClass,
  27113. allowExact: false,
  27114. allowSpread: false,
  27115. allowProto: isClass,
  27116. allowInexact: false
  27117. });
  27118. };
  27119. _proto.flowParseInterfaceExtends = function flowParseInterfaceExtends() {
  27120. var node = this.startNode();
  27121. node.id = this.flowParseQualifiedTypeIdentifier();
  27122. if (this.isRelational("<")) {
  27123. node.typeParameters = this.flowParseTypeParameterInstantiation();
  27124. } else {
  27125. node.typeParameters = null;
  27126. }
  27127. return this.finishNode(node, "InterfaceExtends");
  27128. };
  27129. _proto.flowParseInterface = function flowParseInterface(node) {
  27130. this.flowParseInterfaceish(node);
  27131. return this.finishNode(node, "InterfaceDeclaration");
  27132. };
  27133. _proto.checkNotUnderscore = function checkNotUnderscore(word) {
  27134. if (word === "_") {
  27135. this.raise(this.state.start, "`_` is only allowed as a type argument to call or new");
  27136. }
  27137. };
  27138. _proto.checkReservedType = function checkReservedType(word, startLoc, declaration) {
  27139. if (!reservedTypes.has(word)) return;
  27140. if (declaration) {
  27141. this.raise(startLoc, "Cannot overwrite reserved type " + word);
  27142. return;
  27143. }
  27144. this.raise(startLoc, "Unexpected reserved type " + word);
  27145. };
  27146. _proto.flowParseRestrictedIdentifier = function flowParseRestrictedIdentifier(liberal, declaration) {
  27147. this.checkReservedType(this.state.value, this.state.start, declaration);
  27148. return this.parseIdentifier(liberal);
  27149. };
  27150. _proto.flowParseTypeAlias = function flowParseTypeAlias(node) {
  27151. node.id = this.flowParseRestrictedIdentifier(false, true);
  27152. this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.start);
  27153. if (this.isRelational("<")) {
  27154. node.typeParameters = this.flowParseTypeParameterDeclaration();
  27155. } else {
  27156. node.typeParameters = null;
  27157. }
  27158. node.right = this.flowParseTypeInitialiser(types.eq);
  27159. this.semicolon();
  27160. return this.finishNode(node, "TypeAlias");
  27161. };
  27162. _proto.flowParseOpaqueType = function flowParseOpaqueType(node, declare) {
  27163. this.expectContextual("type");
  27164. node.id = this.flowParseRestrictedIdentifier(true, true);
  27165. this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.start);
  27166. if (this.isRelational("<")) {
  27167. node.typeParameters = this.flowParseTypeParameterDeclaration();
  27168. } else {
  27169. node.typeParameters = null;
  27170. }
  27171. node.supertype = null;
  27172. if (this.match(types.colon)) {
  27173. node.supertype = this.flowParseTypeInitialiser(types.colon);
  27174. }
  27175. node.impltype = null;
  27176. if (!declare) {
  27177. node.impltype = this.flowParseTypeInitialiser(types.eq);
  27178. }
  27179. this.semicolon();
  27180. return this.finishNode(node, "OpaqueType");
  27181. };
  27182. _proto.flowParseTypeParameter = function flowParseTypeParameter(requireDefault) {
  27183. if (requireDefault === void 0) {
  27184. requireDefault = false;
  27185. }
  27186. var nodeStart = this.state.start;
  27187. var node = this.startNode();
  27188. var variance = this.flowParseVariance();
  27189. var ident = this.flowParseTypeAnnotatableIdentifier();
  27190. node.name = ident.name;
  27191. node.variance = variance;
  27192. node.bound = ident.typeAnnotation;
  27193. if (this.match(types.eq)) {
  27194. this.eat(types.eq);
  27195. node["default"] = this.flowParseType();
  27196. } else {
  27197. if (requireDefault) {
  27198. this.raise(nodeStart, "Type parameter declaration needs a default, since a preceding type parameter declaration has a default.");
  27199. }
  27200. }
  27201. return this.finishNode(node, "TypeParameter");
  27202. };
  27203. _proto.flowParseTypeParameterDeclaration = function flowParseTypeParameterDeclaration() {
  27204. var oldInType = this.state.inType;
  27205. var node = this.startNode();
  27206. node.params = [];
  27207. this.state.inType = true;
  27208. if (this.isRelational("<") || this.match(types.jsxTagStart)) {
  27209. this.next();
  27210. } else {
  27211. this.unexpected();
  27212. }
  27213. var defaultRequired = false;
  27214. do {
  27215. var typeParameter = this.flowParseTypeParameter(defaultRequired);
  27216. node.params.push(typeParameter);
  27217. if (typeParameter["default"]) {
  27218. defaultRequired = true;
  27219. }
  27220. if (!this.isRelational(">")) {
  27221. this.expect(types.comma);
  27222. }
  27223. } while (!this.isRelational(">"));
  27224. this.expectRelational(">");
  27225. this.state.inType = oldInType;
  27226. return this.finishNode(node, "TypeParameterDeclaration");
  27227. };
  27228. _proto.flowParseTypeParameterInstantiation = function flowParseTypeParameterInstantiation() {
  27229. var node = this.startNode();
  27230. var oldInType = this.state.inType;
  27231. node.params = [];
  27232. this.state.inType = true;
  27233. this.expectRelational("<");
  27234. var oldNoAnonFunctionType = this.state.noAnonFunctionType;
  27235. this.state.noAnonFunctionType = false;
  27236. while (!this.isRelational(">")) {
  27237. node.params.push(this.flowParseType());
  27238. if (!this.isRelational(">")) {
  27239. this.expect(types.comma);
  27240. }
  27241. }
  27242. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  27243. this.expectRelational(">");
  27244. this.state.inType = oldInType;
  27245. return this.finishNode(node, "TypeParameterInstantiation");
  27246. };
  27247. _proto.flowParseTypeParameterInstantiationCallOrNew = function flowParseTypeParameterInstantiationCallOrNew() {
  27248. var node = this.startNode();
  27249. var oldInType = this.state.inType;
  27250. node.params = [];
  27251. this.state.inType = true;
  27252. this.expectRelational("<");
  27253. while (!this.isRelational(">")) {
  27254. node.params.push(this.flowParseTypeOrImplicitInstantiation());
  27255. if (!this.isRelational(">")) {
  27256. this.expect(types.comma);
  27257. }
  27258. }
  27259. this.expectRelational(">");
  27260. this.state.inType = oldInType;
  27261. return this.finishNode(node, "TypeParameterInstantiation");
  27262. };
  27263. _proto.flowParseInterfaceType = function flowParseInterfaceType() {
  27264. var node = this.startNode();
  27265. this.expectContextual("interface");
  27266. node["extends"] = [];
  27267. if (this.eat(types._extends)) {
  27268. do {
  27269. node["extends"].push(this.flowParseInterfaceExtends());
  27270. } while (this.eat(types.comma));
  27271. }
  27272. node.body = this.flowParseObjectType({
  27273. allowStatic: false,
  27274. allowExact: false,
  27275. allowSpread: false,
  27276. allowProto: false,
  27277. allowInexact: false
  27278. });
  27279. return this.finishNode(node, "InterfaceTypeAnnotation");
  27280. };
  27281. _proto.flowParseObjectPropertyKey = function flowParseObjectPropertyKey() {
  27282. return this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true);
  27283. };
  27284. _proto.flowParseObjectTypeIndexer = function flowParseObjectTypeIndexer(node, isStatic, variance) {
  27285. node["static"] = isStatic;
  27286. if (this.lookahead().type === types.colon) {
  27287. node.id = this.flowParseObjectPropertyKey();
  27288. node.key = this.flowParseTypeInitialiser();
  27289. } else {
  27290. node.id = null;
  27291. node.key = this.flowParseType();
  27292. }
  27293. this.expect(types.bracketR);
  27294. node.value = this.flowParseTypeInitialiser();
  27295. node.variance = variance;
  27296. return this.finishNode(node, "ObjectTypeIndexer");
  27297. };
  27298. _proto.flowParseObjectTypeInternalSlot = function flowParseObjectTypeInternalSlot(node, isStatic) {
  27299. node["static"] = isStatic;
  27300. node.id = this.flowParseObjectPropertyKey();
  27301. this.expect(types.bracketR);
  27302. this.expect(types.bracketR);
  27303. if (this.isRelational("<") || this.match(types.parenL)) {
  27304. node.method = true;
  27305. node.optional = false;
  27306. node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));
  27307. } else {
  27308. node.method = false;
  27309. if (this.eat(types.question)) {
  27310. node.optional = true;
  27311. }
  27312. node.value = this.flowParseTypeInitialiser();
  27313. }
  27314. return this.finishNode(node, "ObjectTypeInternalSlot");
  27315. };
  27316. _proto.flowParseObjectTypeMethodish = function flowParseObjectTypeMethodish(node) {
  27317. node.params = [];
  27318. node.rest = null;
  27319. node.typeParameters = null;
  27320. if (this.isRelational("<")) {
  27321. node.typeParameters = this.flowParseTypeParameterDeclaration();
  27322. }
  27323. this.expect(types.parenL);
  27324. while (!this.match(types.parenR) && !this.match(types.ellipsis)) {
  27325. node.params.push(this.flowParseFunctionTypeParam());
  27326. if (!this.match(types.parenR)) {
  27327. this.expect(types.comma);
  27328. }
  27329. }
  27330. if (this.eat(types.ellipsis)) {
  27331. node.rest = this.flowParseFunctionTypeParam();
  27332. }
  27333. this.expect(types.parenR);
  27334. node.returnType = this.flowParseTypeInitialiser();
  27335. return this.finishNode(node, "FunctionTypeAnnotation");
  27336. };
  27337. _proto.flowParseObjectTypeCallProperty = function flowParseObjectTypeCallProperty(node, isStatic) {
  27338. var valueNode = this.startNode();
  27339. node["static"] = isStatic;
  27340. node.value = this.flowParseObjectTypeMethodish(valueNode);
  27341. return this.finishNode(node, "ObjectTypeCallProperty");
  27342. };
  27343. _proto.flowParseObjectType = function flowParseObjectType(_ref) {
  27344. var allowStatic = _ref.allowStatic,
  27345. allowExact = _ref.allowExact,
  27346. allowSpread = _ref.allowSpread,
  27347. allowProto = _ref.allowProto,
  27348. allowInexact = _ref.allowInexact;
  27349. var oldInType = this.state.inType;
  27350. this.state.inType = true;
  27351. var nodeStart = this.startNode();
  27352. nodeStart.callProperties = [];
  27353. nodeStart.properties = [];
  27354. nodeStart.indexers = [];
  27355. nodeStart.internalSlots = [];
  27356. var endDelim;
  27357. var exact;
  27358. var inexact = false;
  27359. if (allowExact && this.match(types.braceBarL)) {
  27360. this.expect(types.braceBarL);
  27361. endDelim = types.braceBarR;
  27362. exact = true;
  27363. } else {
  27364. this.expect(types.braceL);
  27365. endDelim = types.braceR;
  27366. exact = false;
  27367. }
  27368. nodeStart.exact = exact;
  27369. while (!this.match(endDelim)) {
  27370. var isStatic = false;
  27371. var protoStart = null;
  27372. var inexactStart = null;
  27373. var node = this.startNode();
  27374. if (allowProto && this.isContextual("proto")) {
  27375. var lookahead = this.lookahead();
  27376. if (lookahead.type !== types.colon && lookahead.type !== types.question) {
  27377. this.next();
  27378. protoStart = this.state.start;
  27379. allowStatic = false;
  27380. }
  27381. }
  27382. if (allowStatic && this.isContextual("static")) {
  27383. var _lookahead = this.lookahead();
  27384. if (_lookahead.type !== types.colon && _lookahead.type !== types.question) {
  27385. this.next();
  27386. isStatic = true;
  27387. }
  27388. }
  27389. var variance = this.flowParseVariance();
  27390. if (this.eat(types.bracketL)) {
  27391. if (protoStart != null) {
  27392. this.unexpected(protoStart);
  27393. }
  27394. if (this.eat(types.bracketL)) {
  27395. if (variance) {
  27396. this.unexpected(variance.start);
  27397. }
  27398. nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node, isStatic));
  27399. } else {
  27400. nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance));
  27401. }
  27402. } else if (this.match(types.parenL) || this.isRelational("<")) {
  27403. if (protoStart != null) {
  27404. this.unexpected(protoStart);
  27405. }
  27406. if (variance) {
  27407. this.unexpected(variance.start);
  27408. }
  27409. nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic));
  27410. } else {
  27411. var kind = "init";
  27412. if (this.isContextual("get") || this.isContextual("set")) {
  27413. var _lookahead2 = this.lookahead();
  27414. if (_lookahead2.type === types.name || _lookahead2.type === types.string || _lookahead2.type === types.num) {
  27415. kind = this.state.value;
  27416. this.next();
  27417. }
  27418. }
  27419. var propOrInexact = this.flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact != null ? allowInexact : !exact);
  27420. if (propOrInexact === null) {
  27421. inexact = true;
  27422. inexactStart = this.state.lastTokStart;
  27423. } else {
  27424. nodeStart.properties.push(propOrInexact);
  27425. }
  27426. }
  27427. this.flowObjectTypeSemicolon();
  27428. if (inexactStart && !this.match(types.braceR) && !this.match(types.braceBarR)) {
  27429. this.raise(inexactStart, "Explicit inexact syntax must appear at the end of an inexact object");
  27430. }
  27431. }
  27432. this.expect(endDelim);
  27433. if (allowSpread) {
  27434. nodeStart.inexact = inexact;
  27435. }
  27436. var out = this.finishNode(nodeStart, "ObjectTypeAnnotation");
  27437. this.state.inType = oldInType;
  27438. return out;
  27439. };
  27440. _proto.flowParseObjectTypeProperty = function flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact) {
  27441. if (this.eat(types.ellipsis)) {
  27442. var isInexactToken = this.match(types.comma) || this.match(types.semi) || this.match(types.braceR) || this.match(types.braceBarR);
  27443. if (isInexactToken) {
  27444. if (!allowSpread) {
  27445. this.raise(this.state.lastTokStart, "Explicit inexact syntax cannot appear in class or interface definitions");
  27446. } else if (!allowInexact) {
  27447. this.raise(this.state.lastTokStart, "Explicit inexact syntax cannot appear inside an explicit exact object type");
  27448. }
  27449. if (variance) {
  27450. this.raise(variance.start, "Explicit inexact syntax cannot have variance");
  27451. }
  27452. return null;
  27453. }
  27454. if (!allowSpread) {
  27455. this.raise(this.state.lastTokStart, "Spread operator cannot appear in class or interface definitions");
  27456. }
  27457. if (protoStart != null) {
  27458. this.unexpected(protoStart);
  27459. }
  27460. if (variance) {
  27461. this.raise(variance.start, "Spread properties cannot have variance");
  27462. }
  27463. node.argument = this.flowParseType();
  27464. return this.finishNode(node, "ObjectTypeSpreadProperty");
  27465. } else {
  27466. node.key = this.flowParseObjectPropertyKey();
  27467. node["static"] = isStatic;
  27468. node.proto = protoStart != null;
  27469. node.kind = kind;
  27470. var optional = false;
  27471. if (this.isRelational("<") || this.match(types.parenL)) {
  27472. node.method = true;
  27473. if (protoStart != null) {
  27474. this.unexpected(protoStart);
  27475. }
  27476. if (variance) {
  27477. this.unexpected(variance.start);
  27478. }
  27479. node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));
  27480. if (kind === "get" || kind === "set") {
  27481. this.flowCheckGetterSetterParams(node);
  27482. }
  27483. } else {
  27484. if (kind !== "init") this.unexpected();
  27485. node.method = false;
  27486. if (this.eat(types.question)) {
  27487. optional = true;
  27488. }
  27489. node.value = this.flowParseTypeInitialiser();
  27490. node.variance = variance;
  27491. }
  27492. node.optional = optional;
  27493. return this.finishNode(node, "ObjectTypeProperty");
  27494. }
  27495. };
  27496. _proto.flowCheckGetterSetterParams = function flowCheckGetterSetterParams(property) {
  27497. var paramCount = property.kind === "get" ? 0 : 1;
  27498. var start = property.start;
  27499. var length = property.value.params.length + (property.value.rest ? 1 : 0);
  27500. if (length !== paramCount) {
  27501. if (property.kind === "get") {
  27502. this.raise(start, "getter must not have any formal parameters");
  27503. } else {
  27504. this.raise(start, "setter must have exactly one formal parameter");
  27505. }
  27506. }
  27507. if (property.kind === "set" && property.value.rest) {
  27508. this.raise(start, "setter function argument must not be a rest parameter");
  27509. }
  27510. };
  27511. _proto.flowObjectTypeSemicolon = function flowObjectTypeSemicolon() {
  27512. if (!this.eat(types.semi) && !this.eat(types.comma) && !this.match(types.braceR) && !this.match(types.braceBarR)) {
  27513. this.unexpected();
  27514. }
  27515. };
  27516. _proto.flowParseQualifiedTypeIdentifier = function flowParseQualifiedTypeIdentifier(startPos, startLoc, id) {
  27517. startPos = startPos || this.state.start;
  27518. startLoc = startLoc || this.state.startLoc;
  27519. var node = id || this.flowParseRestrictedIdentifier(true);
  27520. while (this.eat(types.dot)) {
  27521. var node2 = this.startNodeAt(startPos, startLoc);
  27522. node2.qualification = node;
  27523. node2.id = this.flowParseRestrictedIdentifier(true);
  27524. node = this.finishNode(node2, "QualifiedTypeIdentifier");
  27525. }
  27526. return node;
  27527. };
  27528. _proto.flowParseGenericType = function flowParseGenericType(startPos, startLoc, id) {
  27529. var node = this.startNodeAt(startPos, startLoc);
  27530. node.typeParameters = null;
  27531. node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id);
  27532. if (this.isRelational("<")) {
  27533. node.typeParameters = this.flowParseTypeParameterInstantiation();
  27534. }
  27535. return this.finishNode(node, "GenericTypeAnnotation");
  27536. };
  27537. _proto.flowParseTypeofType = function flowParseTypeofType() {
  27538. var node = this.startNode();
  27539. this.expect(types._typeof);
  27540. node.argument = this.flowParsePrimaryType();
  27541. return this.finishNode(node, "TypeofTypeAnnotation");
  27542. };
  27543. _proto.flowParseTupleType = function flowParseTupleType() {
  27544. var node = this.startNode();
  27545. node.types = [];
  27546. this.expect(types.bracketL);
  27547. while (this.state.pos < this.length && !this.match(types.bracketR)) {
  27548. node.types.push(this.flowParseType());
  27549. if (this.match(types.bracketR)) break;
  27550. this.expect(types.comma);
  27551. }
  27552. this.expect(types.bracketR);
  27553. return this.finishNode(node, "TupleTypeAnnotation");
  27554. };
  27555. _proto.flowParseFunctionTypeParam = function flowParseFunctionTypeParam() {
  27556. var name = null;
  27557. var optional = false;
  27558. var typeAnnotation = null;
  27559. var node = this.startNode();
  27560. var lh = this.lookahead();
  27561. if (lh.type === types.colon || lh.type === types.question) {
  27562. name = this.parseIdentifier();
  27563. if (this.eat(types.question)) {
  27564. optional = true;
  27565. }
  27566. typeAnnotation = this.flowParseTypeInitialiser();
  27567. } else {
  27568. typeAnnotation = this.flowParseType();
  27569. }
  27570. node.name = name;
  27571. node.optional = optional;
  27572. node.typeAnnotation = typeAnnotation;
  27573. return this.finishNode(node, "FunctionTypeParam");
  27574. };
  27575. _proto.reinterpretTypeAsFunctionTypeParam = function reinterpretTypeAsFunctionTypeParam(type) {
  27576. var node = this.startNodeAt(type.start, type.loc.start);
  27577. node.name = null;
  27578. node.optional = false;
  27579. node.typeAnnotation = type;
  27580. return this.finishNode(node, "FunctionTypeParam");
  27581. };
  27582. _proto.flowParseFunctionTypeParams = function flowParseFunctionTypeParams(params) {
  27583. if (params === void 0) {
  27584. params = [];
  27585. }
  27586. var rest = null;
  27587. while (!this.match(types.parenR) && !this.match(types.ellipsis)) {
  27588. params.push(this.flowParseFunctionTypeParam());
  27589. if (!this.match(types.parenR)) {
  27590. this.expect(types.comma);
  27591. }
  27592. }
  27593. if (this.eat(types.ellipsis)) {
  27594. rest = this.flowParseFunctionTypeParam();
  27595. }
  27596. return {
  27597. params: params,
  27598. rest: rest
  27599. };
  27600. };
  27601. _proto.flowIdentToTypeAnnotation = function flowIdentToTypeAnnotation(startPos, startLoc, node, id) {
  27602. switch (id.name) {
  27603. case "any":
  27604. return this.finishNode(node, "AnyTypeAnnotation");
  27605. case "bool":
  27606. case "boolean":
  27607. return this.finishNode(node, "BooleanTypeAnnotation");
  27608. case "mixed":
  27609. return this.finishNode(node, "MixedTypeAnnotation");
  27610. case "empty":
  27611. return this.finishNode(node, "EmptyTypeAnnotation");
  27612. case "number":
  27613. return this.finishNode(node, "NumberTypeAnnotation");
  27614. case "string":
  27615. return this.finishNode(node, "StringTypeAnnotation");
  27616. default:
  27617. this.checkNotUnderscore(id.name);
  27618. return this.flowParseGenericType(startPos, startLoc, id);
  27619. }
  27620. };
  27621. _proto.flowParsePrimaryType = function flowParsePrimaryType() {
  27622. var startPos = this.state.start;
  27623. var startLoc = this.state.startLoc;
  27624. var node = this.startNode();
  27625. var tmp;
  27626. var type;
  27627. var isGroupedType = false;
  27628. var oldNoAnonFunctionType = this.state.noAnonFunctionType;
  27629. switch (this.state.type) {
  27630. case types.name:
  27631. if (this.isContextual("interface")) {
  27632. return this.flowParseInterfaceType();
  27633. }
  27634. return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier());
  27635. case types.braceL:
  27636. return this.flowParseObjectType({
  27637. allowStatic: false,
  27638. allowExact: false,
  27639. allowSpread: true,
  27640. allowProto: false,
  27641. allowInexact: true
  27642. });
  27643. case types.braceBarL:
  27644. return this.flowParseObjectType({
  27645. allowStatic: false,
  27646. allowExact: true,
  27647. allowSpread: true,
  27648. allowProto: false,
  27649. allowInexact: false
  27650. });
  27651. case types.bracketL:
  27652. this.state.noAnonFunctionType = false;
  27653. type = this.flowParseTupleType();
  27654. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  27655. return type;
  27656. case types.relational:
  27657. if (this.state.value === "<") {
  27658. node.typeParameters = this.flowParseTypeParameterDeclaration();
  27659. this.expect(types.parenL);
  27660. tmp = this.flowParseFunctionTypeParams();
  27661. node.params = tmp.params;
  27662. node.rest = tmp.rest;
  27663. this.expect(types.parenR);
  27664. this.expect(types.arrow);
  27665. node.returnType = this.flowParseType();
  27666. return this.finishNode(node, "FunctionTypeAnnotation");
  27667. }
  27668. break;
  27669. case types.parenL:
  27670. this.next();
  27671. if (!this.match(types.parenR) && !this.match(types.ellipsis)) {
  27672. if (this.match(types.name)) {
  27673. var token = this.lookahead().type;
  27674. isGroupedType = token !== types.question && token !== types.colon;
  27675. } else {
  27676. isGroupedType = true;
  27677. }
  27678. }
  27679. if (isGroupedType) {
  27680. this.state.noAnonFunctionType = false;
  27681. type = this.flowParseType();
  27682. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  27683. if (this.state.noAnonFunctionType || !(this.match(types.comma) || this.match(types.parenR) && this.lookahead().type === types.arrow)) {
  27684. this.expect(types.parenR);
  27685. return type;
  27686. } else {
  27687. this.eat(types.comma);
  27688. }
  27689. }
  27690. if (type) {
  27691. tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]);
  27692. } else {
  27693. tmp = this.flowParseFunctionTypeParams();
  27694. }
  27695. node.params = tmp.params;
  27696. node.rest = tmp.rest;
  27697. this.expect(types.parenR);
  27698. this.expect(types.arrow);
  27699. node.returnType = this.flowParseType();
  27700. node.typeParameters = null;
  27701. return this.finishNode(node, "FunctionTypeAnnotation");
  27702. case types.string:
  27703. return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation");
  27704. case types._true:
  27705. case types._false:
  27706. node.value = this.match(types._true);
  27707. this.next();
  27708. return this.finishNode(node, "BooleanLiteralTypeAnnotation");
  27709. case types.plusMin:
  27710. if (this.state.value === "-") {
  27711. this.next();
  27712. if (this.match(types.num)) {
  27713. return this.parseLiteral(-this.state.value, "NumberLiteralTypeAnnotation", node.start, node.loc.start);
  27714. }
  27715. if (this.match(types.bigint)) {
  27716. return this.parseLiteral(-this.state.value, "BigIntLiteralTypeAnnotation", node.start, node.loc.start);
  27717. }
  27718. throw this.raise(this.state.start, "Unexpected token, expected \"number\" or \"bigint\"");
  27719. }
  27720. this.unexpected();
  27721. case types.num:
  27722. return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
  27723. case types.bigint:
  27724. return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation");
  27725. case types._void:
  27726. this.next();
  27727. return this.finishNode(node, "VoidTypeAnnotation");
  27728. case types._null:
  27729. this.next();
  27730. return this.finishNode(node, "NullLiteralTypeAnnotation");
  27731. case types._this:
  27732. this.next();
  27733. return this.finishNode(node, "ThisTypeAnnotation");
  27734. case types.star:
  27735. this.next();
  27736. return this.finishNode(node, "ExistsTypeAnnotation");
  27737. default:
  27738. if (this.state.type.keyword === "typeof") {
  27739. return this.flowParseTypeofType();
  27740. } else if (this.state.type.keyword) {
  27741. var label = this.state.type.label;
  27742. this.next();
  27743. return _superClass.prototype.createIdentifier.call(this, node, label);
  27744. }
  27745. }
  27746. throw this.unexpected();
  27747. };
  27748. _proto.flowParsePostfixType = function flowParsePostfixType() {
  27749. var startPos = this.state.start,
  27750. startLoc = this.state.startLoc;
  27751. var type = this.flowParsePrimaryType();
  27752. while (this.match(types.bracketL) && !this.canInsertSemicolon()) {
  27753. var node = this.startNodeAt(startPos, startLoc);
  27754. node.elementType = type;
  27755. this.expect(types.bracketL);
  27756. this.expect(types.bracketR);
  27757. type = this.finishNode(node, "ArrayTypeAnnotation");
  27758. }
  27759. return type;
  27760. };
  27761. _proto.flowParsePrefixType = function flowParsePrefixType() {
  27762. var node = this.startNode();
  27763. if (this.eat(types.question)) {
  27764. node.typeAnnotation = this.flowParsePrefixType();
  27765. return this.finishNode(node, "NullableTypeAnnotation");
  27766. } else {
  27767. return this.flowParsePostfixType();
  27768. }
  27769. };
  27770. _proto.flowParseAnonFunctionWithoutParens = function flowParseAnonFunctionWithoutParens() {
  27771. var param = this.flowParsePrefixType();
  27772. if (!this.state.noAnonFunctionType && this.eat(types.arrow)) {
  27773. var node = this.startNodeAt(param.start, param.loc.start);
  27774. node.params = [this.reinterpretTypeAsFunctionTypeParam(param)];
  27775. node.rest = null;
  27776. node.returnType = this.flowParseType();
  27777. node.typeParameters = null;
  27778. return this.finishNode(node, "FunctionTypeAnnotation");
  27779. }
  27780. return param;
  27781. };
  27782. _proto.flowParseIntersectionType = function flowParseIntersectionType() {
  27783. var node = this.startNode();
  27784. this.eat(types.bitwiseAND);
  27785. var type = this.flowParseAnonFunctionWithoutParens();
  27786. node.types = [type];
  27787. while (this.eat(types.bitwiseAND)) {
  27788. node.types.push(this.flowParseAnonFunctionWithoutParens());
  27789. }
  27790. return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation");
  27791. };
  27792. _proto.flowParseUnionType = function flowParseUnionType() {
  27793. var node = this.startNode();
  27794. this.eat(types.bitwiseOR);
  27795. var type = this.flowParseIntersectionType();
  27796. node.types = [type];
  27797. while (this.eat(types.bitwiseOR)) {
  27798. node.types.push(this.flowParseIntersectionType());
  27799. }
  27800. return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation");
  27801. };
  27802. _proto.flowParseType = function flowParseType() {
  27803. var oldInType = this.state.inType;
  27804. this.state.inType = true;
  27805. var type = this.flowParseUnionType();
  27806. this.state.inType = oldInType;
  27807. this.state.exprAllowed = this.state.exprAllowed || this.state.noAnonFunctionType;
  27808. return type;
  27809. };
  27810. _proto.flowParseTypeOrImplicitInstantiation = function flowParseTypeOrImplicitInstantiation() {
  27811. if (this.state.type === types.name && this.state.value === "_") {
  27812. var startPos = this.state.start;
  27813. var startLoc = this.state.startLoc;
  27814. var node = this.parseIdentifier();
  27815. return this.flowParseGenericType(startPos, startLoc, node);
  27816. } else {
  27817. return this.flowParseType();
  27818. }
  27819. };
  27820. _proto.flowParseTypeAnnotation = function flowParseTypeAnnotation() {
  27821. var node = this.startNode();
  27822. node.typeAnnotation = this.flowParseTypeInitialiser();
  27823. return this.finishNode(node, "TypeAnnotation");
  27824. };
  27825. _proto.flowParseTypeAnnotatableIdentifier = function flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) {
  27826. var ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier();
  27827. if (this.match(types.colon)) {
  27828. ident.typeAnnotation = this.flowParseTypeAnnotation();
  27829. this.resetEndLocation(ident);
  27830. }
  27831. return ident;
  27832. };
  27833. _proto.typeCastToParameter = function typeCastToParameter(node) {
  27834. node.expression.typeAnnotation = node.typeAnnotation;
  27835. this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end);
  27836. return node.expression;
  27837. };
  27838. _proto.flowParseVariance = function flowParseVariance() {
  27839. var variance = null;
  27840. if (this.match(types.plusMin)) {
  27841. variance = this.startNode();
  27842. if (this.state.value === "+") {
  27843. variance.kind = "plus";
  27844. } else {
  27845. variance.kind = "minus";
  27846. }
  27847. this.next();
  27848. this.finishNode(variance, "Variance");
  27849. }
  27850. return variance;
  27851. };
  27852. _proto.parseFunctionBody = function parseFunctionBody(node, allowExpressionBody, isMethod) {
  27853. var _this3 = this;
  27854. if (isMethod === void 0) {
  27855. isMethod = false;
  27856. }
  27857. if (allowExpressionBody) {
  27858. return this.forwardNoArrowParamsConversionAt(node, function () {
  27859. return _superClass.prototype.parseFunctionBody.call(_this3, node, true, isMethod);
  27860. });
  27861. }
  27862. return _superClass.prototype.parseFunctionBody.call(this, node, false, isMethod);
  27863. };
  27864. _proto.parseFunctionBodyAndFinish = function parseFunctionBodyAndFinish(node, type, isMethod) {
  27865. if (isMethod === void 0) {
  27866. isMethod = false;
  27867. }
  27868. if (this.match(types.colon)) {
  27869. var typeNode = this.startNode();
  27870. var _this$flowParseTypeAn2 = this.flowParseTypeAndPredicateInitialiser();
  27871. typeNode.typeAnnotation = _this$flowParseTypeAn2[0];
  27872. node.predicate = _this$flowParseTypeAn2[1];
  27873. node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null;
  27874. }
  27875. _superClass.prototype.parseFunctionBodyAndFinish.call(this, node, type, isMethod);
  27876. };
  27877. _proto.parseStatement = function parseStatement(context, topLevel) {
  27878. if (this.state.strict && this.match(types.name) && this.state.value === "interface") {
  27879. var node = this.startNode();
  27880. this.next();
  27881. return this.flowParseInterface(node);
  27882. } else if (this.shouldParseEnums() && this.isContextual("enum")) {
  27883. var _node = this.startNode();
  27884. this.next();
  27885. return this.flowParseEnumDeclaration(_node);
  27886. } else {
  27887. var stmt = _superClass.prototype.parseStatement.call(this, context, topLevel);
  27888. if (this.flowPragma === undefined && !this.isValidDirective(stmt)) {
  27889. this.flowPragma = null;
  27890. }
  27891. return stmt;
  27892. }
  27893. };
  27894. _proto.parseExpressionStatement = function parseExpressionStatement(node, expr) {
  27895. if (expr.type === "Identifier") {
  27896. if (expr.name === "declare") {
  27897. if (this.match(types._class) || this.match(types.name) || this.match(types._function) || this.match(types._var) || this.match(types._export)) {
  27898. return this.flowParseDeclare(node);
  27899. }
  27900. } else if (this.match(types.name)) {
  27901. if (expr.name === "interface") {
  27902. return this.flowParseInterface(node);
  27903. } else if (expr.name === "type") {
  27904. return this.flowParseTypeAlias(node);
  27905. } else if (expr.name === "opaque") {
  27906. return this.flowParseOpaqueType(node, false);
  27907. }
  27908. }
  27909. }
  27910. return _superClass.prototype.parseExpressionStatement.call(this, node, expr);
  27911. };
  27912. _proto.shouldParseExportDeclaration = function shouldParseExportDeclaration() {
  27913. return this.isContextual("type") || this.isContextual("interface") || this.isContextual("opaque") || this.shouldParseEnums() && this.isContextual("enum") || _superClass.prototype.shouldParseExportDeclaration.call(this);
  27914. };
  27915. _proto.isExportDefaultSpecifier = function isExportDefaultSpecifier() {
  27916. if (this.match(types.name) && (this.state.value === "type" || this.state.value === "interface" || this.state.value === "opaque" || this.shouldParseEnums() && this.state.value === "enum")) {
  27917. return false;
  27918. }
  27919. return _superClass.prototype.isExportDefaultSpecifier.call(this);
  27920. };
  27921. _proto.parseExportDefaultExpression = function parseExportDefaultExpression() {
  27922. if (this.shouldParseEnums() && this.isContextual("enum")) {
  27923. var node = this.startNode();
  27924. this.next();
  27925. return this.flowParseEnumDeclaration(node);
  27926. }
  27927. return _superClass.prototype.parseExportDefaultExpression.call(this);
  27928. };
  27929. _proto.parseConditional = function parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) {
  27930. var _this4 = this;
  27931. if (!this.match(types.question)) return expr;
  27932. if (refNeedsArrowPos) {
  27933. var result = this.tryParse(function () {
  27934. return _superClass.prototype.parseConditional.call(_this4, expr, noIn, startPos, startLoc);
  27935. });
  27936. if (!result.node) {
  27937. refNeedsArrowPos.start = result.error.pos || this.state.start;
  27938. return expr;
  27939. }
  27940. if (result.error) this.state = result.failState;
  27941. return result.node;
  27942. }
  27943. this.expect(types.question);
  27944. var state = this.state.clone();
  27945. var originalNoArrowAt = this.state.noArrowAt;
  27946. var node = this.startNodeAt(startPos, startLoc);
  27947. var _this$tryParseConditi = this.tryParseConditionalConsequent(),
  27948. consequent = _this$tryParseConditi.consequent,
  27949. failed = _this$tryParseConditi.failed;
  27950. var _this$getArrowLikeExp = this.getArrowLikeExpressions(consequent),
  27951. valid = _this$getArrowLikeExp[0],
  27952. invalid = _this$getArrowLikeExp[1];
  27953. if (failed || invalid.length > 0) {
  27954. var noArrowAt = [].concat(originalNoArrowAt);
  27955. if (invalid.length > 0) {
  27956. this.state = state;
  27957. this.state.noArrowAt = noArrowAt;
  27958. for (var i = 0; i < invalid.length; i++) {
  27959. noArrowAt.push(invalid[i].start);
  27960. }
  27961. var _this$tryParseConditi2 = this.tryParseConditionalConsequent();
  27962. consequent = _this$tryParseConditi2.consequent;
  27963. failed = _this$tryParseConditi2.failed;
  27964. var _this$getArrowLikeExp2 = this.getArrowLikeExpressions(consequent);
  27965. valid = _this$getArrowLikeExp2[0];
  27966. invalid = _this$getArrowLikeExp2[1];
  27967. }
  27968. if (failed && valid.length > 1) {
  27969. this.raise(state.start, "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.");
  27970. }
  27971. if (failed && valid.length === 1) {
  27972. this.state = state;
  27973. this.state.noArrowAt = noArrowAt.concat(valid[0].start);
  27974. var _this$tryParseConditi3 = this.tryParseConditionalConsequent();
  27975. consequent = _this$tryParseConditi3.consequent;
  27976. failed = _this$tryParseConditi3.failed;
  27977. }
  27978. }
  27979. this.getArrowLikeExpressions(consequent, true);
  27980. this.state.noArrowAt = originalNoArrowAt;
  27981. this.expect(types.colon);
  27982. node.test = expr;
  27983. node.consequent = consequent;
  27984. node.alternate = this.forwardNoArrowParamsConversionAt(node, function () {
  27985. return _this4.parseMaybeAssign(noIn, undefined, undefined, undefined);
  27986. });
  27987. return this.finishNode(node, "ConditionalExpression");
  27988. };
  27989. _proto.tryParseConditionalConsequent = function tryParseConditionalConsequent() {
  27990. this.state.noArrowParamsConversionAt.push(this.state.start);
  27991. var consequent = this.parseMaybeAssign();
  27992. var failed = !this.match(types.colon);
  27993. this.state.noArrowParamsConversionAt.pop();
  27994. return {
  27995. consequent: consequent,
  27996. failed: failed
  27997. };
  27998. };
  27999. _proto.getArrowLikeExpressions = function getArrowLikeExpressions(node, disallowInvalid) {
  28000. var _this5 = this;
  28001. var stack = [node];
  28002. var arrows = [];
  28003. while (stack.length !== 0) {
  28004. var _node2 = stack.pop();
  28005. if (_node2.type === "ArrowFunctionExpression") {
  28006. if (_node2.typeParameters || !_node2.returnType) {
  28007. this.finishArrowValidation(_node2);
  28008. } else {
  28009. arrows.push(_node2);
  28010. }
  28011. stack.push(_node2.body);
  28012. } else if (_node2.type === "ConditionalExpression") {
  28013. stack.push(_node2.consequent);
  28014. stack.push(_node2.alternate);
  28015. }
  28016. }
  28017. if (disallowInvalid) {
  28018. arrows.forEach(function (node) {
  28019. return _this5.finishArrowValidation(node);
  28020. });
  28021. return [arrows, []];
  28022. }
  28023. return partition(arrows, function (node) {
  28024. return node.params.every(function (param) {
  28025. return _this5.isAssignable(param, true);
  28026. });
  28027. });
  28028. };
  28029. _proto.finishArrowValidation = function finishArrowValidation(node) {
  28030. var _node$extra;
  28031. this.toAssignableList(node.params, true, "arrow function parameters", (_node$extra = node.extra) == null ? void 0 : _node$extra.trailingComma);
  28032. this.scope.enter(functionFlags(false, false) | SCOPE_ARROW);
  28033. _superClass.prototype.checkParams.call(this, node, false, true);
  28034. this.scope.exit();
  28035. };
  28036. _proto.forwardNoArrowParamsConversionAt = function forwardNoArrowParamsConversionAt(node, parse) {
  28037. var result;
  28038. if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
  28039. this.state.noArrowParamsConversionAt.push(this.state.start);
  28040. result = parse();
  28041. this.state.noArrowParamsConversionAt.pop();
  28042. } else {
  28043. result = parse();
  28044. }
  28045. return result;
  28046. };
  28047. _proto.parseParenItem = function parseParenItem(node, startPos, startLoc) {
  28048. node = _superClass.prototype.parseParenItem.call(this, node, startPos, startLoc);
  28049. if (this.eat(types.question)) {
  28050. node.optional = true;
  28051. this.resetEndLocation(node);
  28052. }
  28053. if (this.match(types.colon)) {
  28054. var typeCastNode = this.startNodeAt(startPos, startLoc);
  28055. typeCastNode.expression = node;
  28056. typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();
  28057. return this.finishNode(typeCastNode, "TypeCastExpression");
  28058. }
  28059. return node;
  28060. };
  28061. _proto.assertModuleNodeAllowed = function assertModuleNodeAllowed(node) {
  28062. if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") {
  28063. return;
  28064. }
  28065. _superClass.prototype.assertModuleNodeAllowed.call(this, node);
  28066. };
  28067. _proto.parseExport = function parseExport(node) {
  28068. var decl = _superClass.prototype.parseExport.call(this, node);
  28069. if (decl.type === "ExportNamedDeclaration" || decl.type === "ExportAllDeclaration") {
  28070. decl.exportKind = decl.exportKind || "value";
  28071. }
  28072. return decl;
  28073. };
  28074. _proto.parseExportDeclaration = function parseExportDeclaration(node) {
  28075. if (this.isContextual("type")) {
  28076. node.exportKind = "type";
  28077. var declarationNode = this.startNode();
  28078. this.next();
  28079. if (this.match(types.braceL)) {
  28080. node.specifiers = this.parseExportSpecifiers();
  28081. this.parseExportFrom(node);
  28082. return null;
  28083. } else {
  28084. return this.flowParseTypeAlias(declarationNode);
  28085. }
  28086. } else if (this.isContextual("opaque")) {
  28087. node.exportKind = "type";
  28088. var _declarationNode = this.startNode();
  28089. this.next();
  28090. return this.flowParseOpaqueType(_declarationNode, false);
  28091. } else if (this.isContextual("interface")) {
  28092. node.exportKind = "type";
  28093. var _declarationNode2 = this.startNode();
  28094. this.next();
  28095. return this.flowParseInterface(_declarationNode2);
  28096. } else if (this.shouldParseEnums() && this.isContextual("enum")) {
  28097. node.exportKind = "value";
  28098. var _declarationNode3 = this.startNode();
  28099. this.next();
  28100. return this.flowParseEnumDeclaration(_declarationNode3);
  28101. } else {
  28102. return _superClass.prototype.parseExportDeclaration.call(this, node);
  28103. }
  28104. };
  28105. _proto.eatExportStar = function eatExportStar(node) {
  28106. if (_superClass.prototype.eatExportStar.apply(this, arguments)) return true;
  28107. if (this.isContextual("type") && this.lookahead().type === types.star) {
  28108. node.exportKind = "type";
  28109. this.next();
  28110. this.next();
  28111. return true;
  28112. }
  28113. return false;
  28114. };
  28115. _proto.maybeParseExportNamespaceSpecifier = function maybeParseExportNamespaceSpecifier(node) {
  28116. var pos = this.state.start;
  28117. var hasNamespace = _superClass.prototype.maybeParseExportNamespaceSpecifier.call(this, node);
  28118. if (hasNamespace && node.exportKind === "type") {
  28119. this.unexpected(pos);
  28120. }
  28121. return hasNamespace;
  28122. };
  28123. _proto.parseClassId = function parseClassId(node, isStatement, optionalId) {
  28124. _superClass.prototype.parseClassId.call(this, node, isStatement, optionalId);
  28125. if (this.isRelational("<")) {
  28126. node.typeParameters = this.flowParseTypeParameterDeclaration();
  28127. }
  28128. };
  28129. _proto.getTokenFromCode = function getTokenFromCode(code) {
  28130. var next = this.input.charCodeAt(this.state.pos + 1);
  28131. if (code === 123 && next === 124) {
  28132. return this.finishOp(types.braceBarL, 2);
  28133. } else if (this.state.inType && (code === 62 || code === 60)) {
  28134. return this.finishOp(types.relational, 1);
  28135. } else if (isIteratorStart(code, next)) {
  28136. this.state.isIterator = true;
  28137. return _superClass.prototype.readWord.call(this);
  28138. } else {
  28139. return _superClass.prototype.getTokenFromCode.call(this, code);
  28140. }
  28141. };
  28142. _proto.isAssignable = function isAssignable(node, isBinding) {
  28143. var _this6 = this;
  28144. switch (node.type) {
  28145. case "Identifier":
  28146. case "ObjectPattern":
  28147. case "ArrayPattern":
  28148. case "AssignmentPattern":
  28149. return true;
  28150. case "ObjectExpression":
  28151. {
  28152. var last = node.properties.length - 1;
  28153. return node.properties.every(function (prop, i) {
  28154. return prop.type !== "ObjectMethod" && (i === last || prop.type === "SpreadElement") && _this6.isAssignable(prop);
  28155. });
  28156. }
  28157. case "ObjectProperty":
  28158. return this.isAssignable(node.value);
  28159. case "SpreadElement":
  28160. return this.isAssignable(node.argument);
  28161. case "ArrayExpression":
  28162. return node.elements.every(function (element) {
  28163. return _this6.isAssignable(element);
  28164. });
  28165. case "AssignmentExpression":
  28166. return node.operator === "=";
  28167. case "ParenthesizedExpression":
  28168. case "TypeCastExpression":
  28169. return this.isAssignable(node.expression);
  28170. case "MemberExpression":
  28171. case "OptionalMemberExpression":
  28172. return !isBinding;
  28173. default:
  28174. return false;
  28175. }
  28176. };
  28177. _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) {
  28178. if (node.type === "TypeCastExpression") {
  28179. return _superClass.prototype.toAssignable.call(this, this.typeCastToParameter(node), isBinding, contextDescription);
  28180. } else {
  28181. return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription);
  28182. }
  28183. };
  28184. _proto.toAssignableList = function toAssignableList(exprList, isBinding, contextDescription, trailingCommaPos) {
  28185. for (var i = 0; i < exprList.length; i++) {
  28186. var expr = exprList[i];
  28187. if (expr && expr.type === "TypeCastExpression") {
  28188. exprList[i] = this.typeCastToParameter(expr);
  28189. }
  28190. }
  28191. return _superClass.prototype.toAssignableList.call(this, exprList, isBinding, contextDescription, trailingCommaPos);
  28192. };
  28193. _proto.toReferencedList = function toReferencedList(exprList, isParenthesizedExpr) {
  28194. for (var i = 0; i < exprList.length; i++) {
  28195. var expr = exprList[i];
  28196. if (expr && expr.type === "TypeCastExpression" && (!expr.extra || !expr.extra.parenthesized) && (exprList.length > 1 || !isParenthesizedExpr)) {
  28197. this.raise(expr.typeAnnotation.start, "The type cast expression is expected to be wrapped with parenthesis");
  28198. }
  28199. }
  28200. return exprList;
  28201. };
  28202. _proto.checkLVal = function checkLVal(expr, bindingType, checkClashes, contextDescription) {
  28203. if (bindingType === void 0) {
  28204. bindingType = BIND_NONE;
  28205. }
  28206. if (expr.type !== "TypeCastExpression") {
  28207. return _superClass.prototype.checkLVal.call(this, expr, bindingType, checkClashes, contextDescription);
  28208. }
  28209. };
  28210. _proto.parseClassProperty = function parseClassProperty(node) {
  28211. if (this.match(types.colon)) {
  28212. node.typeAnnotation = this.flowParseTypeAnnotation();
  28213. }
  28214. return _superClass.prototype.parseClassProperty.call(this, node);
  28215. };
  28216. _proto.parseClassPrivateProperty = function parseClassPrivateProperty(node) {
  28217. if (this.match(types.colon)) {
  28218. node.typeAnnotation = this.flowParseTypeAnnotation();
  28219. }
  28220. return _superClass.prototype.parseClassPrivateProperty.call(this, node);
  28221. };
  28222. _proto.isClassMethod = function isClassMethod() {
  28223. return this.isRelational("<") || _superClass.prototype.isClassMethod.call(this);
  28224. };
  28225. _proto.isClassProperty = function isClassProperty() {
  28226. return this.match(types.colon) || _superClass.prototype.isClassProperty.call(this);
  28227. };
  28228. _proto.isNonstaticConstructor = function isNonstaticConstructor(method) {
  28229. return !this.match(types.colon) && _superClass.prototype.isNonstaticConstructor.call(this, method);
  28230. };
  28231. _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  28232. if (method.variance) {
  28233. this.unexpected(method.variance.start);
  28234. }
  28235. delete method.variance;
  28236. if (this.isRelational("<")) {
  28237. method.typeParameters = this.flowParseTypeParameterDeclaration();
  28238. }
  28239. _superClass.prototype.pushClassMethod.call(this, classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper);
  28240. };
  28241. _proto.pushClassPrivateMethod = function pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  28242. if (method.variance) {
  28243. this.unexpected(method.variance.start);
  28244. }
  28245. delete method.variance;
  28246. if (this.isRelational("<")) {
  28247. method.typeParameters = this.flowParseTypeParameterDeclaration();
  28248. }
  28249. _superClass.prototype.pushClassPrivateMethod.call(this, classBody, method, isGenerator, isAsync);
  28250. };
  28251. _proto.parseClassSuper = function parseClassSuper(node) {
  28252. _superClass.prototype.parseClassSuper.call(this, node);
  28253. if (node.superClass && this.isRelational("<")) {
  28254. node.superTypeParameters = this.flowParseTypeParameterInstantiation();
  28255. }
  28256. if (this.isContextual("implements")) {
  28257. this.next();
  28258. var implemented = node["implements"] = [];
  28259. do {
  28260. var _node3 = this.startNode();
  28261. _node3.id = this.flowParseRestrictedIdentifier(true);
  28262. if (this.isRelational("<")) {
  28263. _node3.typeParameters = this.flowParseTypeParameterInstantiation();
  28264. } else {
  28265. _node3.typeParameters = null;
  28266. }
  28267. implemented.push(this.finishNode(_node3, "ClassImplements"));
  28268. } while (this.eat(types.comma));
  28269. }
  28270. };
  28271. _proto.parsePropertyName = function parsePropertyName(node, isPrivateNameAllowed) {
  28272. var variance = this.flowParseVariance();
  28273. var key = _superClass.prototype.parsePropertyName.call(this, node, isPrivateNameAllowed);
  28274. node.variance = variance;
  28275. return key;
  28276. };
  28277. _proto.parseObjPropValue = function parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc) {
  28278. if (prop.variance) {
  28279. this.unexpected(prop.variance.start);
  28280. }
  28281. delete prop.variance;
  28282. var typeParameters;
  28283. if (this.isRelational("<")) {
  28284. typeParameters = this.flowParseTypeParameterDeclaration();
  28285. if (!this.match(types.parenL)) this.unexpected();
  28286. }
  28287. _superClass.prototype.parseObjPropValue.call(this, prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc);
  28288. if (typeParameters) {
  28289. (prop.value || prop).typeParameters = typeParameters;
  28290. }
  28291. };
  28292. _proto.parseAssignableListItemTypes = function parseAssignableListItemTypes(param) {
  28293. if (this.eat(types.question)) {
  28294. if (param.type !== "Identifier") {
  28295. this.raise(param.start, "A binding pattern parameter cannot be optional in an implementation signature.");
  28296. }
  28297. param.optional = true;
  28298. }
  28299. if (this.match(types.colon)) {
  28300. param.typeAnnotation = this.flowParseTypeAnnotation();
  28301. }
  28302. this.resetEndLocation(param);
  28303. return param;
  28304. };
  28305. _proto.parseMaybeDefault = function parseMaybeDefault(startPos, startLoc, left) {
  28306. var node = _superClass.prototype.parseMaybeDefault.call(this, startPos, startLoc, left);
  28307. if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {
  28308. this.raise(node.typeAnnotation.start, "Type annotations must come before default assignments, " + "e.g. instead of `age = 25: number` use `age: number = 25`");
  28309. }
  28310. return node;
  28311. };
  28312. _proto.shouldParseDefaultImport = function shouldParseDefaultImport(node) {
  28313. if (!hasTypeImportKind(node)) {
  28314. return _superClass.prototype.shouldParseDefaultImport.call(this, node);
  28315. }
  28316. return isMaybeDefaultImport(this.state);
  28317. };
  28318. _proto.parseImportSpecifierLocal = function parseImportSpecifierLocal(node, specifier, type, contextDescription) {
  28319. specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true, true) : this.parseIdentifier();
  28320. this.checkLVal(specifier.local, BIND_LEXICAL, undefined, contextDescription);
  28321. node.specifiers.push(this.finishNode(specifier, type));
  28322. };
  28323. _proto.maybeParseDefaultImportSpecifier = function maybeParseDefaultImportSpecifier(node) {
  28324. node.importKind = "value";
  28325. var kind = null;
  28326. if (this.match(types._typeof)) {
  28327. kind = "typeof";
  28328. } else if (this.isContextual("type")) {
  28329. kind = "type";
  28330. }
  28331. if (kind) {
  28332. var lh = this.lookahead();
  28333. if (kind === "type" && lh.type === types.star) {
  28334. this.unexpected(lh.start);
  28335. }
  28336. if (isMaybeDefaultImport(lh) || lh.type === types.braceL || lh.type === types.star) {
  28337. this.next();
  28338. node.importKind = kind;
  28339. }
  28340. }
  28341. return _superClass.prototype.maybeParseDefaultImportSpecifier.call(this, node);
  28342. };
  28343. _proto.parseImportSpecifier = function parseImportSpecifier(node) {
  28344. var specifier = this.startNode();
  28345. var firstIdentLoc = this.state.start;
  28346. var firstIdent = this.parseIdentifier(true);
  28347. var specifierTypeKind = null;
  28348. if (firstIdent.name === "type") {
  28349. specifierTypeKind = "type";
  28350. } else if (firstIdent.name === "typeof") {
  28351. specifierTypeKind = "typeof";
  28352. }
  28353. var isBinding = false;
  28354. if (this.isContextual("as") && !this.isLookaheadContextual("as")) {
  28355. var as_ident = this.parseIdentifier(true);
  28356. if (specifierTypeKind !== null && !this.match(types.name) && !this.state.type.keyword) {
  28357. specifier.imported = as_ident;
  28358. specifier.importKind = specifierTypeKind;
  28359. specifier.local = as_ident.__clone();
  28360. } else {
  28361. specifier.imported = firstIdent;
  28362. specifier.importKind = null;
  28363. specifier.local = this.parseIdentifier();
  28364. }
  28365. } else if (specifierTypeKind !== null && (this.match(types.name) || this.state.type.keyword)) {
  28366. specifier.imported = this.parseIdentifier(true);
  28367. specifier.importKind = specifierTypeKind;
  28368. if (this.eatContextual("as")) {
  28369. specifier.local = this.parseIdentifier();
  28370. } else {
  28371. isBinding = true;
  28372. specifier.local = specifier.imported.__clone();
  28373. }
  28374. } else {
  28375. isBinding = true;
  28376. specifier.imported = firstIdent;
  28377. specifier.importKind = null;
  28378. specifier.local = specifier.imported.__clone();
  28379. }
  28380. var nodeIsTypeImport = hasTypeImportKind(node);
  28381. var specifierIsTypeImport = hasTypeImportKind(specifier);
  28382. if (nodeIsTypeImport && specifierIsTypeImport) {
  28383. this.raise(firstIdentLoc, "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");
  28384. }
  28385. if (nodeIsTypeImport || specifierIsTypeImport) {
  28386. this.checkReservedType(specifier.local.name, specifier.local.start, true);
  28387. }
  28388. if (isBinding && !nodeIsTypeImport && !specifierIsTypeImport) {
  28389. this.checkReservedWord(specifier.local.name, specifier.start, true, true);
  28390. }
  28391. this.checkLVal(specifier.local, BIND_LEXICAL, undefined, "import specifier");
  28392. node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
  28393. };
  28394. _proto.parseFunctionParams = function parseFunctionParams(node, allowModifiers) {
  28395. var kind = node.kind;
  28396. if (kind !== "get" && kind !== "set" && this.isRelational("<")) {
  28397. node.typeParameters = this.flowParseTypeParameterDeclaration();
  28398. }
  28399. _superClass.prototype.parseFunctionParams.call(this, node, allowModifiers);
  28400. };
  28401. _proto.parseVarId = function parseVarId(decl, kind) {
  28402. _superClass.prototype.parseVarId.call(this, decl, kind);
  28403. if (this.match(types.colon)) {
  28404. decl.id.typeAnnotation = this.flowParseTypeAnnotation();
  28405. this.resetEndLocation(decl.id);
  28406. }
  28407. };
  28408. _proto.parseAsyncArrowFromCallExpression = function parseAsyncArrowFromCallExpression(node, call) {
  28409. if (this.match(types.colon)) {
  28410. var oldNoAnonFunctionType = this.state.noAnonFunctionType;
  28411. this.state.noAnonFunctionType = true;
  28412. node.returnType = this.flowParseTypeAnnotation();
  28413. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  28414. }
  28415. return _superClass.prototype.parseAsyncArrowFromCallExpression.call(this, node, call);
  28416. };
  28417. _proto.shouldParseAsyncArrow = function shouldParseAsyncArrow() {
  28418. return this.match(types.colon) || _superClass.prototype.shouldParseAsyncArrow.call(this);
  28419. };
  28420. _proto.parseMaybeAssign = function parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) {
  28421. var _this7 = this;
  28422. var state = null;
  28423. var jsx;
  28424. if (this.hasPlugin("jsx") && (this.match(types.jsxTagStart) || this.isRelational("<"))) {
  28425. state = this.state.clone();
  28426. jsx = this.tryParse(function () {
  28427. return _superClass.prototype.parseMaybeAssign.call(_this7, noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos);
  28428. }, state);
  28429. if (!jsx.error) return jsx.node;
  28430. var context = this.state.context;
  28431. if (context[context.length - 1] === types$1.j_oTag) {
  28432. context.length -= 2;
  28433. } else if (context[context.length - 1] === types$1.j_expr) {
  28434. context.length -= 1;
  28435. }
  28436. }
  28437. if (jsx && jsx.error || this.isRelational("<")) {
  28438. state = state || this.state.clone();
  28439. var typeParameters;
  28440. var arrow = this.tryParse(function () {
  28441. typeParameters = _this7.flowParseTypeParameterDeclaration();
  28442. var arrowExpression = _this7.forwardNoArrowParamsConversionAt(typeParameters, function () {
  28443. return _superClass.prototype.parseMaybeAssign.call(_this7, noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos);
  28444. });
  28445. arrowExpression.typeParameters = typeParameters;
  28446. _this7.resetStartLocationFromNode(arrowExpression, typeParameters);
  28447. return arrowExpression;
  28448. }, state);
  28449. var arrowExpression = arrow.node && arrow.node.type === "ArrowFunctionExpression" ? arrow.node : null;
  28450. if (!arrow.error && arrowExpression) return arrowExpression;
  28451. if (jsx && jsx.node) {
  28452. this.state = jsx.failState;
  28453. return jsx.node;
  28454. }
  28455. if (arrowExpression) {
  28456. this.state = arrow.failState;
  28457. return arrowExpression;
  28458. }
  28459. if (jsx && jsx.thrown) throw jsx.error;
  28460. if (arrow.thrown) throw arrow.error;
  28461. throw this.raise(typeParameters.start, "Expected an arrow function after this type parameter declaration");
  28462. }
  28463. return _superClass.prototype.parseMaybeAssign.call(this, noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos);
  28464. };
  28465. _proto.parseArrow = function parseArrow(node) {
  28466. var _this8 = this;
  28467. if (this.match(types.colon)) {
  28468. var result = this.tryParse(function () {
  28469. var oldNoAnonFunctionType = _this8.state.noAnonFunctionType;
  28470. _this8.state.noAnonFunctionType = true;
  28471. var typeNode = _this8.startNode();
  28472. var _this8$flowParseTypeA = _this8.flowParseTypeAndPredicateInitialiser();
  28473. typeNode.typeAnnotation = _this8$flowParseTypeA[0];
  28474. node.predicate = _this8$flowParseTypeA[1];
  28475. _this8.state.noAnonFunctionType = oldNoAnonFunctionType;
  28476. if (_this8.canInsertSemicolon()) _this8.unexpected();
  28477. if (!_this8.match(types.arrow)) _this8.unexpected();
  28478. return typeNode;
  28479. });
  28480. if (result.thrown) return null;
  28481. if (result.error) this.state = result.failState;
  28482. node.returnType = result.node.typeAnnotation ? this.finishNode(result.node, "TypeAnnotation") : null;
  28483. }
  28484. return _superClass.prototype.parseArrow.call(this, node);
  28485. };
  28486. _proto.shouldParseArrow = function shouldParseArrow() {
  28487. return this.match(types.colon) || _superClass.prototype.shouldParseArrow.call(this);
  28488. };
  28489. _proto.setArrowFunctionParameters = function setArrowFunctionParameters(node, params) {
  28490. if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
  28491. node.params = params;
  28492. } else {
  28493. _superClass.prototype.setArrowFunctionParameters.call(this, node, params);
  28494. }
  28495. };
  28496. _proto.checkParams = function checkParams(node, allowDuplicates, isArrowFunction) {
  28497. if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
  28498. return;
  28499. }
  28500. return _superClass.prototype.checkParams.apply(this, arguments);
  28501. };
  28502. _proto.parseParenAndDistinguishExpression = function parseParenAndDistinguishExpression(canBeArrow) {
  28503. return _superClass.prototype.parseParenAndDistinguishExpression.call(this, canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1);
  28504. };
  28505. _proto.parseSubscripts = function parseSubscripts(base, startPos, startLoc, noCalls) {
  28506. var _this9 = this;
  28507. if (base.type === "Identifier" && base.name === "async" && this.state.noArrowAt.indexOf(startPos) !== -1) {
  28508. this.next();
  28509. var node = this.startNodeAt(startPos, startLoc);
  28510. node.callee = base;
  28511. node.arguments = this.parseCallExpressionArguments(types.parenR, false);
  28512. base = this.finishNode(node, "CallExpression");
  28513. } else if (base.type === "Identifier" && base.name === "async" && this.isRelational("<")) {
  28514. var state = this.state.clone();
  28515. var arrow = this.tryParse(function (abort) {
  28516. return _this9.parseAsyncArrowWithTypeParameters(startPos, startLoc) || abort();
  28517. }, state);
  28518. if (!arrow.error && !arrow.aborted) return arrow.node;
  28519. var result = this.tryParse(function () {
  28520. return _superClass.prototype.parseSubscripts.call(_this9, base, startPos, startLoc, noCalls);
  28521. }, state);
  28522. if (result.node && !result.error) return result.node;
  28523. if (arrow.node) {
  28524. this.state = arrow.failState;
  28525. return arrow.node;
  28526. }
  28527. if (result.node) {
  28528. this.state = result.failState;
  28529. return result.node;
  28530. }
  28531. throw arrow.error || result.error;
  28532. }
  28533. return _superClass.prototype.parseSubscripts.call(this, base, startPos, startLoc, noCalls);
  28534. };
  28535. _proto.parseSubscript = function parseSubscript(base, startPos, startLoc, noCalls, subscriptState) {
  28536. var _this10 = this;
  28537. if (this.match(types.questionDot) && this.isLookaheadRelational("<")) {
  28538. subscriptState.optionalChainMember = true;
  28539. if (noCalls) {
  28540. subscriptState.stop = true;
  28541. return base;
  28542. }
  28543. this.next();
  28544. var node = this.startNodeAt(startPos, startLoc);
  28545. node.callee = base;
  28546. node.typeArguments = this.flowParseTypeParameterInstantiation();
  28547. this.expect(types.parenL);
  28548. node.arguments = this.parseCallExpressionArguments(types.parenR, false);
  28549. node.optional = true;
  28550. return this.finishCallExpression(node, true);
  28551. } else if (!noCalls && this.shouldParseTypes() && this.isRelational("<")) {
  28552. var _node4 = this.startNodeAt(startPos, startLoc);
  28553. _node4.callee = base;
  28554. var result = this.tryParse(function () {
  28555. _node4.typeArguments = _this10.flowParseTypeParameterInstantiationCallOrNew();
  28556. _this10.expect(types.parenL);
  28557. _node4.arguments = _this10.parseCallExpressionArguments(types.parenR, false);
  28558. if (subscriptState.optionalChainMember) _node4.optional = false;
  28559. return _this10.finishCallExpression(_node4, subscriptState.optionalChainMember);
  28560. });
  28561. if (result.node) {
  28562. if (result.error) this.state = result.failState;
  28563. return result.node;
  28564. }
  28565. }
  28566. return _superClass.prototype.parseSubscript.call(this, base, startPos, startLoc, noCalls, subscriptState);
  28567. };
  28568. _proto.parseNewArguments = function parseNewArguments(node) {
  28569. var _this11 = this;
  28570. var targs = null;
  28571. if (this.shouldParseTypes() && this.isRelational("<")) {
  28572. targs = this.tryParse(function () {
  28573. return _this11.flowParseTypeParameterInstantiationCallOrNew();
  28574. }).node;
  28575. }
  28576. node.typeArguments = targs;
  28577. _superClass.prototype.parseNewArguments.call(this, node);
  28578. };
  28579. _proto.parseAsyncArrowWithTypeParameters = function parseAsyncArrowWithTypeParameters(startPos, startLoc) {
  28580. var node = this.startNodeAt(startPos, startLoc);
  28581. this.parseFunctionParams(node);
  28582. if (!this.parseArrow(node)) return;
  28583. return this.parseArrowExpression(node, undefined, true);
  28584. };
  28585. _proto.readToken_mult_modulo = function readToken_mult_modulo(code) {
  28586. var next = this.input.charCodeAt(this.state.pos + 1);
  28587. if (code === 42 && next === 47 && this.state.hasFlowComment) {
  28588. this.state.hasFlowComment = false;
  28589. this.state.pos += 2;
  28590. this.nextToken();
  28591. return;
  28592. }
  28593. _superClass.prototype.readToken_mult_modulo.call(this, code);
  28594. };
  28595. _proto.readToken_pipe_amp = function readToken_pipe_amp(code) {
  28596. var next = this.input.charCodeAt(this.state.pos + 1);
  28597. if (code === 124 && next === 125) {
  28598. this.finishOp(types.braceBarR, 2);
  28599. return;
  28600. }
  28601. _superClass.prototype.readToken_pipe_amp.call(this, code);
  28602. };
  28603. _proto.parseTopLevel = function parseTopLevel(file, program) {
  28604. var fileNode = _superClass.prototype.parseTopLevel.call(this, file, program);
  28605. if (this.state.hasFlowComment) {
  28606. this.raise(this.state.pos, "Unterminated flow-comment");
  28607. }
  28608. return fileNode;
  28609. };
  28610. _proto.skipBlockComment = function skipBlockComment() {
  28611. if (this.hasPlugin("flowComments") && this.skipFlowComment()) {
  28612. if (this.state.hasFlowComment) {
  28613. this.unexpected(null, "Cannot have a flow comment inside another flow comment");
  28614. }
  28615. this.hasFlowCommentCompletion();
  28616. this.state.pos += this.skipFlowComment();
  28617. this.state.hasFlowComment = true;
  28618. return;
  28619. }
  28620. if (this.state.hasFlowComment) {
  28621. var end = this.input.indexOf("*-/", this.state.pos += 2);
  28622. if (end === -1) {
  28623. throw this.raise(this.state.pos - 2, "Unterminated comment");
  28624. }
  28625. this.state.pos = end + 3;
  28626. return;
  28627. }
  28628. _superClass.prototype.skipBlockComment.call(this);
  28629. };
  28630. _proto.skipFlowComment = function skipFlowComment() {
  28631. var pos = this.state.pos;
  28632. var shiftToFirstNonWhiteSpace = 2;
  28633. while ([32, 9].includes(this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace))) {
  28634. shiftToFirstNonWhiteSpace++;
  28635. }
  28636. var ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos);
  28637. var ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1);
  28638. if (ch2 === 58 && ch3 === 58) {
  28639. return shiftToFirstNonWhiteSpace + 2;
  28640. }
  28641. if (this.input.slice(shiftToFirstNonWhiteSpace + pos, shiftToFirstNonWhiteSpace + pos + 12) === "flow-include") {
  28642. return shiftToFirstNonWhiteSpace + 12;
  28643. }
  28644. if (ch2 === 58 && ch3 !== 58) {
  28645. return shiftToFirstNonWhiteSpace;
  28646. }
  28647. return false;
  28648. };
  28649. _proto.hasFlowCommentCompletion = function hasFlowCommentCompletion() {
  28650. var end = this.input.indexOf("*/", this.state.pos);
  28651. if (end === -1) {
  28652. throw this.raise(this.state.pos, "Unterminated comment");
  28653. }
  28654. };
  28655. _proto.flowEnumErrorBooleanMemberNotInitialized = function flowEnumErrorBooleanMemberNotInitialized(pos, _ref2) {
  28656. var enumName = _ref2.enumName,
  28657. memberName = _ref2.memberName;
  28658. this.raise(pos, "Boolean enum members need to be initialized. Use either `" + memberName + " = true,` " + ("or `" + memberName + " = false,` in enum `" + enumName + "`."));
  28659. };
  28660. _proto.flowEnumErrorInvalidMemberName = function flowEnumErrorInvalidMemberName(pos, _ref3) {
  28661. var enumName = _ref3.enumName,
  28662. memberName = _ref3.memberName;
  28663. var suggestion = memberName[0].toUpperCase() + memberName.slice(1);
  28664. this.raise(pos, "Enum member names cannot start with lowercase 'a' through 'z'. Instead of using " + ("`" + memberName + "`, consider using `" + suggestion + "`, in enum `" + enumName + "`."));
  28665. };
  28666. _proto.flowEnumErrorDuplicateMemberName = function flowEnumErrorDuplicateMemberName(pos, _ref4) {
  28667. var enumName = _ref4.enumName,
  28668. memberName = _ref4.memberName;
  28669. this.raise(pos, "Enum member names need to be unique, but the name `" + memberName + "` has already been used " + ("before in enum `" + enumName + "`."));
  28670. };
  28671. _proto.flowEnumErrorInconsistentMemberValues = function flowEnumErrorInconsistentMemberValues(pos, _ref5) {
  28672. var enumName = _ref5.enumName;
  28673. this.raise(pos, "Enum `" + enumName + "` has inconsistent member initializers. Either use no initializers, or " + "consistently use literals (either booleans, numbers, or strings) for all member initializers.");
  28674. };
  28675. _proto.flowEnumErrorInvalidExplicitType = function flowEnumErrorInvalidExplicitType(pos, _ref6) {
  28676. var enumName = _ref6.enumName,
  28677. suppliedType = _ref6.suppliedType;
  28678. var suggestion = "Use one of `boolean`, `number`, `string`, or `symbol` in " + ("enum `" + enumName + "`.");
  28679. var message = suppliedType === null ? "Supplied enum type is not valid. " + suggestion : "Enum type `" + suppliedType + "` is not valid. " + suggestion;
  28680. return this.raise(pos, message);
  28681. };
  28682. _proto.flowEnumErrorInvalidMemberInitializer = function flowEnumErrorInvalidMemberInitializer(pos, _ref7) {
  28683. var enumName = _ref7.enumName,
  28684. explicitType = _ref7.explicitType,
  28685. memberName = _ref7.memberName;
  28686. var message = null;
  28687. switch (explicitType) {
  28688. case "boolean":
  28689. case "number":
  28690. case "string":
  28691. message = "Enum `" + enumName + "` has type `" + explicitType + "`, so the initializer of " + ("`" + memberName + "` needs to be a " + explicitType + " literal.");
  28692. break;
  28693. case "symbol":
  28694. message = "Symbol enum members cannot be initialized. Use `" + memberName + ",` in " + ("enum `" + enumName + "`.");
  28695. break;
  28696. default:
  28697. message = "The enum member initializer for `" + memberName + "` needs to be a literal (either " + ("a boolean, number, or string) in enum `" + enumName + "`.");
  28698. }
  28699. return this.raise(pos, message);
  28700. };
  28701. _proto.flowEnumErrorNumberMemberNotInitialized = function flowEnumErrorNumberMemberNotInitialized(pos, _ref8) {
  28702. var enumName = _ref8.enumName,
  28703. memberName = _ref8.memberName;
  28704. this.raise(pos, "Number enum members need to be initialized, e.g. `" + memberName + " = 1` in enum `" + enumName + "`.");
  28705. };
  28706. _proto.flowEnumErrorStringMemberInconsistentlyInitailized = function flowEnumErrorStringMemberInconsistentlyInitailized(pos, _ref9) {
  28707. var enumName = _ref9.enumName;
  28708. this.raise(pos, "String enum members need to consistently either all use initializers, or use no initializers, " + ("in enum `" + enumName + "`."));
  28709. };
  28710. _proto.flowEnumMemberInit = function flowEnumMemberInit() {
  28711. var _this12 = this;
  28712. var startPos = this.state.start;
  28713. var endOfInit = function endOfInit() {
  28714. return _this12.match(types.comma) || _this12.match(types.braceR);
  28715. };
  28716. switch (this.state.type) {
  28717. case types.num:
  28718. {
  28719. var literal = this.parseLiteral(this.state.value, "NumericLiteral");
  28720. if (endOfInit()) {
  28721. return {
  28722. type: "number",
  28723. pos: literal.start,
  28724. value: literal
  28725. };
  28726. }
  28727. return {
  28728. type: "invalid",
  28729. pos: startPos
  28730. };
  28731. }
  28732. case types.string:
  28733. {
  28734. var _literal = this.parseLiteral(this.state.value, "StringLiteral");
  28735. if (endOfInit()) {
  28736. return {
  28737. type: "string",
  28738. pos: _literal.start,
  28739. value: _literal
  28740. };
  28741. }
  28742. return {
  28743. type: "invalid",
  28744. pos: startPos
  28745. };
  28746. }
  28747. case types._true:
  28748. case types._false:
  28749. {
  28750. var _literal2 = this.parseBooleanLiteral();
  28751. if (endOfInit()) {
  28752. return {
  28753. type: "boolean",
  28754. pos: _literal2.start,
  28755. value: _literal2
  28756. };
  28757. }
  28758. return {
  28759. type: "invalid",
  28760. pos: startPos
  28761. };
  28762. }
  28763. default:
  28764. return {
  28765. type: "invalid",
  28766. pos: startPos
  28767. };
  28768. }
  28769. };
  28770. _proto.flowEnumMemberRaw = function flowEnumMemberRaw() {
  28771. var pos = this.state.start;
  28772. var id = this.parseIdentifier(true);
  28773. var init = this.eat(types.eq) ? this.flowEnumMemberInit() : {
  28774. type: "none",
  28775. pos: pos
  28776. };
  28777. return {
  28778. id: id,
  28779. init: init
  28780. };
  28781. };
  28782. _proto.flowEnumCheckExplicitTypeMismatch = function flowEnumCheckExplicitTypeMismatch(pos, context, expectedType) {
  28783. var explicitType = context.explicitType;
  28784. if (explicitType === null) {
  28785. return;
  28786. }
  28787. if (explicitType !== expectedType) {
  28788. this.flowEnumErrorInvalidMemberInitializer(pos, context);
  28789. }
  28790. };
  28791. _proto.flowEnumMembers = function flowEnumMembers(_ref10) {
  28792. var enumName = _ref10.enumName,
  28793. explicitType = _ref10.explicitType;
  28794. var seenNames = new Set();
  28795. var members = {
  28796. booleanMembers: [],
  28797. numberMembers: [],
  28798. stringMembers: [],
  28799. defaultedMembers: []
  28800. };
  28801. while (!this.match(types.braceR)) {
  28802. var memberNode = this.startNode();
  28803. var _this$flowEnumMemberR = this.flowEnumMemberRaw(),
  28804. id = _this$flowEnumMemberR.id,
  28805. init = _this$flowEnumMemberR.init;
  28806. var memberName = id.name;
  28807. if (memberName === "") {
  28808. continue;
  28809. }
  28810. if (/^[a-z]/.test(memberName)) {
  28811. this.flowEnumErrorInvalidMemberName(id.start, {
  28812. enumName: enumName,
  28813. memberName: memberName
  28814. });
  28815. }
  28816. if (seenNames.has(memberName)) {
  28817. this.flowEnumErrorDuplicateMemberName(id.start, {
  28818. enumName: enumName,
  28819. memberName: memberName
  28820. });
  28821. }
  28822. seenNames.add(memberName);
  28823. var context = {
  28824. enumName: enumName,
  28825. explicitType: explicitType,
  28826. memberName: memberName
  28827. };
  28828. memberNode.id = id;
  28829. switch (init.type) {
  28830. case "boolean":
  28831. {
  28832. this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "boolean");
  28833. memberNode.init = init.value;
  28834. members.booleanMembers.push(this.finishNode(memberNode, "EnumBooleanMember"));
  28835. break;
  28836. }
  28837. case "number":
  28838. {
  28839. this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "number");
  28840. memberNode.init = init.value;
  28841. members.numberMembers.push(this.finishNode(memberNode, "EnumNumberMember"));
  28842. break;
  28843. }
  28844. case "string":
  28845. {
  28846. this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "string");
  28847. memberNode.init = init.value;
  28848. members.stringMembers.push(this.finishNode(memberNode, "EnumStringMember"));
  28849. break;
  28850. }
  28851. case "invalid":
  28852. {
  28853. throw this.flowEnumErrorInvalidMemberInitializer(init.pos, context);
  28854. }
  28855. case "none":
  28856. {
  28857. switch (explicitType) {
  28858. case "boolean":
  28859. this.flowEnumErrorBooleanMemberNotInitialized(init.pos, context);
  28860. break;
  28861. case "number":
  28862. this.flowEnumErrorNumberMemberNotInitialized(init.pos, context);
  28863. break;
  28864. default:
  28865. members.defaultedMembers.push(this.finishNode(memberNode, "EnumDefaultedMember"));
  28866. }
  28867. }
  28868. }
  28869. if (!this.match(types.braceR)) {
  28870. this.expect(types.comma);
  28871. }
  28872. }
  28873. return members;
  28874. };
  28875. _proto.flowEnumStringMembers = function flowEnumStringMembers(initializedMembers, defaultedMembers, _ref11) {
  28876. var enumName = _ref11.enumName;
  28877. if (initializedMembers.length === 0) {
  28878. return defaultedMembers;
  28879. } else if (defaultedMembers.length === 0) {
  28880. return initializedMembers;
  28881. } else if (defaultedMembers.length > initializedMembers.length) {
  28882. for (var _i2 = 0; _i2 < initializedMembers.length; _i2++) {
  28883. var member = initializedMembers[_i2];
  28884. this.flowEnumErrorStringMemberInconsistentlyInitailized(member.start, {
  28885. enumName: enumName
  28886. });
  28887. }
  28888. return defaultedMembers;
  28889. } else {
  28890. for (var _i4 = 0; _i4 < defaultedMembers.length; _i4++) {
  28891. var _member = defaultedMembers[_i4];
  28892. this.flowEnumErrorStringMemberInconsistentlyInitailized(_member.start, {
  28893. enumName: enumName
  28894. });
  28895. }
  28896. return initializedMembers;
  28897. }
  28898. };
  28899. _proto.flowEnumParseExplicitType = function flowEnumParseExplicitType(_ref12) {
  28900. var enumName = _ref12.enumName;
  28901. if (this.eatContextual("of")) {
  28902. if (!this.match(types.name)) {
  28903. throw this.flowEnumErrorInvalidExplicitType(this.state.start, {
  28904. enumName: enumName,
  28905. suppliedType: null
  28906. });
  28907. }
  28908. var value = this.state.value;
  28909. this.next();
  28910. if (value !== "boolean" && value !== "number" && value !== "string" && value !== "symbol") {
  28911. this.flowEnumErrorInvalidExplicitType(this.state.start, {
  28912. enumName: enumName,
  28913. suppliedType: value
  28914. });
  28915. }
  28916. return value;
  28917. }
  28918. return null;
  28919. };
  28920. _proto.flowEnumBody = function flowEnumBody(node, _ref13) {
  28921. var _this13 = this;
  28922. var enumName = _ref13.enumName,
  28923. nameLoc = _ref13.nameLoc;
  28924. var explicitType = this.flowEnumParseExplicitType({
  28925. enumName: enumName
  28926. });
  28927. this.expect(types.braceL);
  28928. var members = this.flowEnumMembers({
  28929. enumName: enumName,
  28930. explicitType: explicitType
  28931. });
  28932. switch (explicitType) {
  28933. case "boolean":
  28934. node.explicitType = true;
  28935. node.members = members.booleanMembers;
  28936. this.expect(types.braceR);
  28937. return this.finishNode(node, "EnumBooleanBody");
  28938. case "number":
  28939. node.explicitType = true;
  28940. node.members = members.numberMembers;
  28941. this.expect(types.braceR);
  28942. return this.finishNode(node, "EnumNumberBody");
  28943. case "string":
  28944. node.explicitType = true;
  28945. node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, {
  28946. enumName: enumName
  28947. });
  28948. this.expect(types.braceR);
  28949. return this.finishNode(node, "EnumStringBody");
  28950. case "symbol":
  28951. node.members = members.defaultedMembers;
  28952. this.expect(types.braceR);
  28953. return this.finishNode(node, "EnumSymbolBody");
  28954. default:
  28955. {
  28956. var empty = function empty() {
  28957. node.members = [];
  28958. _this13.expect(types.braceR);
  28959. return _this13.finishNode(node, "EnumStringBody");
  28960. };
  28961. node.explicitType = false;
  28962. var boolsLen = members.booleanMembers.length;
  28963. var numsLen = members.numberMembers.length;
  28964. var strsLen = members.stringMembers.length;
  28965. var defaultedLen = members.defaultedMembers.length;
  28966. if (!boolsLen && !numsLen && !strsLen && !defaultedLen) {
  28967. return empty();
  28968. } else if (!boolsLen && !numsLen) {
  28969. node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, {
  28970. enumName: enumName
  28971. });
  28972. this.expect(types.braceR);
  28973. return this.finishNode(node, "EnumStringBody");
  28974. } else if (!numsLen && !strsLen && boolsLen >= defaultedLen) {
  28975. for (var _i6 = 0, _members$defaultedMem2 = members.defaultedMembers; _i6 < _members$defaultedMem2.length; _i6++) {
  28976. var member = _members$defaultedMem2[_i6];
  28977. this.flowEnumErrorBooleanMemberNotInitialized(member.start, {
  28978. enumName: enumName,
  28979. memberName: member.id.name
  28980. });
  28981. }
  28982. node.members = members.booleanMembers;
  28983. this.expect(types.braceR);
  28984. return this.finishNode(node, "EnumBooleanBody");
  28985. } else if (!boolsLen && !strsLen && numsLen >= defaultedLen) {
  28986. for (var _i8 = 0, _members$defaultedMem4 = members.defaultedMembers; _i8 < _members$defaultedMem4.length; _i8++) {
  28987. var _member2 = _members$defaultedMem4[_i8];
  28988. this.flowEnumErrorNumberMemberNotInitialized(_member2.start, {
  28989. enumName: enumName,
  28990. memberName: _member2.id.name
  28991. });
  28992. }
  28993. node.members = members.numberMembers;
  28994. this.expect(types.braceR);
  28995. return this.finishNode(node, "EnumNumberBody");
  28996. } else {
  28997. this.flowEnumErrorInconsistentMemberValues(nameLoc, {
  28998. enumName: enumName
  28999. });
  29000. return empty();
  29001. }
  29002. }
  29003. }
  29004. };
  29005. _proto.flowParseEnumDeclaration = function flowParseEnumDeclaration(node) {
  29006. var id = this.parseIdentifier();
  29007. node.id = id;
  29008. node.body = this.flowEnumBody(this.startNode(), {
  29009. enumName: id.name,
  29010. nameLoc: id.start
  29011. });
  29012. return this.finishNode(node, "EnumDeclaration");
  29013. };
  29014. return _class;
  29015. }(superClass);
  29016. });
  29017. var entities = {
  29018. quot: "\"",
  29019. amp: "&",
  29020. apos: "'",
  29021. lt: "<",
  29022. gt: ">",
  29023. nbsp: "\xA0",
  29024. iexcl: "\xA1",
  29025. cent: "\xA2",
  29026. pound: "\xA3",
  29027. curren: "\xA4",
  29028. yen: "\xA5",
  29029. brvbar: "\xA6",
  29030. sect: "\xA7",
  29031. uml: "\xA8",
  29032. copy: "\xA9",
  29033. ordf: "\xAA",
  29034. laquo: "\xAB",
  29035. not: "\xAC",
  29036. shy: "\xAD",
  29037. reg: "\xAE",
  29038. macr: "\xAF",
  29039. deg: "\xB0",
  29040. plusmn: "\xB1",
  29041. sup2: "\xB2",
  29042. sup3: "\xB3",
  29043. acute: "\xB4",
  29044. micro: "\xB5",
  29045. para: "\xB6",
  29046. middot: "\xB7",
  29047. cedil: "\xB8",
  29048. sup1: "\xB9",
  29049. ordm: "\xBA",
  29050. raquo: "\xBB",
  29051. frac14: "\xBC",
  29052. frac12: "\xBD",
  29053. frac34: "\xBE",
  29054. iquest: "\xBF",
  29055. Agrave: "\xC0",
  29056. Aacute: "\xC1",
  29057. Acirc: "\xC2",
  29058. Atilde: "\xC3",
  29059. Auml: "\xC4",
  29060. Aring: "\xC5",
  29061. AElig: "\xC6",
  29062. Ccedil: "\xC7",
  29063. Egrave: "\xC8",
  29064. Eacute: "\xC9",
  29065. Ecirc: "\xCA",
  29066. Euml: "\xCB",
  29067. Igrave: "\xCC",
  29068. Iacute: "\xCD",
  29069. Icirc: "\xCE",
  29070. Iuml: "\xCF",
  29071. ETH: "\xD0",
  29072. Ntilde: "\xD1",
  29073. Ograve: "\xD2",
  29074. Oacute: "\xD3",
  29075. Ocirc: "\xD4",
  29076. Otilde: "\xD5",
  29077. Ouml: "\xD6",
  29078. times: "\xD7",
  29079. Oslash: "\xD8",
  29080. Ugrave: "\xD9",
  29081. Uacute: "\xDA",
  29082. Ucirc: "\xDB",
  29083. Uuml: "\xDC",
  29084. Yacute: "\xDD",
  29085. THORN: "\xDE",
  29086. szlig: "\xDF",
  29087. agrave: "\xE0",
  29088. aacute: "\xE1",
  29089. acirc: "\xE2",
  29090. atilde: "\xE3",
  29091. auml: "\xE4",
  29092. aring: "\xE5",
  29093. aelig: "\xE6",
  29094. ccedil: "\xE7",
  29095. egrave: "\xE8",
  29096. eacute: "\xE9",
  29097. ecirc: "\xEA",
  29098. euml: "\xEB",
  29099. igrave: "\xEC",
  29100. iacute: "\xED",
  29101. icirc: "\xEE",
  29102. iuml: "\xEF",
  29103. eth: "\xF0",
  29104. ntilde: "\xF1",
  29105. ograve: "\xF2",
  29106. oacute: "\xF3",
  29107. ocirc: "\xF4",
  29108. otilde: "\xF5",
  29109. ouml: "\xF6",
  29110. divide: "\xF7",
  29111. oslash: "\xF8",
  29112. ugrave: "\xF9",
  29113. uacute: "\xFA",
  29114. ucirc: "\xFB",
  29115. uuml: "\xFC",
  29116. yacute: "\xFD",
  29117. thorn: "\xFE",
  29118. yuml: "\xFF",
  29119. OElig: "\u0152",
  29120. oelig: "\u0153",
  29121. Scaron: "\u0160",
  29122. scaron: "\u0161",
  29123. Yuml: "\u0178",
  29124. fnof: "\u0192",
  29125. circ: "\u02C6",
  29126. tilde: "\u02DC",
  29127. Alpha: "\u0391",
  29128. Beta: "\u0392",
  29129. Gamma: "\u0393",
  29130. Delta: "\u0394",
  29131. Epsilon: "\u0395",
  29132. Zeta: "\u0396",
  29133. Eta: "\u0397",
  29134. Theta: "\u0398",
  29135. Iota: "\u0399",
  29136. Kappa: "\u039A",
  29137. Lambda: "\u039B",
  29138. Mu: "\u039C",
  29139. Nu: "\u039D",
  29140. Xi: "\u039E",
  29141. Omicron: "\u039F",
  29142. Pi: "\u03A0",
  29143. Rho: "\u03A1",
  29144. Sigma: "\u03A3",
  29145. Tau: "\u03A4",
  29146. Upsilon: "\u03A5",
  29147. Phi: "\u03A6",
  29148. Chi: "\u03A7",
  29149. Psi: "\u03A8",
  29150. Omega: "\u03A9",
  29151. alpha: "\u03B1",
  29152. beta: "\u03B2",
  29153. gamma: "\u03B3",
  29154. delta: "\u03B4",
  29155. epsilon: "\u03B5",
  29156. zeta: "\u03B6",
  29157. eta: "\u03B7",
  29158. theta: "\u03B8",
  29159. iota: "\u03B9",
  29160. kappa: "\u03BA",
  29161. lambda: "\u03BB",
  29162. mu: "\u03BC",
  29163. nu: "\u03BD",
  29164. xi: "\u03BE",
  29165. omicron: "\u03BF",
  29166. pi: "\u03C0",
  29167. rho: "\u03C1",
  29168. sigmaf: "\u03C2",
  29169. sigma: "\u03C3",
  29170. tau: "\u03C4",
  29171. upsilon: "\u03C5",
  29172. phi: "\u03C6",
  29173. chi: "\u03C7",
  29174. psi: "\u03C8",
  29175. omega: "\u03C9",
  29176. thetasym: "\u03D1",
  29177. upsih: "\u03D2",
  29178. piv: "\u03D6",
  29179. ensp: "\u2002",
  29180. emsp: "\u2003",
  29181. thinsp: "\u2009",
  29182. zwnj: "\u200C",
  29183. zwj: "\u200D",
  29184. lrm: "\u200E",
  29185. rlm: "\u200F",
  29186. ndash: "\u2013",
  29187. mdash: "\u2014",
  29188. lsquo: "\u2018",
  29189. rsquo: "\u2019",
  29190. sbquo: "\u201A",
  29191. ldquo: "\u201C",
  29192. rdquo: "\u201D",
  29193. bdquo: "\u201E",
  29194. dagger: "\u2020",
  29195. Dagger: "\u2021",
  29196. bull: "\u2022",
  29197. hellip: "\u2026",
  29198. permil: "\u2030",
  29199. prime: "\u2032",
  29200. Prime: "\u2033",
  29201. lsaquo: "\u2039",
  29202. rsaquo: "\u203A",
  29203. oline: "\u203E",
  29204. frasl: "\u2044",
  29205. euro: "\u20AC",
  29206. image: "\u2111",
  29207. weierp: "\u2118",
  29208. real: "\u211C",
  29209. trade: "\u2122",
  29210. alefsym: "\u2135",
  29211. larr: "\u2190",
  29212. uarr: "\u2191",
  29213. rarr: "\u2192",
  29214. darr: "\u2193",
  29215. harr: "\u2194",
  29216. crarr: "\u21B5",
  29217. lArr: "\u21D0",
  29218. uArr: "\u21D1",
  29219. rArr: "\u21D2",
  29220. dArr: "\u21D3",
  29221. hArr: "\u21D4",
  29222. forall: "\u2200",
  29223. part: "\u2202",
  29224. exist: "\u2203",
  29225. empty: "\u2205",
  29226. nabla: "\u2207",
  29227. isin: "\u2208",
  29228. notin: "\u2209",
  29229. ni: "\u220B",
  29230. prod: "\u220F",
  29231. sum: "\u2211",
  29232. minus: "\u2212",
  29233. lowast: "\u2217",
  29234. radic: "\u221A",
  29235. prop: "\u221D",
  29236. infin: "\u221E",
  29237. ang: "\u2220",
  29238. and: "\u2227",
  29239. or: "\u2228",
  29240. cap: "\u2229",
  29241. cup: "\u222A",
  29242. "int": "\u222B",
  29243. there4: "\u2234",
  29244. sim: "\u223C",
  29245. cong: "\u2245",
  29246. asymp: "\u2248",
  29247. ne: "\u2260",
  29248. equiv: "\u2261",
  29249. le: "\u2264",
  29250. ge: "\u2265",
  29251. sub: "\u2282",
  29252. sup: "\u2283",
  29253. nsub: "\u2284",
  29254. sube: "\u2286",
  29255. supe: "\u2287",
  29256. oplus: "\u2295",
  29257. otimes: "\u2297",
  29258. perp: "\u22A5",
  29259. sdot: "\u22C5",
  29260. lceil: "\u2308",
  29261. rceil: "\u2309",
  29262. lfloor: "\u230A",
  29263. rfloor: "\u230B",
  29264. lang: "\u2329",
  29265. rang: "\u232A",
  29266. loz: "\u25CA",
  29267. spades: "\u2660",
  29268. clubs: "\u2663",
  29269. hearts: "\u2665",
  29270. diams: "\u2666"
  29271. };
  29272. var HEX_NUMBER = /^[\da-fA-F]+$/;
  29273. var DECIMAL_NUMBER = /^\d+$/;
  29274. types$1.j_oTag = new TokContext("<tag", false);
  29275. types$1.j_cTag = new TokContext("</tag", false);
  29276. types$1.j_expr = new TokContext("<tag>...</tag>", true, true);
  29277. types.jsxName = new TokenType("jsxName");
  29278. types.jsxText = new TokenType("jsxText", {
  29279. beforeExpr: true
  29280. });
  29281. types.jsxTagStart = new TokenType("jsxTagStart", {
  29282. startsExpr: true
  29283. });
  29284. types.jsxTagEnd = new TokenType("jsxTagEnd");
  29285. types.jsxTagStart.updateContext = function () {
  29286. this.state.context.push(types$1.j_expr);
  29287. this.state.context.push(types$1.j_oTag);
  29288. this.state.exprAllowed = false;
  29289. };
  29290. types.jsxTagEnd.updateContext = function (prevType) {
  29291. var out = this.state.context.pop();
  29292. if (out === types$1.j_oTag && prevType === types.slash || out === types$1.j_cTag) {
  29293. this.state.context.pop();
  29294. this.state.exprAllowed = this.curContext() === types$1.j_expr;
  29295. } else {
  29296. this.state.exprAllowed = true;
  29297. }
  29298. };
  29299. function isFragment(object) {
  29300. return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false;
  29301. }
  29302. function getQualifiedJSXName(object) {
  29303. if (object.type === "JSXIdentifier") {
  29304. return object.name;
  29305. }
  29306. if (object.type === "JSXNamespacedName") {
  29307. return object.namespace.name + ":" + object.name.name;
  29308. }
  29309. if (object.type === "JSXMemberExpression") {
  29310. return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property);
  29311. }
  29312. throw new Error("Node had unexpected type: " + object.type);
  29313. }
  29314. var jsx = (function (superClass) {
  29315. return function (_superClass) {
  29316. _inheritsLoose(_class, _superClass);
  29317. function _class() {
  29318. return _superClass.apply(this, arguments) || this;
  29319. }
  29320. var _proto = _class.prototype;
  29321. _proto.jsxReadToken = function jsxReadToken() {
  29322. var out = "";
  29323. var chunkStart = this.state.pos;
  29324. for (;;) {
  29325. if (this.state.pos >= this.length) {
  29326. throw this.raise(this.state.start, "Unterminated JSX contents");
  29327. }
  29328. var ch = this.input.charCodeAt(this.state.pos);
  29329. switch (ch) {
  29330. case 60:
  29331. case 123:
  29332. if (this.state.pos === this.state.start) {
  29333. if (ch === 60 && this.state.exprAllowed) {
  29334. ++this.state.pos;
  29335. return this.finishToken(types.jsxTagStart);
  29336. }
  29337. return _superClass.prototype.getTokenFromCode.call(this, ch);
  29338. }
  29339. out += this.input.slice(chunkStart, this.state.pos);
  29340. return this.finishToken(types.jsxText, out);
  29341. case 38:
  29342. out += this.input.slice(chunkStart, this.state.pos);
  29343. out += this.jsxReadEntity();
  29344. chunkStart = this.state.pos;
  29345. break;
  29346. default:
  29347. if (isNewLine(ch)) {
  29348. out += this.input.slice(chunkStart, this.state.pos);
  29349. out += this.jsxReadNewLine(true);
  29350. chunkStart = this.state.pos;
  29351. } else {
  29352. ++this.state.pos;
  29353. }
  29354. }
  29355. }
  29356. };
  29357. _proto.jsxReadNewLine = function jsxReadNewLine(normalizeCRLF) {
  29358. var ch = this.input.charCodeAt(this.state.pos);
  29359. var out;
  29360. ++this.state.pos;
  29361. if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) {
  29362. ++this.state.pos;
  29363. out = normalizeCRLF ? "\n" : "\r\n";
  29364. } else {
  29365. out = String.fromCharCode(ch);
  29366. }
  29367. ++this.state.curLine;
  29368. this.state.lineStart = this.state.pos;
  29369. return out;
  29370. };
  29371. _proto.jsxReadString = function jsxReadString(quote) {
  29372. var out = "";
  29373. var chunkStart = ++this.state.pos;
  29374. for (;;) {
  29375. if (this.state.pos >= this.length) {
  29376. throw this.raise(this.state.start, "Unterminated string constant");
  29377. }
  29378. var ch = this.input.charCodeAt(this.state.pos);
  29379. if (ch === quote) break;
  29380. if (ch === 38) {
  29381. out += this.input.slice(chunkStart, this.state.pos);
  29382. out += this.jsxReadEntity();
  29383. chunkStart = this.state.pos;
  29384. } else if (isNewLine(ch)) {
  29385. out += this.input.slice(chunkStart, this.state.pos);
  29386. out += this.jsxReadNewLine(false);
  29387. chunkStart = this.state.pos;
  29388. } else {
  29389. ++this.state.pos;
  29390. }
  29391. }
  29392. out += this.input.slice(chunkStart, this.state.pos++);
  29393. return this.finishToken(types.string, out);
  29394. };
  29395. _proto.jsxReadEntity = function jsxReadEntity() {
  29396. var str = "";
  29397. var count = 0;
  29398. var entity;
  29399. var ch = this.input[this.state.pos];
  29400. var startPos = ++this.state.pos;
  29401. while (this.state.pos < this.length && count++ < 10) {
  29402. ch = this.input[this.state.pos++];
  29403. if (ch === ";") {
  29404. if (str[0] === "#") {
  29405. if (str[1] === "x") {
  29406. str = str.substr(2);
  29407. if (HEX_NUMBER.test(str)) {
  29408. entity = String.fromCodePoint(parseInt(str, 16));
  29409. }
  29410. } else {
  29411. str = str.substr(1);
  29412. if (DECIMAL_NUMBER.test(str)) {
  29413. entity = String.fromCodePoint(parseInt(str, 10));
  29414. }
  29415. }
  29416. } else {
  29417. entity = entities[str];
  29418. }
  29419. break;
  29420. }
  29421. str += ch;
  29422. }
  29423. if (!entity) {
  29424. this.state.pos = startPos;
  29425. return "&";
  29426. }
  29427. return entity;
  29428. };
  29429. _proto.jsxReadWord = function jsxReadWord() {
  29430. var ch;
  29431. var start = this.state.pos;
  29432. do {
  29433. ch = this.input.charCodeAt(++this.state.pos);
  29434. } while (isIdentifierChar(ch) || ch === 45);
  29435. return this.finishToken(types.jsxName, this.input.slice(start, this.state.pos));
  29436. };
  29437. _proto.jsxParseIdentifier = function jsxParseIdentifier() {
  29438. var node = this.startNode();
  29439. if (this.match(types.jsxName)) {
  29440. node.name = this.state.value;
  29441. } else if (this.state.type.keyword) {
  29442. node.name = this.state.type.keyword;
  29443. } else {
  29444. this.unexpected();
  29445. }
  29446. this.next();
  29447. return this.finishNode(node, "JSXIdentifier");
  29448. };
  29449. _proto.jsxParseNamespacedName = function jsxParseNamespacedName() {
  29450. var startPos = this.state.start;
  29451. var startLoc = this.state.startLoc;
  29452. var name = this.jsxParseIdentifier();
  29453. if (!this.eat(types.colon)) return name;
  29454. var node = this.startNodeAt(startPos, startLoc);
  29455. node.namespace = name;
  29456. node.name = this.jsxParseIdentifier();
  29457. return this.finishNode(node, "JSXNamespacedName");
  29458. };
  29459. _proto.jsxParseElementName = function jsxParseElementName() {
  29460. var startPos = this.state.start;
  29461. var startLoc = this.state.startLoc;
  29462. var node = this.jsxParseNamespacedName();
  29463. if (node.type === "JSXNamespacedName") {
  29464. return node;
  29465. }
  29466. while (this.eat(types.dot)) {
  29467. var newNode = this.startNodeAt(startPos, startLoc);
  29468. newNode.object = node;
  29469. newNode.property = this.jsxParseIdentifier();
  29470. node = this.finishNode(newNode, "JSXMemberExpression");
  29471. }
  29472. return node;
  29473. };
  29474. _proto.jsxParseAttributeValue = function jsxParseAttributeValue() {
  29475. var node;
  29476. switch (this.state.type) {
  29477. case types.braceL:
  29478. node = this.startNode();
  29479. this.next();
  29480. node = this.jsxParseExpressionContainer(node);
  29481. if (node.expression.type === "JSXEmptyExpression") {
  29482. this.raise(node.start, "JSX attributes must only be assigned a non-empty expression");
  29483. }
  29484. return node;
  29485. case types.jsxTagStart:
  29486. case types.string:
  29487. return this.parseExprAtom();
  29488. default:
  29489. throw this.raise(this.state.start, "JSX value should be either an expression or a quoted JSX text");
  29490. }
  29491. };
  29492. _proto.jsxParseEmptyExpression = function jsxParseEmptyExpression() {
  29493. var node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc);
  29494. return this.finishNodeAt(node, "JSXEmptyExpression", this.state.start, this.state.startLoc);
  29495. };
  29496. _proto.jsxParseSpreadChild = function jsxParseSpreadChild(node) {
  29497. this.next();
  29498. node.expression = this.parseExpression();
  29499. this.expect(types.braceR);
  29500. return this.finishNode(node, "JSXSpreadChild");
  29501. };
  29502. _proto.jsxParseExpressionContainer = function jsxParseExpressionContainer(node) {
  29503. if (this.match(types.braceR)) {
  29504. node.expression = this.jsxParseEmptyExpression();
  29505. } else {
  29506. node.expression = this.parseExpression();
  29507. }
  29508. this.expect(types.braceR);
  29509. return this.finishNode(node, "JSXExpressionContainer");
  29510. };
  29511. _proto.jsxParseAttribute = function jsxParseAttribute() {
  29512. var node = this.startNode();
  29513. if (this.eat(types.braceL)) {
  29514. this.expect(types.ellipsis);
  29515. node.argument = this.parseMaybeAssign();
  29516. this.expect(types.braceR);
  29517. return this.finishNode(node, "JSXSpreadAttribute");
  29518. }
  29519. node.name = this.jsxParseNamespacedName();
  29520. node.value = this.eat(types.eq) ? this.jsxParseAttributeValue() : null;
  29521. return this.finishNode(node, "JSXAttribute");
  29522. };
  29523. _proto.jsxParseOpeningElementAt = function jsxParseOpeningElementAt(startPos, startLoc) {
  29524. var node = this.startNodeAt(startPos, startLoc);
  29525. if (this.match(types.jsxTagEnd)) {
  29526. this.expect(types.jsxTagEnd);
  29527. return this.finishNode(node, "JSXOpeningFragment");
  29528. }
  29529. node.name = this.jsxParseElementName();
  29530. return this.jsxParseOpeningElementAfterName(node);
  29531. };
  29532. _proto.jsxParseOpeningElementAfterName = function jsxParseOpeningElementAfterName(node) {
  29533. var attributes = [];
  29534. while (!this.match(types.slash) && !this.match(types.jsxTagEnd)) {
  29535. attributes.push(this.jsxParseAttribute());
  29536. }
  29537. node.attributes = attributes;
  29538. node.selfClosing = this.eat(types.slash);
  29539. this.expect(types.jsxTagEnd);
  29540. return this.finishNode(node, "JSXOpeningElement");
  29541. };
  29542. _proto.jsxParseClosingElementAt = function jsxParseClosingElementAt(startPos, startLoc) {
  29543. var node = this.startNodeAt(startPos, startLoc);
  29544. if (this.match(types.jsxTagEnd)) {
  29545. this.expect(types.jsxTagEnd);
  29546. return this.finishNode(node, "JSXClosingFragment");
  29547. }
  29548. node.name = this.jsxParseElementName();
  29549. this.expect(types.jsxTagEnd);
  29550. return this.finishNode(node, "JSXClosingElement");
  29551. };
  29552. _proto.jsxParseElementAt = function jsxParseElementAt(startPos, startLoc) {
  29553. var node = this.startNodeAt(startPos, startLoc);
  29554. var children = [];
  29555. var openingElement = this.jsxParseOpeningElementAt(startPos, startLoc);
  29556. var closingElement = null;
  29557. if (!openingElement.selfClosing) {
  29558. contents: for (;;) {
  29559. switch (this.state.type) {
  29560. case types.jsxTagStart:
  29561. startPos = this.state.start;
  29562. startLoc = this.state.startLoc;
  29563. this.next();
  29564. if (this.eat(types.slash)) {
  29565. closingElement = this.jsxParseClosingElementAt(startPos, startLoc);
  29566. break contents;
  29567. }
  29568. children.push(this.jsxParseElementAt(startPos, startLoc));
  29569. break;
  29570. case types.jsxText:
  29571. children.push(this.parseExprAtom());
  29572. break;
  29573. case types.braceL:
  29574. {
  29575. var _node = this.startNode();
  29576. this.next();
  29577. if (this.match(types.ellipsis)) {
  29578. children.push(this.jsxParseSpreadChild(_node));
  29579. } else {
  29580. children.push(this.jsxParseExpressionContainer(_node));
  29581. }
  29582. break;
  29583. }
  29584. default:
  29585. throw this.unexpected();
  29586. }
  29587. }
  29588. if (isFragment(openingElement) && !isFragment(closingElement)) {
  29589. this.raise(closingElement.start, "Expected corresponding JSX closing tag for <>");
  29590. } else if (!isFragment(openingElement) && isFragment(closingElement)) {
  29591. this.raise(closingElement.start, "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">");
  29592. } else if (!isFragment(openingElement) && !isFragment(closingElement)) {
  29593. if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) {
  29594. this.raise(closingElement.start, "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">");
  29595. }
  29596. }
  29597. }
  29598. if (isFragment(openingElement)) {
  29599. node.openingFragment = openingElement;
  29600. node.closingFragment = closingElement;
  29601. } else {
  29602. node.openingElement = openingElement;
  29603. node.closingElement = closingElement;
  29604. }
  29605. node.children = children;
  29606. if (this.isRelational("<")) {
  29607. throw this.raise(this.state.start, "Adjacent JSX elements must be wrapped in an enclosing tag. " + "Did you want a JSX fragment <>...</>?");
  29608. }
  29609. return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement");
  29610. };
  29611. _proto.jsxParseElement = function jsxParseElement() {
  29612. var startPos = this.state.start;
  29613. var startLoc = this.state.startLoc;
  29614. this.next();
  29615. return this.jsxParseElementAt(startPos, startLoc);
  29616. };
  29617. _proto.parseExprAtom = function parseExprAtom(refShortHandDefaultPos) {
  29618. if (this.match(types.jsxText)) {
  29619. return this.parseLiteral(this.state.value, "JSXText");
  29620. } else if (this.match(types.jsxTagStart)) {
  29621. return this.jsxParseElement();
  29622. } else if (this.isRelational("<") && this.input.charCodeAt(this.state.pos) !== 33) {
  29623. this.finishToken(types.jsxTagStart);
  29624. return this.jsxParseElement();
  29625. } else {
  29626. return _superClass.prototype.parseExprAtom.call(this, refShortHandDefaultPos);
  29627. }
  29628. };
  29629. _proto.getTokenFromCode = function getTokenFromCode(code) {
  29630. if (this.state.inPropertyName) return _superClass.prototype.getTokenFromCode.call(this, code);
  29631. var context = this.curContext();
  29632. if (context === types$1.j_expr) {
  29633. return this.jsxReadToken();
  29634. }
  29635. if (context === types$1.j_oTag || context === types$1.j_cTag) {
  29636. if (isIdentifierStart(code)) {
  29637. return this.jsxReadWord();
  29638. }
  29639. if (code === 62) {
  29640. ++this.state.pos;
  29641. return this.finishToken(types.jsxTagEnd);
  29642. }
  29643. if ((code === 34 || code === 39) && context === types$1.j_oTag) {
  29644. return this.jsxReadString(code);
  29645. }
  29646. }
  29647. if (code === 60 && this.state.exprAllowed && this.input.charCodeAt(this.state.pos + 1) !== 33) {
  29648. ++this.state.pos;
  29649. return this.finishToken(types.jsxTagStart);
  29650. }
  29651. return _superClass.prototype.getTokenFromCode.call(this, code);
  29652. };
  29653. _proto.updateContext = function updateContext(prevType) {
  29654. if (this.match(types.braceL)) {
  29655. var curContext = this.curContext();
  29656. if (curContext === types$1.j_oTag) {
  29657. this.state.context.push(types$1.braceExpression);
  29658. } else if (curContext === types$1.j_expr) {
  29659. this.state.context.push(types$1.templateQuasi);
  29660. } else {
  29661. _superClass.prototype.updateContext.call(this, prevType);
  29662. }
  29663. this.state.exprAllowed = true;
  29664. } else if (this.match(types.slash) && prevType === types.jsxTagStart) {
  29665. this.state.context.length -= 2;
  29666. this.state.context.push(types$1.j_cTag);
  29667. this.state.exprAllowed = false;
  29668. } else {
  29669. return _superClass.prototype.updateContext.call(this, prevType);
  29670. }
  29671. };
  29672. return _class;
  29673. }(superClass);
  29674. });
  29675. var Scope$2 = function Scope(flags) {
  29676. this["var"] = [];
  29677. this.lexical = [];
  29678. this.functions = [];
  29679. this.flags = flags;
  29680. };
  29681. var ScopeHandler = function () {
  29682. function ScopeHandler(raise, inModule) {
  29683. this.scopeStack = [];
  29684. this.undefinedExports = new Map();
  29685. this.undefinedPrivateNames = new Map();
  29686. this.raise = raise;
  29687. this.inModule = inModule;
  29688. }
  29689. var _proto = ScopeHandler.prototype;
  29690. _proto.createScope = function createScope(flags) {
  29691. return new Scope$2(flags);
  29692. };
  29693. _proto.enter = function enter(flags) {
  29694. this.scopeStack.push(this.createScope(flags));
  29695. };
  29696. _proto.exit = function exit() {
  29697. this.scopeStack.pop();
  29698. };
  29699. _proto.treatFunctionsAsVarInScope = function treatFunctionsAsVarInScope(scope) {
  29700. return !!(scope.flags & SCOPE_FUNCTION || !this.inModule && scope.flags & SCOPE_PROGRAM);
  29701. };
  29702. _proto.declareName = function declareName(name, bindingType, pos) {
  29703. var scope = this.currentScope();
  29704. if (bindingType & BIND_SCOPE_LEXICAL || bindingType & BIND_SCOPE_FUNCTION) {
  29705. this.checkRedeclarationInScope(scope, name, bindingType, pos);
  29706. if (bindingType & BIND_SCOPE_FUNCTION) {
  29707. scope.functions.push(name);
  29708. } else {
  29709. scope.lexical.push(name);
  29710. }
  29711. if (bindingType & BIND_SCOPE_LEXICAL) {
  29712. this.maybeExportDefined(scope, name);
  29713. }
  29714. } else if (bindingType & BIND_SCOPE_VAR) {
  29715. for (var i = this.scopeStack.length - 1; i >= 0; --i) {
  29716. scope = this.scopeStack[i];
  29717. this.checkRedeclarationInScope(scope, name, bindingType, pos);
  29718. scope["var"].push(name);
  29719. this.maybeExportDefined(scope, name);
  29720. if (scope.flags & SCOPE_VAR) break;
  29721. }
  29722. }
  29723. if (this.inModule && scope.flags & SCOPE_PROGRAM) {
  29724. this.undefinedExports["delete"](name);
  29725. }
  29726. };
  29727. _proto.maybeExportDefined = function maybeExportDefined(scope, name) {
  29728. if (this.inModule && scope.flags & SCOPE_PROGRAM) {
  29729. this.undefinedExports["delete"](name);
  29730. }
  29731. };
  29732. _proto.checkRedeclarationInScope = function checkRedeclarationInScope(scope, name, bindingType, pos) {
  29733. if (this.isRedeclaredInScope(scope, name, bindingType)) {
  29734. this.raise(pos, "Identifier '" + name + "' has already been declared");
  29735. }
  29736. };
  29737. _proto.isRedeclaredInScope = function isRedeclaredInScope(scope, name, bindingType) {
  29738. if (!(bindingType & BIND_KIND_VALUE)) return false;
  29739. if (bindingType & BIND_SCOPE_LEXICAL) {
  29740. return scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope["var"].indexOf(name) > -1;
  29741. }
  29742. if (bindingType & BIND_SCOPE_FUNCTION) {
  29743. return scope.lexical.indexOf(name) > -1 || !this.treatFunctionsAsVarInScope(scope) && scope["var"].indexOf(name) > -1;
  29744. }
  29745. return scope.lexical.indexOf(name) > -1 && !(scope.flags & SCOPE_SIMPLE_CATCH && scope.lexical[0] === name) || !this.treatFunctionsAsVarInScope(scope) && scope.functions.indexOf(name) > -1;
  29746. };
  29747. _proto.checkLocalExport = function checkLocalExport(id) {
  29748. if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && this.scopeStack[0]["var"].indexOf(id.name) === -1 && this.scopeStack[0].functions.indexOf(id.name) === -1) {
  29749. this.undefinedExports.set(id.name, id.start);
  29750. }
  29751. };
  29752. _proto.currentScope = function currentScope() {
  29753. return this.scopeStack[this.scopeStack.length - 1];
  29754. };
  29755. _proto.currentVarScope = function currentVarScope() {
  29756. for (var i = this.scopeStack.length - 1;; i--) {
  29757. var scope = this.scopeStack[i];
  29758. if (scope.flags & SCOPE_VAR) {
  29759. return scope;
  29760. }
  29761. }
  29762. };
  29763. _proto.currentThisScope = function currentThisScope() {
  29764. for (var i = this.scopeStack.length - 1;; i--) {
  29765. var scope = this.scopeStack[i];
  29766. if ((scope.flags & SCOPE_VAR || scope.flags & SCOPE_CLASS) && !(scope.flags & SCOPE_ARROW)) {
  29767. return scope;
  29768. }
  29769. }
  29770. };
  29771. _createClass(ScopeHandler, [{
  29772. key: "inFunction",
  29773. get: function get() {
  29774. return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0;
  29775. }
  29776. }, {
  29777. key: "inGenerator",
  29778. get: function get() {
  29779. return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0;
  29780. }
  29781. }, {
  29782. key: "inAsync",
  29783. get: function get() {
  29784. for (var i = this.scopeStack.length - 1;; i--) {
  29785. var scope = this.scopeStack[i];
  29786. var isVarScope = scope.flags & SCOPE_VAR;
  29787. var isClassScope = scope.flags & SCOPE_CLASS;
  29788. if (isClassScope && !isVarScope) {
  29789. return false;
  29790. } else if (isVarScope) {
  29791. return (scope.flags & SCOPE_ASYNC) > 0;
  29792. }
  29793. }
  29794. }
  29795. }, {
  29796. key: "allowSuper",
  29797. get: function get() {
  29798. return (this.currentThisScope().flags & SCOPE_SUPER) > 0;
  29799. }
  29800. }, {
  29801. key: "allowDirectSuper",
  29802. get: function get() {
  29803. return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0;
  29804. }
  29805. }, {
  29806. key: "inClass",
  29807. get: function get() {
  29808. return (this.currentThisScope().flags & SCOPE_CLASS) > 0;
  29809. }
  29810. }, {
  29811. key: "inNonArrowFunction",
  29812. get: function get() {
  29813. return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0;
  29814. }
  29815. }, {
  29816. key: "treatFunctionsAsVar",
  29817. get: function get() {
  29818. return this.treatFunctionsAsVarInScope(this.currentScope());
  29819. }
  29820. }]);
  29821. return ScopeHandler;
  29822. }();
  29823. var TypeScriptScope = function (_Scope) {
  29824. _inheritsLoose(TypeScriptScope, _Scope);
  29825. function TypeScriptScope() {
  29826. var _this;
  29827. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  29828. args[_key] = arguments[_key];
  29829. }
  29830. _this = _Scope.call.apply(_Scope, [this].concat(args)) || this;
  29831. _this.types = [];
  29832. _this.enums = [];
  29833. _this.constEnums = [];
  29834. _this.classes = [];
  29835. _this.exportOnlyBindings = [];
  29836. return _this;
  29837. }
  29838. return TypeScriptScope;
  29839. }(Scope$2);
  29840. var TypeScriptScopeHandler = function (_ScopeHandler) {
  29841. _inheritsLoose(TypeScriptScopeHandler, _ScopeHandler);
  29842. function TypeScriptScopeHandler() {
  29843. return _ScopeHandler.apply(this, arguments) || this;
  29844. }
  29845. var _proto = TypeScriptScopeHandler.prototype;
  29846. _proto.createScope = function createScope(flags) {
  29847. return new TypeScriptScope(flags);
  29848. };
  29849. _proto.declareName = function declareName(name, bindingType, pos) {
  29850. var scope = this.currentScope();
  29851. if (bindingType & BIND_FLAGS_TS_EXPORT_ONLY) {
  29852. this.maybeExportDefined(scope, name);
  29853. scope.exportOnlyBindings.push(name);
  29854. return;
  29855. }
  29856. _ScopeHandler.prototype.declareName.apply(this, arguments);
  29857. if (bindingType & BIND_KIND_TYPE) {
  29858. if (!(bindingType & BIND_KIND_VALUE)) {
  29859. this.checkRedeclarationInScope(scope, name, bindingType, pos);
  29860. this.maybeExportDefined(scope, name);
  29861. }
  29862. scope.types.push(name);
  29863. }
  29864. if (bindingType & BIND_FLAGS_TS_ENUM) scope.enums.push(name);
  29865. if (bindingType & BIND_FLAGS_TS_CONST_ENUM) scope.constEnums.push(name);
  29866. if (bindingType & BIND_FLAGS_CLASS) scope.classes.push(name);
  29867. };
  29868. _proto.isRedeclaredInScope = function isRedeclaredInScope(scope, name, bindingType) {
  29869. if (scope.enums.indexOf(name) > -1) {
  29870. if (bindingType & BIND_FLAGS_TS_ENUM) {
  29871. var isConst = !!(bindingType & BIND_FLAGS_TS_CONST_ENUM);
  29872. var wasConst = scope.constEnums.indexOf(name) > -1;
  29873. return isConst !== wasConst;
  29874. }
  29875. return true;
  29876. }
  29877. if (bindingType & BIND_FLAGS_CLASS && scope.classes.indexOf(name) > -1) {
  29878. if (scope.lexical.indexOf(name) > -1) {
  29879. return !!(bindingType & BIND_KIND_VALUE);
  29880. } else {
  29881. return false;
  29882. }
  29883. }
  29884. if (bindingType & BIND_KIND_TYPE && scope.types.indexOf(name) > -1) {
  29885. return true;
  29886. }
  29887. return _ScopeHandler.prototype.isRedeclaredInScope.apply(this, arguments);
  29888. };
  29889. _proto.checkLocalExport = function checkLocalExport(id) {
  29890. if (this.scopeStack[0].types.indexOf(id.name) === -1 && this.scopeStack[0].exportOnlyBindings.indexOf(id.name) === -1) {
  29891. _ScopeHandler.prototype.checkLocalExport.call(this, id);
  29892. }
  29893. };
  29894. return TypeScriptScopeHandler;
  29895. }(ScopeHandler);
  29896. function nonNull(x) {
  29897. if (x == null) {
  29898. throw new Error("Unexpected " + x + " value.");
  29899. }
  29900. return x;
  29901. }
  29902. function assert$1(x) {
  29903. if (!x) {
  29904. throw new Error("Assert fail");
  29905. }
  29906. }
  29907. function keywordTypeFromName(value) {
  29908. switch (value) {
  29909. case "any":
  29910. return "TSAnyKeyword";
  29911. case "boolean":
  29912. return "TSBooleanKeyword";
  29913. case "bigint":
  29914. return "TSBigIntKeyword";
  29915. case "never":
  29916. return "TSNeverKeyword";
  29917. case "number":
  29918. return "TSNumberKeyword";
  29919. case "object":
  29920. return "TSObjectKeyword";
  29921. case "string":
  29922. return "TSStringKeyword";
  29923. case "symbol":
  29924. return "TSSymbolKeyword";
  29925. case "undefined":
  29926. return "TSUndefinedKeyword";
  29927. case "unknown":
  29928. return "TSUnknownKeyword";
  29929. default:
  29930. return undefined;
  29931. }
  29932. }
  29933. var typescript = (function (superClass) {
  29934. return function (_superClass) {
  29935. _inheritsLoose(_class, _superClass);
  29936. function _class() {
  29937. return _superClass.apply(this, arguments) || this;
  29938. }
  29939. var _proto = _class.prototype;
  29940. _proto.getScopeHandler = function getScopeHandler() {
  29941. return TypeScriptScopeHandler;
  29942. };
  29943. _proto.tsIsIdentifier = function tsIsIdentifier() {
  29944. return this.match(types.name);
  29945. };
  29946. _proto.tsNextTokenCanFollowModifier = function tsNextTokenCanFollowModifier() {
  29947. this.next();
  29948. return !this.hasPrecedingLineBreak() && !this.match(types.parenL) && !this.match(types.parenR) && !this.match(types.colon) && !this.match(types.eq) && !this.match(types.question) && !this.match(types.bang);
  29949. };
  29950. _proto.tsParseModifier = function tsParseModifier(allowedModifiers) {
  29951. if (!this.match(types.name)) {
  29952. return undefined;
  29953. }
  29954. var modifier = this.state.value;
  29955. if (allowedModifiers.indexOf(modifier) !== -1 && this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) {
  29956. return modifier;
  29957. }
  29958. return undefined;
  29959. };
  29960. _proto.tsParseModifiers = function tsParseModifiers(allowedModifiers) {
  29961. var modifiers = Object.create(null);
  29962. while (true) {
  29963. var startPos = this.state.start;
  29964. var modifier = this.tsParseModifier(allowedModifiers);
  29965. if (!modifier) break;
  29966. if (Object.hasOwnProperty.call(modifiers, modifier)) {
  29967. this.raise(startPos, "Duplicate modifier: '" + modifier + "'");
  29968. }
  29969. modifiers[modifier] = true;
  29970. }
  29971. return modifiers;
  29972. };
  29973. _proto.tsIsListTerminator = function tsIsListTerminator(kind) {
  29974. switch (kind) {
  29975. case "EnumMembers":
  29976. case "TypeMembers":
  29977. return this.match(types.braceR);
  29978. case "HeritageClauseElement":
  29979. return this.match(types.braceL);
  29980. case "TupleElementTypes":
  29981. return this.match(types.bracketR);
  29982. case "TypeParametersOrArguments":
  29983. return this.isRelational(">");
  29984. }
  29985. throw new Error("Unreachable");
  29986. };
  29987. _proto.tsParseList = function tsParseList(kind, parseElement) {
  29988. var result = [];
  29989. while (!this.tsIsListTerminator(kind)) {
  29990. result.push(parseElement());
  29991. }
  29992. return result;
  29993. };
  29994. _proto.tsParseDelimitedList = function tsParseDelimitedList(kind, parseElement) {
  29995. return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true));
  29996. };
  29997. _proto.tsParseDelimitedListWorker = function tsParseDelimitedListWorker(kind, parseElement, expectSuccess) {
  29998. var result = [];
  29999. while (true) {
  30000. if (this.tsIsListTerminator(kind)) {
  30001. break;
  30002. }
  30003. var element = parseElement();
  30004. if (element == null) {
  30005. return undefined;
  30006. }
  30007. result.push(element);
  30008. if (this.eat(types.comma)) {
  30009. continue;
  30010. }
  30011. if (this.tsIsListTerminator(kind)) {
  30012. break;
  30013. }
  30014. if (expectSuccess) {
  30015. this.expect(types.comma);
  30016. }
  30017. return undefined;
  30018. }
  30019. return result;
  30020. };
  30021. _proto.tsParseBracketedList = function tsParseBracketedList(kind, parseElement, bracket, skipFirstToken) {
  30022. if (!skipFirstToken) {
  30023. if (bracket) {
  30024. this.expect(types.bracketL);
  30025. } else {
  30026. this.expectRelational("<");
  30027. }
  30028. }
  30029. var result = this.tsParseDelimitedList(kind, parseElement);
  30030. if (bracket) {
  30031. this.expect(types.bracketR);
  30032. } else {
  30033. this.expectRelational(">");
  30034. }
  30035. return result;
  30036. };
  30037. _proto.tsParseImportType = function tsParseImportType() {
  30038. var node = this.startNode();
  30039. this.expect(types._import);
  30040. this.expect(types.parenL);
  30041. if (!this.match(types.string)) {
  30042. this.raise(this.state.start, "Argument in a type import must be a string literal");
  30043. }
  30044. node.argument = this.parseExprAtom();
  30045. this.expect(types.parenR);
  30046. if (this.eat(types.dot)) {
  30047. node.qualifier = this.tsParseEntityName(true);
  30048. }
  30049. if (this.isRelational("<")) {
  30050. node.typeParameters = this.tsParseTypeArguments();
  30051. }
  30052. return this.finishNode(node, "TSImportType");
  30053. };
  30054. _proto.tsParseEntityName = function tsParseEntityName(allowReservedWords) {
  30055. var entity = this.parseIdentifier();
  30056. while (this.eat(types.dot)) {
  30057. var node = this.startNodeAtNode(entity);
  30058. node.left = entity;
  30059. node.right = this.parseIdentifier(allowReservedWords);
  30060. entity = this.finishNode(node, "TSQualifiedName");
  30061. }
  30062. return entity;
  30063. };
  30064. _proto.tsParseTypeReference = function tsParseTypeReference() {
  30065. var node = this.startNode();
  30066. node.typeName = this.tsParseEntityName(false);
  30067. if (!this.hasPrecedingLineBreak() && this.isRelational("<")) {
  30068. node.typeParameters = this.tsParseTypeArguments();
  30069. }
  30070. return this.finishNode(node, "TSTypeReference");
  30071. };
  30072. _proto.tsParseThisTypePredicate = function tsParseThisTypePredicate(lhs) {
  30073. this.next();
  30074. var node = this.startNodeAtNode(lhs);
  30075. node.parameterName = lhs;
  30076. node.typeAnnotation = this.tsParseTypeAnnotation(false);
  30077. return this.finishNode(node, "TSTypePredicate");
  30078. };
  30079. _proto.tsParseThisTypeNode = function tsParseThisTypeNode() {
  30080. var node = this.startNode();
  30081. this.next();
  30082. return this.finishNode(node, "TSThisType");
  30083. };
  30084. _proto.tsParseTypeQuery = function tsParseTypeQuery() {
  30085. var node = this.startNode();
  30086. this.expect(types._typeof);
  30087. if (this.match(types._import)) {
  30088. node.exprName = this.tsParseImportType();
  30089. } else {
  30090. node.exprName = this.tsParseEntityName(true);
  30091. }
  30092. return this.finishNode(node, "TSTypeQuery");
  30093. };
  30094. _proto.tsParseTypeParameter = function tsParseTypeParameter() {
  30095. var node = this.startNode();
  30096. node.name = this.parseIdentifierName(node.start);
  30097. node.constraint = this.tsEatThenParseType(types._extends);
  30098. node["default"] = this.tsEatThenParseType(types.eq);
  30099. return this.finishNode(node, "TSTypeParameter");
  30100. };
  30101. _proto.tsTryParseTypeParameters = function tsTryParseTypeParameters() {
  30102. if (this.isRelational("<")) {
  30103. return this.tsParseTypeParameters();
  30104. }
  30105. };
  30106. _proto.tsParseTypeParameters = function tsParseTypeParameters() {
  30107. var node = this.startNode();
  30108. if (this.isRelational("<") || this.match(types.jsxTagStart)) {
  30109. this.next();
  30110. } else {
  30111. this.unexpected();
  30112. }
  30113. node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this), false, true);
  30114. return this.finishNode(node, "TSTypeParameterDeclaration");
  30115. };
  30116. _proto.tsTryNextParseConstantContext = function tsTryNextParseConstantContext() {
  30117. if (this.lookahead().type === types._const) {
  30118. this.next();
  30119. return this.tsParseTypeReference();
  30120. }
  30121. return null;
  30122. };
  30123. _proto.tsFillSignature = function tsFillSignature(returnToken, signature) {
  30124. var returnTokenRequired = returnToken === types.arrow;
  30125. signature.typeParameters = this.tsTryParseTypeParameters();
  30126. this.expect(types.parenL);
  30127. signature.parameters = this.tsParseBindingListForSignature();
  30128. if (returnTokenRequired) {
  30129. signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken);
  30130. } else if (this.match(returnToken)) {
  30131. signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken);
  30132. }
  30133. };
  30134. _proto.tsParseBindingListForSignature = function tsParseBindingListForSignature() {
  30135. var _this = this;
  30136. return this.parseBindingList(types.parenR, 41).map(function (pattern) {
  30137. if (pattern.type !== "Identifier" && pattern.type !== "RestElement" && pattern.type !== "ObjectPattern" && pattern.type !== "ArrayPattern") {
  30138. _this.raise(pattern.start, "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern," + ("instead got " + pattern.type));
  30139. }
  30140. return pattern;
  30141. });
  30142. };
  30143. _proto.tsParseTypeMemberSemicolon = function tsParseTypeMemberSemicolon() {
  30144. if (!this.eat(types.comma)) {
  30145. this.semicolon();
  30146. }
  30147. };
  30148. _proto.tsParseSignatureMember = function tsParseSignatureMember(kind, node) {
  30149. this.tsFillSignature(types.colon, node);
  30150. this.tsParseTypeMemberSemicolon();
  30151. return this.finishNode(node, kind);
  30152. };
  30153. _proto.tsIsUnambiguouslyIndexSignature = function tsIsUnambiguouslyIndexSignature() {
  30154. this.next();
  30155. return this.eat(types.name) && this.match(types.colon);
  30156. };
  30157. _proto.tsTryParseIndexSignature = function tsTryParseIndexSignature(node) {
  30158. if (!(this.match(types.bracketL) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) {
  30159. return undefined;
  30160. }
  30161. this.expect(types.bracketL);
  30162. var id = this.parseIdentifier();
  30163. id.typeAnnotation = this.tsParseTypeAnnotation();
  30164. this.resetEndLocation(id);
  30165. this.expect(types.bracketR);
  30166. node.parameters = [id];
  30167. var type = this.tsTryParseTypeAnnotation();
  30168. if (type) node.typeAnnotation = type;
  30169. this.tsParseTypeMemberSemicolon();
  30170. return this.finishNode(node, "TSIndexSignature");
  30171. };
  30172. _proto.tsParsePropertyOrMethodSignature = function tsParsePropertyOrMethodSignature(node, readonly) {
  30173. if (this.eat(types.question)) node.optional = true;
  30174. var nodeAny = node;
  30175. if (!readonly && (this.match(types.parenL) || this.isRelational("<"))) {
  30176. var method = nodeAny;
  30177. this.tsFillSignature(types.colon, method);
  30178. this.tsParseTypeMemberSemicolon();
  30179. return this.finishNode(method, "TSMethodSignature");
  30180. } else {
  30181. var property = nodeAny;
  30182. if (readonly) property.readonly = true;
  30183. var type = this.tsTryParseTypeAnnotation();
  30184. if (type) property.typeAnnotation = type;
  30185. this.tsParseTypeMemberSemicolon();
  30186. return this.finishNode(property, "TSPropertySignature");
  30187. }
  30188. };
  30189. _proto.tsParseTypeMember = function tsParseTypeMember() {
  30190. var node = this.startNode();
  30191. if (this.match(types.parenL) || this.isRelational("<")) {
  30192. return this.tsParseSignatureMember("TSCallSignatureDeclaration", node);
  30193. }
  30194. if (this.match(types._new)) {
  30195. var id = this.startNode();
  30196. this.next();
  30197. if (this.match(types.parenL) || this.isRelational("<")) {
  30198. return this.tsParseSignatureMember("TSConstructSignatureDeclaration", node);
  30199. } else {
  30200. node.key = this.createIdentifier(id, "new");
  30201. return this.tsParsePropertyOrMethodSignature(node, false);
  30202. }
  30203. }
  30204. var readonly = !!this.tsParseModifier(["readonly"]);
  30205. var idx = this.tsTryParseIndexSignature(node);
  30206. if (idx) {
  30207. if (readonly) node.readonly = true;
  30208. return idx;
  30209. }
  30210. this.parsePropertyName(node, false);
  30211. return this.tsParsePropertyOrMethodSignature(node, readonly);
  30212. };
  30213. _proto.tsParseTypeLiteral = function tsParseTypeLiteral() {
  30214. var node = this.startNode();
  30215. node.members = this.tsParseObjectTypeMembers();
  30216. return this.finishNode(node, "TSTypeLiteral");
  30217. };
  30218. _proto.tsParseObjectTypeMembers = function tsParseObjectTypeMembers() {
  30219. this.expect(types.braceL);
  30220. var members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this));
  30221. this.expect(types.braceR);
  30222. return members;
  30223. };
  30224. _proto.tsIsStartOfMappedType = function tsIsStartOfMappedType() {
  30225. this.next();
  30226. if (this.eat(types.plusMin)) {
  30227. return this.isContextual("readonly");
  30228. }
  30229. if (this.isContextual("readonly")) {
  30230. this.next();
  30231. }
  30232. if (!this.match(types.bracketL)) {
  30233. return false;
  30234. }
  30235. this.next();
  30236. if (!this.tsIsIdentifier()) {
  30237. return false;
  30238. }
  30239. this.next();
  30240. return this.match(types._in);
  30241. };
  30242. _proto.tsParseMappedTypeParameter = function tsParseMappedTypeParameter() {
  30243. var node = this.startNode();
  30244. node.name = this.parseIdentifierName(node.start);
  30245. node.constraint = this.tsExpectThenParseType(types._in);
  30246. return this.finishNode(node, "TSTypeParameter");
  30247. };
  30248. _proto.tsParseMappedType = function tsParseMappedType() {
  30249. var node = this.startNode();
  30250. this.expect(types.braceL);
  30251. if (this.match(types.plusMin)) {
  30252. node.readonly = this.state.value;
  30253. this.next();
  30254. this.expectContextual("readonly");
  30255. } else if (this.eatContextual("readonly")) {
  30256. node.readonly = true;
  30257. }
  30258. this.expect(types.bracketL);
  30259. node.typeParameter = this.tsParseMappedTypeParameter();
  30260. this.expect(types.bracketR);
  30261. if (this.match(types.plusMin)) {
  30262. node.optional = this.state.value;
  30263. this.next();
  30264. this.expect(types.question);
  30265. } else if (this.eat(types.question)) {
  30266. node.optional = true;
  30267. }
  30268. node.typeAnnotation = this.tsTryParseType();
  30269. this.semicolon();
  30270. this.expect(types.braceR);
  30271. return this.finishNode(node, "TSMappedType");
  30272. };
  30273. _proto.tsParseTupleType = function tsParseTupleType() {
  30274. var _this2 = this;
  30275. var node = this.startNode();
  30276. node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false);
  30277. var seenOptionalElement = false;
  30278. node.elementTypes.forEach(function (elementNode) {
  30279. if (elementNode.type === "TSOptionalType") {
  30280. seenOptionalElement = true;
  30281. } else if (seenOptionalElement && elementNode.type !== "TSRestType") {
  30282. _this2.raise(elementNode.start, "A required element cannot follow an optional element.");
  30283. }
  30284. });
  30285. return this.finishNode(node, "TSTupleType");
  30286. };
  30287. _proto.tsParseTupleElementType = function tsParseTupleElementType() {
  30288. if (this.match(types.ellipsis)) {
  30289. var restNode = this.startNode();
  30290. this.next();
  30291. restNode.typeAnnotation = this.tsParseType();
  30292. if (this.match(types.comma) && this.lookaheadCharCode() !== 93) {
  30293. this.raiseRestNotLast(this.state.start);
  30294. }
  30295. return this.finishNode(restNode, "TSRestType");
  30296. }
  30297. var type = this.tsParseType();
  30298. if (this.eat(types.question)) {
  30299. var optionalTypeNode = this.startNodeAtNode(type);
  30300. optionalTypeNode.typeAnnotation = type;
  30301. return this.finishNode(optionalTypeNode, "TSOptionalType");
  30302. }
  30303. return type;
  30304. };
  30305. _proto.tsParseParenthesizedType = function tsParseParenthesizedType() {
  30306. var node = this.startNode();
  30307. this.expect(types.parenL);
  30308. node.typeAnnotation = this.tsParseType();
  30309. this.expect(types.parenR);
  30310. return this.finishNode(node, "TSParenthesizedType");
  30311. };
  30312. _proto.tsParseFunctionOrConstructorType = function tsParseFunctionOrConstructorType(type) {
  30313. var node = this.startNode();
  30314. if (type === "TSConstructorType") {
  30315. this.expect(types._new);
  30316. }
  30317. this.tsFillSignature(types.arrow, node);
  30318. return this.finishNode(node, type);
  30319. };
  30320. _proto.tsParseLiteralTypeNode = function tsParseLiteralTypeNode() {
  30321. var _this3 = this;
  30322. var node = this.startNode();
  30323. node.literal = function () {
  30324. switch (_this3.state.type) {
  30325. case types.num:
  30326. case types.string:
  30327. case types._true:
  30328. case types._false:
  30329. return _this3.parseExprAtom();
  30330. default:
  30331. throw _this3.unexpected();
  30332. }
  30333. }();
  30334. return this.finishNode(node, "TSLiteralType");
  30335. };
  30336. _proto.tsParseTemplateLiteralType = function tsParseTemplateLiteralType() {
  30337. var node = this.startNode();
  30338. var templateNode = this.parseTemplate(false);
  30339. if (templateNode.expressions.length > 0) {
  30340. this.raise(templateNode.expressions[0].start, "Template literal types cannot have any substitution");
  30341. }
  30342. node.literal = templateNode;
  30343. return this.finishNode(node, "TSLiteralType");
  30344. };
  30345. _proto.tsParseThisTypeOrThisTypePredicate = function tsParseThisTypeOrThisTypePredicate() {
  30346. var thisKeyword = this.tsParseThisTypeNode();
  30347. if (this.isContextual("is") && !this.hasPrecedingLineBreak()) {
  30348. return this.tsParseThisTypePredicate(thisKeyword);
  30349. } else {
  30350. return thisKeyword;
  30351. }
  30352. };
  30353. _proto.tsParseNonArrayType = function tsParseNonArrayType() {
  30354. switch (this.state.type) {
  30355. case types.name:
  30356. case types._void:
  30357. case types._null:
  30358. {
  30359. var type = this.match(types._void) ? "TSVoidKeyword" : this.match(types._null) ? "TSNullKeyword" : keywordTypeFromName(this.state.value);
  30360. if (type !== undefined && this.lookaheadCharCode() !== 46) {
  30361. var node = this.startNode();
  30362. this.next();
  30363. return this.finishNode(node, type);
  30364. }
  30365. return this.tsParseTypeReference();
  30366. }
  30367. case types.string:
  30368. case types.num:
  30369. case types._true:
  30370. case types._false:
  30371. return this.tsParseLiteralTypeNode();
  30372. case types.plusMin:
  30373. if (this.state.value === "-") {
  30374. var _node = this.startNode();
  30375. if (this.lookahead().type !== types.num) {
  30376. throw this.unexpected();
  30377. }
  30378. _node.literal = this.parseMaybeUnary();
  30379. return this.finishNode(_node, "TSLiteralType");
  30380. }
  30381. break;
  30382. case types._this:
  30383. return this.tsParseThisTypeOrThisTypePredicate();
  30384. case types._typeof:
  30385. return this.tsParseTypeQuery();
  30386. case types._import:
  30387. return this.tsParseImportType();
  30388. case types.braceL:
  30389. return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral();
  30390. case types.bracketL:
  30391. return this.tsParseTupleType();
  30392. case types.parenL:
  30393. return this.tsParseParenthesizedType();
  30394. case types.backQuote:
  30395. return this.tsParseTemplateLiteralType();
  30396. }
  30397. throw this.unexpected();
  30398. };
  30399. _proto.tsParseArrayTypeOrHigher = function tsParseArrayTypeOrHigher() {
  30400. var type = this.tsParseNonArrayType();
  30401. while (!this.hasPrecedingLineBreak() && this.eat(types.bracketL)) {
  30402. if (this.match(types.bracketR)) {
  30403. var node = this.startNodeAtNode(type);
  30404. node.elementType = type;
  30405. this.expect(types.bracketR);
  30406. type = this.finishNode(node, "TSArrayType");
  30407. } else {
  30408. var _node2 = this.startNodeAtNode(type);
  30409. _node2.objectType = type;
  30410. _node2.indexType = this.tsParseType();
  30411. this.expect(types.bracketR);
  30412. type = this.finishNode(_node2, "TSIndexedAccessType");
  30413. }
  30414. }
  30415. return type;
  30416. };
  30417. _proto.tsParseTypeOperator = function tsParseTypeOperator(operator) {
  30418. var node = this.startNode();
  30419. this.expectContextual(operator);
  30420. node.operator = operator;
  30421. node.typeAnnotation = this.tsParseTypeOperatorOrHigher();
  30422. if (operator === "readonly") {
  30423. this.tsCheckTypeAnnotationForReadOnly(node);
  30424. }
  30425. return this.finishNode(node, "TSTypeOperator");
  30426. };
  30427. _proto.tsCheckTypeAnnotationForReadOnly = function tsCheckTypeAnnotationForReadOnly(node) {
  30428. switch (node.typeAnnotation.type) {
  30429. case "TSTupleType":
  30430. case "TSArrayType":
  30431. return;
  30432. default:
  30433. this.raise(node.start, "'readonly' type modifier is only permitted on array and tuple literal types.");
  30434. }
  30435. };
  30436. _proto.tsParseInferType = function tsParseInferType() {
  30437. var node = this.startNode();
  30438. this.expectContextual("infer");
  30439. var typeParameter = this.startNode();
  30440. typeParameter.name = this.parseIdentifierName(typeParameter.start);
  30441. node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter");
  30442. return this.finishNode(node, "TSInferType");
  30443. };
  30444. _proto.tsParseTypeOperatorOrHigher = function tsParseTypeOperatorOrHigher() {
  30445. var _this4 = this;
  30446. var operator = ["keyof", "unique", "readonly"].find(function (kw) {
  30447. return _this4.isContextual(kw);
  30448. });
  30449. return operator ? this.tsParseTypeOperator(operator) : this.isContextual("infer") ? this.tsParseInferType() : this.tsParseArrayTypeOrHigher();
  30450. };
  30451. _proto.tsParseUnionOrIntersectionType = function tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
  30452. this.eat(operator);
  30453. var type = parseConstituentType();
  30454. if (this.match(operator)) {
  30455. var types = [type];
  30456. while (this.eat(operator)) {
  30457. types.push(parseConstituentType());
  30458. }
  30459. var node = this.startNodeAtNode(type);
  30460. node.types = types;
  30461. type = this.finishNode(node, kind);
  30462. }
  30463. return type;
  30464. };
  30465. _proto.tsParseIntersectionTypeOrHigher = function tsParseIntersectionTypeOrHigher() {
  30466. return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), types.bitwiseAND);
  30467. };
  30468. _proto.tsParseUnionTypeOrHigher = function tsParseUnionTypeOrHigher() {
  30469. return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), types.bitwiseOR);
  30470. };
  30471. _proto.tsIsStartOfFunctionType = function tsIsStartOfFunctionType() {
  30472. if (this.isRelational("<")) {
  30473. return true;
  30474. }
  30475. return this.match(types.parenL) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this));
  30476. };
  30477. _proto.tsSkipParameterStart = function tsSkipParameterStart() {
  30478. if (this.match(types.name) || this.match(types._this)) {
  30479. this.next();
  30480. return true;
  30481. }
  30482. if (this.match(types.braceL)) {
  30483. var braceStackCounter = 1;
  30484. this.next();
  30485. while (braceStackCounter > 0) {
  30486. if (this.match(types.braceL)) {
  30487. ++braceStackCounter;
  30488. } else if (this.match(types.braceR)) {
  30489. --braceStackCounter;
  30490. }
  30491. this.next();
  30492. }
  30493. return true;
  30494. }
  30495. if (this.match(types.bracketL)) {
  30496. var _braceStackCounter = 1;
  30497. this.next();
  30498. while (_braceStackCounter > 0) {
  30499. if (this.match(types.bracketL)) {
  30500. ++_braceStackCounter;
  30501. } else if (this.match(types.bracketR)) {
  30502. --_braceStackCounter;
  30503. }
  30504. this.next();
  30505. }
  30506. return true;
  30507. }
  30508. return false;
  30509. };
  30510. _proto.tsIsUnambiguouslyStartOfFunctionType = function tsIsUnambiguouslyStartOfFunctionType() {
  30511. this.next();
  30512. if (this.match(types.parenR) || this.match(types.ellipsis)) {
  30513. return true;
  30514. }
  30515. if (this.tsSkipParameterStart()) {
  30516. if (this.match(types.colon) || this.match(types.comma) || this.match(types.question) || this.match(types.eq)) {
  30517. return true;
  30518. }
  30519. if (this.match(types.parenR)) {
  30520. this.next();
  30521. if (this.match(types.arrow)) {
  30522. return true;
  30523. }
  30524. }
  30525. }
  30526. return false;
  30527. };
  30528. _proto.tsParseTypeOrTypePredicateAnnotation = function tsParseTypeOrTypePredicateAnnotation(returnToken) {
  30529. var _this5 = this;
  30530. return this.tsInType(function () {
  30531. var t = _this5.startNode();
  30532. _this5.expect(returnToken);
  30533. var asserts = _this5.tsTryParse(_this5.tsParseTypePredicateAsserts.bind(_this5));
  30534. if (asserts && _this5.match(types._this)) {
  30535. var thisTypePredicate = _this5.tsParseThisTypeOrThisTypePredicate();
  30536. if (thisTypePredicate.type === "TSThisType") {
  30537. var _node3 = _this5.startNodeAtNode(t);
  30538. _node3.parameterName = thisTypePredicate;
  30539. _node3.asserts = true;
  30540. thisTypePredicate = _this5.finishNode(_node3, "TSTypePredicate");
  30541. } else {
  30542. thisTypePredicate.asserts = true;
  30543. }
  30544. t.typeAnnotation = thisTypePredicate;
  30545. return _this5.finishNode(t, "TSTypeAnnotation");
  30546. }
  30547. var typePredicateVariable = _this5.tsIsIdentifier() && _this5.tsTryParse(_this5.tsParseTypePredicatePrefix.bind(_this5));
  30548. if (!typePredicateVariable) {
  30549. if (!asserts) {
  30550. return _this5.tsParseTypeAnnotation(false, t);
  30551. }
  30552. var _node4 = _this5.startNodeAtNode(t);
  30553. _node4.parameterName = _this5.parseIdentifier();
  30554. _node4.asserts = asserts;
  30555. t.typeAnnotation = _this5.finishNode(_node4, "TSTypePredicate");
  30556. return _this5.finishNode(t, "TSTypeAnnotation");
  30557. }
  30558. var type = _this5.tsParseTypeAnnotation(false);
  30559. var node = _this5.startNodeAtNode(t);
  30560. node.parameterName = typePredicateVariable;
  30561. node.typeAnnotation = type;
  30562. node.asserts = asserts;
  30563. t.typeAnnotation = _this5.finishNode(node, "TSTypePredicate");
  30564. return _this5.finishNode(t, "TSTypeAnnotation");
  30565. });
  30566. };
  30567. _proto.tsTryParseTypeOrTypePredicateAnnotation = function tsTryParseTypeOrTypePredicateAnnotation() {
  30568. return this.match(types.colon) ? this.tsParseTypeOrTypePredicateAnnotation(types.colon) : undefined;
  30569. };
  30570. _proto.tsTryParseTypeAnnotation = function tsTryParseTypeAnnotation() {
  30571. return this.match(types.colon) ? this.tsParseTypeAnnotation() : undefined;
  30572. };
  30573. _proto.tsTryParseType = function tsTryParseType() {
  30574. return this.tsEatThenParseType(types.colon);
  30575. };
  30576. _proto.tsParseTypePredicatePrefix = function tsParseTypePredicatePrefix() {
  30577. var id = this.parseIdentifier();
  30578. if (this.isContextual("is") && !this.hasPrecedingLineBreak()) {
  30579. this.next();
  30580. return id;
  30581. }
  30582. };
  30583. _proto.tsParseTypePredicateAsserts = function tsParseTypePredicateAsserts() {
  30584. if (!this.match(types.name) || this.state.value !== "asserts" || this.hasPrecedingLineBreak()) {
  30585. return false;
  30586. }
  30587. var containsEsc = this.state.containsEsc;
  30588. this.next();
  30589. if (!this.match(types.name) && !this.match(types._this)) {
  30590. return false;
  30591. }
  30592. if (containsEsc) {
  30593. this.raise(this.state.lastTokStart, "Escape sequence in keyword asserts");
  30594. }
  30595. return true;
  30596. };
  30597. _proto.tsParseTypeAnnotation = function tsParseTypeAnnotation(eatColon, t) {
  30598. var _this6 = this;
  30599. if (eatColon === void 0) {
  30600. eatColon = true;
  30601. }
  30602. if (t === void 0) {
  30603. t = this.startNode();
  30604. }
  30605. this.tsInType(function () {
  30606. if (eatColon) _this6.expect(types.colon);
  30607. t.typeAnnotation = _this6.tsParseType();
  30608. });
  30609. return this.finishNode(t, "TSTypeAnnotation");
  30610. };
  30611. _proto.tsParseType = function tsParseType() {
  30612. assert$1(this.state.inType);
  30613. var type = this.tsParseNonConditionalType();
  30614. if (this.hasPrecedingLineBreak() || !this.eat(types._extends)) {
  30615. return type;
  30616. }
  30617. var node = this.startNodeAtNode(type);
  30618. node.checkType = type;
  30619. node.extendsType = this.tsParseNonConditionalType();
  30620. this.expect(types.question);
  30621. node.trueType = this.tsParseType();
  30622. this.expect(types.colon);
  30623. node.falseType = this.tsParseType();
  30624. return this.finishNode(node, "TSConditionalType");
  30625. };
  30626. _proto.tsParseNonConditionalType = function tsParseNonConditionalType() {
  30627. if (this.tsIsStartOfFunctionType()) {
  30628. return this.tsParseFunctionOrConstructorType("TSFunctionType");
  30629. }
  30630. if (this.match(types._new)) {
  30631. return this.tsParseFunctionOrConstructorType("TSConstructorType");
  30632. }
  30633. return this.tsParseUnionTypeOrHigher();
  30634. };
  30635. _proto.tsParseTypeAssertion = function tsParseTypeAssertion() {
  30636. var node = this.startNode();
  30637. var _const = this.tsTryNextParseConstantContext();
  30638. node.typeAnnotation = _const || this.tsNextThenParseType();
  30639. this.expectRelational(">");
  30640. node.expression = this.parseMaybeUnary();
  30641. return this.finishNode(node, "TSTypeAssertion");
  30642. };
  30643. _proto.tsParseHeritageClause = function tsParseHeritageClause(descriptor) {
  30644. var originalStart = this.state.start;
  30645. var delimitedList = this.tsParseDelimitedList("HeritageClauseElement", this.tsParseExpressionWithTypeArguments.bind(this));
  30646. if (!delimitedList.length) {
  30647. this.raise(originalStart, "'" + descriptor + "' list cannot be empty.");
  30648. }
  30649. return delimitedList;
  30650. };
  30651. _proto.tsParseExpressionWithTypeArguments = function tsParseExpressionWithTypeArguments() {
  30652. var node = this.startNode();
  30653. node.expression = this.tsParseEntityName(false);
  30654. if (this.isRelational("<")) {
  30655. node.typeParameters = this.tsParseTypeArguments();
  30656. }
  30657. return this.finishNode(node, "TSExpressionWithTypeArguments");
  30658. };
  30659. _proto.tsParseInterfaceDeclaration = function tsParseInterfaceDeclaration(node) {
  30660. node.id = this.parseIdentifier();
  30661. this.checkLVal(node.id, BIND_TS_INTERFACE, undefined, "typescript interface declaration");
  30662. node.typeParameters = this.tsTryParseTypeParameters();
  30663. if (this.eat(types._extends)) {
  30664. node["extends"] = this.tsParseHeritageClause("extends");
  30665. }
  30666. var body = this.startNode();
  30667. body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this));
  30668. node.body = this.finishNode(body, "TSInterfaceBody");
  30669. return this.finishNode(node, "TSInterfaceDeclaration");
  30670. };
  30671. _proto.tsParseTypeAliasDeclaration = function tsParseTypeAliasDeclaration(node) {
  30672. node.id = this.parseIdentifier();
  30673. this.checkLVal(node.id, BIND_TS_TYPE, undefined, "typescript type alias");
  30674. node.typeParameters = this.tsTryParseTypeParameters();
  30675. node.typeAnnotation = this.tsExpectThenParseType(types.eq);
  30676. this.semicolon();
  30677. return this.finishNode(node, "TSTypeAliasDeclaration");
  30678. };
  30679. _proto.tsInNoContext = function tsInNoContext(cb) {
  30680. var oldContext = this.state.context;
  30681. this.state.context = [oldContext[0]];
  30682. try {
  30683. return cb();
  30684. } finally {
  30685. this.state.context = oldContext;
  30686. }
  30687. };
  30688. _proto.tsInType = function tsInType(cb) {
  30689. var oldInType = this.state.inType;
  30690. this.state.inType = true;
  30691. try {
  30692. return cb();
  30693. } finally {
  30694. this.state.inType = oldInType;
  30695. }
  30696. };
  30697. _proto.tsEatThenParseType = function tsEatThenParseType(token) {
  30698. return !this.match(token) ? undefined : this.tsNextThenParseType();
  30699. };
  30700. _proto.tsExpectThenParseType = function tsExpectThenParseType(token) {
  30701. var _this7 = this;
  30702. return this.tsDoThenParseType(function () {
  30703. return _this7.expect(token);
  30704. });
  30705. };
  30706. _proto.tsNextThenParseType = function tsNextThenParseType() {
  30707. var _this8 = this;
  30708. return this.tsDoThenParseType(function () {
  30709. return _this8.next();
  30710. });
  30711. };
  30712. _proto.tsDoThenParseType = function tsDoThenParseType(cb) {
  30713. var _this9 = this;
  30714. return this.tsInType(function () {
  30715. cb();
  30716. return _this9.tsParseType();
  30717. });
  30718. };
  30719. _proto.tsParseEnumMember = function tsParseEnumMember() {
  30720. var node = this.startNode();
  30721. node.id = this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true);
  30722. if (this.eat(types.eq)) {
  30723. node.initializer = this.parseMaybeAssign();
  30724. }
  30725. return this.finishNode(node, "TSEnumMember");
  30726. };
  30727. _proto.tsParseEnumDeclaration = function tsParseEnumDeclaration(node, isConst) {
  30728. if (isConst) node["const"] = true;
  30729. node.id = this.parseIdentifier();
  30730. this.checkLVal(node.id, isConst ? BIND_TS_CONST_ENUM : BIND_TS_ENUM, undefined, "typescript enum declaration");
  30731. this.expect(types.braceL);
  30732. node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this));
  30733. this.expect(types.braceR);
  30734. return this.finishNode(node, "TSEnumDeclaration");
  30735. };
  30736. _proto.tsParseModuleBlock = function tsParseModuleBlock() {
  30737. var node = this.startNode();
  30738. this.scope.enter(SCOPE_OTHER);
  30739. this.expect(types.braceL);
  30740. this.parseBlockOrModuleBlockBody(node.body = [], undefined, true, types.braceR);
  30741. this.scope.exit();
  30742. return this.finishNode(node, "TSModuleBlock");
  30743. };
  30744. _proto.tsParseModuleOrNamespaceDeclaration = function tsParseModuleOrNamespaceDeclaration(node, nested) {
  30745. if (nested === void 0) {
  30746. nested = false;
  30747. }
  30748. node.id = this.parseIdentifier();
  30749. if (!nested) {
  30750. this.checkLVal(node.id, BIND_TS_NAMESPACE, null, "module or namespace declaration");
  30751. }
  30752. if (this.eat(types.dot)) {
  30753. var inner = this.startNode();
  30754. this.tsParseModuleOrNamespaceDeclaration(inner, true);
  30755. node.body = inner;
  30756. } else {
  30757. this.scope.enter(SCOPE_TS_MODULE);
  30758. node.body = this.tsParseModuleBlock();
  30759. this.scope.exit();
  30760. }
  30761. return this.finishNode(node, "TSModuleDeclaration");
  30762. };
  30763. _proto.tsParseAmbientExternalModuleDeclaration = function tsParseAmbientExternalModuleDeclaration(node) {
  30764. if (this.isContextual("global")) {
  30765. node.global = true;
  30766. node.id = this.parseIdentifier();
  30767. } else if (this.match(types.string)) {
  30768. node.id = this.parseExprAtom();
  30769. } else {
  30770. this.unexpected();
  30771. }
  30772. if (this.match(types.braceL)) {
  30773. this.scope.enter(SCOPE_TS_MODULE);
  30774. node.body = this.tsParseModuleBlock();
  30775. this.scope.exit();
  30776. } else {
  30777. this.semicolon();
  30778. }
  30779. return this.finishNode(node, "TSModuleDeclaration");
  30780. };
  30781. _proto.tsParseImportEqualsDeclaration = function tsParseImportEqualsDeclaration(node, isExport) {
  30782. node.isExport = isExport || false;
  30783. node.id = this.parseIdentifier();
  30784. this.checkLVal(node.id, BIND_LEXICAL, undefined, "import equals declaration");
  30785. this.expect(types.eq);
  30786. node.moduleReference = this.tsParseModuleReference();
  30787. this.semicolon();
  30788. return this.finishNode(node, "TSImportEqualsDeclaration");
  30789. };
  30790. _proto.tsIsExternalModuleReference = function tsIsExternalModuleReference() {
  30791. return this.isContextual("require") && this.lookaheadCharCode() === 40;
  30792. };
  30793. _proto.tsParseModuleReference = function tsParseModuleReference() {
  30794. return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false);
  30795. };
  30796. _proto.tsParseExternalModuleReference = function tsParseExternalModuleReference() {
  30797. var node = this.startNode();
  30798. this.expectContextual("require");
  30799. this.expect(types.parenL);
  30800. if (!this.match(types.string)) {
  30801. throw this.unexpected();
  30802. }
  30803. node.expression = this.parseExprAtom();
  30804. this.expect(types.parenR);
  30805. return this.finishNode(node, "TSExternalModuleReference");
  30806. };
  30807. _proto.tsLookAhead = function tsLookAhead(f) {
  30808. var state = this.state.clone();
  30809. var res = f();
  30810. this.state = state;
  30811. return res;
  30812. };
  30813. _proto.tsTryParseAndCatch = function tsTryParseAndCatch(f) {
  30814. var result = this.tryParse(function (abort) {
  30815. return f() || abort();
  30816. });
  30817. if (result.aborted || !result.node) return undefined;
  30818. if (result.error) this.state = result.failState;
  30819. return result.node;
  30820. };
  30821. _proto.tsTryParse = function tsTryParse(f) {
  30822. var state = this.state.clone();
  30823. var result = f();
  30824. if (result !== undefined && result !== false) {
  30825. return result;
  30826. } else {
  30827. this.state = state;
  30828. return undefined;
  30829. }
  30830. };
  30831. _proto.tsTryParseDeclare = function tsTryParseDeclare(nany) {
  30832. if (this.isLineTerminator()) {
  30833. return;
  30834. }
  30835. var starttype = this.state.type;
  30836. var kind;
  30837. if (this.isContextual("let")) {
  30838. starttype = types._var;
  30839. kind = "let";
  30840. }
  30841. switch (starttype) {
  30842. case types._function:
  30843. return this.parseFunctionStatement(nany, false, true);
  30844. case types._class:
  30845. nany.declare = true;
  30846. return this.parseClass(nany, true, false);
  30847. case types._const:
  30848. if (this.match(types._const) && this.isLookaheadContextual("enum")) {
  30849. this.expect(types._const);
  30850. this.expectContextual("enum");
  30851. return this.tsParseEnumDeclaration(nany, true);
  30852. }
  30853. case types._var:
  30854. kind = kind || this.state.value;
  30855. return this.parseVarStatement(nany, kind);
  30856. case types.name:
  30857. {
  30858. var value = this.state.value;
  30859. if (value === "global") {
  30860. return this.tsParseAmbientExternalModuleDeclaration(nany);
  30861. } else {
  30862. return this.tsParseDeclaration(nany, value, true);
  30863. }
  30864. }
  30865. }
  30866. };
  30867. _proto.tsTryParseExportDeclaration = function tsTryParseExportDeclaration() {
  30868. return this.tsParseDeclaration(this.startNode(), this.state.value, true);
  30869. };
  30870. _proto.tsParseExpressionStatement = function tsParseExpressionStatement(node, expr) {
  30871. switch (expr.name) {
  30872. case "declare":
  30873. {
  30874. var declaration = this.tsTryParseDeclare(node);
  30875. if (declaration) {
  30876. declaration.declare = true;
  30877. return declaration;
  30878. }
  30879. break;
  30880. }
  30881. case "global":
  30882. if (this.match(types.braceL)) {
  30883. this.scope.enter(SCOPE_TS_MODULE);
  30884. var mod = node;
  30885. mod.global = true;
  30886. mod.id = expr;
  30887. mod.body = this.tsParseModuleBlock();
  30888. this.scope.exit();
  30889. return this.finishNode(mod, "TSModuleDeclaration");
  30890. }
  30891. break;
  30892. default:
  30893. return this.tsParseDeclaration(node, expr.name, false);
  30894. }
  30895. };
  30896. _proto.tsParseDeclaration = function tsParseDeclaration(node, value, next) {
  30897. switch (value) {
  30898. case "abstract":
  30899. if (this.tsCheckLineTerminatorAndMatch(types._class, next)) {
  30900. var cls = node;
  30901. cls["abstract"] = true;
  30902. if (next) {
  30903. this.next();
  30904. if (!this.match(types._class)) {
  30905. this.unexpected(null, types._class);
  30906. }
  30907. }
  30908. return this.parseClass(cls, true, false);
  30909. }
  30910. break;
  30911. case "enum":
  30912. if (next || this.match(types.name)) {
  30913. if (next) this.next();
  30914. return this.tsParseEnumDeclaration(node, false);
  30915. }
  30916. break;
  30917. case "interface":
  30918. if (this.tsCheckLineTerminatorAndMatch(types.name, next)) {
  30919. if (next) this.next();
  30920. return this.tsParseInterfaceDeclaration(node);
  30921. }
  30922. break;
  30923. case "module":
  30924. if (next) this.next();
  30925. if (this.match(types.string)) {
  30926. return this.tsParseAmbientExternalModuleDeclaration(node);
  30927. } else if (this.tsCheckLineTerminatorAndMatch(types.name, next)) {
  30928. return this.tsParseModuleOrNamespaceDeclaration(node);
  30929. }
  30930. break;
  30931. case "namespace":
  30932. if (this.tsCheckLineTerminatorAndMatch(types.name, next)) {
  30933. if (next) this.next();
  30934. return this.tsParseModuleOrNamespaceDeclaration(node);
  30935. }
  30936. break;
  30937. case "type":
  30938. if (this.tsCheckLineTerminatorAndMatch(types.name, next)) {
  30939. if (next) this.next();
  30940. return this.tsParseTypeAliasDeclaration(node);
  30941. }
  30942. break;
  30943. }
  30944. };
  30945. _proto.tsCheckLineTerminatorAndMatch = function tsCheckLineTerminatorAndMatch(tokenType, next) {
  30946. return (next || this.match(tokenType)) && !this.isLineTerminator();
  30947. };
  30948. _proto.tsTryParseGenericAsyncArrowFunction = function tsTryParseGenericAsyncArrowFunction(startPos, startLoc) {
  30949. var _this10 = this;
  30950. if (!this.isRelational("<")) {
  30951. return undefined;
  30952. }
  30953. var res = this.tsTryParseAndCatch(function () {
  30954. var node = _this10.startNodeAt(startPos, startLoc);
  30955. node.typeParameters = _this10.tsParseTypeParameters();
  30956. _superClass.prototype.parseFunctionParams.call(_this10, node);
  30957. node.returnType = _this10.tsTryParseTypeOrTypePredicateAnnotation();
  30958. _this10.expect(types.arrow);
  30959. return node;
  30960. });
  30961. if (!res) {
  30962. return undefined;
  30963. }
  30964. return this.parseArrowExpression(res, null, true);
  30965. };
  30966. _proto.tsParseTypeArguments = function tsParseTypeArguments() {
  30967. var _this11 = this;
  30968. var node = this.startNode();
  30969. node.params = this.tsInType(function () {
  30970. return _this11.tsInNoContext(function () {
  30971. _this11.expectRelational("<");
  30972. return _this11.tsParseDelimitedList("TypeParametersOrArguments", _this11.tsParseType.bind(_this11));
  30973. });
  30974. });
  30975. this.state.exprAllowed = false;
  30976. this.expectRelational(">");
  30977. return this.finishNode(node, "TSTypeParameterInstantiation");
  30978. };
  30979. _proto.tsIsDeclarationStart = function tsIsDeclarationStart() {
  30980. if (this.match(types.name)) {
  30981. switch (this.state.value) {
  30982. case "abstract":
  30983. case "declare":
  30984. case "enum":
  30985. case "interface":
  30986. case "module":
  30987. case "namespace":
  30988. case "type":
  30989. return true;
  30990. }
  30991. }
  30992. return false;
  30993. };
  30994. _proto.isExportDefaultSpecifier = function isExportDefaultSpecifier() {
  30995. if (this.tsIsDeclarationStart()) return false;
  30996. return _superClass.prototype.isExportDefaultSpecifier.call(this);
  30997. };
  30998. _proto.parseAssignableListItem = function parseAssignableListItem(allowModifiers, decorators) {
  30999. var startPos = this.state.start;
  31000. var startLoc = this.state.startLoc;
  31001. var accessibility;
  31002. var readonly = false;
  31003. if (allowModifiers) {
  31004. accessibility = this.parseAccessModifier();
  31005. readonly = !!this.tsParseModifier(["readonly"]);
  31006. }
  31007. var left = this.parseMaybeDefault();
  31008. this.parseAssignableListItemTypes(left);
  31009. var elt = this.parseMaybeDefault(left.start, left.loc.start, left);
  31010. if (accessibility || readonly) {
  31011. var pp = this.startNodeAt(startPos, startLoc);
  31012. if (decorators.length) {
  31013. pp.decorators = decorators;
  31014. }
  31015. if (accessibility) pp.accessibility = accessibility;
  31016. if (readonly) pp.readonly = readonly;
  31017. if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") {
  31018. this.raise(pp.start, "A parameter property may not be declared using a binding pattern.");
  31019. }
  31020. pp.parameter = elt;
  31021. return this.finishNode(pp, "TSParameterProperty");
  31022. }
  31023. if (decorators.length) {
  31024. left.decorators = decorators;
  31025. }
  31026. return elt;
  31027. };
  31028. _proto.parseFunctionBodyAndFinish = function parseFunctionBodyAndFinish(node, type, isMethod) {
  31029. if (isMethod === void 0) {
  31030. isMethod = false;
  31031. }
  31032. if (this.match(types.colon)) {
  31033. node.returnType = this.tsParseTypeOrTypePredicateAnnotation(types.colon);
  31034. }
  31035. var bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" ? "TSDeclareMethod" : undefined;
  31036. if (bodilessType && !this.match(types.braceL) && this.isLineTerminator()) {
  31037. this.finishNode(node, bodilessType);
  31038. return;
  31039. }
  31040. _superClass.prototype.parseFunctionBodyAndFinish.call(this, node, type, isMethod);
  31041. };
  31042. _proto.registerFunctionStatementId = function registerFunctionStatementId(node) {
  31043. if (!node.body && node.id) {
  31044. this.checkLVal(node.id, BIND_TS_AMBIENT, null, "function name");
  31045. } else {
  31046. _superClass.prototype.registerFunctionStatementId.apply(this, arguments);
  31047. }
  31048. };
  31049. _proto.parseSubscript = function parseSubscript(base, startPos, startLoc, noCalls, state) {
  31050. var _this12 = this;
  31051. if (!this.hasPrecedingLineBreak() && this.match(types.bang)) {
  31052. this.state.exprAllowed = false;
  31053. this.next();
  31054. var nonNullExpression = this.startNodeAt(startPos, startLoc);
  31055. nonNullExpression.expression = base;
  31056. return this.finishNode(nonNullExpression, "TSNonNullExpression");
  31057. }
  31058. if (this.isRelational("<")) {
  31059. var result = this.tsTryParseAndCatch(function () {
  31060. if (!noCalls && _this12.atPossibleAsync(base)) {
  31061. var asyncArrowFn = _this12.tsTryParseGenericAsyncArrowFunction(startPos, startLoc);
  31062. if (asyncArrowFn) {
  31063. return asyncArrowFn;
  31064. }
  31065. }
  31066. var node = _this12.startNodeAt(startPos, startLoc);
  31067. node.callee = base;
  31068. var typeArguments = _this12.tsParseTypeArguments();
  31069. if (typeArguments) {
  31070. if (!noCalls && _this12.eat(types.parenL)) {
  31071. node.arguments = _this12.parseCallExpressionArguments(types.parenR, false);
  31072. node.typeParameters = typeArguments;
  31073. return _this12.finishCallExpression(node, state.optionalChainMember);
  31074. } else if (_this12.match(types.backQuote)) {
  31075. return _this12.parseTaggedTemplateExpression(startPos, startLoc, base, state, typeArguments);
  31076. }
  31077. }
  31078. _this12.unexpected();
  31079. });
  31080. if (result) return result;
  31081. }
  31082. return _superClass.prototype.parseSubscript.call(this, base, startPos, startLoc, noCalls, state);
  31083. };
  31084. _proto.parseNewArguments = function parseNewArguments(node) {
  31085. var _this13 = this;
  31086. if (this.isRelational("<")) {
  31087. var typeParameters = this.tsTryParseAndCatch(function () {
  31088. var args = _this13.tsParseTypeArguments();
  31089. if (!_this13.match(types.parenL)) _this13.unexpected();
  31090. return args;
  31091. });
  31092. if (typeParameters) {
  31093. node.typeParameters = typeParameters;
  31094. }
  31095. }
  31096. _superClass.prototype.parseNewArguments.call(this, node);
  31097. };
  31098. _proto.parseExprOp = function parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn) {
  31099. if (nonNull(types._in.binop) > minPrec && !this.hasPrecedingLineBreak() && this.isContextual("as")) {
  31100. var node = this.startNodeAt(leftStartPos, leftStartLoc);
  31101. node.expression = left;
  31102. var _const = this.tsTryNextParseConstantContext();
  31103. if (_const) {
  31104. node.typeAnnotation = _const;
  31105. } else {
  31106. node.typeAnnotation = this.tsNextThenParseType();
  31107. }
  31108. this.finishNode(node, "TSAsExpression");
  31109. return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn);
  31110. }
  31111. return _superClass.prototype.parseExprOp.call(this, left, leftStartPos, leftStartLoc, minPrec, noIn);
  31112. };
  31113. _proto.checkReservedWord = function checkReservedWord(word, startLoc, checkKeywords, isBinding) {};
  31114. _proto.checkDuplicateExports = function checkDuplicateExports() {};
  31115. _proto.parseImport = function parseImport(node) {
  31116. if (this.match(types.name) && this.lookahead().type === types.eq) {
  31117. return this.tsParseImportEqualsDeclaration(node);
  31118. }
  31119. return _superClass.prototype.parseImport.call(this, node);
  31120. };
  31121. _proto.parseExport = function parseExport(node) {
  31122. if (this.match(types._import)) {
  31123. this.expect(types._import);
  31124. return this.tsParseImportEqualsDeclaration(node, true);
  31125. } else if (this.eat(types.eq)) {
  31126. var assign = node;
  31127. assign.expression = this.parseExpression();
  31128. this.semicolon();
  31129. return this.finishNode(assign, "TSExportAssignment");
  31130. } else if (this.eatContextual("as")) {
  31131. var decl = node;
  31132. this.expectContextual("namespace");
  31133. decl.id = this.parseIdentifier();
  31134. this.semicolon();
  31135. return this.finishNode(decl, "TSNamespaceExportDeclaration");
  31136. } else {
  31137. return _superClass.prototype.parseExport.call(this, node);
  31138. }
  31139. };
  31140. _proto.isAbstractClass = function isAbstractClass() {
  31141. return this.isContextual("abstract") && this.lookahead().type === types._class;
  31142. };
  31143. _proto.parseExportDefaultExpression = function parseExportDefaultExpression() {
  31144. if (this.isAbstractClass()) {
  31145. var cls = this.startNode();
  31146. this.next();
  31147. this.parseClass(cls, true, true);
  31148. cls["abstract"] = true;
  31149. return cls;
  31150. }
  31151. if (this.state.value === "interface") {
  31152. var result = this.tsParseDeclaration(this.startNode(), this.state.value, true);
  31153. if (result) return result;
  31154. }
  31155. return _superClass.prototype.parseExportDefaultExpression.call(this);
  31156. };
  31157. _proto.parseStatementContent = function parseStatementContent(context, topLevel) {
  31158. if (this.state.type === types._const) {
  31159. var ahead = this.lookahead();
  31160. if (ahead.type === types.name && ahead.value === "enum") {
  31161. var node = this.startNode();
  31162. this.expect(types._const);
  31163. this.expectContextual("enum");
  31164. return this.tsParseEnumDeclaration(node, true);
  31165. }
  31166. }
  31167. return _superClass.prototype.parseStatementContent.call(this, context, topLevel);
  31168. };
  31169. _proto.parseAccessModifier = function parseAccessModifier() {
  31170. return this.tsParseModifier(["public", "protected", "private"]);
  31171. };
  31172. _proto.parseClassMember = function parseClassMember(classBody, member, state, constructorAllowsSuper) {
  31173. var accessibility = this.parseAccessModifier();
  31174. if (accessibility) member.accessibility = accessibility;
  31175. _superClass.prototype.parseClassMember.call(this, classBody, member, state, constructorAllowsSuper);
  31176. };
  31177. _proto.parseClassMemberWithIsStatic = function parseClassMemberWithIsStatic(classBody, member, state, isStatic, constructorAllowsSuper) {
  31178. var modifiers = this.tsParseModifiers(["abstract", "readonly", "declare"]);
  31179. Object.assign(member, modifiers);
  31180. var idx = this.tsTryParseIndexSignature(member);
  31181. if (idx) {
  31182. classBody.body.push(idx);
  31183. if (modifiers["abstract"]) {
  31184. this.raise(member.start, "Index signatures cannot have the 'abstract' modifier");
  31185. }
  31186. if (isStatic) {
  31187. this.raise(member.start, "Index signatures cannot have the 'static' modifier");
  31188. }
  31189. if (member.accessibility) {
  31190. this.raise(member.start, "Index signatures cannot have an accessibility modifier ('" + member.accessibility + "')");
  31191. }
  31192. return;
  31193. }
  31194. _superClass.prototype.parseClassMemberWithIsStatic.call(this, classBody, member, state, isStatic, constructorAllowsSuper);
  31195. };
  31196. _proto.parsePostMemberNameModifiers = function parsePostMemberNameModifiers(methodOrProp) {
  31197. var optional = this.eat(types.question);
  31198. if (optional) methodOrProp.optional = true;
  31199. if (methodOrProp.readonly && this.match(types.parenL)) {
  31200. this.raise(methodOrProp.start, "Class methods cannot have the 'readonly' modifier");
  31201. }
  31202. if (methodOrProp.declare && this.match(types.parenL)) {
  31203. this.raise(methodOrProp.start, "Class methods cannot have the 'declare' modifier");
  31204. }
  31205. };
  31206. _proto.parseExpressionStatement = function parseExpressionStatement(node, expr) {
  31207. var decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr) : undefined;
  31208. return decl || _superClass.prototype.parseExpressionStatement.call(this, node, expr);
  31209. };
  31210. _proto.shouldParseExportDeclaration = function shouldParseExportDeclaration() {
  31211. if (this.tsIsDeclarationStart()) return true;
  31212. return _superClass.prototype.shouldParseExportDeclaration.call(this);
  31213. };
  31214. _proto.parseConditional = function parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) {
  31215. var _this14 = this;
  31216. if (!refNeedsArrowPos || !this.match(types.question)) {
  31217. return _superClass.prototype.parseConditional.call(this, expr, noIn, startPos, startLoc, refNeedsArrowPos);
  31218. }
  31219. var result = this.tryParse(function () {
  31220. return _superClass.prototype.parseConditional.call(_this14, expr, noIn, startPos, startLoc);
  31221. });
  31222. if (!result.node) {
  31223. refNeedsArrowPos.start = result.error.pos || this.state.start;
  31224. return expr;
  31225. }
  31226. if (result.error) this.state = result.failState;
  31227. return result.node;
  31228. };
  31229. _proto.parseParenItem = function parseParenItem(node, startPos, startLoc) {
  31230. node = _superClass.prototype.parseParenItem.call(this, node, startPos, startLoc);
  31231. if (this.eat(types.question)) {
  31232. node.optional = true;
  31233. this.resetEndLocation(node);
  31234. }
  31235. if (this.match(types.colon)) {
  31236. var typeCastNode = this.startNodeAt(startPos, startLoc);
  31237. typeCastNode.expression = node;
  31238. typeCastNode.typeAnnotation = this.tsParseTypeAnnotation();
  31239. return this.finishNode(typeCastNode, "TSTypeCastExpression");
  31240. }
  31241. return node;
  31242. };
  31243. _proto.parseExportDeclaration = function parseExportDeclaration(node) {
  31244. var startPos = this.state.start;
  31245. var startLoc = this.state.startLoc;
  31246. var isDeclare = this.eatContextual("declare");
  31247. var declaration;
  31248. if (this.match(types.name)) {
  31249. declaration = this.tsTryParseExportDeclaration();
  31250. }
  31251. if (!declaration) {
  31252. declaration = _superClass.prototype.parseExportDeclaration.call(this, node);
  31253. }
  31254. if (declaration && isDeclare) {
  31255. this.resetStartLocation(declaration, startPos, startLoc);
  31256. declaration.declare = true;
  31257. }
  31258. return declaration;
  31259. };
  31260. _proto.parseClassId = function parseClassId(node, isStatement, optionalId) {
  31261. if ((!isStatement || optionalId) && this.isContextual("implements")) {
  31262. return;
  31263. }
  31264. _superClass.prototype.parseClassId.call(this, node, isStatement, optionalId, node.declare ? BIND_TS_AMBIENT : BIND_CLASS);
  31265. var typeParameters = this.tsTryParseTypeParameters();
  31266. if (typeParameters) node.typeParameters = typeParameters;
  31267. };
  31268. _proto.parseClassPropertyAnnotation = function parseClassPropertyAnnotation(node) {
  31269. if (!node.optional && this.eat(types.bang)) {
  31270. node.definite = true;
  31271. }
  31272. var type = this.tsTryParseTypeAnnotation();
  31273. if (type) node.typeAnnotation = type;
  31274. };
  31275. _proto.parseClassProperty = function parseClassProperty(node) {
  31276. this.parseClassPropertyAnnotation(node);
  31277. if (node.declare && this.match(types.equal)) {
  31278. this.raise(this.state.start, "'declare' class fields cannot have an initializer");
  31279. }
  31280. return _superClass.prototype.parseClassProperty.call(this, node);
  31281. };
  31282. _proto.parseClassPrivateProperty = function parseClassPrivateProperty(node) {
  31283. if (node["abstract"]) {
  31284. this.raise(node.start, "Private elements cannot have the 'abstract' modifier.");
  31285. }
  31286. if (node.accessibility) {
  31287. this.raise(node.start, "Private elements cannot have an accessibility modifier ('" + node.accessibility + "')");
  31288. }
  31289. this.parseClassPropertyAnnotation(node);
  31290. return _superClass.prototype.parseClassPrivateProperty.call(this, node);
  31291. };
  31292. _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  31293. var typeParameters = this.tsTryParseTypeParameters();
  31294. if (typeParameters) method.typeParameters = typeParameters;
  31295. _superClass.prototype.pushClassMethod.call(this, classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper);
  31296. };
  31297. _proto.pushClassPrivateMethod = function pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  31298. var typeParameters = this.tsTryParseTypeParameters();
  31299. if (typeParameters) method.typeParameters = typeParameters;
  31300. _superClass.prototype.pushClassPrivateMethod.call(this, classBody, method, isGenerator, isAsync);
  31301. };
  31302. _proto.parseClassSuper = function parseClassSuper(node) {
  31303. _superClass.prototype.parseClassSuper.call(this, node);
  31304. if (node.superClass && this.isRelational("<")) {
  31305. node.superTypeParameters = this.tsParseTypeArguments();
  31306. }
  31307. if (this.eatContextual("implements")) {
  31308. node["implements"] = this.tsParseHeritageClause("implements");
  31309. }
  31310. };
  31311. _proto.parseObjPropValue = function parseObjPropValue(prop) {
  31312. var _superClass$prototype;
  31313. var typeParameters = this.tsTryParseTypeParameters();
  31314. if (typeParameters) prop.typeParameters = typeParameters;
  31315. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  31316. args[_key - 1] = arguments[_key];
  31317. }
  31318. (_superClass$prototype = _superClass.prototype.parseObjPropValue).call.apply(_superClass$prototype, [this, prop].concat(args));
  31319. };
  31320. _proto.parseFunctionParams = function parseFunctionParams(node, allowModifiers) {
  31321. var typeParameters = this.tsTryParseTypeParameters();
  31322. if (typeParameters) node.typeParameters = typeParameters;
  31323. _superClass.prototype.parseFunctionParams.call(this, node, allowModifiers);
  31324. };
  31325. _proto.parseVarId = function parseVarId(decl, kind) {
  31326. _superClass.prototype.parseVarId.call(this, decl, kind);
  31327. if (decl.id.type === "Identifier" && this.eat(types.bang)) {
  31328. decl.definite = true;
  31329. }
  31330. var type = this.tsTryParseTypeAnnotation();
  31331. if (type) {
  31332. decl.id.typeAnnotation = type;
  31333. this.resetEndLocation(decl.id);
  31334. }
  31335. };
  31336. _proto.parseAsyncArrowFromCallExpression = function parseAsyncArrowFromCallExpression(node, call) {
  31337. if (this.match(types.colon)) {
  31338. node.returnType = this.tsParseTypeAnnotation();
  31339. }
  31340. return _superClass.prototype.parseAsyncArrowFromCallExpression.call(this, node, call);
  31341. };
  31342. _proto.parseMaybeAssign = function parseMaybeAssign() {
  31343. var _this15 = this;
  31344. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  31345. args[_key2] = arguments[_key2];
  31346. }
  31347. var state;
  31348. var jsx;
  31349. var typeCast;
  31350. if (this.match(types.jsxTagStart)) {
  31351. state = this.state.clone();
  31352. jsx = this.tryParse(function () {
  31353. var _superClass$prototype2;
  31354. return (_superClass$prototype2 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype2, [_this15].concat(args));
  31355. }, state);
  31356. if (!jsx.error) return jsx.node;
  31357. var context = this.state.context;
  31358. if (context[context.length - 1] === types$1.j_oTag) {
  31359. context.length -= 2;
  31360. } else if (context[context.length - 1] === types$1.j_expr) {
  31361. context.length -= 1;
  31362. }
  31363. }
  31364. if (!(jsx && jsx.error) && !this.isRelational("<")) {
  31365. var _superClass$prototype3;
  31366. return (_superClass$prototype3 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype3, [this].concat(args));
  31367. }
  31368. var typeParameters;
  31369. state = state || this.state.clone();
  31370. var arrow = this.tryParse(function (abort) {
  31371. var _superClass$prototype4;
  31372. typeParameters = _this15.tsParseTypeParameters();
  31373. var expr = (_superClass$prototype4 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype4, [_this15].concat(args));
  31374. if (expr.type !== "ArrowFunctionExpression" || expr.extra && expr.extra.parenthesized) {
  31375. abort();
  31376. }
  31377. if (typeParameters && typeParameters.params.length !== 0) {
  31378. _this15.resetStartLocationFromNode(expr, typeParameters);
  31379. }
  31380. expr.typeParameters = typeParameters;
  31381. return expr;
  31382. }, state);
  31383. if (!arrow.error && !arrow.aborted) return arrow.node;
  31384. if (!jsx) {
  31385. assert$1(!this.hasPlugin("jsx"));
  31386. typeCast = this.tryParse(function () {
  31387. var _superClass$prototype5;
  31388. return (_superClass$prototype5 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype5, [_this15].concat(args));
  31389. }, state);
  31390. if (!typeCast.error) return typeCast.node;
  31391. }
  31392. if (jsx && jsx.node) {
  31393. this.state = jsx.failState;
  31394. return jsx.node;
  31395. }
  31396. if (arrow.node) {
  31397. this.state = arrow.failState;
  31398. return arrow.node;
  31399. }
  31400. if (typeCast && typeCast.node) {
  31401. this.state = typeCast.failState;
  31402. return typeCast.node;
  31403. }
  31404. if (jsx && jsx.thrown) throw jsx.error;
  31405. if (arrow.thrown) throw arrow.error;
  31406. if (typeCast && typeCast.thrown) throw typeCast.error;
  31407. throw jsx && jsx.error || arrow.error || typeCast && typeCast.error;
  31408. };
  31409. _proto.parseMaybeUnary = function parseMaybeUnary(refShorthandDefaultPos) {
  31410. if (!this.hasPlugin("jsx") && this.isRelational("<")) {
  31411. return this.tsParseTypeAssertion();
  31412. } else {
  31413. return _superClass.prototype.parseMaybeUnary.call(this, refShorthandDefaultPos);
  31414. }
  31415. };
  31416. _proto.parseArrow = function parseArrow(node) {
  31417. var _this16 = this;
  31418. if (this.match(types.colon)) {
  31419. var result = this.tryParse(function (abort) {
  31420. var returnType = _this16.tsParseTypeOrTypePredicateAnnotation(types.colon);
  31421. if (_this16.canInsertSemicolon() || !_this16.match(types.arrow)) abort();
  31422. return returnType;
  31423. });
  31424. if (result.aborted) return;
  31425. if (!result.thrown) {
  31426. if (result.error) this.state = result.failState;
  31427. node.returnType = result.node;
  31428. }
  31429. }
  31430. return _superClass.prototype.parseArrow.call(this, node);
  31431. };
  31432. _proto.parseAssignableListItemTypes = function parseAssignableListItemTypes(param) {
  31433. if (this.eat(types.question)) {
  31434. if (param.type !== "Identifier") {
  31435. this.raise(param.start, "A binding pattern parameter cannot be optional in an implementation signature.");
  31436. }
  31437. param.optional = true;
  31438. }
  31439. var type = this.tsTryParseTypeAnnotation();
  31440. if (type) param.typeAnnotation = type;
  31441. this.resetEndLocation(param);
  31442. return param;
  31443. };
  31444. _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) {
  31445. switch (node.type) {
  31446. case "TSTypeCastExpression":
  31447. return _superClass.prototype.toAssignable.call(this, this.typeCastToParameter(node), isBinding, contextDescription);
  31448. case "TSParameterProperty":
  31449. return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription);
  31450. case "TSAsExpression":
  31451. case "TSNonNullExpression":
  31452. case "TSTypeAssertion":
  31453. node.expression = this.toAssignable(node.expression, isBinding, contextDescription);
  31454. return node;
  31455. default:
  31456. return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription);
  31457. }
  31458. };
  31459. _proto.checkLVal = function checkLVal(expr, bindingType, checkClashes, contextDescription) {
  31460. if (bindingType === void 0) {
  31461. bindingType = BIND_NONE;
  31462. }
  31463. switch (expr.type) {
  31464. case "TSTypeCastExpression":
  31465. return;
  31466. case "TSParameterProperty":
  31467. this.checkLVal(expr.parameter, bindingType, checkClashes, "parameter property");
  31468. return;
  31469. case "TSAsExpression":
  31470. case "TSNonNullExpression":
  31471. case "TSTypeAssertion":
  31472. this.checkLVal(expr.expression, bindingType, checkClashes, contextDescription);
  31473. return;
  31474. default:
  31475. _superClass.prototype.checkLVal.call(this, expr, bindingType, checkClashes, contextDescription);
  31476. return;
  31477. }
  31478. };
  31479. _proto.parseBindingAtom = function parseBindingAtom() {
  31480. switch (this.state.type) {
  31481. case types._this:
  31482. return this.parseIdentifier(true);
  31483. default:
  31484. return _superClass.prototype.parseBindingAtom.call(this);
  31485. }
  31486. };
  31487. _proto.parseMaybeDecoratorArguments = function parseMaybeDecoratorArguments(expr) {
  31488. if (this.isRelational("<")) {
  31489. var typeArguments = this.tsParseTypeArguments();
  31490. if (this.match(types.parenL)) {
  31491. var call = _superClass.prototype.parseMaybeDecoratorArguments.call(this, expr);
  31492. call.typeParameters = typeArguments;
  31493. return call;
  31494. }
  31495. this.unexpected(this.state.start, types.parenL);
  31496. }
  31497. return _superClass.prototype.parseMaybeDecoratorArguments.call(this, expr);
  31498. };
  31499. _proto.isClassMethod = function isClassMethod() {
  31500. return this.isRelational("<") || _superClass.prototype.isClassMethod.call(this);
  31501. };
  31502. _proto.isClassProperty = function isClassProperty() {
  31503. return this.match(types.bang) || this.match(types.colon) || _superClass.prototype.isClassProperty.call(this);
  31504. };
  31505. _proto.parseMaybeDefault = function parseMaybeDefault() {
  31506. var _superClass$prototype6;
  31507. for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  31508. args[_key3] = arguments[_key3];
  31509. }
  31510. var node = (_superClass$prototype6 = _superClass.prototype.parseMaybeDefault).call.apply(_superClass$prototype6, [this].concat(args));
  31511. if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {
  31512. this.raise(node.typeAnnotation.start, "Type annotations must come before default assignments, " + "e.g. instead of `age = 25: number` use `age: number = 25`");
  31513. }
  31514. return node;
  31515. };
  31516. _proto.getTokenFromCode = function getTokenFromCode(code) {
  31517. if (this.state.inType && (code === 62 || code === 60)) {
  31518. return this.finishOp(types.relational, 1);
  31519. } else {
  31520. return _superClass.prototype.getTokenFromCode.call(this, code);
  31521. }
  31522. };
  31523. _proto.toAssignableList = function toAssignableList(exprList, isBinding) {
  31524. for (var i = 0; i < exprList.length; i++) {
  31525. var expr = exprList[i];
  31526. if (!expr) continue;
  31527. switch (expr.type) {
  31528. case "TSTypeCastExpression":
  31529. exprList[i] = this.typeCastToParameter(expr);
  31530. break;
  31531. case "TSAsExpression":
  31532. case "TSTypeAssertion":
  31533. if (!isBinding) {
  31534. exprList[i] = this.typeCastToParameter(expr);
  31535. } else {
  31536. this.raise(expr.start, "Unexpected type cast in parameter position.");
  31537. }
  31538. break;
  31539. }
  31540. }
  31541. return _superClass.prototype.toAssignableList.apply(this, arguments);
  31542. };
  31543. _proto.typeCastToParameter = function typeCastToParameter(node) {
  31544. node.expression.typeAnnotation = node.typeAnnotation;
  31545. this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end);
  31546. return node.expression;
  31547. };
  31548. _proto.toReferencedList = function toReferencedList(exprList, isInParens) {
  31549. for (var i = 0; i < exprList.length; i++) {
  31550. var expr = exprList[i];
  31551. if (expr && expr.type === "TSTypeCastExpression") {
  31552. this.raise(expr.start, "Did not expect a type annotation here.");
  31553. }
  31554. }
  31555. return exprList;
  31556. };
  31557. _proto.shouldParseArrow = function shouldParseArrow() {
  31558. return this.match(types.colon) || _superClass.prototype.shouldParseArrow.call(this);
  31559. };
  31560. _proto.shouldParseAsyncArrow = function shouldParseAsyncArrow() {
  31561. return this.match(types.colon) || _superClass.prototype.shouldParseAsyncArrow.call(this);
  31562. };
  31563. _proto.canHaveLeadingDecorator = function canHaveLeadingDecorator() {
  31564. return _superClass.prototype.canHaveLeadingDecorator.call(this) || this.isAbstractClass();
  31565. };
  31566. _proto.jsxParseOpeningElementAfterName = function jsxParseOpeningElementAfterName(node) {
  31567. var _this17 = this;
  31568. if (this.isRelational("<")) {
  31569. var typeArguments = this.tsTryParseAndCatch(function () {
  31570. return _this17.tsParseTypeArguments();
  31571. });
  31572. if (typeArguments) node.typeParameters = typeArguments;
  31573. }
  31574. return _superClass.prototype.jsxParseOpeningElementAfterName.call(this, node);
  31575. };
  31576. _proto.getGetterSetterExpectedParamCount = function getGetterSetterExpectedParamCount(method) {
  31577. var baseCount = _superClass.prototype.getGetterSetterExpectedParamCount.call(this, method);
  31578. var firstParam = method.params[0];
  31579. var hasContextParam = firstParam && firstParam.type === "Identifier" && firstParam.name === "this";
  31580. return hasContextParam ? baseCount + 1 : baseCount;
  31581. };
  31582. return _class;
  31583. }(superClass);
  31584. });
  31585. types.placeholder = new TokenType("%%", {
  31586. startsExpr: true
  31587. });
  31588. var placeholders = (function (superClass) {
  31589. return function (_superClass) {
  31590. _inheritsLoose(_class, _superClass);
  31591. function _class() {
  31592. return _superClass.apply(this, arguments) || this;
  31593. }
  31594. var _proto = _class.prototype;
  31595. _proto.parsePlaceholder = function parsePlaceholder(expectedNode) {
  31596. if (this.match(types.placeholder)) {
  31597. var node = this.startNode();
  31598. this.next();
  31599. this.assertNoSpace("Unexpected space in placeholder.");
  31600. node.name = _superClass.prototype.parseIdentifier.call(this, true);
  31601. this.assertNoSpace("Unexpected space in placeholder.");
  31602. this.expect(types.placeholder);
  31603. return this.finishPlaceholder(node, expectedNode);
  31604. }
  31605. };
  31606. _proto.finishPlaceholder = function finishPlaceholder(node, expectedNode) {
  31607. var isFinished = !!(node.expectedNode && node.type === "Placeholder");
  31608. node.expectedNode = expectedNode;
  31609. return isFinished ? node : this.finishNode(node, "Placeholder");
  31610. };
  31611. _proto.getTokenFromCode = function getTokenFromCode(code) {
  31612. if (code === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) {
  31613. return this.finishOp(types.placeholder, 2);
  31614. }
  31615. return _superClass.prototype.getTokenFromCode.apply(this, arguments);
  31616. };
  31617. _proto.parseExprAtom = function parseExprAtom() {
  31618. return this.parsePlaceholder("Expression") || _superClass.prototype.parseExprAtom.apply(this, arguments);
  31619. };
  31620. _proto.parseIdentifier = function parseIdentifier() {
  31621. return this.parsePlaceholder("Identifier") || _superClass.prototype.parseIdentifier.apply(this, arguments);
  31622. };
  31623. _proto.checkReservedWord = function checkReservedWord(word) {
  31624. if (word !== undefined) _superClass.prototype.checkReservedWord.apply(this, arguments);
  31625. };
  31626. _proto.parseBindingAtom = function parseBindingAtom() {
  31627. return this.parsePlaceholder("Pattern") || _superClass.prototype.parseBindingAtom.apply(this, arguments);
  31628. };
  31629. _proto.checkLVal = function checkLVal(expr) {
  31630. if (expr.type !== "Placeholder") _superClass.prototype.checkLVal.apply(this, arguments);
  31631. };
  31632. _proto.toAssignable = function toAssignable(node) {
  31633. if (node && node.type === "Placeholder" && node.expectedNode === "Expression") {
  31634. node.expectedNode = "Pattern";
  31635. return node;
  31636. }
  31637. return _superClass.prototype.toAssignable.apply(this, arguments);
  31638. };
  31639. _proto.verifyBreakContinue = function verifyBreakContinue(node) {
  31640. if (node.label && node.label.type === "Placeholder") return;
  31641. _superClass.prototype.verifyBreakContinue.apply(this, arguments);
  31642. };
  31643. _proto.parseExpressionStatement = function parseExpressionStatement(node, expr) {
  31644. if (expr.type !== "Placeholder" || expr.extra && expr.extra.parenthesized) {
  31645. return _superClass.prototype.parseExpressionStatement.apply(this, arguments);
  31646. }
  31647. if (this.match(types.colon)) {
  31648. var stmt = node;
  31649. stmt.label = this.finishPlaceholder(expr, "Identifier");
  31650. this.next();
  31651. stmt.body = this.parseStatement("label");
  31652. return this.finishNode(stmt, "LabeledStatement");
  31653. }
  31654. this.semicolon();
  31655. node.name = expr.name;
  31656. return this.finishPlaceholder(node, "Statement");
  31657. };
  31658. _proto.parseBlock = function parseBlock() {
  31659. return this.parsePlaceholder("BlockStatement") || _superClass.prototype.parseBlock.apply(this, arguments);
  31660. };
  31661. _proto.parseFunctionId = function parseFunctionId() {
  31662. return this.parsePlaceholder("Identifier") || _superClass.prototype.parseFunctionId.apply(this, arguments);
  31663. };
  31664. _proto.parseClass = function parseClass(node, isStatement, optionalId) {
  31665. var type = isStatement ? "ClassDeclaration" : "ClassExpression";
  31666. this.next();
  31667. this.takeDecorators(node);
  31668. var placeholder = this.parsePlaceholder("Identifier");
  31669. if (placeholder) {
  31670. if (this.match(types._extends) || this.match(types.placeholder) || this.match(types.braceL)) {
  31671. node.id = placeholder;
  31672. } else if (optionalId || !isStatement) {
  31673. node.id = null;
  31674. node.body = this.finishPlaceholder(placeholder, "ClassBody");
  31675. return this.finishNode(node, type);
  31676. } else {
  31677. this.unexpected(null, "A class name is required");
  31678. }
  31679. } else {
  31680. this.parseClassId(node, isStatement, optionalId);
  31681. }
  31682. this.parseClassSuper(node);
  31683. node.body = this.parsePlaceholder("ClassBody") || this.parseClassBody(!!node.superClass);
  31684. return this.finishNode(node, type);
  31685. };
  31686. _proto.parseExport = function parseExport(node) {
  31687. var placeholder = this.parsePlaceholder("Identifier");
  31688. if (!placeholder) return _superClass.prototype.parseExport.apply(this, arguments);
  31689. if (!this.isContextual("from") && !this.match(types.comma)) {
  31690. node.specifiers = [];
  31691. node.source = null;
  31692. node.declaration = this.finishPlaceholder(placeholder, "Declaration");
  31693. return this.finishNode(node, "ExportNamedDeclaration");
  31694. }
  31695. this.expectPlugin("exportDefaultFrom");
  31696. var specifier = this.startNode();
  31697. specifier.exported = placeholder;
  31698. node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
  31699. return _superClass.prototype.parseExport.call(this, node);
  31700. };
  31701. _proto.maybeParseExportDefaultSpecifier = function maybeParseExportDefaultSpecifier(node) {
  31702. if (node.specifiers && node.specifiers.length > 0) {
  31703. return true;
  31704. }
  31705. return _superClass.prototype.maybeParseExportDefaultSpecifier.apply(this, arguments);
  31706. };
  31707. _proto.checkExport = function checkExport(node) {
  31708. var specifiers = node.specifiers;
  31709. if (specifiers && specifiers.length) {
  31710. node.specifiers = specifiers.filter(function (node) {
  31711. return node.exported.type === "Placeholder";
  31712. });
  31713. }
  31714. _superClass.prototype.checkExport.call(this, node);
  31715. node.specifiers = specifiers;
  31716. };
  31717. _proto.parseImport = function parseImport(node) {
  31718. var placeholder = this.parsePlaceholder("Identifier");
  31719. if (!placeholder) return _superClass.prototype.parseImport.apply(this, arguments);
  31720. node.specifiers = [];
  31721. if (!this.isContextual("from") && !this.match(types.comma)) {
  31722. node.source = this.finishPlaceholder(placeholder, "StringLiteral");
  31723. this.semicolon();
  31724. return this.finishNode(node, "ImportDeclaration");
  31725. }
  31726. var specifier = this.startNodeAtNode(placeholder);
  31727. specifier.local = placeholder;
  31728. this.finishNode(specifier, "ImportDefaultSpecifier");
  31729. node.specifiers.push(specifier);
  31730. if (this.eat(types.comma)) {
  31731. var hasStarImport = this.maybeParseStarImportSpecifier(node);
  31732. if (!hasStarImport) this.parseNamedImportSpecifiers(node);
  31733. }
  31734. this.expectContextual("from");
  31735. node.source = this.parseImportSource();
  31736. this.semicolon();
  31737. return this.finishNode(node, "ImportDeclaration");
  31738. };
  31739. _proto.parseImportSource = function parseImportSource() {
  31740. return this.parsePlaceholder("StringLiteral") || _superClass.prototype.parseImportSource.apply(this, arguments);
  31741. };
  31742. return _class;
  31743. }(superClass);
  31744. });
  31745. var v8intrinsic = (function (superClass) {
  31746. return function (_superClass) {
  31747. _inheritsLoose(_class, _superClass);
  31748. function _class() {
  31749. return _superClass.apply(this, arguments) || this;
  31750. }
  31751. var _proto = _class.prototype;
  31752. _proto.parseV8Intrinsic = function parseV8Intrinsic() {
  31753. if (this.match(types.modulo)) {
  31754. var v8IntrinsicStart = this.state.start;
  31755. var node = this.startNode();
  31756. this.eat(types.modulo);
  31757. if (this.match(types.name)) {
  31758. var name = this.parseIdentifierName(this.state.start);
  31759. var identifier = this.createIdentifier(node, name);
  31760. identifier.type = "V8IntrinsicIdentifier";
  31761. if (this.match(types.parenL)) {
  31762. return identifier;
  31763. }
  31764. }
  31765. this.unexpected(v8IntrinsicStart);
  31766. }
  31767. };
  31768. _proto.parseExprAtom = function parseExprAtom() {
  31769. return this.parseV8Intrinsic() || _superClass.prototype.parseExprAtom.apply(this, arguments);
  31770. };
  31771. return _class;
  31772. }(superClass);
  31773. });
  31774. function hasPlugin(plugins, name) {
  31775. return plugins.some(function (plugin) {
  31776. if (Array.isArray(plugin)) {
  31777. return plugin[0] === name;
  31778. } else {
  31779. return plugin === name;
  31780. }
  31781. });
  31782. }
  31783. function getPluginOption(plugins, name, option) {
  31784. var plugin = plugins.find(function (plugin) {
  31785. if (Array.isArray(plugin)) {
  31786. return plugin[0] === name;
  31787. } else {
  31788. return plugin === name;
  31789. }
  31790. });
  31791. if (plugin && Array.isArray(plugin)) {
  31792. return plugin[1][option];
  31793. }
  31794. return null;
  31795. }
  31796. var PIPELINE_PROPOSALS = ["minimal", "smart", "fsharp"];
  31797. function validatePlugins(plugins) {
  31798. if (hasPlugin(plugins, "decorators")) {
  31799. if (hasPlugin(plugins, "decorators-legacy")) {
  31800. throw new Error("Cannot use the decorators and decorators-legacy plugin together");
  31801. }
  31802. var decoratorsBeforeExport = getPluginOption(plugins, "decorators", "decoratorsBeforeExport");
  31803. if (decoratorsBeforeExport == null) {
  31804. 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'.");
  31805. } else if (typeof decoratorsBeforeExport !== "boolean") {
  31806. throw new Error("'decoratorsBeforeExport' must be a boolean.");
  31807. }
  31808. }
  31809. if (hasPlugin(plugins, "flow") && hasPlugin(plugins, "typescript")) {
  31810. throw new Error("Cannot combine flow and typescript plugins.");
  31811. }
  31812. if (hasPlugin(plugins, "placeholders") && hasPlugin(plugins, "v8intrinsic")) {
  31813. throw new Error("Cannot combine placeholders and v8intrinsic plugins.");
  31814. }
  31815. if (hasPlugin(plugins, "pipelineOperator") && !PIPELINE_PROPOSALS.includes(getPluginOption(plugins, "pipelineOperator", "proposal"))) {
  31816. throw new Error("'pipelineOperator' requires 'proposal' option whose value should be one of: " + PIPELINE_PROPOSALS.map(function (p) {
  31817. return "'" + p + "'";
  31818. }).join(", "));
  31819. }
  31820. }
  31821. var mixinPlugins = {
  31822. estree: estree,
  31823. jsx: jsx,
  31824. flow: flow,
  31825. typescript: typescript,
  31826. v8intrinsic: v8intrinsic,
  31827. placeholders: placeholders
  31828. };
  31829. var mixinPluginNames = Object.keys(mixinPlugins);
  31830. var defaultOptions = {
  31831. sourceType: "script",
  31832. sourceFilename: undefined,
  31833. startLine: 1,
  31834. allowAwaitOutsideFunction: false,
  31835. allowReturnOutsideFunction: false,
  31836. allowImportExportEverywhere: false,
  31837. allowSuperOutsideMethod: false,
  31838. allowUndeclaredExports: false,
  31839. plugins: [],
  31840. strictMode: null,
  31841. ranges: false,
  31842. tokens: false,
  31843. createParenthesizedExpressions: false,
  31844. errorRecovery: false
  31845. };
  31846. function getOptions(opts) {
  31847. var options = {};
  31848. for (var _i2 = 0, _Object$keys2 = Object.keys(defaultOptions); _i2 < _Object$keys2.length; _i2++) {
  31849. var key = _Object$keys2[_i2];
  31850. options[key] = opts && opts[key] != null ? opts[key] : defaultOptions[key];
  31851. }
  31852. return options;
  31853. }
  31854. var Position = function Position(line, col) {
  31855. this.line = line;
  31856. this.column = col;
  31857. };
  31858. var SourceLocation = function SourceLocation(start, end) {
  31859. this.start = start;
  31860. this.end = end;
  31861. };
  31862. function getLineInfo(input, offset) {
  31863. var line = 1;
  31864. var lineStart = 0;
  31865. var match;
  31866. lineBreakG.lastIndex = 0;
  31867. while ((match = lineBreakG.exec(input)) && match.index < offset) {
  31868. line++;
  31869. lineStart = lineBreakG.lastIndex;
  31870. }
  31871. return new Position(line, offset - lineStart);
  31872. }
  31873. var BaseParser = function () {
  31874. function BaseParser() {
  31875. this.sawUnambiguousESM = false;
  31876. this.ambiguousScriptDifferentAst = false;
  31877. }
  31878. var _proto = BaseParser.prototype;
  31879. _proto.hasPlugin = function hasPlugin(name) {
  31880. return this.plugins.has(name);
  31881. };
  31882. _proto.getPluginOption = function getPluginOption(plugin, name) {
  31883. if (this.hasPlugin(plugin)) return this.plugins.get(plugin)[name];
  31884. };
  31885. return BaseParser;
  31886. }();
  31887. function last(stack) {
  31888. return stack[stack.length - 1];
  31889. }
  31890. var CommentsParser = function (_BaseParser) {
  31891. _inheritsLoose(CommentsParser, _BaseParser);
  31892. function CommentsParser() {
  31893. return _BaseParser.apply(this, arguments) || this;
  31894. }
  31895. var _proto = CommentsParser.prototype;
  31896. _proto.addComment = function addComment(comment) {
  31897. if (this.filename) comment.loc.filename = this.filename;
  31898. this.state.trailingComments.push(comment);
  31899. this.state.leadingComments.push(comment);
  31900. };
  31901. _proto.adjustCommentsAfterTrailingComma = function adjustCommentsAfterTrailingComma(node, elements, takeAllComments) {
  31902. if (this.state.leadingComments.length === 0) {
  31903. return;
  31904. }
  31905. var lastElement = null;
  31906. var i = elements.length;
  31907. while (lastElement === null && i > 0) {
  31908. lastElement = elements[--i];
  31909. }
  31910. if (lastElement === null) {
  31911. return;
  31912. }
  31913. for (var j = 0; j < this.state.leadingComments.length; j++) {
  31914. if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) {
  31915. this.state.leadingComments.splice(j, 1);
  31916. j--;
  31917. }
  31918. }
  31919. var newTrailingComments = [];
  31920. for (var _i = 0; _i < this.state.leadingComments.length; _i++) {
  31921. var leadingComment = this.state.leadingComments[_i];
  31922. if (leadingComment.end < node.end) {
  31923. newTrailingComments.push(leadingComment);
  31924. if (!takeAllComments) {
  31925. this.state.leadingComments.splice(_i, 1);
  31926. _i--;
  31927. }
  31928. } else {
  31929. if (node.trailingComments === undefined) {
  31930. node.trailingComments = [];
  31931. }
  31932. node.trailingComments.push(leadingComment);
  31933. }
  31934. }
  31935. if (takeAllComments) this.state.leadingComments = [];
  31936. if (newTrailingComments.length > 0) {
  31937. lastElement.trailingComments = newTrailingComments;
  31938. } else if (lastElement.trailingComments !== undefined) {
  31939. lastElement.trailingComments = [];
  31940. }
  31941. };
  31942. _proto.processComment = function processComment(node) {
  31943. if (node.type === "Program" && node.body.length > 0) return;
  31944. var stack = this.state.commentStack;
  31945. var firstChild, lastChild, trailingComments, i, j;
  31946. if (this.state.trailingComments.length > 0) {
  31947. if (this.state.trailingComments[0].start >= node.end) {
  31948. trailingComments = this.state.trailingComments;
  31949. this.state.trailingComments = [];
  31950. } else {
  31951. this.state.trailingComments.length = 0;
  31952. }
  31953. } else if (stack.length > 0) {
  31954. var lastInStack = last(stack);
  31955. if (lastInStack.trailingComments && lastInStack.trailingComments[0].start >= node.end) {
  31956. trailingComments = lastInStack.trailingComments;
  31957. delete lastInStack.trailingComments;
  31958. }
  31959. }
  31960. if (stack.length > 0 && last(stack).start >= node.start) {
  31961. firstChild = stack.pop();
  31962. }
  31963. while (stack.length > 0 && last(stack).start >= node.start) {
  31964. lastChild = stack.pop();
  31965. }
  31966. if (!lastChild && firstChild) lastChild = firstChild;
  31967. if (firstChild) {
  31968. switch (node.type) {
  31969. case "ObjectExpression":
  31970. this.adjustCommentsAfterTrailingComma(node, node.properties);
  31971. break;
  31972. case "ObjectPattern":
  31973. this.adjustCommentsAfterTrailingComma(node, node.properties, true);
  31974. break;
  31975. case "CallExpression":
  31976. this.adjustCommentsAfterTrailingComma(node, node.arguments);
  31977. break;
  31978. case "ArrayExpression":
  31979. this.adjustCommentsAfterTrailingComma(node, node.elements);
  31980. break;
  31981. case "ArrayPattern":
  31982. this.adjustCommentsAfterTrailingComma(node, node.elements, true);
  31983. break;
  31984. }
  31985. } else if (this.state.commentPreviousNode && (this.state.commentPreviousNode.type === "ImportSpecifier" && node.type !== "ImportSpecifier" || this.state.commentPreviousNode.type === "ExportSpecifier" && node.type !== "ExportSpecifier")) {
  31986. this.adjustCommentsAfterTrailingComma(node, [this.state.commentPreviousNode]);
  31987. }
  31988. if (lastChild) {
  31989. if (lastChild.leadingComments) {
  31990. if (lastChild !== node && lastChild.leadingComments.length > 0 && last(lastChild.leadingComments).end <= node.start) {
  31991. node.leadingComments = lastChild.leadingComments;
  31992. delete lastChild.leadingComments;
  31993. } else {
  31994. for (i = lastChild.leadingComments.length - 2; i >= 0; --i) {
  31995. if (lastChild.leadingComments[i].end <= node.start) {
  31996. node.leadingComments = lastChild.leadingComments.splice(0, i + 1);
  31997. break;
  31998. }
  31999. }
  32000. }
  32001. }
  32002. } else if (this.state.leadingComments.length > 0) {
  32003. if (last(this.state.leadingComments).end <= node.start) {
  32004. if (this.state.commentPreviousNode) {
  32005. for (j = 0; j < this.state.leadingComments.length; j++) {
  32006. if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) {
  32007. this.state.leadingComments.splice(j, 1);
  32008. j--;
  32009. }
  32010. }
  32011. }
  32012. if (this.state.leadingComments.length > 0) {
  32013. node.leadingComments = this.state.leadingComments;
  32014. this.state.leadingComments = [];
  32015. }
  32016. } else {
  32017. for (i = 0; i < this.state.leadingComments.length; i++) {
  32018. if (this.state.leadingComments[i].end > node.start) {
  32019. break;
  32020. }
  32021. }
  32022. var leadingComments = this.state.leadingComments.slice(0, i);
  32023. if (leadingComments.length) {
  32024. node.leadingComments = leadingComments;
  32025. }
  32026. trailingComments = this.state.leadingComments.slice(i);
  32027. if (trailingComments.length === 0) {
  32028. trailingComments = null;
  32029. }
  32030. }
  32031. }
  32032. this.state.commentPreviousNode = node;
  32033. if (trailingComments) {
  32034. if (trailingComments.length && trailingComments[0].start >= node.start && last(trailingComments).end <= node.end) {
  32035. node.innerComments = trailingComments;
  32036. } else {
  32037. node.trailingComments = trailingComments;
  32038. }
  32039. }
  32040. stack.push(node);
  32041. };
  32042. return CommentsParser;
  32043. }(BaseParser);
  32044. var LocationParser = function (_CommentsParser) {
  32045. _inheritsLoose(LocationParser, _CommentsParser);
  32046. function LocationParser() {
  32047. return _CommentsParser.apply(this, arguments) || this;
  32048. }
  32049. var _proto = LocationParser.prototype;
  32050. _proto.getLocationForPosition = function getLocationForPosition(pos) {
  32051. var loc;
  32052. 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);
  32053. return loc;
  32054. };
  32055. _proto.raise = function raise(pos, message, _temp) {
  32056. var _ref = _temp === void 0 ? {} : _temp,
  32057. missingPluginNames = _ref.missingPluginNames,
  32058. code = _ref.code;
  32059. var loc = this.getLocationForPosition(pos);
  32060. message += " (" + loc.line + ":" + loc.column + ")";
  32061. var err = new SyntaxError(message);
  32062. err.pos = pos;
  32063. err.loc = loc;
  32064. if (missingPluginNames) {
  32065. err.missingPlugin = missingPluginNames;
  32066. }
  32067. if (code !== undefined) {
  32068. err.code = code;
  32069. }
  32070. if (this.options.errorRecovery) {
  32071. if (!this.isLookahead) this.state.errors.push(err);
  32072. return err;
  32073. } else {
  32074. throw err;
  32075. }
  32076. };
  32077. return LocationParser;
  32078. }(CommentsParser);
  32079. var State = function () {
  32080. function State() {
  32081. this.errors = [];
  32082. this.potentialArrowAt = -1;
  32083. this.noArrowAt = [];
  32084. this.noArrowParamsConversionAt = [];
  32085. this.inParameters = false;
  32086. this.maybeInArrowParameters = false;
  32087. this.inPipeline = false;
  32088. this.inType = false;
  32089. this.noAnonFunctionType = false;
  32090. this.inPropertyName = false;
  32091. this.hasFlowComment = false;
  32092. this.isIterator = false;
  32093. this.topicContext = {
  32094. maxNumOfResolvableTopics: 0,
  32095. maxTopicIndex: null
  32096. };
  32097. this.soloAwait = false;
  32098. this.inFSharpPipelineDirectBody = false;
  32099. this.labels = [];
  32100. this.decoratorStack = [[]];
  32101. this.yieldPos = -1;
  32102. this.awaitPos = -1;
  32103. this.tokens = [];
  32104. this.comments = [];
  32105. this.trailingComments = [];
  32106. this.leadingComments = [];
  32107. this.commentStack = [];
  32108. this.commentPreviousNode = null;
  32109. this.pos = 0;
  32110. this.lineStart = 0;
  32111. this.type = types.eof;
  32112. this.value = null;
  32113. this.start = 0;
  32114. this.end = 0;
  32115. this.lastTokEndLoc = null;
  32116. this.lastTokStartLoc = null;
  32117. this.lastTokStart = 0;
  32118. this.lastTokEnd = 0;
  32119. this.context = [types$1.braceStatement];
  32120. this.exprAllowed = true;
  32121. this.containsEsc = false;
  32122. this.containsOctal = false;
  32123. this.octalPosition = null;
  32124. this.exportedIdentifiers = [];
  32125. }
  32126. var _proto = State.prototype;
  32127. _proto.init = function init(options) {
  32128. this.strict = options.strictMode === false ? false : options.sourceType === "module";
  32129. this.curLine = options.startLine;
  32130. this.startLoc = this.endLoc = this.curPosition();
  32131. };
  32132. _proto.curPosition = function curPosition() {
  32133. return new Position(this.curLine, this.pos - this.lineStart);
  32134. };
  32135. _proto.clone = function clone(skipArrays) {
  32136. var state = new State();
  32137. var keys = Object.keys(this);
  32138. for (var i = 0, length = keys.length; i < length; i++) {
  32139. var key = keys[i];
  32140. var val = this[key];
  32141. if (!skipArrays && Array.isArray(val)) {
  32142. val = val.slice();
  32143. }
  32144. state[key] = val;
  32145. }
  32146. return state;
  32147. };
  32148. return State;
  32149. }();
  32150. var _isDigit = function isDigit(code) {
  32151. return code >= 48 && code <= 57;
  32152. };
  32153. var VALID_REGEX_FLAGS = new Set(["g", "m", "s", "i", "y", "u"]);
  32154. var forbiddenNumericSeparatorSiblings = {
  32155. decBinOct: [46, 66, 69, 79, 95, 98, 101, 111],
  32156. hex: [46, 88, 95, 120]
  32157. };
  32158. var allowedNumericSeparatorSiblings = {};
  32159. allowedNumericSeparatorSiblings.bin = [48, 49];
  32160. allowedNumericSeparatorSiblings.oct = [].concat(allowedNumericSeparatorSiblings.bin, [50, 51, 52, 53, 54, 55]);
  32161. allowedNumericSeparatorSiblings.dec = [].concat(allowedNumericSeparatorSiblings.oct, [56, 57]);
  32162. allowedNumericSeparatorSiblings.hex = [].concat(allowedNumericSeparatorSiblings.dec, [65, 66, 67, 68, 69, 70, 97, 98, 99, 100, 101, 102]);
  32163. var Token = function Token(state) {
  32164. this.type = state.type;
  32165. this.value = state.value;
  32166. this.start = state.start;
  32167. this.end = state.end;
  32168. this.loc = new SourceLocation(state.startLoc, state.endLoc);
  32169. };
  32170. var Tokenizer = function (_LocationParser) {
  32171. _inheritsLoose(Tokenizer, _LocationParser);
  32172. function Tokenizer(options, input) {
  32173. var _this;
  32174. _this = _LocationParser.call(this) || this;
  32175. _this.state = new State();
  32176. _this.state.init(options);
  32177. _this.input = input;
  32178. _this.length = input.length;
  32179. _this.isLookahead = false;
  32180. return _this;
  32181. }
  32182. var _proto = Tokenizer.prototype;
  32183. _proto.next = function next() {
  32184. if (!this.isLookahead) {
  32185. this.checkKeywordEscapes();
  32186. if (this.options.tokens) {
  32187. this.state.tokens.push(new Token(this.state));
  32188. }
  32189. }
  32190. this.state.lastTokEnd = this.state.end;
  32191. this.state.lastTokStart = this.state.start;
  32192. this.state.lastTokEndLoc = this.state.endLoc;
  32193. this.state.lastTokStartLoc = this.state.startLoc;
  32194. this.nextToken();
  32195. };
  32196. _proto.eat = function eat(type) {
  32197. if (this.match(type)) {
  32198. this.next();
  32199. return true;
  32200. } else {
  32201. return false;
  32202. }
  32203. };
  32204. _proto.match = function match(type) {
  32205. return this.state.type === type;
  32206. };
  32207. _proto.lookahead = function lookahead() {
  32208. var old = this.state;
  32209. this.state = old.clone(true);
  32210. this.isLookahead = true;
  32211. this.next();
  32212. this.isLookahead = false;
  32213. var curr = this.state;
  32214. this.state = old;
  32215. return curr;
  32216. };
  32217. _proto.nextTokenStart = function nextTokenStart() {
  32218. var thisTokEnd = this.state.pos;
  32219. skipWhiteSpace.lastIndex = thisTokEnd;
  32220. var skip = skipWhiteSpace.exec(this.input);
  32221. return thisTokEnd + skip[0].length;
  32222. };
  32223. _proto.lookaheadCharCode = function lookaheadCharCode() {
  32224. return this.input.charCodeAt(this.nextTokenStart());
  32225. };
  32226. _proto.setStrict = function setStrict(strict) {
  32227. this.state.strict = strict;
  32228. if (!this.match(types.num) && !this.match(types.string)) return;
  32229. this.state.pos = this.state.start;
  32230. while (this.state.pos < this.state.lineStart) {
  32231. this.state.lineStart = this.input.lastIndexOf("\n", this.state.lineStart - 2) + 1;
  32232. --this.state.curLine;
  32233. }
  32234. this.nextToken();
  32235. };
  32236. _proto.curContext = function curContext() {
  32237. return this.state.context[this.state.context.length - 1];
  32238. };
  32239. _proto.nextToken = function nextToken() {
  32240. var curContext = this.curContext();
  32241. if (!curContext || !curContext.preserveSpace) this.skipSpace();
  32242. this.state.containsOctal = false;
  32243. this.state.octalPosition = null;
  32244. this.state.start = this.state.pos;
  32245. this.state.startLoc = this.state.curPosition();
  32246. if (this.state.pos >= this.length) {
  32247. this.finishToken(types.eof);
  32248. return;
  32249. }
  32250. if (curContext.override) {
  32251. curContext.override(this);
  32252. } else {
  32253. this.getTokenFromCode(this.input.codePointAt(this.state.pos));
  32254. }
  32255. };
  32256. _proto.pushComment = function pushComment(block, text, start, end, startLoc, endLoc) {
  32257. var comment = {
  32258. type: block ? "CommentBlock" : "CommentLine",
  32259. value: text,
  32260. start: start,
  32261. end: end,
  32262. loc: new SourceLocation(startLoc, endLoc)
  32263. };
  32264. if (this.options.tokens) this.state.tokens.push(comment);
  32265. this.state.comments.push(comment);
  32266. this.addComment(comment);
  32267. };
  32268. _proto.skipBlockComment = function skipBlockComment() {
  32269. var startLoc = this.state.curPosition();
  32270. var start = this.state.pos;
  32271. var end = this.input.indexOf("*/", this.state.pos + 2);
  32272. if (end === -1) throw this.raise(start, "Unterminated comment");
  32273. this.state.pos = end + 2;
  32274. lineBreakG.lastIndex = start;
  32275. var match;
  32276. while ((match = lineBreakG.exec(this.input)) && match.index < this.state.pos) {
  32277. ++this.state.curLine;
  32278. this.state.lineStart = match.index + match[0].length;
  32279. }
  32280. if (this.isLookahead) return;
  32281. this.pushComment(true, this.input.slice(start + 2, end), start, this.state.pos, startLoc, this.state.curPosition());
  32282. };
  32283. _proto.skipLineComment = function skipLineComment(startSkip) {
  32284. var start = this.state.pos;
  32285. var startLoc = this.state.curPosition();
  32286. var ch = this.input.charCodeAt(this.state.pos += startSkip);
  32287. if (this.state.pos < this.length) {
  32288. while (!isNewLine(ch) && ++this.state.pos < this.length) {
  32289. ch = this.input.charCodeAt(this.state.pos);
  32290. }
  32291. }
  32292. if (this.isLookahead) return;
  32293. this.pushComment(false, this.input.slice(start + startSkip, this.state.pos), start, this.state.pos, startLoc, this.state.curPosition());
  32294. };
  32295. _proto.skipSpace = function skipSpace() {
  32296. loop: while (this.state.pos < this.length) {
  32297. var ch = this.input.charCodeAt(this.state.pos);
  32298. switch (ch) {
  32299. case 32:
  32300. case 160:
  32301. case 9:
  32302. ++this.state.pos;
  32303. break;
  32304. case 13:
  32305. if (this.input.charCodeAt(this.state.pos + 1) === 10) {
  32306. ++this.state.pos;
  32307. }
  32308. case 10:
  32309. case 8232:
  32310. case 8233:
  32311. ++this.state.pos;
  32312. ++this.state.curLine;
  32313. this.state.lineStart = this.state.pos;
  32314. break;
  32315. case 47:
  32316. switch (this.input.charCodeAt(this.state.pos + 1)) {
  32317. case 42:
  32318. this.skipBlockComment();
  32319. break;
  32320. case 47:
  32321. this.skipLineComment(2);
  32322. break;
  32323. default:
  32324. break loop;
  32325. }
  32326. break;
  32327. default:
  32328. if (isWhitespace(ch)) {
  32329. ++this.state.pos;
  32330. } else {
  32331. break loop;
  32332. }
  32333. }
  32334. }
  32335. };
  32336. _proto.finishToken = function finishToken(type, val) {
  32337. this.state.end = this.state.pos;
  32338. this.state.endLoc = this.state.curPosition();
  32339. var prevType = this.state.type;
  32340. this.state.type = type;
  32341. this.state.value = val;
  32342. if (!this.isLookahead) this.updateContext(prevType);
  32343. };
  32344. _proto.readToken_numberSign = function readToken_numberSign() {
  32345. if (this.state.pos === 0 && this.readToken_interpreter()) {
  32346. return;
  32347. }
  32348. var nextPos = this.state.pos + 1;
  32349. var next = this.input.charCodeAt(nextPos);
  32350. if (next >= 48 && next <= 57) {
  32351. throw this.raise(this.state.pos, "Unexpected digit after hash token");
  32352. }
  32353. if (this.hasPlugin("classPrivateProperties") || this.hasPlugin("classPrivateMethods") || this.getPluginOption("pipelineOperator", "proposal") === "smart") {
  32354. this.finishOp(types.hash, 1);
  32355. } else {
  32356. throw this.raise(this.state.pos, "Unexpected character '#'");
  32357. }
  32358. };
  32359. _proto.readToken_dot = function readToken_dot() {
  32360. var next = this.input.charCodeAt(this.state.pos + 1);
  32361. if (next >= 48 && next <= 57) {
  32362. this.readNumber(true);
  32363. return;
  32364. }
  32365. if (next === 46 && this.input.charCodeAt(this.state.pos + 2) === 46) {
  32366. this.state.pos += 3;
  32367. this.finishToken(types.ellipsis);
  32368. } else {
  32369. ++this.state.pos;
  32370. this.finishToken(types.dot);
  32371. }
  32372. };
  32373. _proto.readToken_slash = function readToken_slash() {
  32374. if (this.state.exprAllowed && !this.state.inType) {
  32375. ++this.state.pos;
  32376. this.readRegexp();
  32377. return;
  32378. }
  32379. var next = this.input.charCodeAt(this.state.pos + 1);
  32380. if (next === 61) {
  32381. this.finishOp(types.assign, 2);
  32382. } else {
  32383. this.finishOp(types.slash, 1);
  32384. }
  32385. };
  32386. _proto.readToken_interpreter = function readToken_interpreter() {
  32387. if (this.state.pos !== 0 || this.length < 2) return false;
  32388. var start = this.state.pos;
  32389. this.state.pos += 1;
  32390. var ch = this.input.charCodeAt(this.state.pos);
  32391. if (ch !== 33) return false;
  32392. while (!isNewLine(ch) && ++this.state.pos < this.length) {
  32393. ch = this.input.charCodeAt(this.state.pos);
  32394. }
  32395. var value = this.input.slice(start + 2, this.state.pos);
  32396. this.finishToken(types.interpreterDirective, value);
  32397. return true;
  32398. };
  32399. _proto.readToken_mult_modulo = function readToken_mult_modulo(code) {
  32400. var type = code === 42 ? types.star : types.modulo;
  32401. var width = 1;
  32402. var next = this.input.charCodeAt(this.state.pos + 1);
  32403. var exprAllowed = this.state.exprAllowed;
  32404. if (code === 42 && next === 42) {
  32405. width++;
  32406. next = this.input.charCodeAt(this.state.pos + 2);
  32407. type = types.exponent;
  32408. }
  32409. if (next === 61 && !exprAllowed) {
  32410. width++;
  32411. type = types.assign;
  32412. }
  32413. this.finishOp(type, width);
  32414. };
  32415. _proto.readToken_pipe_amp = function readToken_pipe_amp(code) {
  32416. var next = this.input.charCodeAt(this.state.pos + 1);
  32417. if (next === code) {
  32418. if (this.input.charCodeAt(this.state.pos + 2) === 61) {
  32419. this.finishOp(types.assign, 3);
  32420. } else {
  32421. this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2);
  32422. }
  32423. return;
  32424. }
  32425. if (code === 124) {
  32426. if (next === 62) {
  32427. this.finishOp(types.pipeline, 2);
  32428. return;
  32429. }
  32430. }
  32431. if (next === 61) {
  32432. this.finishOp(types.assign, 2);
  32433. return;
  32434. }
  32435. this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1);
  32436. };
  32437. _proto.readToken_caret = function readToken_caret() {
  32438. var next = this.input.charCodeAt(this.state.pos + 1);
  32439. if (next === 61) {
  32440. this.finishOp(types.assign, 2);
  32441. } else {
  32442. this.finishOp(types.bitwiseXOR, 1);
  32443. }
  32444. };
  32445. _proto.readToken_plus_min = function readToken_plus_min(code) {
  32446. var next = this.input.charCodeAt(this.state.pos + 1);
  32447. if (next === code) {
  32448. if (next === 45 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 62 && (this.state.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.pos)))) {
  32449. this.skipLineComment(3);
  32450. this.skipSpace();
  32451. this.nextToken();
  32452. return;
  32453. }
  32454. this.finishOp(types.incDec, 2);
  32455. return;
  32456. }
  32457. if (next === 61) {
  32458. this.finishOp(types.assign, 2);
  32459. } else {
  32460. this.finishOp(types.plusMin, 1);
  32461. }
  32462. };
  32463. _proto.readToken_lt_gt = function readToken_lt_gt(code) {
  32464. var next = this.input.charCodeAt(this.state.pos + 1);
  32465. var size = 1;
  32466. if (next === code) {
  32467. size = code === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2;
  32468. if (this.input.charCodeAt(this.state.pos + size) === 61) {
  32469. this.finishOp(types.assign, size + 1);
  32470. return;
  32471. }
  32472. this.finishOp(types.bitShift, size);
  32473. return;
  32474. }
  32475. if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 45 && this.input.charCodeAt(this.state.pos + 3) === 45) {
  32476. this.skipLineComment(4);
  32477. this.skipSpace();
  32478. this.nextToken();
  32479. return;
  32480. }
  32481. if (next === 61) {
  32482. size = 2;
  32483. }
  32484. this.finishOp(types.relational, size);
  32485. };
  32486. _proto.readToken_eq_excl = function readToken_eq_excl(code) {
  32487. var next = this.input.charCodeAt(this.state.pos + 1);
  32488. if (next === 61) {
  32489. this.finishOp(types.equality, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2);
  32490. return;
  32491. }
  32492. if (code === 61 && next === 62) {
  32493. this.state.pos += 2;
  32494. this.finishToken(types.arrow);
  32495. return;
  32496. }
  32497. this.finishOp(code === 61 ? types.eq : types.bang, 1);
  32498. };
  32499. _proto.readToken_question = function readToken_question() {
  32500. var next = this.input.charCodeAt(this.state.pos + 1);
  32501. var next2 = this.input.charCodeAt(this.state.pos + 2);
  32502. if (next === 63 && !this.state.inType) {
  32503. if (next2 === 61) {
  32504. this.finishOp(types.assign, 3);
  32505. } else {
  32506. this.finishOp(types.nullishCoalescing, 2);
  32507. }
  32508. } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) {
  32509. this.state.pos += 2;
  32510. this.finishToken(types.questionDot);
  32511. } else {
  32512. ++this.state.pos;
  32513. this.finishToken(types.question);
  32514. }
  32515. };
  32516. _proto.getTokenFromCode = function getTokenFromCode(code) {
  32517. switch (code) {
  32518. case 46:
  32519. this.readToken_dot();
  32520. return;
  32521. case 40:
  32522. ++this.state.pos;
  32523. this.finishToken(types.parenL);
  32524. return;
  32525. case 41:
  32526. ++this.state.pos;
  32527. this.finishToken(types.parenR);
  32528. return;
  32529. case 59:
  32530. ++this.state.pos;
  32531. this.finishToken(types.semi);
  32532. return;
  32533. case 44:
  32534. ++this.state.pos;
  32535. this.finishToken(types.comma);
  32536. return;
  32537. case 91:
  32538. ++this.state.pos;
  32539. this.finishToken(types.bracketL);
  32540. return;
  32541. case 93:
  32542. ++this.state.pos;
  32543. this.finishToken(types.bracketR);
  32544. return;
  32545. case 123:
  32546. ++this.state.pos;
  32547. this.finishToken(types.braceL);
  32548. return;
  32549. case 125:
  32550. ++this.state.pos;
  32551. this.finishToken(types.braceR);
  32552. return;
  32553. case 58:
  32554. if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) {
  32555. this.finishOp(types.doubleColon, 2);
  32556. } else {
  32557. ++this.state.pos;
  32558. this.finishToken(types.colon);
  32559. }
  32560. return;
  32561. case 63:
  32562. this.readToken_question();
  32563. return;
  32564. case 96:
  32565. ++this.state.pos;
  32566. this.finishToken(types.backQuote);
  32567. return;
  32568. case 48:
  32569. {
  32570. var next = this.input.charCodeAt(this.state.pos + 1);
  32571. if (next === 120 || next === 88) {
  32572. this.readRadixNumber(16);
  32573. return;
  32574. }
  32575. if (next === 111 || next === 79) {
  32576. this.readRadixNumber(8);
  32577. return;
  32578. }
  32579. if (next === 98 || next === 66) {
  32580. this.readRadixNumber(2);
  32581. return;
  32582. }
  32583. }
  32584. case 49:
  32585. case 50:
  32586. case 51:
  32587. case 52:
  32588. case 53:
  32589. case 54:
  32590. case 55:
  32591. case 56:
  32592. case 57:
  32593. this.readNumber(false);
  32594. return;
  32595. case 34:
  32596. case 39:
  32597. this.readString(code);
  32598. return;
  32599. case 47:
  32600. this.readToken_slash();
  32601. return;
  32602. case 37:
  32603. case 42:
  32604. this.readToken_mult_modulo(code);
  32605. return;
  32606. case 124:
  32607. case 38:
  32608. this.readToken_pipe_amp(code);
  32609. return;
  32610. case 94:
  32611. this.readToken_caret();
  32612. return;
  32613. case 43:
  32614. case 45:
  32615. this.readToken_plus_min(code);
  32616. return;
  32617. case 60:
  32618. case 62:
  32619. this.readToken_lt_gt(code);
  32620. return;
  32621. case 61:
  32622. case 33:
  32623. this.readToken_eq_excl(code);
  32624. return;
  32625. case 126:
  32626. this.finishOp(types.tilde, 1);
  32627. return;
  32628. case 64:
  32629. ++this.state.pos;
  32630. this.finishToken(types.at);
  32631. return;
  32632. case 35:
  32633. this.readToken_numberSign();
  32634. return;
  32635. case 92:
  32636. this.readWord();
  32637. return;
  32638. default:
  32639. if (isIdentifierStart(code)) {
  32640. this.readWord();
  32641. return;
  32642. }
  32643. }
  32644. throw this.raise(this.state.pos, "Unexpected character '" + String.fromCodePoint(code) + "'");
  32645. };
  32646. _proto.finishOp = function finishOp(type, size) {
  32647. var str = this.input.slice(this.state.pos, this.state.pos + size);
  32648. this.state.pos += size;
  32649. this.finishToken(type, str);
  32650. };
  32651. _proto.readRegexp = function readRegexp() {
  32652. var start = this.state.pos;
  32653. var escaped, inClass;
  32654. for (;;) {
  32655. if (this.state.pos >= this.length) {
  32656. throw this.raise(start, "Unterminated regular expression");
  32657. }
  32658. var ch = this.input.charAt(this.state.pos);
  32659. if (lineBreak.test(ch)) {
  32660. throw this.raise(start, "Unterminated regular expression");
  32661. }
  32662. if (escaped) {
  32663. escaped = false;
  32664. } else {
  32665. if (ch === "[") {
  32666. inClass = true;
  32667. } else if (ch === "]" && inClass) {
  32668. inClass = false;
  32669. } else if (ch === "/" && !inClass) {
  32670. break;
  32671. }
  32672. escaped = ch === "\\";
  32673. }
  32674. ++this.state.pos;
  32675. }
  32676. var content = this.input.slice(start, this.state.pos);
  32677. ++this.state.pos;
  32678. var mods = "";
  32679. while (this.state.pos < this.length) {
  32680. var _char = this.input[this.state.pos];
  32681. var charCode = this.input.codePointAt(this.state.pos);
  32682. if (VALID_REGEX_FLAGS.has(_char)) {
  32683. if (mods.indexOf(_char) > -1) {
  32684. this.raise(this.state.pos + 1, "Duplicate regular expression flag");
  32685. }
  32686. } else if (isIdentifierChar(charCode) || charCode === 92) {
  32687. this.raise(this.state.pos + 1, "Invalid regular expression flag");
  32688. } else {
  32689. break;
  32690. }
  32691. ++this.state.pos;
  32692. mods += _char;
  32693. }
  32694. this.finishToken(types.regexp, {
  32695. pattern: content,
  32696. flags: mods
  32697. });
  32698. };
  32699. _proto.readInt = function readInt(radix, len, forceLen, allowNumSeparator) {
  32700. if (allowNumSeparator === void 0) {
  32701. allowNumSeparator = true;
  32702. }
  32703. var start = this.state.pos;
  32704. var forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
  32705. var allowedSiblings = radix === 16 ? allowedNumericSeparatorSiblings.hex : radix === 10 ? allowedNumericSeparatorSiblings.dec : radix === 8 ? allowedNumericSeparatorSiblings.oct : allowedNumericSeparatorSiblings.bin;
  32706. var invalid = false;
  32707. var total = 0;
  32708. for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) {
  32709. var code = this.input.charCodeAt(this.state.pos);
  32710. var val = void 0;
  32711. if (this.hasPlugin("numericSeparator")) {
  32712. if (code === 95) {
  32713. var prev = this.input.charCodeAt(this.state.pos - 1);
  32714. var next = this.input.charCodeAt(this.state.pos + 1);
  32715. if (allowedSiblings.indexOf(next) === -1) {
  32716. this.raise(this.state.pos, "A numeric separator is only allowed between two digits");
  32717. } else if (forbiddenSiblings.indexOf(prev) > -1 || forbiddenSiblings.indexOf(next) > -1 || Number.isNaN(next)) {
  32718. this.raise(this.state.pos, "A numeric separator is only allowed between two digits");
  32719. }
  32720. if (!allowNumSeparator) {
  32721. this.raise(this.state.pos, "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences");
  32722. }
  32723. ++this.state.pos;
  32724. continue;
  32725. }
  32726. }
  32727. if (code >= 97) {
  32728. val = code - 97 + 10;
  32729. } else if (code >= 65) {
  32730. val = code - 65 + 10;
  32731. } else if (_isDigit(code)) {
  32732. val = code - 48;
  32733. } else {
  32734. val = Infinity;
  32735. }
  32736. if (val >= radix) {
  32737. if (this.options.errorRecovery && val <= 9) {
  32738. val = 0;
  32739. this.raise(this.state.start + i + 2, "Expected number in radix " + radix);
  32740. } else if (forceLen) {
  32741. val = 0;
  32742. invalid = true;
  32743. } else {
  32744. break;
  32745. }
  32746. }
  32747. ++this.state.pos;
  32748. total = total * radix + val;
  32749. }
  32750. if (this.state.pos === start || len != null && this.state.pos - start !== len || invalid) {
  32751. return null;
  32752. }
  32753. return total;
  32754. };
  32755. _proto.readRadixNumber = function readRadixNumber(radix) {
  32756. var start = this.state.pos;
  32757. var isBigInt = false;
  32758. this.state.pos += 2;
  32759. var val = this.readInt(radix);
  32760. if (val == null) {
  32761. this.raise(this.state.start + 2, "Expected number in radix " + radix);
  32762. }
  32763. if (this.hasPlugin("bigInt")) {
  32764. if (this.input.charCodeAt(this.state.pos) === 110) {
  32765. ++this.state.pos;
  32766. isBigInt = true;
  32767. }
  32768. }
  32769. if (isIdentifierStart(this.input.codePointAt(this.state.pos))) {
  32770. throw this.raise(this.state.pos, "Identifier directly after number");
  32771. }
  32772. if (isBigInt) {
  32773. var str = this.input.slice(start, this.state.pos).replace(/[_n]/g, "");
  32774. this.finishToken(types.bigint, str);
  32775. return;
  32776. }
  32777. this.finishToken(types.num, val);
  32778. };
  32779. _proto.readNumber = function readNumber(startsWithDot) {
  32780. var start = this.state.pos;
  32781. var isFloat = false;
  32782. var isBigInt = false;
  32783. var isNonOctalDecimalInt = false;
  32784. if (!startsWithDot && this.readInt(10) === null) {
  32785. this.raise(start, "Invalid number");
  32786. }
  32787. var octal = this.state.pos - start >= 2 && this.input.charCodeAt(start) === 48;
  32788. if (octal) {
  32789. if (this.state.strict) {
  32790. this.raise(start, "Legacy octal literals are not allowed in strict mode");
  32791. }
  32792. if (/[89]/.test(this.input.slice(start, this.state.pos))) {
  32793. octal = false;
  32794. isNonOctalDecimalInt = true;
  32795. }
  32796. }
  32797. var next = this.input.charCodeAt(this.state.pos);
  32798. if (next === 46 && !octal) {
  32799. ++this.state.pos;
  32800. this.readInt(10);
  32801. isFloat = true;
  32802. next = this.input.charCodeAt(this.state.pos);
  32803. }
  32804. if ((next === 69 || next === 101) && !octal) {
  32805. next = this.input.charCodeAt(++this.state.pos);
  32806. if (next === 43 || next === 45) {
  32807. ++this.state.pos;
  32808. }
  32809. if (this.readInt(10) === null) this.raise(start, "Invalid number");
  32810. isFloat = true;
  32811. next = this.input.charCodeAt(this.state.pos);
  32812. }
  32813. if (this.hasPlugin("numericSeparator") && (octal || isNonOctalDecimalInt)) {
  32814. var underscorePos = this.input.slice(start, this.state.pos).indexOf("_");
  32815. if (underscorePos > 0) {
  32816. this.raise(underscorePos + start, "Numeric separator can not be used after leading 0");
  32817. }
  32818. }
  32819. if (this.hasPlugin("bigInt")) {
  32820. if (next === 110) {
  32821. if (isFloat || octal || isNonOctalDecimalInt) {
  32822. this.raise(start, "Invalid BigIntLiteral");
  32823. }
  32824. ++this.state.pos;
  32825. isBigInt = true;
  32826. }
  32827. }
  32828. if (isIdentifierStart(this.input.codePointAt(this.state.pos))) {
  32829. throw this.raise(this.state.pos, "Identifier directly after number");
  32830. }
  32831. var str = this.input.slice(start, this.state.pos).replace(/[_n]/g, "");
  32832. if (isBigInt) {
  32833. this.finishToken(types.bigint, str);
  32834. return;
  32835. }
  32836. var val = octal ? parseInt(str, 8) : parseFloat(str);
  32837. this.finishToken(types.num, val);
  32838. };
  32839. _proto.readCodePoint = function readCodePoint(throwOnInvalid) {
  32840. var ch = this.input.charCodeAt(this.state.pos);
  32841. var code;
  32842. if (ch === 123) {
  32843. var codePos = ++this.state.pos;
  32844. code = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, true, throwOnInvalid);
  32845. ++this.state.pos;
  32846. if (code !== null && code > 0x10ffff) {
  32847. if (throwOnInvalid) {
  32848. this.raise(codePos, "Code point out of bounds");
  32849. } else {
  32850. return null;
  32851. }
  32852. }
  32853. } else {
  32854. code = this.readHexChar(4, false, throwOnInvalid);
  32855. }
  32856. return code;
  32857. };
  32858. _proto.readString = function readString(quote) {
  32859. var out = "",
  32860. chunkStart = ++this.state.pos;
  32861. for (;;) {
  32862. if (this.state.pos >= this.length) {
  32863. throw this.raise(this.state.start, "Unterminated string constant");
  32864. }
  32865. var ch = this.input.charCodeAt(this.state.pos);
  32866. if (ch === quote) break;
  32867. if (ch === 92) {
  32868. out += this.input.slice(chunkStart, this.state.pos);
  32869. out += this.readEscapedChar(false);
  32870. chunkStart = this.state.pos;
  32871. } else if (ch === 8232 || ch === 8233) {
  32872. ++this.state.pos;
  32873. ++this.state.curLine;
  32874. this.state.lineStart = this.state.pos;
  32875. } else if (isNewLine(ch)) {
  32876. throw this.raise(this.state.start, "Unterminated string constant");
  32877. } else {
  32878. ++this.state.pos;
  32879. }
  32880. }
  32881. out += this.input.slice(chunkStart, this.state.pos++);
  32882. this.finishToken(types.string, out);
  32883. };
  32884. _proto.readTmplToken = function readTmplToken() {
  32885. var out = "",
  32886. chunkStart = this.state.pos,
  32887. containsInvalid = false;
  32888. for (;;) {
  32889. if (this.state.pos >= this.length) {
  32890. throw this.raise(this.state.start, "Unterminated template");
  32891. }
  32892. var ch = this.input.charCodeAt(this.state.pos);
  32893. if (ch === 96 || ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) {
  32894. if (this.state.pos === this.state.start && this.match(types.template)) {
  32895. if (ch === 36) {
  32896. this.state.pos += 2;
  32897. this.finishToken(types.dollarBraceL);
  32898. return;
  32899. } else {
  32900. ++this.state.pos;
  32901. this.finishToken(types.backQuote);
  32902. return;
  32903. }
  32904. }
  32905. out += this.input.slice(chunkStart, this.state.pos);
  32906. this.finishToken(types.template, containsInvalid ? null : out);
  32907. return;
  32908. }
  32909. if (ch === 92) {
  32910. out += this.input.slice(chunkStart, this.state.pos);
  32911. var escaped = this.readEscapedChar(true);
  32912. if (escaped === null) {
  32913. containsInvalid = true;
  32914. } else {
  32915. out += escaped;
  32916. }
  32917. chunkStart = this.state.pos;
  32918. } else if (isNewLine(ch)) {
  32919. out += this.input.slice(chunkStart, this.state.pos);
  32920. ++this.state.pos;
  32921. switch (ch) {
  32922. case 13:
  32923. if (this.input.charCodeAt(this.state.pos) === 10) {
  32924. ++this.state.pos;
  32925. }
  32926. case 10:
  32927. out += "\n";
  32928. break;
  32929. default:
  32930. out += String.fromCharCode(ch);
  32931. break;
  32932. }
  32933. ++this.state.curLine;
  32934. this.state.lineStart = this.state.pos;
  32935. chunkStart = this.state.pos;
  32936. } else {
  32937. ++this.state.pos;
  32938. }
  32939. }
  32940. };
  32941. _proto.readEscapedChar = function readEscapedChar(inTemplate) {
  32942. var throwOnInvalid = !inTemplate;
  32943. var ch = this.input.charCodeAt(++this.state.pos);
  32944. ++this.state.pos;
  32945. switch (ch) {
  32946. case 110:
  32947. return "\n";
  32948. case 114:
  32949. return "\r";
  32950. case 120:
  32951. {
  32952. var code = this.readHexChar(2, false, throwOnInvalid);
  32953. return code === null ? null : String.fromCharCode(code);
  32954. }
  32955. case 117:
  32956. {
  32957. var _code = this.readCodePoint(throwOnInvalid);
  32958. return _code === null ? null : String.fromCodePoint(_code);
  32959. }
  32960. case 116:
  32961. return "\t";
  32962. case 98:
  32963. return "\b";
  32964. case 118:
  32965. return "\x0B";
  32966. case 102:
  32967. return "\f";
  32968. case 13:
  32969. if (this.input.charCodeAt(this.state.pos) === 10) {
  32970. ++this.state.pos;
  32971. }
  32972. case 10:
  32973. this.state.lineStart = this.state.pos;
  32974. ++this.state.curLine;
  32975. case 8232:
  32976. case 8233:
  32977. return "";
  32978. case 56:
  32979. case 57:
  32980. if (inTemplate) {
  32981. return null;
  32982. }
  32983. default:
  32984. if (ch >= 48 && ch <= 55) {
  32985. var codePos = this.state.pos - 1;
  32986. var octalStr = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/)[0];
  32987. var octal = parseInt(octalStr, 8);
  32988. if (octal > 255) {
  32989. octalStr = octalStr.slice(0, -1);
  32990. octal = parseInt(octalStr, 8);
  32991. }
  32992. this.state.pos += octalStr.length - 1;
  32993. var next = this.input.charCodeAt(this.state.pos);
  32994. if (octalStr !== "0" || next === 56 || next === 57) {
  32995. if (inTemplate) {
  32996. return null;
  32997. } else if (this.state.strict) {
  32998. this.raise(codePos, "Octal literal in strict mode");
  32999. } else if (!this.state.containsOctal) {
  33000. this.state.containsOctal = true;
  33001. this.state.octalPosition = codePos;
  33002. }
  33003. }
  33004. return String.fromCharCode(octal);
  33005. }
  33006. return String.fromCharCode(ch);
  33007. }
  33008. };
  33009. _proto.readHexChar = function readHexChar(len, forceLen, throwOnInvalid) {
  33010. var codePos = this.state.pos;
  33011. var n = this.readInt(16, len, forceLen, false);
  33012. if (n === null) {
  33013. if (throwOnInvalid) {
  33014. this.raise(codePos, "Bad character escape sequence");
  33015. } else {
  33016. this.state.pos = codePos - 1;
  33017. }
  33018. }
  33019. return n;
  33020. };
  33021. _proto.readWord1 = function readWord1() {
  33022. var word = "";
  33023. this.state.containsEsc = false;
  33024. var start = this.state.pos;
  33025. var chunkStart = this.state.pos;
  33026. while (this.state.pos < this.length) {
  33027. var ch = this.input.codePointAt(this.state.pos);
  33028. if (isIdentifierChar(ch)) {
  33029. this.state.pos += ch <= 0xffff ? 1 : 2;
  33030. } else if (this.state.isIterator && ch === 64) {
  33031. ++this.state.pos;
  33032. } else if (ch === 92) {
  33033. this.state.containsEsc = true;
  33034. word += this.input.slice(chunkStart, this.state.pos);
  33035. var escStart = this.state.pos;
  33036. var identifierCheck = this.state.pos === start ? isIdentifierStart : isIdentifierChar;
  33037. if (this.input.charCodeAt(++this.state.pos) !== 117) {
  33038. this.raise(this.state.pos, "Expecting Unicode escape sequence \\uXXXX");
  33039. continue;
  33040. }
  33041. ++this.state.pos;
  33042. var esc = this.readCodePoint(true);
  33043. if (esc !== null) {
  33044. if (!identifierCheck(esc)) {
  33045. this.raise(escStart, "Invalid Unicode escape");
  33046. }
  33047. word += String.fromCodePoint(esc);
  33048. }
  33049. chunkStart = this.state.pos;
  33050. } else {
  33051. break;
  33052. }
  33053. }
  33054. return word + this.input.slice(chunkStart, this.state.pos);
  33055. };
  33056. _proto.isIterator = function isIterator(word) {
  33057. return word === "@@iterator" || word === "@@asyncIterator";
  33058. };
  33059. _proto.readWord = function readWord() {
  33060. var word = this.readWord1();
  33061. var type = keywords.get(word) || types.name;
  33062. if (this.state.isIterator && (!this.isIterator(word) || !this.state.inType)) {
  33063. this.raise(this.state.pos, "Invalid identifier " + word);
  33064. }
  33065. this.finishToken(type, word);
  33066. };
  33067. _proto.checkKeywordEscapes = function checkKeywordEscapes() {
  33068. var kw = this.state.type.keyword;
  33069. if (kw && this.state.containsEsc) {
  33070. this.raise(this.state.start, "Escape sequence in keyword " + kw);
  33071. }
  33072. };
  33073. _proto.braceIsBlock = function braceIsBlock(prevType) {
  33074. var parent = this.curContext();
  33075. if (parent === types$1.functionExpression || parent === types$1.functionStatement) {
  33076. return true;
  33077. }
  33078. if (prevType === types.colon && (parent === types$1.braceStatement || parent === types$1.braceExpression)) {
  33079. return !parent.isExpr;
  33080. }
  33081. if (prevType === types._return || prevType === types.name && this.state.exprAllowed) {
  33082. return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start));
  33083. }
  33084. if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR || prevType === types.arrow) {
  33085. return true;
  33086. }
  33087. if (prevType === types.braceL) {
  33088. return parent === types$1.braceStatement;
  33089. }
  33090. if (prevType === types._var || prevType === types._const || prevType === types.name) {
  33091. return false;
  33092. }
  33093. if (prevType === types.relational) {
  33094. return true;
  33095. }
  33096. return !this.state.exprAllowed;
  33097. };
  33098. _proto.updateContext = function updateContext(prevType) {
  33099. var type = this.state.type;
  33100. var update;
  33101. if (type.keyword && (prevType === types.dot || prevType === types.questionDot)) {
  33102. this.state.exprAllowed = false;
  33103. } else if (update = type.updateContext) {
  33104. update.call(this, prevType);
  33105. } else {
  33106. this.state.exprAllowed = type.beforeExpr;
  33107. }
  33108. };
  33109. return Tokenizer;
  33110. }(LocationParser);
  33111. var literal = /^('|")((?:\\?.)*?)\1/;
  33112. var UtilParser = function (_Tokenizer) {
  33113. _inheritsLoose(UtilParser, _Tokenizer);
  33114. function UtilParser() {
  33115. return _Tokenizer.apply(this, arguments) || this;
  33116. }
  33117. var _proto = UtilParser.prototype;
  33118. _proto.addExtra = function addExtra(node, key, val) {
  33119. if (!node) return;
  33120. var extra = node.extra = node.extra || {};
  33121. extra[key] = val;
  33122. };
  33123. _proto.isRelational = function isRelational(op) {
  33124. return this.match(types.relational) && this.state.value === op;
  33125. };
  33126. _proto.isLookaheadRelational = function isLookaheadRelational(op) {
  33127. var next = this.nextTokenStart();
  33128. if (this.input.charAt(next) === op) {
  33129. if (next + 1 === this.input.length) {
  33130. return true;
  33131. }
  33132. var afterNext = this.input.charCodeAt(next + 1);
  33133. return afterNext !== op.charCodeAt(0) && afterNext !== 61;
  33134. }
  33135. return false;
  33136. };
  33137. _proto.expectRelational = function expectRelational(op) {
  33138. if (this.isRelational(op)) {
  33139. this.next();
  33140. } else {
  33141. this.unexpected(null, types.relational);
  33142. }
  33143. };
  33144. _proto.isContextual = function isContextual(name) {
  33145. return this.match(types.name) && this.state.value === name && !this.state.containsEsc;
  33146. };
  33147. _proto.isUnparsedContextual = function isUnparsedContextual(nameStart, name) {
  33148. var nameEnd = nameStart + name.length;
  33149. return this.input.slice(nameStart, nameEnd) === name && (nameEnd === this.input.length || !isIdentifierChar(this.input.charCodeAt(nameEnd)));
  33150. };
  33151. _proto.isLookaheadContextual = function isLookaheadContextual(name) {
  33152. var next = this.nextTokenStart();
  33153. return this.isUnparsedContextual(next, name);
  33154. };
  33155. _proto.eatContextual = function eatContextual(name) {
  33156. return this.isContextual(name) && this.eat(types.name);
  33157. };
  33158. _proto.expectContextual = function expectContextual(name, message) {
  33159. if (!this.eatContextual(name)) this.unexpected(null, message);
  33160. };
  33161. _proto.canInsertSemicolon = function canInsertSemicolon() {
  33162. return this.match(types.eof) || this.match(types.braceR) || this.hasPrecedingLineBreak();
  33163. };
  33164. _proto.hasPrecedingLineBreak = function hasPrecedingLineBreak() {
  33165. return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start));
  33166. };
  33167. _proto.isLineTerminator = function isLineTerminator() {
  33168. return this.eat(types.semi) || this.canInsertSemicolon();
  33169. };
  33170. _proto.semicolon = function semicolon() {
  33171. if (!this.isLineTerminator()) this.unexpected(null, types.semi);
  33172. };
  33173. _proto.expect = function expect(type, pos) {
  33174. this.eat(type) || this.unexpected(pos, type);
  33175. };
  33176. _proto.assertNoSpace = function assertNoSpace(message) {
  33177. if (message === void 0) {
  33178. message = "Unexpected space.";
  33179. }
  33180. if (this.state.start > this.state.lastTokEnd) {
  33181. this.raise(this.state.lastTokEnd, message);
  33182. }
  33183. };
  33184. _proto.unexpected = function unexpected(pos, messageOrType) {
  33185. if (messageOrType === void 0) {
  33186. messageOrType = "Unexpected token";
  33187. }
  33188. if (typeof messageOrType !== "string") {
  33189. messageOrType = "Unexpected token, expected \"" + messageOrType.label + "\"";
  33190. }
  33191. throw this.raise(pos != null ? pos : this.state.start, messageOrType);
  33192. };
  33193. _proto.expectPlugin = function expectPlugin(name, pos) {
  33194. if (!this.hasPlugin(name)) {
  33195. throw this.raise(pos != null ? pos : this.state.start, "This experimental syntax requires enabling the parser plugin: '" + name + "'", {
  33196. missingPluginNames: [name]
  33197. });
  33198. }
  33199. return true;
  33200. };
  33201. _proto.expectOnePlugin = function expectOnePlugin(names, pos) {
  33202. var _this = this;
  33203. if (!names.some(function (n) {
  33204. return _this.hasPlugin(n);
  33205. })) {
  33206. throw this.raise(pos != null ? pos : this.state.start, "This experimental syntax requires enabling one of the following parser plugin(s): '" + names.join(", ") + "'", {
  33207. missingPluginNames: names
  33208. });
  33209. }
  33210. };
  33211. _proto.checkYieldAwaitInDefaultParams = function checkYieldAwaitInDefaultParams() {
  33212. if (this.state.yieldPos !== -1 && (this.state.awaitPos === -1 || this.state.yieldPos < this.state.awaitPos)) {
  33213. this.raise(this.state.yieldPos, "Yield cannot be used as name inside a generator function");
  33214. }
  33215. if (this.state.awaitPos !== -1) {
  33216. this.raise(this.state.awaitPos, "Await cannot be used as name inside an async function");
  33217. }
  33218. };
  33219. _proto.strictDirective = function strictDirective(start) {
  33220. for (;;) {
  33221. skipWhiteSpace.lastIndex = start;
  33222. start += skipWhiteSpace.exec(this.input)[0].length;
  33223. var match = literal.exec(this.input.slice(start));
  33224. if (!match) break;
  33225. if (match[2] === "use strict") return true;
  33226. start += match[0].length;
  33227. skipWhiteSpace.lastIndex = start;
  33228. start += skipWhiteSpace.exec(this.input)[0].length;
  33229. if (this.input[start] === ";") {
  33230. start++;
  33231. }
  33232. }
  33233. return false;
  33234. };
  33235. _proto.tryParse = function tryParse(fn, oldState) {
  33236. if (oldState === void 0) {
  33237. oldState = this.state.clone();
  33238. }
  33239. var abortSignal = {
  33240. node: null
  33241. };
  33242. try {
  33243. var _node = fn(function (node) {
  33244. if (node === void 0) {
  33245. node = null;
  33246. }
  33247. abortSignal.node = node;
  33248. throw abortSignal;
  33249. });
  33250. if (this.state.errors.length > oldState.errors.length) {
  33251. var failState = this.state;
  33252. this.state = oldState;
  33253. return {
  33254. node: _node,
  33255. error: failState.errors[oldState.errors.length],
  33256. thrown: false,
  33257. aborted: false,
  33258. failState: failState
  33259. };
  33260. }
  33261. return {
  33262. node: _node,
  33263. error: null,
  33264. thrown: false,
  33265. aborted: false,
  33266. failState: null
  33267. };
  33268. } catch (error) {
  33269. var _failState = this.state;
  33270. this.state = oldState;
  33271. if (error instanceof SyntaxError) {
  33272. return {
  33273. node: null,
  33274. error: error,
  33275. thrown: true,
  33276. aborted: false,
  33277. failState: _failState
  33278. };
  33279. }
  33280. if (error === abortSignal) {
  33281. return {
  33282. node: abortSignal.node,
  33283. error: null,
  33284. thrown: false,
  33285. aborted: true,
  33286. failState: _failState
  33287. };
  33288. }
  33289. throw error;
  33290. }
  33291. };
  33292. return UtilParser;
  33293. }(Tokenizer);
  33294. var Node = function () {
  33295. function Node(parser, pos, loc) {
  33296. this.type = "";
  33297. this.start = pos;
  33298. this.end = 0;
  33299. this.loc = new SourceLocation(loc);
  33300. if (parser && parser.options.ranges) this.range = [pos, 0];
  33301. if (parser && parser.filename) this.loc.filename = parser.filename;
  33302. }
  33303. var _proto = Node.prototype;
  33304. _proto.__clone = function __clone() {
  33305. var newNode = new Node();
  33306. var keys = Object.keys(this);
  33307. for (var i = 0, length = keys.length; i < length; i++) {
  33308. var _key = keys[i];
  33309. if (_key !== "leadingComments" && _key !== "trailingComments" && _key !== "innerComments") {
  33310. newNode[_key] = this[_key];
  33311. }
  33312. }
  33313. return newNode;
  33314. };
  33315. return Node;
  33316. }();
  33317. var NodeUtils = function (_UtilParser) {
  33318. _inheritsLoose(NodeUtils, _UtilParser);
  33319. function NodeUtils() {
  33320. return _UtilParser.apply(this, arguments) || this;
  33321. }
  33322. var _proto2 = NodeUtils.prototype;
  33323. _proto2.startNode = function startNode() {
  33324. return new Node(this, this.state.start, this.state.startLoc);
  33325. };
  33326. _proto2.startNodeAt = function startNodeAt(pos, loc) {
  33327. return new Node(this, pos, loc);
  33328. };
  33329. _proto2.startNodeAtNode = function startNodeAtNode(type) {
  33330. return this.startNodeAt(type.start, type.loc.start);
  33331. };
  33332. _proto2.finishNode = function finishNode(node, type) {
  33333. return this.finishNodeAt(node, type, this.state.lastTokEnd, this.state.lastTokEndLoc);
  33334. };
  33335. _proto2.finishNodeAt = function finishNodeAt(node, type, pos, loc) {
  33336. if ( node.end > 0) {
  33337. throw new Error("Do not call finishNode*() twice on the same node." + " Instead use resetEndLocation() or change type directly.");
  33338. }
  33339. node.type = type;
  33340. node.end = pos;
  33341. node.loc.end = loc;
  33342. if (this.options.ranges) node.range[1] = pos;
  33343. this.processComment(node);
  33344. return node;
  33345. };
  33346. _proto2.resetStartLocation = function resetStartLocation(node, start, startLoc) {
  33347. node.start = start;
  33348. node.loc.start = startLoc;
  33349. if (this.options.ranges) node.range[0] = start;
  33350. };
  33351. _proto2.resetEndLocation = function resetEndLocation(node, end, endLoc) {
  33352. if (end === void 0) {
  33353. end = this.state.lastTokEnd;
  33354. }
  33355. if (endLoc === void 0) {
  33356. endLoc = this.state.lastTokEndLoc;
  33357. }
  33358. node.end = end;
  33359. node.loc.end = endLoc;
  33360. if (this.options.ranges) node.range[1] = end;
  33361. };
  33362. _proto2.resetStartLocationFromNode = function resetStartLocationFromNode(node, locationNode) {
  33363. this.resetStartLocation(node, locationNode.start, locationNode.loc.start);
  33364. };
  33365. return NodeUtils;
  33366. }(UtilParser);
  33367. var unwrapParenthesizedExpression = function unwrapParenthesizedExpression(node) {
  33368. return node.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node.expression) : node;
  33369. };
  33370. var LValParser = function (_NodeUtils) {
  33371. _inheritsLoose(LValParser, _NodeUtils);
  33372. function LValParser() {
  33373. return _NodeUtils.apply(this, arguments) || this;
  33374. }
  33375. var _proto = LValParser.prototype;
  33376. _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) {
  33377. var _node$extra3;
  33378. if (node) {
  33379. var _node$extra;
  33380. if (this.options.createParenthesizedExpressions && node.type === "ParenthesizedExpression" || ((_node$extra = node.extra) == null ? void 0 : _node$extra.parenthesized)) {
  33381. var parenthesized = unwrapParenthesizedExpression(node);
  33382. if (parenthesized.type !== "Identifier" && parenthesized.type !== "MemberExpression") {
  33383. this.raise(node.start, "Invalid parenthesized assignment pattern");
  33384. }
  33385. }
  33386. switch (node.type) {
  33387. case "Identifier":
  33388. case "ObjectPattern":
  33389. case "ArrayPattern":
  33390. case "AssignmentPattern":
  33391. break;
  33392. case "ObjectExpression":
  33393. node.type = "ObjectPattern";
  33394. for (var i = 0, length = node.properties.length, last = length - 1; i < length; i++) {
  33395. var _node$extra2;
  33396. var prop = node.properties[i];
  33397. var isLast = i === last;
  33398. this.toAssignableObjectExpressionProp(prop, isBinding, isLast);
  33399. if (isLast && prop.type === "RestElement" && ((_node$extra2 = node.extra) == null ? void 0 : _node$extra2.trailingComma)) {
  33400. this.raiseRestNotLast(node.extra.trailingComma);
  33401. }
  33402. }
  33403. break;
  33404. case "ObjectProperty":
  33405. this.toAssignable(node.value, isBinding, contextDescription);
  33406. break;
  33407. case "SpreadElement":
  33408. {
  33409. this.checkToRestConversion(node);
  33410. node.type = "RestElement";
  33411. var arg = node.argument;
  33412. this.toAssignable(arg, isBinding, contextDescription);
  33413. break;
  33414. }
  33415. case "ArrayExpression":
  33416. node.type = "ArrayPattern";
  33417. this.toAssignableList(node.elements, isBinding, contextDescription, (_node$extra3 = node.extra) == null ? void 0 : _node$extra3.trailingComma);
  33418. break;
  33419. case "AssignmentExpression":
  33420. if (node.operator !== "=") {
  33421. this.raise(node.left.end, "Only '=' operator can be used for specifying default value.");
  33422. }
  33423. node.type = "AssignmentPattern";
  33424. delete node.operator;
  33425. this.toAssignable(node.left, isBinding, contextDescription);
  33426. break;
  33427. case "ParenthesizedExpression":
  33428. node.expression = this.toAssignable(node.expression, isBinding, contextDescription);
  33429. break;
  33430. }
  33431. }
  33432. return node;
  33433. };
  33434. _proto.toAssignableObjectExpressionProp = function toAssignableObjectExpressionProp(prop, isBinding, isLast) {
  33435. if (prop.type === "ObjectMethod") {
  33436. var error = prop.kind === "get" || prop.kind === "set" ? "Object pattern can't contain getter or setter" : "Object pattern can't contain methods";
  33437. this.raise(prop.key.start, error);
  33438. } else if (prop.type === "SpreadElement" && !isLast) {
  33439. this.raiseRestNotLast(prop.start);
  33440. } else {
  33441. this.toAssignable(prop, isBinding, "object destructuring pattern");
  33442. }
  33443. };
  33444. _proto.toAssignableList = function toAssignableList(exprList, isBinding, contextDescription, trailingCommaPos) {
  33445. var end = exprList.length;
  33446. if (end) {
  33447. var last = exprList[end - 1];
  33448. if (last && last.type === "RestElement") {
  33449. --end;
  33450. } else if (last && last.type === "SpreadElement") {
  33451. last.type = "RestElement";
  33452. var arg = last.argument;
  33453. this.toAssignable(arg, isBinding, contextDescription);
  33454. if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern" && arg.type !== "ObjectPattern") {
  33455. this.unexpected(arg.start);
  33456. }
  33457. if (trailingCommaPos) {
  33458. this.raiseTrailingCommaAfterRest(trailingCommaPos);
  33459. }
  33460. --end;
  33461. }
  33462. }
  33463. for (var i = 0; i < end; i++) {
  33464. var elt = exprList[i];
  33465. if (elt) {
  33466. this.toAssignable(elt, isBinding, contextDescription);
  33467. if (elt.type === "RestElement") {
  33468. this.raiseRestNotLast(elt.start);
  33469. }
  33470. }
  33471. }
  33472. return exprList;
  33473. };
  33474. _proto.toReferencedList = function toReferencedList(exprList, isParenthesizedExpr) {
  33475. return exprList;
  33476. };
  33477. _proto.toReferencedListDeep = function toReferencedListDeep(exprList, isParenthesizedExpr) {
  33478. this.toReferencedList(exprList, isParenthesizedExpr);
  33479. for (var _i2 = 0; _i2 < exprList.length; _i2++) {
  33480. var expr = exprList[_i2];
  33481. if (expr && expr.type === "ArrayExpression") {
  33482. this.toReferencedListDeep(expr.elements);
  33483. }
  33484. }
  33485. };
  33486. _proto.parseSpread = function parseSpread(refShorthandDefaultPos, refNeedsArrowPos) {
  33487. var node = this.startNode();
  33488. this.next();
  33489. node.argument = this.parseMaybeAssign(false, refShorthandDefaultPos, undefined, refNeedsArrowPos);
  33490. return this.finishNode(node, "SpreadElement");
  33491. };
  33492. _proto.parseRestBinding = function parseRestBinding() {
  33493. var node = this.startNode();
  33494. this.next();
  33495. node.argument = this.parseBindingAtom();
  33496. return this.finishNode(node, "RestElement");
  33497. };
  33498. _proto.parseBindingAtom = function parseBindingAtom() {
  33499. switch (this.state.type) {
  33500. case types.bracketL:
  33501. {
  33502. var node = this.startNode();
  33503. this.next();
  33504. node.elements = this.parseBindingList(types.bracketR, 93, true);
  33505. return this.finishNode(node, "ArrayPattern");
  33506. }
  33507. case types.braceL:
  33508. return this.parseObj(true);
  33509. }
  33510. return this.parseIdentifier();
  33511. };
  33512. _proto.parseBindingList = function parseBindingList(close, closeCharCode, allowEmpty, allowModifiers) {
  33513. var elts = [];
  33514. var first = true;
  33515. while (!this.eat(close)) {
  33516. if (first) {
  33517. first = false;
  33518. } else {
  33519. this.expect(types.comma);
  33520. }
  33521. if (allowEmpty && this.match(types.comma)) {
  33522. elts.push(null);
  33523. } else if (this.eat(close)) {
  33524. break;
  33525. } else if (this.match(types.ellipsis)) {
  33526. elts.push(this.parseAssignableListItemTypes(this.parseRestBinding()));
  33527. this.checkCommaAfterRest(closeCharCode);
  33528. this.expect(close);
  33529. break;
  33530. } else {
  33531. var decorators = [];
  33532. if (this.match(types.at) && this.hasPlugin("decorators")) {
  33533. this.raise(this.state.start, "Stage 2 decorators cannot be used to decorate parameters");
  33534. }
  33535. while (this.match(types.at)) {
  33536. decorators.push(this.parseDecorator());
  33537. }
  33538. elts.push(this.parseAssignableListItem(allowModifiers, decorators));
  33539. }
  33540. }
  33541. return elts;
  33542. };
  33543. _proto.parseAssignableListItem = function parseAssignableListItem(allowModifiers, decorators) {
  33544. var left = this.parseMaybeDefault();
  33545. this.parseAssignableListItemTypes(left);
  33546. var elt = this.parseMaybeDefault(left.start, left.loc.start, left);
  33547. if (decorators.length) {
  33548. left.decorators = decorators;
  33549. }
  33550. return elt;
  33551. };
  33552. _proto.parseAssignableListItemTypes = function parseAssignableListItemTypes(param) {
  33553. return param;
  33554. };
  33555. _proto.parseMaybeDefault = function parseMaybeDefault(startPos, startLoc, left) {
  33556. startLoc = startLoc || this.state.startLoc;
  33557. startPos = startPos || this.state.start;
  33558. left = left || this.parseBindingAtom();
  33559. if (!this.eat(types.eq)) return left;
  33560. var node = this.startNodeAt(startPos, startLoc);
  33561. node.left = left;
  33562. node.right = this.parseMaybeAssign();
  33563. return this.finishNode(node, "AssignmentPattern");
  33564. };
  33565. _proto.checkLVal = function checkLVal(expr, bindingType, checkClashes, contextDescription, disallowLetBinding, strictModeChanged) {
  33566. if (bindingType === void 0) {
  33567. bindingType = BIND_NONE;
  33568. }
  33569. if (strictModeChanged === void 0) {
  33570. strictModeChanged = false;
  33571. }
  33572. switch (expr.type) {
  33573. case "Identifier":
  33574. if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(expr.name, this.inModule) : isStrictBindOnlyReservedWord(expr.name))) {
  33575. this.raise(expr.start, (bindingType === BIND_NONE ? "Assigning to" : "Binding") + " '" + expr.name + "' in strict mode");
  33576. }
  33577. if (checkClashes) {
  33578. var _key = "_" + expr.name;
  33579. if (checkClashes[_key]) {
  33580. this.raise(expr.start, "Argument name clash");
  33581. } else {
  33582. checkClashes[_key] = true;
  33583. }
  33584. }
  33585. if (disallowLetBinding && expr.name === "let") {
  33586. this.raise(expr.start, "'let' is not allowed to be used as a name in 'let' or 'const' declarations.");
  33587. }
  33588. if (!(bindingType & BIND_NONE)) {
  33589. this.scope.declareName(expr.name, bindingType, expr.start);
  33590. }
  33591. break;
  33592. case "MemberExpression":
  33593. if (bindingType !== BIND_NONE) {
  33594. this.raise(expr.start, "Binding member expression");
  33595. }
  33596. break;
  33597. case "ObjectPattern":
  33598. for (var _i4 = 0, _expr$properties2 = expr.properties; _i4 < _expr$properties2.length; _i4++) {
  33599. var prop = _expr$properties2[_i4];
  33600. if (prop.type === "ObjectProperty") prop = prop.value;else if (prop.type === "ObjectMethod") continue;
  33601. this.checkLVal(prop, bindingType, checkClashes, "object destructuring pattern", disallowLetBinding);
  33602. }
  33603. break;
  33604. case "ArrayPattern":
  33605. for (var _i6 = 0, _expr$elements2 = expr.elements; _i6 < _expr$elements2.length; _i6++) {
  33606. var elem = _expr$elements2[_i6];
  33607. if (elem) {
  33608. this.checkLVal(elem, bindingType, checkClashes, "array destructuring pattern", disallowLetBinding);
  33609. }
  33610. }
  33611. break;
  33612. case "AssignmentPattern":
  33613. this.checkLVal(expr.left, bindingType, checkClashes, "assignment pattern");
  33614. break;
  33615. case "RestElement":
  33616. this.checkLVal(expr.argument, bindingType, checkClashes, "rest element");
  33617. break;
  33618. case "ParenthesizedExpression":
  33619. this.checkLVal(expr.expression, bindingType, checkClashes, "parenthesized expression");
  33620. break;
  33621. default:
  33622. {
  33623. var message = (bindingType === BIND_NONE ? "Invalid" : "Binding invalid") + " left-hand side" + (contextDescription ? " in " + contextDescription : "expression");
  33624. this.raise(expr.start, message);
  33625. }
  33626. }
  33627. };
  33628. _proto.checkToRestConversion = function checkToRestConversion(node) {
  33629. if (node.argument.type !== "Identifier" && node.argument.type !== "MemberExpression") {
  33630. this.raise(node.argument.start, "Invalid rest operator's argument");
  33631. }
  33632. };
  33633. _proto.checkCommaAfterRest = function checkCommaAfterRest(close) {
  33634. if (this.match(types.comma)) {
  33635. if (this.lookaheadCharCode() === close) {
  33636. this.raiseTrailingCommaAfterRest(this.state.start);
  33637. } else {
  33638. this.raiseRestNotLast(this.state.start);
  33639. }
  33640. }
  33641. };
  33642. _proto.raiseRestNotLast = function raiseRestNotLast(pos) {
  33643. throw this.raise(pos, "Rest element must be last element");
  33644. };
  33645. _proto.raiseTrailingCommaAfterRest = function raiseTrailingCommaAfterRest(pos) {
  33646. this.raise(pos, "Unexpected trailing comma after rest element");
  33647. };
  33648. return LValParser;
  33649. }(NodeUtils);
  33650. var ExpressionParser = function (_LValParser) {
  33651. _inheritsLoose(ExpressionParser, _LValParser);
  33652. function ExpressionParser() {
  33653. return _LValParser.apply(this, arguments) || this;
  33654. }
  33655. var _proto = ExpressionParser.prototype;
  33656. _proto.checkDuplicatedProto = function checkDuplicatedProto(prop, protoRef) {
  33657. if (prop.type === "SpreadElement" || prop.computed || prop.kind || prop.shorthand) {
  33658. return;
  33659. }
  33660. var key = prop.key;
  33661. var name = key.type === "Identifier" ? key.name : String(key.value);
  33662. if (name === "__proto__") {
  33663. if (protoRef.used && !protoRef.start) {
  33664. protoRef.start = key.start;
  33665. }
  33666. protoRef.used = true;
  33667. }
  33668. };
  33669. _proto.getExpression = function getExpression() {
  33670. var scopeFlags = SCOPE_PROGRAM;
  33671. if (this.hasPlugin("topLevelAwait") && this.inModule) {
  33672. scopeFlags |= SCOPE_ASYNC;
  33673. }
  33674. this.scope.enter(scopeFlags);
  33675. this.nextToken();
  33676. var expr = this.parseExpression();
  33677. if (!this.match(types.eof)) {
  33678. this.unexpected();
  33679. }
  33680. expr.comments = this.state.comments;
  33681. expr.errors = this.state.errors;
  33682. return expr;
  33683. };
  33684. _proto.parseExpression = function parseExpression(noIn, refShorthandDefaultPos) {
  33685. var startPos = this.state.start;
  33686. var startLoc = this.state.startLoc;
  33687. var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos);
  33688. if (this.match(types.comma)) {
  33689. var _node = this.startNodeAt(startPos, startLoc);
  33690. _node.expressions = [expr];
  33691. while (this.eat(types.comma)) {
  33692. _node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos));
  33693. }
  33694. this.toReferencedList(_node.expressions);
  33695. return this.finishNode(_node, "SequenceExpression");
  33696. }
  33697. return expr;
  33698. };
  33699. _proto.parseMaybeAssign = function parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) {
  33700. var startPos = this.state.start;
  33701. var startLoc = this.state.startLoc;
  33702. if (this.isContextual("yield")) {
  33703. if (this.scope.inGenerator) {
  33704. var _left = this.parseYield(noIn);
  33705. if (afterLeftParse) {
  33706. _left = afterLeftParse.call(this, _left, startPos, startLoc);
  33707. }
  33708. return _left;
  33709. } else {
  33710. this.state.exprAllowed = false;
  33711. }
  33712. }
  33713. var failOnShorthandAssign;
  33714. if (refShorthandDefaultPos) {
  33715. failOnShorthandAssign = false;
  33716. } else {
  33717. refShorthandDefaultPos = {
  33718. start: 0
  33719. };
  33720. failOnShorthandAssign = true;
  33721. }
  33722. if (this.match(types.parenL) || this.match(types.name)) {
  33723. this.state.potentialArrowAt = this.state.start;
  33724. }
  33725. var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos);
  33726. if (afterLeftParse) {
  33727. left = afterLeftParse.call(this, left, startPos, startLoc);
  33728. }
  33729. if (this.state.type.isAssign) {
  33730. var _node2 = this.startNodeAt(startPos, startLoc);
  33731. var operator = this.state.value;
  33732. _node2.operator = operator;
  33733. if (operator === "??=") {
  33734. this.expectPlugin("logicalAssignment");
  33735. }
  33736. if (operator === "||=" || operator === "&&=") {
  33737. this.expectPlugin("logicalAssignment");
  33738. }
  33739. _node2.left = this.match(types.eq) ? this.toAssignable(left, undefined, "assignment expression") : left;
  33740. if (refShorthandDefaultPos.start >= _node2.left.start) {
  33741. refShorthandDefaultPos.start = 0;
  33742. }
  33743. this.checkLVal(left, undefined, undefined, "assignment expression");
  33744. this.next();
  33745. _node2.right = this.parseMaybeAssign(noIn);
  33746. return this.finishNode(_node2, "AssignmentExpression");
  33747. } else if (failOnShorthandAssign && refShorthandDefaultPos.start) {
  33748. this.unexpected(refShorthandDefaultPos.start);
  33749. }
  33750. return left;
  33751. };
  33752. _proto.parseMaybeConditional = function parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos) {
  33753. var startPos = this.state.start;
  33754. var startLoc = this.state.startLoc;
  33755. var potentialArrowAt = this.state.potentialArrowAt;
  33756. var expr = this.parseExprOps(noIn, refShorthandDefaultPos);
  33757. if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) {
  33758. return expr;
  33759. }
  33760. if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
  33761. return this.parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos);
  33762. };
  33763. _proto.parseConditional = function parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) {
  33764. if (this.eat(types.question)) {
  33765. var _node3 = this.startNodeAt(startPos, startLoc);
  33766. _node3.test = expr;
  33767. _node3.consequent = this.parseMaybeAssign();
  33768. this.expect(types.colon);
  33769. _node3.alternate = this.parseMaybeAssign(noIn);
  33770. return this.finishNode(_node3, "ConditionalExpression");
  33771. }
  33772. return expr;
  33773. };
  33774. _proto.parseExprOps = function parseExprOps(noIn, refShorthandDefaultPos) {
  33775. var startPos = this.state.start;
  33776. var startLoc = this.state.startLoc;
  33777. var potentialArrowAt = this.state.potentialArrowAt;
  33778. var expr = this.parseMaybeUnary(refShorthandDefaultPos);
  33779. if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) {
  33780. return expr;
  33781. }
  33782. if (refShorthandDefaultPos && refShorthandDefaultPos.start) {
  33783. return expr;
  33784. }
  33785. return this.parseExprOp(expr, startPos, startLoc, -1, noIn);
  33786. };
  33787. _proto.parseExprOp = function parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn) {
  33788. var prec = this.state.type.binop;
  33789. if (prec != null && (!noIn || !this.match(types._in))) {
  33790. if (prec > minPrec) {
  33791. var operator = this.state.value;
  33792. if (operator === "|>" && this.state.inFSharpPipelineDirectBody) {
  33793. return left;
  33794. }
  33795. var _node4 = this.startNodeAt(leftStartPos, leftStartLoc);
  33796. _node4.left = left;
  33797. _node4.operator = operator;
  33798. if (operator === "**" && left.type === "UnaryExpression" && (this.options.createParenthesizedExpressions || !(left.extra && left.extra.parenthesized))) {
  33799. this.raise(left.argument.start, "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");
  33800. }
  33801. var op = this.state.type;
  33802. if (op === types.pipeline) {
  33803. this.expectPlugin("pipelineOperator");
  33804. this.state.inPipeline = true;
  33805. this.checkPipelineAtInfixOperator(left, leftStartPos);
  33806. }
  33807. this.next();
  33808. if (op === types.pipeline && this.getPluginOption("pipelineOperator", "proposal") === "minimal") {
  33809. if (this.match(types.name) && this.state.value === "await" && this.scope.inAsync) {
  33810. throw this.raise(this.state.start, "Unexpected \"await\" after pipeline body; await must have parentheses in minimal proposal");
  33811. }
  33812. }
  33813. _node4.right = this.parseExprOpRightExpr(op, prec, noIn);
  33814. if (op === types.nullishCoalescing) {
  33815. if (left.type === "LogicalExpression" && left.operator !== "??" && !(left.extra && left.extra.parenthesized)) {
  33816. throw this.raise(left.start, "Nullish coalescing operator(??) requires parens when mixing with logical operators");
  33817. } else if (_node4.right.type === "LogicalExpression" && _node4.right.operator !== "??" && !(_node4.right.extra && _node4.right.extra.parenthesized)) {
  33818. throw this.raise(_node4.right.start, "Nullish coalescing operator(??) requires parens when mixing with logical operators");
  33819. }
  33820. }
  33821. this.finishNode(_node4, op === types.logicalOR || op === types.logicalAND || op === types.nullishCoalescing ? "LogicalExpression" : "BinaryExpression");
  33822. return this.parseExprOp(_node4, leftStartPos, leftStartLoc, minPrec, noIn);
  33823. }
  33824. }
  33825. return left;
  33826. };
  33827. _proto.parseExprOpRightExpr = function parseExprOpRightExpr(op, prec, noIn) {
  33828. var _this = this;
  33829. var startPos = this.state.start;
  33830. var startLoc = this.state.startLoc;
  33831. switch (op) {
  33832. case types.pipeline:
  33833. switch (this.getPluginOption("pipelineOperator", "proposal")) {
  33834. case "smart":
  33835. return this.withTopicPermittingContext(function () {
  33836. return _this.parseSmartPipelineBody(_this.parseExprOpBaseRightExpr(op, prec, noIn), startPos, startLoc);
  33837. });
  33838. case "fsharp":
  33839. return this.withSoloAwaitPermittingContext(function () {
  33840. return _this.parseFSharpPipelineBody(prec, noIn);
  33841. });
  33842. }
  33843. default:
  33844. return this.parseExprOpBaseRightExpr(op, prec, noIn);
  33845. }
  33846. };
  33847. _proto.parseExprOpBaseRightExpr = function parseExprOpBaseRightExpr(op, prec, noIn) {
  33848. var startPos = this.state.start;
  33849. var startLoc = this.state.startLoc;
  33850. return this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec, noIn);
  33851. };
  33852. _proto.parseMaybeUnary = function parseMaybeUnary(refShorthandDefaultPos) {
  33853. if (this.isContextual("await") && this.isAwaitAllowed()) {
  33854. return this.parseAwait();
  33855. } else if (this.state.type.prefix) {
  33856. var _node5 = this.startNode();
  33857. var update = this.match(types.incDec);
  33858. _node5.operator = this.state.value;
  33859. _node5.prefix = true;
  33860. if (_node5.operator === "throw") {
  33861. this.expectPlugin("throwExpressions");
  33862. }
  33863. this.next();
  33864. _node5.argument = this.parseMaybeUnary();
  33865. if (refShorthandDefaultPos && refShorthandDefaultPos.start) {
  33866. this.unexpected(refShorthandDefaultPos.start);
  33867. }
  33868. if (update) {
  33869. this.checkLVal(_node5.argument, undefined, undefined, "prefix operation");
  33870. } else if (this.state.strict && _node5.operator === "delete") {
  33871. var arg = _node5.argument;
  33872. if (arg.type === "Identifier") {
  33873. this.raise(_node5.start, "Deleting local variable in strict mode");
  33874. } else if (arg.type === "MemberExpression" && arg.property.type === "PrivateName") {
  33875. this.raise(_node5.start, "Deleting a private field is not allowed");
  33876. }
  33877. }
  33878. return this.finishNode(_node5, update ? "UpdateExpression" : "UnaryExpression");
  33879. }
  33880. var startPos = this.state.start;
  33881. var startLoc = this.state.startLoc;
  33882. var expr = this.parseExprSubscripts(refShorthandDefaultPos);
  33883. if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
  33884. while (this.state.type.postfix && !this.canInsertSemicolon()) {
  33885. var _node6 = this.startNodeAt(startPos, startLoc);
  33886. _node6.operator = this.state.value;
  33887. _node6.prefix = false;
  33888. _node6.argument = expr;
  33889. this.checkLVal(expr, undefined, undefined, "postfix operation");
  33890. this.next();
  33891. expr = this.finishNode(_node6, "UpdateExpression");
  33892. }
  33893. return expr;
  33894. };
  33895. _proto.parseExprSubscripts = function parseExprSubscripts(refShorthandDefaultPos) {
  33896. var startPos = this.state.start;
  33897. var startLoc = this.state.startLoc;
  33898. var potentialArrowAt = this.state.potentialArrowAt;
  33899. var expr = this.parseExprAtom(refShorthandDefaultPos);
  33900. if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) {
  33901. return expr;
  33902. }
  33903. if (refShorthandDefaultPos && refShorthandDefaultPos.start) {
  33904. return expr;
  33905. }
  33906. return this.parseSubscripts(expr, startPos, startLoc);
  33907. };
  33908. _proto.parseSubscripts = function parseSubscripts(base, startPos, startLoc, noCalls) {
  33909. var state = {
  33910. optionalChainMember: false,
  33911. maybeAsyncArrow: this.atPossibleAsync(base),
  33912. stop: false
  33913. };
  33914. do {
  33915. base = this.parseSubscript(base, startPos, startLoc, noCalls, state);
  33916. state.maybeAsyncArrow = false;
  33917. } while (!state.stop);
  33918. return base;
  33919. };
  33920. _proto.parseSubscript = function parseSubscript(base, startPos, startLoc, noCalls, state) {
  33921. if (!noCalls && this.eat(types.doubleColon)) {
  33922. var _node7 = this.startNodeAt(startPos, startLoc);
  33923. _node7.object = base;
  33924. _node7.callee = this.parseNoCallExpr();
  33925. state.stop = true;
  33926. return this.parseSubscripts(this.finishNode(_node7, "BindExpression"), startPos, startLoc, noCalls);
  33927. }
  33928. var optional = false;
  33929. if (this.match(types.questionDot)) {
  33930. state.optionalChainMember = optional = true;
  33931. if (noCalls && this.lookaheadCharCode() === 40) {
  33932. state.stop = true;
  33933. return base;
  33934. }
  33935. this.next();
  33936. }
  33937. var computed = this.eat(types.bracketL);
  33938. if (optional && !this.match(types.parenL) && !this.match(types.backQuote) || computed || this.eat(types.dot)) {
  33939. var _node8 = this.startNodeAt(startPos, startLoc);
  33940. _node8.object = base;
  33941. _node8.property = computed ? this.parseExpression() : optional ? this.parseIdentifier(true) : this.parseMaybePrivateName(true);
  33942. _node8.computed = computed;
  33943. if (_node8.property.type === "PrivateName") {
  33944. if (_node8.object.type === "Super") {
  33945. this.raise(startPos, "Private fields can't be accessed on super");
  33946. }
  33947. this.classScope.usePrivateName(_node8.property.id.name, _node8.property.start);
  33948. }
  33949. if (computed) {
  33950. this.expect(types.bracketR);
  33951. }
  33952. if (state.optionalChainMember) {
  33953. _node8.optional = optional;
  33954. return this.finishNode(_node8, "OptionalMemberExpression");
  33955. } else {
  33956. return this.finishNode(_node8, "MemberExpression");
  33957. }
  33958. } else if (!noCalls && this.match(types.parenL)) {
  33959. var oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  33960. var oldYieldPos = this.state.yieldPos;
  33961. var oldAwaitPos = this.state.awaitPos;
  33962. this.state.maybeInArrowParameters = true;
  33963. this.state.yieldPos = -1;
  33964. this.state.awaitPos = -1;
  33965. this.next();
  33966. var _node9 = this.startNodeAt(startPos, startLoc);
  33967. _node9.callee = base;
  33968. if (optional) {
  33969. _node9.optional = true;
  33970. _node9.arguments = this.parseCallExpressionArguments(types.parenR, false);
  33971. } else {
  33972. _node9.arguments = this.parseCallExpressionArguments(types.parenR, state.maybeAsyncArrow, base.type === "Import", base.type !== "Super", _node9);
  33973. }
  33974. this.finishCallExpression(_node9, state.optionalChainMember);
  33975. if (state.maybeAsyncArrow && this.shouldParseAsyncArrow() && !optional) {
  33976. state.stop = true;
  33977. _node9 = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), _node9);
  33978. this.checkYieldAwaitInDefaultParams();
  33979. this.state.yieldPos = oldYieldPos;
  33980. this.state.awaitPos = oldAwaitPos;
  33981. } else {
  33982. this.toReferencedListDeep(_node9.arguments);
  33983. if (oldYieldPos !== -1) this.state.yieldPos = oldYieldPos;
  33984. if (!this.isAwaitAllowed() && !oldMaybeInArrowParameters || oldAwaitPos !== -1) {
  33985. this.state.awaitPos = oldAwaitPos;
  33986. }
  33987. }
  33988. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  33989. return _node9;
  33990. } else if (this.match(types.backQuote)) {
  33991. return this.parseTaggedTemplateExpression(startPos, startLoc, base, state);
  33992. } else {
  33993. state.stop = true;
  33994. return base;
  33995. }
  33996. };
  33997. _proto.parseTaggedTemplateExpression = function parseTaggedTemplateExpression(startPos, startLoc, base, state, typeArguments) {
  33998. var node = this.startNodeAt(startPos, startLoc);
  33999. node.tag = base;
  34000. node.quasi = this.parseTemplate(true);
  34001. if (typeArguments) node.typeParameters = typeArguments;
  34002. if (state.optionalChainMember) {
  34003. this.raise(startPos, "Tagged Template Literals are not allowed in optionalChain");
  34004. }
  34005. return this.finishNode(node, "TaggedTemplateExpression");
  34006. };
  34007. _proto.atPossibleAsync = function atPossibleAsync(base) {
  34008. return base.type === "Identifier" && base.name === "async" && this.state.lastTokEnd === base.end && !this.canInsertSemicolon() && this.input.slice(base.start, base.end) === "async";
  34009. };
  34010. _proto.finishCallExpression = function finishCallExpression(node, optional) {
  34011. if (node.callee.type === "Import") {
  34012. if (node.arguments.length !== 1) {
  34013. this.raise(node.start, "import() requires exactly one argument");
  34014. } else {
  34015. var importArg = node.arguments[0];
  34016. if (importArg && importArg.type === "SpreadElement") {
  34017. this.raise(importArg.start, "... is not allowed in import()");
  34018. }
  34019. }
  34020. }
  34021. return this.finishNode(node, optional ? "OptionalCallExpression" : "CallExpression");
  34022. };
  34023. _proto.parseCallExpressionArguments = function parseCallExpressionArguments(close, possibleAsyncArrow, dynamicImport, allowPlaceholder, nodeForExtra) {
  34024. var elts = [];
  34025. var innerParenStart;
  34026. var first = true;
  34027. var oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  34028. this.state.inFSharpPipelineDirectBody = false;
  34029. while (!this.eat(close)) {
  34030. if (first) {
  34031. first = false;
  34032. } else {
  34033. this.expect(types.comma);
  34034. if (this.match(close)) {
  34035. if (dynamicImport) {
  34036. this.raise(this.state.lastTokStart, "Trailing comma is disallowed inside import(...) arguments");
  34037. }
  34038. if (nodeForExtra) {
  34039. this.addExtra(nodeForExtra, "trailingComma", this.state.lastTokStart);
  34040. }
  34041. this.next();
  34042. break;
  34043. }
  34044. }
  34045. if (this.match(types.parenL) && !innerParenStart) {
  34046. innerParenStart = this.state.start;
  34047. }
  34048. elts.push(this.parseExprListItem(false, possibleAsyncArrow ? {
  34049. start: 0
  34050. } : undefined, possibleAsyncArrow ? {
  34051. start: 0
  34052. } : undefined, allowPlaceholder));
  34053. }
  34054. if (possibleAsyncArrow && innerParenStart && this.shouldParseAsyncArrow()) {
  34055. this.unexpected();
  34056. }
  34057. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  34058. return elts;
  34059. };
  34060. _proto.shouldParseAsyncArrow = function shouldParseAsyncArrow() {
  34061. return this.match(types.arrow) && !this.canInsertSemicolon();
  34062. };
  34063. _proto.parseAsyncArrowFromCallExpression = function parseAsyncArrowFromCallExpression(node, call) {
  34064. var _call$extra;
  34065. this.expect(types.arrow);
  34066. this.parseArrowExpression(node, call.arguments, true, (_call$extra = call.extra) == null ? void 0 : _call$extra.trailingComma);
  34067. return node;
  34068. };
  34069. _proto.parseNoCallExpr = function parseNoCallExpr() {
  34070. var startPos = this.state.start;
  34071. var startLoc = this.state.startLoc;
  34072. return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);
  34073. };
  34074. _proto.parseExprAtom = function parseExprAtom(refShorthandDefaultPos) {
  34075. if (this.state.type === types.slash) this.readRegexp();
  34076. var canBeArrow = this.state.potentialArrowAt === this.state.start;
  34077. var node;
  34078. switch (this.state.type) {
  34079. case types._super:
  34080. node = this.startNode();
  34081. this.next();
  34082. if (this.match(types.parenL) && !this.scope.allowDirectSuper && !this.options.allowSuperOutsideMethod) {
  34083. this.raise(node.start, "super() is only valid inside a class constructor of a subclass. " + "Maybe a typo in the method name ('constructor') or not extending another class?");
  34084. } else if (!this.scope.allowSuper && !this.options.allowSuperOutsideMethod) {
  34085. this.raise(node.start, "super is only allowed in object methods and classes");
  34086. }
  34087. if (!this.match(types.parenL) && !this.match(types.bracketL) && !this.match(types.dot)) {
  34088. this.raise(node.start, "super can only be used with function calls (i.e. super()) or " + "in property accesses (i.e. super.prop or super[prop])");
  34089. }
  34090. return this.finishNode(node, "Super");
  34091. case types._import:
  34092. node = this.startNode();
  34093. this.next();
  34094. if (this.match(types.dot)) {
  34095. return this.parseImportMetaProperty(node);
  34096. }
  34097. if (!this.match(types.parenL)) {
  34098. this.raise(this.state.lastTokStart, "import can only be used in import() or import.meta");
  34099. }
  34100. return this.finishNode(node, "Import");
  34101. case types._this:
  34102. node = this.startNode();
  34103. this.next();
  34104. return this.finishNode(node, "ThisExpression");
  34105. case types.name:
  34106. {
  34107. node = this.startNode();
  34108. var containsEsc = this.state.containsEsc;
  34109. var id = this.parseIdentifier();
  34110. if (!containsEsc && id.name === "async" && this.match(types._function) && !this.canInsertSemicolon()) {
  34111. var last = this.state.context.length - 1;
  34112. if (this.state.context[last] !== types$1.functionStatement) {
  34113. throw new Error("Internal error");
  34114. }
  34115. this.state.context[last] = types$1.functionExpression;
  34116. this.next();
  34117. return this.parseFunction(node, undefined, true);
  34118. } else if (canBeArrow && !containsEsc && id.name === "async" && this.match(types.name) && !this.canInsertSemicolon()) {
  34119. var oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  34120. var oldYieldPos = this.state.yieldPos;
  34121. var oldAwaitPos = this.state.awaitPos;
  34122. this.state.maybeInArrowParameters = true;
  34123. this.state.yieldPos = -1;
  34124. this.state.awaitPos = -1;
  34125. var params = [this.parseIdentifier()];
  34126. this.expect(types.arrow);
  34127. this.checkYieldAwaitInDefaultParams();
  34128. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  34129. this.state.yieldPos = oldYieldPos;
  34130. this.state.awaitPos = oldAwaitPos;
  34131. this.parseArrowExpression(node, params, true);
  34132. return node;
  34133. }
  34134. if (canBeArrow && this.match(types.arrow) && !this.canInsertSemicolon()) {
  34135. this.next();
  34136. this.parseArrowExpression(node, [id], false);
  34137. return node;
  34138. }
  34139. return id;
  34140. }
  34141. case types._do:
  34142. {
  34143. this.expectPlugin("doExpressions");
  34144. var _node10 = this.startNode();
  34145. this.next();
  34146. var oldLabels = this.state.labels;
  34147. this.state.labels = [];
  34148. _node10.body = this.parseBlock();
  34149. this.state.labels = oldLabels;
  34150. return this.finishNode(_node10, "DoExpression");
  34151. }
  34152. case types.regexp:
  34153. {
  34154. var value = this.state.value;
  34155. node = this.parseLiteral(value.value, "RegExpLiteral");
  34156. node.pattern = value.pattern;
  34157. node.flags = value.flags;
  34158. return node;
  34159. }
  34160. case types.num:
  34161. return this.parseLiteral(this.state.value, "NumericLiteral");
  34162. case types.bigint:
  34163. return this.parseLiteral(this.state.value, "BigIntLiteral");
  34164. case types.string:
  34165. return this.parseLiteral(this.state.value, "StringLiteral");
  34166. case types._null:
  34167. node = this.startNode();
  34168. this.next();
  34169. return this.finishNode(node, "NullLiteral");
  34170. case types._true:
  34171. case types._false:
  34172. return this.parseBooleanLiteral();
  34173. case types.parenL:
  34174. return this.parseParenAndDistinguishExpression(canBeArrow);
  34175. case types.bracketL:
  34176. {
  34177. var oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  34178. this.state.inFSharpPipelineDirectBody = false;
  34179. node = this.startNode();
  34180. this.next();
  34181. node.elements = this.parseExprList(types.bracketR, true, refShorthandDefaultPos, node);
  34182. if (!this.state.maybeInArrowParameters) {
  34183. this.toReferencedList(node.elements);
  34184. }
  34185. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  34186. return this.finishNode(node, "ArrayExpression");
  34187. }
  34188. case types.braceL:
  34189. {
  34190. var _oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  34191. this.state.inFSharpPipelineDirectBody = false;
  34192. var ret = this.parseObj(false, refShorthandDefaultPos);
  34193. this.state.inFSharpPipelineDirectBody = _oldInFSharpPipelineDirectBody;
  34194. return ret;
  34195. }
  34196. case types._function:
  34197. return this.parseFunctionExpression();
  34198. case types.at:
  34199. this.parseDecorators();
  34200. case types._class:
  34201. node = this.startNode();
  34202. this.takeDecorators(node);
  34203. return this.parseClass(node, false);
  34204. case types._new:
  34205. return this.parseNew();
  34206. case types.backQuote:
  34207. return this.parseTemplate(false);
  34208. case types.doubleColon:
  34209. {
  34210. node = this.startNode();
  34211. this.next();
  34212. node.object = null;
  34213. var callee = node.callee = this.parseNoCallExpr();
  34214. if (callee.type === "MemberExpression") {
  34215. return this.finishNode(node, "BindExpression");
  34216. } else {
  34217. throw this.raise(callee.start, "Binding should be performed on object property.");
  34218. }
  34219. }
  34220. case types.hash:
  34221. {
  34222. if (this.state.inPipeline) {
  34223. node = this.startNode();
  34224. if (this.getPluginOption("pipelineOperator", "proposal") !== "smart") {
  34225. this.raise(node.start, "Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option.");
  34226. }
  34227. this.next();
  34228. if (!this.primaryTopicReferenceIsAllowedInCurrentTopicContext()) {
  34229. this.raise(node.start, "Topic reference was used in a lexical context without topic binding");
  34230. }
  34231. this.registerTopicReference();
  34232. return this.finishNode(node, "PipelinePrimaryTopicReference");
  34233. }
  34234. }
  34235. default:
  34236. throw this.unexpected();
  34237. }
  34238. };
  34239. _proto.parseBooleanLiteral = function parseBooleanLiteral() {
  34240. var node = this.startNode();
  34241. node.value = this.match(types._true);
  34242. this.next();
  34243. return this.finishNode(node, "BooleanLiteral");
  34244. };
  34245. _proto.parseMaybePrivateName = function parseMaybePrivateName(isPrivateNameAllowed) {
  34246. var isPrivate = this.match(types.hash);
  34247. if (isPrivate) {
  34248. this.expectOnePlugin(["classPrivateProperties", "classPrivateMethods"]);
  34249. if (!isPrivateNameAllowed) {
  34250. this.raise(this.state.pos, "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).");
  34251. }
  34252. var _node11 = this.startNode();
  34253. this.next();
  34254. this.assertNoSpace("Unexpected space between # and identifier");
  34255. _node11.id = this.parseIdentifier(true);
  34256. return this.finishNode(_node11, "PrivateName");
  34257. } else {
  34258. return this.parseIdentifier(true);
  34259. }
  34260. };
  34261. _proto.parseFunctionExpression = function parseFunctionExpression() {
  34262. var node = this.startNode();
  34263. var meta = this.startNode();
  34264. this.next();
  34265. meta = this.createIdentifier(meta, "function");
  34266. if (this.scope.inGenerator && this.eat(types.dot)) {
  34267. return this.parseMetaProperty(node, meta, "sent");
  34268. }
  34269. return this.parseFunction(node);
  34270. };
  34271. _proto.parseMetaProperty = function parseMetaProperty(node, meta, propertyName) {
  34272. node.meta = meta;
  34273. if (meta.name === "function" && propertyName === "sent") {
  34274. if (this.isContextual(propertyName)) {
  34275. this.expectPlugin("functionSent");
  34276. } else if (!this.hasPlugin("functionSent")) {
  34277. this.unexpected();
  34278. }
  34279. }
  34280. var containsEsc = this.state.containsEsc;
  34281. node.property = this.parseIdentifier(true);
  34282. if (node.property.name !== propertyName || containsEsc) {
  34283. this.raise(node.property.start, "The only valid meta property for " + meta.name + " is " + meta.name + "." + propertyName);
  34284. }
  34285. return this.finishNode(node, "MetaProperty");
  34286. };
  34287. _proto.parseImportMetaProperty = function parseImportMetaProperty(node) {
  34288. var id = this.createIdentifier(this.startNodeAtNode(node), "import");
  34289. this.expect(types.dot);
  34290. if (this.isContextual("meta")) {
  34291. this.expectPlugin("importMeta");
  34292. if (!this.inModule) {
  34293. this.raise(id.start, "import.meta may appear only with 'sourceType: \"module\"'", {
  34294. code: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"
  34295. });
  34296. }
  34297. this.sawUnambiguousESM = true;
  34298. } else if (!this.hasPlugin("importMeta")) {
  34299. this.raise(id.start, "Dynamic imports require a parameter: import('a.js')");
  34300. }
  34301. return this.parseMetaProperty(node, id, "meta");
  34302. };
  34303. _proto.parseLiteral = function parseLiteral(value, type, startPos, startLoc) {
  34304. startPos = startPos || this.state.start;
  34305. startLoc = startLoc || this.state.startLoc;
  34306. var node = this.startNodeAt(startPos, startLoc);
  34307. this.addExtra(node, "rawValue", value);
  34308. this.addExtra(node, "raw", this.input.slice(startPos, this.state.end));
  34309. node.value = value;
  34310. this.next();
  34311. return this.finishNode(node, type);
  34312. };
  34313. _proto.parseParenAndDistinguishExpression = function parseParenAndDistinguishExpression(canBeArrow) {
  34314. var startPos = this.state.start;
  34315. var startLoc = this.state.startLoc;
  34316. var val;
  34317. this.expect(types.parenL);
  34318. var oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  34319. var oldYieldPos = this.state.yieldPos;
  34320. var oldAwaitPos = this.state.awaitPos;
  34321. var oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  34322. this.state.maybeInArrowParameters = true;
  34323. this.state.yieldPos = -1;
  34324. this.state.awaitPos = -1;
  34325. this.state.inFSharpPipelineDirectBody = false;
  34326. var innerStartPos = this.state.start;
  34327. var innerStartLoc = this.state.startLoc;
  34328. var exprList = [];
  34329. var refShorthandDefaultPos = {
  34330. start: 0
  34331. };
  34332. var refNeedsArrowPos = {
  34333. start: 0
  34334. };
  34335. var first = true;
  34336. var spreadStart;
  34337. var optionalCommaStart;
  34338. while (!this.match(types.parenR)) {
  34339. if (first) {
  34340. first = false;
  34341. } else {
  34342. this.expect(types.comma, refNeedsArrowPos.start || null);
  34343. if (this.match(types.parenR)) {
  34344. optionalCommaStart = this.state.start;
  34345. break;
  34346. }
  34347. }
  34348. if (this.match(types.ellipsis)) {
  34349. var spreadNodeStartPos = this.state.start;
  34350. var spreadNodeStartLoc = this.state.startLoc;
  34351. spreadStart = this.state.start;
  34352. exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartPos, spreadNodeStartLoc));
  34353. this.checkCommaAfterRest(41);
  34354. break;
  34355. } else {
  34356. exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos));
  34357. }
  34358. }
  34359. var innerEndPos = this.state.start;
  34360. var innerEndLoc = this.state.startLoc;
  34361. this.expect(types.parenR);
  34362. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  34363. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  34364. var arrowNode = this.startNodeAt(startPos, startLoc);
  34365. if (canBeArrow && this.shouldParseArrow() && (arrowNode = this.parseArrow(arrowNode))) {
  34366. this.checkYieldAwaitInDefaultParams();
  34367. this.state.yieldPos = oldYieldPos;
  34368. this.state.awaitPos = oldAwaitPos;
  34369. for (var _i2 = 0; _i2 < exprList.length; _i2++) {
  34370. var param = exprList[_i2];
  34371. if (param.extra && param.extra.parenthesized) {
  34372. this.unexpected(param.extra.parenStart);
  34373. }
  34374. }
  34375. this.parseArrowExpression(arrowNode, exprList, false);
  34376. return arrowNode;
  34377. }
  34378. if (oldYieldPos !== -1) this.state.yieldPos = oldYieldPos;
  34379. if (oldAwaitPos !== -1) this.state.awaitPos = oldAwaitPos;
  34380. if (!exprList.length) {
  34381. this.unexpected(this.state.lastTokStart);
  34382. }
  34383. if (optionalCommaStart) this.unexpected(optionalCommaStart);
  34384. if (spreadStart) this.unexpected(spreadStart);
  34385. if (refShorthandDefaultPos.start) {
  34386. this.unexpected(refShorthandDefaultPos.start);
  34387. }
  34388. if (refNeedsArrowPos.start) this.unexpected(refNeedsArrowPos.start);
  34389. this.toReferencedListDeep(exprList, true);
  34390. if (exprList.length > 1) {
  34391. val = this.startNodeAt(innerStartPos, innerStartLoc);
  34392. val.expressions = exprList;
  34393. this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
  34394. } else {
  34395. val = exprList[0];
  34396. }
  34397. if (!this.options.createParenthesizedExpressions) {
  34398. this.addExtra(val, "parenthesized", true);
  34399. this.addExtra(val, "parenStart", startPos);
  34400. return val;
  34401. }
  34402. var parenExpression = this.startNodeAt(startPos, startLoc);
  34403. parenExpression.expression = val;
  34404. this.finishNode(parenExpression, "ParenthesizedExpression");
  34405. return parenExpression;
  34406. };
  34407. _proto.shouldParseArrow = function shouldParseArrow() {
  34408. return !this.canInsertSemicolon();
  34409. };
  34410. _proto.parseArrow = function parseArrow(node) {
  34411. if (this.eat(types.arrow)) {
  34412. return node;
  34413. }
  34414. };
  34415. _proto.parseParenItem = function parseParenItem(node, startPos, startLoc) {
  34416. return node;
  34417. };
  34418. _proto.parseNew = function parseNew() {
  34419. var node = this.startNode();
  34420. var meta = this.startNode();
  34421. this.next();
  34422. meta = this.createIdentifier(meta, "new");
  34423. if (this.eat(types.dot)) {
  34424. var metaProp = this.parseMetaProperty(node, meta, "target");
  34425. if (!this.scope.inNonArrowFunction && !this.scope.inClass) {
  34426. var error = "new.target can only be used in functions";
  34427. if (this.hasPlugin("classProperties")) {
  34428. error += " or class properties";
  34429. }
  34430. this.raise(metaProp.start, error);
  34431. }
  34432. return metaProp;
  34433. }
  34434. node.callee = this.parseNoCallExpr();
  34435. if (node.callee.type === "Import") {
  34436. this.raise(node.callee.start, "Cannot use new with import(...)");
  34437. } else if (node.callee.type === "OptionalMemberExpression" || node.callee.type === "OptionalCallExpression") {
  34438. this.raise(this.state.lastTokEnd, "constructors in/after an Optional Chain are not allowed");
  34439. } else if (this.eat(types.questionDot)) {
  34440. this.raise(this.state.start, "constructors in/after an Optional Chain are not allowed");
  34441. }
  34442. this.parseNewArguments(node);
  34443. return this.finishNode(node, "NewExpression");
  34444. };
  34445. _proto.parseNewArguments = function parseNewArguments(node) {
  34446. if (this.eat(types.parenL)) {
  34447. var args = this.parseExprList(types.parenR);
  34448. this.toReferencedList(args);
  34449. node.arguments = args;
  34450. } else {
  34451. node.arguments = [];
  34452. }
  34453. };
  34454. _proto.parseTemplateElement = function parseTemplateElement(isTagged) {
  34455. var elem = this.startNode();
  34456. if (this.state.value === null) {
  34457. if (!isTagged) {
  34458. this.raise(this.state.start + 1, "Invalid escape sequence in template");
  34459. }
  34460. }
  34461. elem.value = {
  34462. raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"),
  34463. cooked: this.state.value
  34464. };
  34465. this.next();
  34466. elem.tail = this.match(types.backQuote);
  34467. return this.finishNode(elem, "TemplateElement");
  34468. };
  34469. _proto.parseTemplate = function parseTemplate(isTagged) {
  34470. var node = this.startNode();
  34471. this.next();
  34472. node.expressions = [];
  34473. var curElt = this.parseTemplateElement(isTagged);
  34474. node.quasis = [curElt];
  34475. while (!curElt.tail) {
  34476. this.expect(types.dollarBraceL);
  34477. node.expressions.push(this.parseExpression());
  34478. this.expect(types.braceR);
  34479. node.quasis.push(curElt = this.parseTemplateElement(isTagged));
  34480. }
  34481. this.next();
  34482. return this.finishNode(node, "TemplateLiteral");
  34483. };
  34484. _proto.parseObj = function parseObj(isPattern, refShorthandDefaultPos) {
  34485. var propHash = Object.create(null);
  34486. var first = true;
  34487. var node = this.startNode();
  34488. node.properties = [];
  34489. this.next();
  34490. while (!this.eat(types.braceR)) {
  34491. if (first) {
  34492. first = false;
  34493. } else {
  34494. this.expect(types.comma);
  34495. if (this.match(types.braceR)) {
  34496. this.addExtra(node, "trailingComma", this.state.lastTokStart);
  34497. this.next();
  34498. break;
  34499. }
  34500. }
  34501. var prop = this.parseObjectMember(isPattern, refShorthandDefaultPos);
  34502. if (!isPattern) this.checkDuplicatedProto(prop, propHash);
  34503. if (prop.shorthand) {
  34504. this.addExtra(prop, "shorthand", true);
  34505. }
  34506. node.properties.push(prop);
  34507. }
  34508. if (!this.match(types.eq) && propHash.start !== undefined) {
  34509. this.raise(propHash.start, "Redefinition of __proto__ property");
  34510. }
  34511. return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression");
  34512. };
  34513. _proto.isAsyncProp = function isAsyncProp(prop) {
  34514. return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && (this.match(types.name) || this.match(types.num) || this.match(types.string) || this.match(types.bracketL) || this.state.type.keyword || this.match(types.star)) && !this.hasPrecedingLineBreak();
  34515. };
  34516. _proto.parseObjectMember = function parseObjectMember(isPattern, refShorthandDefaultPos) {
  34517. var decorators = [];
  34518. if (this.match(types.at)) {
  34519. if (this.hasPlugin("decorators")) {
  34520. this.raise(this.state.start, "Stage 2 decorators disallow object literal property decorators");
  34521. }
  34522. while (this.match(types.at)) {
  34523. decorators.push(this.parseDecorator());
  34524. }
  34525. }
  34526. var prop = this.startNode();
  34527. var isGenerator = false;
  34528. var isAsync = false;
  34529. var startPos;
  34530. var startLoc;
  34531. if (this.match(types.ellipsis)) {
  34532. if (decorators.length) this.unexpected();
  34533. if (isPattern) {
  34534. this.next();
  34535. prop.argument = this.parseIdentifier();
  34536. this.checkCommaAfterRest(125);
  34537. return this.finishNode(prop, "RestElement");
  34538. }
  34539. return this.parseSpread();
  34540. }
  34541. if (decorators.length) {
  34542. prop.decorators = decorators;
  34543. decorators = [];
  34544. }
  34545. prop.method = false;
  34546. if (isPattern || refShorthandDefaultPos) {
  34547. startPos = this.state.start;
  34548. startLoc = this.state.startLoc;
  34549. }
  34550. if (!isPattern) {
  34551. isGenerator = this.eat(types.star);
  34552. }
  34553. var containsEsc = this.state.containsEsc;
  34554. this.parsePropertyName(prop, false);
  34555. if (!isPattern && !containsEsc && !isGenerator && this.isAsyncProp(prop)) {
  34556. isAsync = true;
  34557. isGenerator = this.eat(types.star);
  34558. this.parsePropertyName(prop, false);
  34559. } else {
  34560. isAsync = false;
  34561. }
  34562. this.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc);
  34563. return prop;
  34564. };
  34565. _proto.isGetterOrSetterMethod = function isGetterOrSetterMethod(prop, isPattern) {
  34566. return !isPattern && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.match(types.string) || this.match(types.num) || this.match(types.bracketL) || this.match(types.name) || !!this.state.type.keyword);
  34567. };
  34568. _proto.getGetterSetterExpectedParamCount = function getGetterSetterExpectedParamCount(method) {
  34569. return method.kind === "get" ? 0 : 1;
  34570. };
  34571. _proto.checkGetterSetterParams = function checkGetterSetterParams(method) {
  34572. var paramCount = this.getGetterSetterExpectedParamCount(method);
  34573. var start = method.start;
  34574. if (method.params.length !== paramCount) {
  34575. if (method.kind === "get") {
  34576. this.raise(start, "getter must not have any formal parameters");
  34577. } else {
  34578. this.raise(start, "setter must have exactly one formal parameter");
  34579. }
  34580. }
  34581. if (method.kind === "set" && method.params[method.params.length - 1].type === "RestElement") {
  34582. this.raise(start, "setter function argument must not be a rest parameter");
  34583. }
  34584. };
  34585. _proto.parseObjectMethod = function parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) {
  34586. if (isAsync || isGenerator || this.match(types.parenL)) {
  34587. if (isPattern) this.unexpected();
  34588. prop.kind = "method";
  34589. prop.method = true;
  34590. return this.parseMethod(prop, isGenerator, isAsync, false, false, "ObjectMethod");
  34591. }
  34592. if (!containsEsc && this.isGetterOrSetterMethod(prop, isPattern)) {
  34593. if (isGenerator || isAsync) this.unexpected();
  34594. prop.kind = prop.key.name;
  34595. this.parsePropertyName(prop, false);
  34596. this.parseMethod(prop, false, false, false, false, "ObjectMethod");
  34597. this.checkGetterSetterParams(prop);
  34598. return prop;
  34599. }
  34600. };
  34601. _proto.parseObjectProperty = function parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos) {
  34602. prop.shorthand = false;
  34603. if (this.eat(types.colon)) {
  34604. prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos);
  34605. return this.finishNode(prop, "ObjectProperty");
  34606. }
  34607. if (!prop.computed && prop.key.type === "Identifier") {
  34608. this.checkReservedWord(prop.key.name, prop.key.start, true, true);
  34609. if (isPattern) {
  34610. prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
  34611. } else if (this.match(types.eq) && refShorthandDefaultPos) {
  34612. if (!refShorthandDefaultPos.start) {
  34613. refShorthandDefaultPos.start = this.state.start;
  34614. }
  34615. prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
  34616. } else {
  34617. prop.value = prop.key.__clone();
  34618. }
  34619. prop.shorthand = true;
  34620. return this.finishNode(prop, "ObjectProperty");
  34621. }
  34622. };
  34623. _proto.parseObjPropValue = function parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc) {
  34624. var node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos);
  34625. if (!node) this.unexpected();
  34626. return node;
  34627. };
  34628. _proto.parsePropertyName = function parsePropertyName(prop, isPrivateNameAllowed) {
  34629. if (this.eat(types.bracketL)) {
  34630. prop.computed = true;
  34631. prop.key = this.parseMaybeAssign();
  34632. this.expect(types.bracketR);
  34633. } else {
  34634. var oldInPropertyName = this.state.inPropertyName;
  34635. this.state.inPropertyName = true;
  34636. prop.key = this.match(types.num) || this.match(types.string) || this.match(types.bigint) ? this.parseExprAtom() : this.parseMaybePrivateName(isPrivateNameAllowed);
  34637. if (prop.key.type !== "PrivateName") {
  34638. prop.computed = false;
  34639. }
  34640. this.state.inPropertyName = oldInPropertyName;
  34641. }
  34642. return prop.key;
  34643. };
  34644. _proto.initFunction = function initFunction(node, isAsync) {
  34645. node.id = null;
  34646. node.generator = false;
  34647. node.async = !!isAsync;
  34648. };
  34649. _proto.parseMethod = function parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope) {
  34650. if (inClassScope === void 0) {
  34651. inClassScope = false;
  34652. }
  34653. var oldYieldPos = this.state.yieldPos;
  34654. var oldAwaitPos = this.state.awaitPos;
  34655. this.state.yieldPos = -1;
  34656. this.state.awaitPos = -1;
  34657. this.initFunction(node, isAsync);
  34658. node.generator = !!isGenerator;
  34659. var allowModifiers = isConstructor;
  34660. this.scope.enter(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (inClassScope ? SCOPE_CLASS : 0) | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0));
  34661. this.parseFunctionParams(node, allowModifiers);
  34662. this.parseFunctionBodyAndFinish(node, type, true);
  34663. this.scope.exit();
  34664. this.state.yieldPos = oldYieldPos;
  34665. this.state.awaitPos = oldAwaitPos;
  34666. return node;
  34667. };
  34668. _proto.parseArrowExpression = function parseArrowExpression(node, params, isAsync, trailingCommaPos) {
  34669. this.scope.enter(functionFlags(isAsync, false) | SCOPE_ARROW);
  34670. this.initFunction(node, isAsync);
  34671. var oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  34672. var oldYieldPos = this.state.yieldPos;
  34673. var oldAwaitPos = this.state.awaitPos;
  34674. this.state.maybeInArrowParameters = false;
  34675. this.state.yieldPos = -1;
  34676. this.state.awaitPos = -1;
  34677. if (params) this.setArrowFunctionParameters(node, params, trailingCommaPos);
  34678. this.parseFunctionBody(node, true);
  34679. this.scope.exit();
  34680. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  34681. this.state.yieldPos = oldYieldPos;
  34682. this.state.awaitPos = oldAwaitPos;
  34683. return this.finishNode(node, "ArrowFunctionExpression");
  34684. };
  34685. _proto.setArrowFunctionParameters = function setArrowFunctionParameters(node, params, trailingCommaPos) {
  34686. node.params = this.toAssignableList(params, true, "arrow function parameters", trailingCommaPos);
  34687. };
  34688. _proto.parseFunctionBodyAndFinish = function parseFunctionBodyAndFinish(node, type, isMethod) {
  34689. if (isMethod === void 0) {
  34690. isMethod = false;
  34691. }
  34692. this.parseFunctionBody(node, false, isMethod);
  34693. this.finishNode(node, type);
  34694. };
  34695. _proto.parseFunctionBody = function parseFunctionBody(node, allowExpression, isMethod) {
  34696. if (isMethod === void 0) {
  34697. isMethod = false;
  34698. }
  34699. var isExpression = allowExpression && !this.match(types.braceL);
  34700. var oldStrict = this.state.strict;
  34701. var useStrict = false;
  34702. var oldInParameters = this.state.inParameters;
  34703. this.state.inParameters = false;
  34704. if (isExpression) {
  34705. node.body = this.parseMaybeAssign();
  34706. this.checkParams(node, false, allowExpression, false);
  34707. } else {
  34708. var nonSimple = !this.isSimpleParamList(node.params);
  34709. if (!oldStrict || nonSimple) {
  34710. useStrict = this.strictDirective(this.state.end);
  34711. if (useStrict && nonSimple) {
  34712. var errorPos = (node.kind === "method" || node.kind === "constructor") && !!node.key ? node.key.end : node.start;
  34713. this.raise(errorPos, "Illegal 'use strict' directive in function with non-simple parameter list");
  34714. }
  34715. }
  34716. var oldLabels = this.state.labels;
  34717. this.state.labels = [];
  34718. if (useStrict) this.state.strict = true;
  34719. this.checkParams(node, !oldStrict && !useStrict && !allowExpression && !isMethod && !nonSimple, allowExpression, !oldStrict && useStrict);
  34720. node.body = this.parseBlock(true, false);
  34721. this.state.labels = oldLabels;
  34722. }
  34723. this.state.inParameters = oldInParameters;
  34724. if (this.state.strict && node.id) {
  34725. this.checkLVal(node.id, BIND_OUTSIDE, undefined, "function name", undefined, !oldStrict && useStrict);
  34726. }
  34727. this.state.strict = oldStrict;
  34728. };
  34729. _proto.isSimpleParamList = function isSimpleParamList(params) {
  34730. for (var i = 0, len = params.length; i < len; i++) {
  34731. if (params[i].type !== "Identifier") return false;
  34732. }
  34733. return true;
  34734. };
  34735. _proto.checkParams = function checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged) {
  34736. if (strictModeChanged === void 0) {
  34737. strictModeChanged = true;
  34738. }
  34739. var nameHash = Object.create(null);
  34740. for (var i = 0; i < node.params.length; i++) {
  34741. this.checkLVal(node.params[i], BIND_VAR, allowDuplicates ? null : nameHash, "function parameter list", undefined, strictModeChanged);
  34742. }
  34743. };
  34744. _proto.parseExprList = function parseExprList(close, allowEmpty, refShorthandDefaultPos, nodeForExtra) {
  34745. var elts = [];
  34746. var first = true;
  34747. while (!this.eat(close)) {
  34748. if (first) {
  34749. first = false;
  34750. } else {
  34751. this.expect(types.comma);
  34752. if (this.match(close)) {
  34753. if (nodeForExtra) {
  34754. this.addExtra(nodeForExtra, "trailingComma", this.state.lastTokStart);
  34755. }
  34756. this.next();
  34757. break;
  34758. }
  34759. }
  34760. elts.push(this.parseExprListItem(allowEmpty, refShorthandDefaultPos));
  34761. }
  34762. return elts;
  34763. };
  34764. _proto.parseExprListItem = function parseExprListItem(allowEmpty, refShorthandDefaultPos, refNeedsArrowPos, allowPlaceholder) {
  34765. var elt;
  34766. if (allowEmpty && this.match(types.comma)) {
  34767. elt = null;
  34768. } else if (this.match(types.ellipsis)) {
  34769. var spreadNodeStartPos = this.state.start;
  34770. var spreadNodeStartLoc = this.state.startLoc;
  34771. elt = this.parseParenItem(this.parseSpread(refShorthandDefaultPos, refNeedsArrowPos), spreadNodeStartPos, spreadNodeStartLoc);
  34772. } else if (this.match(types.question)) {
  34773. this.expectPlugin("partialApplication");
  34774. if (!allowPlaceholder) {
  34775. this.raise(this.state.start, "Unexpected argument placeholder");
  34776. }
  34777. var _node12 = this.startNode();
  34778. this.next();
  34779. elt = this.finishNode(_node12, "ArgumentPlaceholder");
  34780. } else {
  34781. elt = this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos);
  34782. }
  34783. return elt;
  34784. };
  34785. _proto.parseIdentifier = function parseIdentifier(liberal) {
  34786. var node = this.startNode();
  34787. var name = this.parseIdentifierName(node.start, liberal);
  34788. return this.createIdentifier(node, name);
  34789. };
  34790. _proto.createIdentifier = function createIdentifier(node, name) {
  34791. node.name = name;
  34792. node.loc.identifierName = name;
  34793. return this.finishNode(node, "Identifier");
  34794. };
  34795. _proto.parseIdentifierName = function parseIdentifierName(pos, liberal) {
  34796. var name;
  34797. if (this.match(types.name)) {
  34798. name = this.state.value;
  34799. } else if (this.state.type.keyword) {
  34800. name = this.state.type.keyword;
  34801. if ((name === "class" || name === "function") && (this.state.lastTokEnd !== this.state.lastTokStart + 1 || this.input.charCodeAt(this.state.lastTokStart) !== 46)) {
  34802. this.state.context.pop();
  34803. }
  34804. } else {
  34805. throw this.unexpected();
  34806. }
  34807. if (liberal) {
  34808. this.state.type = types.name;
  34809. } else {
  34810. this.checkReservedWord(name, this.state.start, !!this.state.type.keyword, false);
  34811. }
  34812. this.next();
  34813. return name;
  34814. };
  34815. _proto.checkReservedWord = function checkReservedWord(word, startLoc, checkKeywords, isBinding) {
  34816. if (this.scope.inGenerator && word === "yield") {
  34817. this.raise(startLoc, "Can not use 'yield' as identifier inside a generator");
  34818. return;
  34819. }
  34820. if (word === "await") {
  34821. if (this.scope.inAsync) {
  34822. this.raise(startLoc, "Can not use 'await' as identifier inside an async function");
  34823. return;
  34824. }
  34825. if (this.state.awaitPos === -1 && (this.state.maybeInArrowParameters || this.isAwaitAllowed())) {
  34826. this.state.awaitPos = this.state.start;
  34827. }
  34828. }
  34829. if (this.scope.inClass && !this.scope.inNonArrowFunction && word === "arguments") {
  34830. this.raise(startLoc, "'arguments' is not allowed in class field initializer");
  34831. return;
  34832. }
  34833. if (checkKeywords && isKeyword(word)) {
  34834. this.raise(startLoc, "Unexpected keyword '" + word + "'");
  34835. return;
  34836. }
  34837. var reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord;
  34838. if (reservedTest(word, this.inModule)) {
  34839. if (!this.scope.inAsync && word === "await") {
  34840. this.raise(startLoc, "Can not use keyword 'await' outside an async function");
  34841. } else {
  34842. this.raise(startLoc, "Unexpected reserved word '" + word + "'");
  34843. }
  34844. }
  34845. };
  34846. _proto.isAwaitAllowed = function isAwaitAllowed() {
  34847. if (this.scope.inFunction) return this.scope.inAsync;
  34848. if (this.options.allowAwaitOutsideFunction) return true;
  34849. if (this.hasPlugin("topLevelAwait")) {
  34850. return this.inModule && this.scope.inAsync;
  34851. }
  34852. return false;
  34853. };
  34854. _proto.parseAwait = function parseAwait() {
  34855. var node = this.startNode();
  34856. this.next();
  34857. if (this.state.inParameters) {
  34858. this.raise(node.start, "await is not allowed in async function parameters");
  34859. } else if (this.state.awaitPos === -1) {
  34860. this.state.awaitPos = node.start;
  34861. }
  34862. if (this.eat(types.star)) {
  34863. this.raise(node.start, "await* has been removed from the async functions proposal. Use Promise.all() instead.");
  34864. }
  34865. if (!this.scope.inFunction && !this.options.allowAwaitOutsideFunction) {
  34866. if (this.hasPrecedingLineBreak() || this.match(types.plusMin) || this.match(types.parenL) || this.match(types.bracketL) || this.match(types.backQuote) || this.match(types.regexp) || this.match(types.slash) || this.hasPlugin("v8intrinsic") && this.match(types.modulo)) {
  34867. this.ambiguousScriptDifferentAst = true;
  34868. } else {
  34869. this.sawUnambiguousESM = true;
  34870. }
  34871. }
  34872. if (!this.state.soloAwait) {
  34873. node.argument = this.parseMaybeUnary();
  34874. }
  34875. return this.finishNode(node, "AwaitExpression");
  34876. };
  34877. _proto.parseYield = function parseYield(noIn) {
  34878. var node = this.startNode();
  34879. if (this.state.inParameters) {
  34880. this.raise(node.start, "yield is not allowed in generator parameters");
  34881. } else if (this.state.yieldPos === -1) {
  34882. this.state.yieldPos = node.start;
  34883. }
  34884. this.next();
  34885. if (this.match(types.semi) || !this.match(types.star) && !this.state.type.startsExpr || this.hasPrecedingLineBreak()) {
  34886. node.delegate = false;
  34887. node.argument = null;
  34888. } else {
  34889. node.delegate = this.eat(types.star);
  34890. node.argument = this.parseMaybeAssign(noIn);
  34891. }
  34892. return this.finishNode(node, "YieldExpression");
  34893. };
  34894. _proto.checkPipelineAtInfixOperator = function checkPipelineAtInfixOperator(left, leftStartPos) {
  34895. if (this.getPluginOption("pipelineOperator", "proposal") === "smart") {
  34896. if (left.type === "SequenceExpression") {
  34897. this.raise(leftStartPos, "Pipeline head should not be a comma-separated sequence expression");
  34898. }
  34899. }
  34900. };
  34901. _proto.parseSmartPipelineBody = function parseSmartPipelineBody(childExpression, startPos, startLoc) {
  34902. var pipelineStyle = this.checkSmartPipelineBodyStyle(childExpression);
  34903. this.checkSmartPipelineBodyEarlyErrors(childExpression, pipelineStyle, startPos);
  34904. return this.parseSmartPipelineBodyInStyle(childExpression, pipelineStyle, startPos, startLoc);
  34905. };
  34906. _proto.checkSmartPipelineBodyEarlyErrors = function checkSmartPipelineBodyEarlyErrors(childExpression, pipelineStyle, startPos) {
  34907. if (this.match(types.arrow)) {
  34908. throw this.raise(this.state.start, "Unexpected arrow \"=>\" after pipeline body; arrow function in pipeline body must be parenthesized");
  34909. } else if (pipelineStyle === "PipelineTopicExpression" && childExpression.type === "SequenceExpression") {
  34910. this.raise(startPos, "Pipeline body may not be a comma-separated sequence expression");
  34911. }
  34912. };
  34913. _proto.parseSmartPipelineBodyInStyle = function parseSmartPipelineBodyInStyle(childExpression, pipelineStyle, startPos, startLoc) {
  34914. var bodyNode = this.startNodeAt(startPos, startLoc);
  34915. switch (pipelineStyle) {
  34916. case "PipelineBareFunction":
  34917. bodyNode.callee = childExpression;
  34918. break;
  34919. case "PipelineBareConstructor":
  34920. bodyNode.callee = childExpression.callee;
  34921. break;
  34922. case "PipelineBareAwaitedFunction":
  34923. bodyNode.callee = childExpression.argument;
  34924. break;
  34925. case "PipelineTopicExpression":
  34926. if (!this.topicReferenceWasUsedInCurrentTopicContext()) {
  34927. this.raise(startPos, "Pipeline is in topic style but does not use topic reference");
  34928. }
  34929. bodyNode.expression = childExpression;
  34930. break;
  34931. default:
  34932. throw new Error("Internal @babel/parser error: Unknown pipeline style (" + pipelineStyle + ")");
  34933. }
  34934. return this.finishNode(bodyNode, pipelineStyle);
  34935. };
  34936. _proto.checkSmartPipelineBodyStyle = function checkSmartPipelineBodyStyle(expression) {
  34937. switch (expression.type) {
  34938. default:
  34939. return this.isSimpleReference(expression) ? "PipelineBareFunction" : "PipelineTopicExpression";
  34940. }
  34941. };
  34942. _proto.isSimpleReference = function isSimpleReference(expression) {
  34943. switch (expression.type) {
  34944. case "MemberExpression":
  34945. return !expression.computed && this.isSimpleReference(expression.object);
  34946. case "Identifier":
  34947. return true;
  34948. default:
  34949. return false;
  34950. }
  34951. };
  34952. _proto.withTopicPermittingContext = function withTopicPermittingContext(callback) {
  34953. var outerContextTopicState = this.state.topicContext;
  34954. this.state.topicContext = {
  34955. maxNumOfResolvableTopics: 1,
  34956. maxTopicIndex: null
  34957. };
  34958. try {
  34959. return callback();
  34960. } finally {
  34961. this.state.topicContext = outerContextTopicState;
  34962. }
  34963. };
  34964. _proto.withTopicForbiddingContext = function withTopicForbiddingContext(callback) {
  34965. var outerContextTopicState = this.state.topicContext;
  34966. this.state.topicContext = {
  34967. maxNumOfResolvableTopics: 0,
  34968. maxTopicIndex: null
  34969. };
  34970. try {
  34971. return callback();
  34972. } finally {
  34973. this.state.topicContext = outerContextTopicState;
  34974. }
  34975. };
  34976. _proto.withSoloAwaitPermittingContext = function withSoloAwaitPermittingContext(callback) {
  34977. var outerContextSoloAwaitState = this.state.soloAwait;
  34978. this.state.soloAwait = true;
  34979. try {
  34980. return callback();
  34981. } finally {
  34982. this.state.soloAwait = outerContextSoloAwaitState;
  34983. }
  34984. };
  34985. _proto.registerTopicReference = function registerTopicReference() {
  34986. this.state.topicContext.maxTopicIndex = 0;
  34987. };
  34988. _proto.primaryTopicReferenceIsAllowedInCurrentTopicContext = function primaryTopicReferenceIsAllowedInCurrentTopicContext() {
  34989. return this.state.topicContext.maxNumOfResolvableTopics >= 1;
  34990. };
  34991. _proto.topicReferenceWasUsedInCurrentTopicContext = function topicReferenceWasUsedInCurrentTopicContext() {
  34992. return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0;
  34993. };
  34994. _proto.parseFSharpPipelineBody = function parseFSharpPipelineBody(prec, noIn) {
  34995. var startPos = this.state.start;
  34996. var startLoc = this.state.startLoc;
  34997. this.state.potentialArrowAt = this.state.start;
  34998. var oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  34999. this.state.inFSharpPipelineDirectBody = true;
  35000. var ret = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, prec, noIn);
  35001. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  35002. return ret;
  35003. };
  35004. return ExpressionParser;
  35005. }(LValParser);
  35006. var loopLabel = {
  35007. kind: "loop"
  35008. },
  35009. switchLabel = {
  35010. kind: "switch"
  35011. };
  35012. var FUNC_NO_FLAGS = 0,
  35013. FUNC_STATEMENT = 1,
  35014. FUNC_HANGING_STATEMENT = 2,
  35015. FUNC_NULLABLE_ID = 4;
  35016. var StatementParser = function (_ExpressionParser) {
  35017. _inheritsLoose(StatementParser, _ExpressionParser);
  35018. function StatementParser() {
  35019. return _ExpressionParser.apply(this, arguments) || this;
  35020. }
  35021. var _proto = StatementParser.prototype;
  35022. _proto.parseTopLevel = function parseTopLevel(file, program) {
  35023. program.sourceType = this.options.sourceType;
  35024. program.interpreter = this.parseInterpreterDirective();
  35025. this.parseBlockBody(program, true, true, types.eof);
  35026. if (this.inModule && !this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) {
  35027. for (var _i2 = 0, _Array$from2 = Array.from(this.scope.undefinedExports); _i2 < _Array$from2.length; _i2++) {
  35028. var _Array$from2$_i = _Array$from2[_i2],
  35029. name = _Array$from2$_i[0];
  35030. var pos = this.scope.undefinedExports.get(name);
  35031. this.raise(pos, "Export '" + name + "' is not defined");
  35032. }
  35033. }
  35034. file.program = this.finishNode(program, "Program");
  35035. file.comments = this.state.comments;
  35036. if (this.options.tokens) file.tokens = this.state.tokens;
  35037. return this.finishNode(file, "File");
  35038. };
  35039. _proto.stmtToDirective = function stmtToDirective(stmt) {
  35040. var expr = stmt.expression;
  35041. var directiveLiteral = this.startNodeAt(expr.start, expr.loc.start);
  35042. var directive = this.startNodeAt(stmt.start, stmt.loc.start);
  35043. var raw = this.input.slice(expr.start, expr.end);
  35044. var val = directiveLiteral.value = raw.slice(1, -1);
  35045. this.addExtra(directiveLiteral, "raw", raw);
  35046. this.addExtra(directiveLiteral, "rawValue", val);
  35047. directive.value = this.finishNodeAt(directiveLiteral, "DirectiveLiteral", expr.end, expr.loc.end);
  35048. return this.finishNodeAt(directive, "Directive", stmt.end, stmt.loc.end);
  35049. };
  35050. _proto.parseInterpreterDirective = function parseInterpreterDirective() {
  35051. if (!this.match(types.interpreterDirective)) {
  35052. return null;
  35053. }
  35054. var node = this.startNode();
  35055. node.value = this.state.value;
  35056. this.next();
  35057. return this.finishNode(node, "InterpreterDirective");
  35058. };
  35059. _proto.isLet = function isLet(context) {
  35060. if (!this.isContextual("let")) {
  35061. return false;
  35062. }
  35063. var next = this.nextTokenStart();
  35064. var nextCh = this.input.charCodeAt(next);
  35065. if (nextCh === 91) return true;
  35066. if (context) return false;
  35067. if (nextCh === 123) return true;
  35068. if (isIdentifierStart(nextCh)) {
  35069. var pos = next + 1;
  35070. while (isIdentifierChar(this.input.charCodeAt(pos))) {
  35071. ++pos;
  35072. }
  35073. var ident = this.input.slice(next, pos);
  35074. if (!keywordRelationalOperator.test(ident)) return true;
  35075. }
  35076. return false;
  35077. };
  35078. _proto.parseStatement = function parseStatement(context, topLevel) {
  35079. if (this.match(types.at)) {
  35080. this.parseDecorators(true);
  35081. }
  35082. return this.parseStatementContent(context, topLevel);
  35083. };
  35084. _proto.parseStatementContent = function parseStatementContent(context, topLevel) {
  35085. var starttype = this.state.type;
  35086. var node = this.startNode();
  35087. var kind;
  35088. if (this.isLet(context)) {
  35089. starttype = types._var;
  35090. kind = "let";
  35091. }
  35092. switch (starttype) {
  35093. case types._break:
  35094. case types._continue:
  35095. return this.parseBreakContinueStatement(node, starttype.keyword);
  35096. case types._debugger:
  35097. return this.parseDebuggerStatement(node);
  35098. case types._do:
  35099. return this.parseDoStatement(node);
  35100. case types._for:
  35101. return this.parseForStatement(node);
  35102. case types._function:
  35103. if (this.lookaheadCharCode() === 46) break;
  35104. if (context) {
  35105. if (this.state.strict) {
  35106. this.raise(this.state.start, "In strict mode code, functions can only be declared at top level or inside a block");
  35107. } else if (context !== "if" && context !== "label") {
  35108. this.raise(this.state.start, "In non-strict mode code, functions can only be declared at top level, " + "inside a block, or as the body of an if statement");
  35109. }
  35110. }
  35111. return this.parseFunctionStatement(node, false, !context);
  35112. case types._class:
  35113. if (context) this.unexpected();
  35114. return this.parseClass(node, true);
  35115. case types._if:
  35116. return this.parseIfStatement(node);
  35117. case types._return:
  35118. return this.parseReturnStatement(node);
  35119. case types._switch:
  35120. return this.parseSwitchStatement(node);
  35121. case types._throw:
  35122. return this.parseThrowStatement(node);
  35123. case types._try:
  35124. return this.parseTryStatement(node);
  35125. case types._const:
  35126. case types._var:
  35127. kind = kind || this.state.value;
  35128. if (context && kind !== "var") {
  35129. this.raise(this.state.start, "Lexical declaration cannot appear in a single-statement context");
  35130. }
  35131. return this.parseVarStatement(node, kind);
  35132. case types._while:
  35133. return this.parseWhileStatement(node);
  35134. case types._with:
  35135. return this.parseWithStatement(node);
  35136. case types.braceL:
  35137. return this.parseBlock();
  35138. case types.semi:
  35139. return this.parseEmptyStatement(node);
  35140. case types._export:
  35141. case types._import:
  35142. {
  35143. var nextTokenCharCode = this.lookaheadCharCode();
  35144. if (nextTokenCharCode === 40 || nextTokenCharCode === 46) {
  35145. break;
  35146. }
  35147. if (!this.options.allowImportExportEverywhere && !topLevel) {
  35148. this.raise(this.state.start, "'import' and 'export' may only appear at the top level");
  35149. }
  35150. this.next();
  35151. var result;
  35152. if (starttype === types._import) {
  35153. result = this.parseImport(node);
  35154. if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) {
  35155. this.sawUnambiguousESM = true;
  35156. }
  35157. } else {
  35158. result = this.parseExport(node);
  35159. if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") {
  35160. this.sawUnambiguousESM = true;
  35161. }
  35162. }
  35163. this.assertModuleNodeAllowed(node);
  35164. return result;
  35165. }
  35166. default:
  35167. {
  35168. if (this.isAsyncFunction()) {
  35169. if (context) {
  35170. this.raise(this.state.start, "Async functions can only be declared at the top level or inside a block");
  35171. }
  35172. this.next();
  35173. return this.parseFunctionStatement(node, true, !context);
  35174. }
  35175. }
  35176. }
  35177. var maybeName = this.state.value;
  35178. var expr = this.parseExpression();
  35179. if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) {
  35180. return this.parseLabeledStatement(node, maybeName, expr, context);
  35181. } else {
  35182. return this.parseExpressionStatement(node, expr);
  35183. }
  35184. };
  35185. _proto.assertModuleNodeAllowed = function assertModuleNodeAllowed(node) {
  35186. if (!this.options.allowImportExportEverywhere && !this.inModule) {
  35187. this.raise(node.start, "'import' and 'export' may appear only with 'sourceType: \"module\"'", {
  35188. code: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"
  35189. });
  35190. }
  35191. };
  35192. _proto.takeDecorators = function takeDecorators(node) {
  35193. var decorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
  35194. if (decorators.length) {
  35195. node.decorators = decorators;
  35196. this.resetStartLocationFromNode(node, decorators[0]);
  35197. this.state.decoratorStack[this.state.decoratorStack.length - 1] = [];
  35198. }
  35199. };
  35200. _proto.canHaveLeadingDecorator = function canHaveLeadingDecorator() {
  35201. return this.match(types._class);
  35202. };
  35203. _proto.parseDecorators = function parseDecorators(allowExport) {
  35204. var currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
  35205. while (this.match(types.at)) {
  35206. var decorator = this.parseDecorator();
  35207. currentContextDecorators.push(decorator);
  35208. }
  35209. if (this.match(types._export)) {
  35210. if (!allowExport) {
  35211. this.unexpected();
  35212. }
  35213. if (this.hasPlugin("decorators") && !this.getPluginOption("decorators", "decoratorsBeforeExport")) {
  35214. this.raise(this.state.start, "Using the export keyword between a decorator and a class is not allowed. " + "Please use `export @dec class` instead.");
  35215. }
  35216. } else if (!this.canHaveLeadingDecorator()) {
  35217. throw this.raise(this.state.start, "Leading decorators must be attached to a class declaration");
  35218. }
  35219. };
  35220. _proto.parseDecorator = function parseDecorator() {
  35221. this.expectOnePlugin(["decorators-legacy", "decorators"]);
  35222. var node = this.startNode();
  35223. this.next();
  35224. if (this.hasPlugin("decorators")) {
  35225. this.state.decoratorStack.push([]);
  35226. var startPos = this.state.start;
  35227. var startLoc = this.state.startLoc;
  35228. var expr;
  35229. if (this.eat(types.parenL)) {
  35230. expr = this.parseExpression();
  35231. this.expect(types.parenR);
  35232. } else {
  35233. expr = this.parseIdentifier(false);
  35234. while (this.eat(types.dot)) {
  35235. var _node = this.startNodeAt(startPos, startLoc);
  35236. _node.object = expr;
  35237. _node.property = this.parseIdentifier(true);
  35238. _node.computed = false;
  35239. expr = this.finishNode(_node, "MemberExpression");
  35240. }
  35241. }
  35242. node.expression = this.parseMaybeDecoratorArguments(expr);
  35243. this.state.decoratorStack.pop();
  35244. } else {
  35245. node.expression = this.parseExprSubscripts();
  35246. }
  35247. return this.finishNode(node, "Decorator");
  35248. };
  35249. _proto.parseMaybeDecoratorArguments = function parseMaybeDecoratorArguments(expr) {
  35250. if (this.eat(types.parenL)) {
  35251. var node = this.startNodeAtNode(expr);
  35252. node.callee = expr;
  35253. node.arguments = this.parseCallExpressionArguments(types.parenR, false);
  35254. this.toReferencedList(node.arguments);
  35255. return this.finishNode(node, "CallExpression");
  35256. }
  35257. return expr;
  35258. };
  35259. _proto.parseBreakContinueStatement = function parseBreakContinueStatement(node, keyword) {
  35260. var isBreak = keyword === "break";
  35261. this.next();
  35262. if (this.isLineTerminator()) {
  35263. node.label = null;
  35264. } else {
  35265. node.label = this.parseIdentifier();
  35266. this.semicolon();
  35267. }
  35268. this.verifyBreakContinue(node, keyword);
  35269. return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
  35270. };
  35271. _proto.verifyBreakContinue = function verifyBreakContinue(node, keyword) {
  35272. var isBreak = keyword === "break";
  35273. var i;
  35274. for (i = 0; i < this.state.labels.length; ++i) {
  35275. var lab = this.state.labels[i];
  35276. if (node.label == null || lab.name === node.label.name) {
  35277. if (lab.kind != null && (isBreak || lab.kind === "loop")) break;
  35278. if (node.label && isBreak) break;
  35279. }
  35280. }
  35281. if (i === this.state.labels.length) {
  35282. this.raise(node.start, "Unsyntactic " + keyword);
  35283. }
  35284. };
  35285. _proto.parseDebuggerStatement = function parseDebuggerStatement(node) {
  35286. this.next();
  35287. this.semicolon();
  35288. return this.finishNode(node, "DebuggerStatement");
  35289. };
  35290. _proto.parseHeaderExpression = function parseHeaderExpression() {
  35291. this.expect(types.parenL);
  35292. var val = this.parseExpression();
  35293. this.expect(types.parenR);
  35294. return val;
  35295. };
  35296. _proto.parseDoStatement = function parseDoStatement(node) {
  35297. var _this = this;
  35298. this.next();
  35299. this.state.labels.push(loopLabel);
  35300. node.body = this.withTopicForbiddingContext(function () {
  35301. return _this.parseStatement("do");
  35302. });
  35303. this.state.labels.pop();
  35304. this.expect(types._while);
  35305. node.test = this.parseHeaderExpression();
  35306. this.eat(types.semi);
  35307. return this.finishNode(node, "DoWhileStatement");
  35308. };
  35309. _proto.parseForStatement = function parseForStatement(node) {
  35310. this.next();
  35311. this.state.labels.push(loopLabel);
  35312. var awaitAt = -1;
  35313. if (this.isAwaitAllowed() && this.eatContextual("await")) {
  35314. awaitAt = this.state.lastTokStart;
  35315. }
  35316. this.scope.enter(SCOPE_OTHER);
  35317. this.expect(types.parenL);
  35318. if (this.match(types.semi)) {
  35319. if (awaitAt > -1) {
  35320. this.unexpected(awaitAt);
  35321. }
  35322. return this.parseFor(node, null);
  35323. }
  35324. var isLet = this.isLet();
  35325. if (this.match(types._var) || this.match(types._const) || isLet) {
  35326. var _init = this.startNode();
  35327. var kind = isLet ? "let" : this.state.value;
  35328. this.next();
  35329. this.parseVar(_init, true, kind);
  35330. this.finishNode(_init, "VariableDeclaration");
  35331. if ((this.match(types._in) || this.isContextual("of")) && _init.declarations.length === 1) {
  35332. return this.parseForIn(node, _init, awaitAt);
  35333. }
  35334. if (awaitAt > -1) {
  35335. this.unexpected(awaitAt);
  35336. }
  35337. return this.parseFor(node, _init);
  35338. }
  35339. var refShorthandDefaultPos = {
  35340. start: 0
  35341. };
  35342. var init = this.parseExpression(true, refShorthandDefaultPos);
  35343. if (this.match(types._in) || this.isContextual("of")) {
  35344. var description = this.isContextual("of") ? "for-of statement" : "for-in statement";
  35345. this.toAssignable(init, undefined, description);
  35346. this.checkLVal(init, undefined, undefined, description);
  35347. return this.parseForIn(node, init, awaitAt);
  35348. } else if (refShorthandDefaultPos.start) {
  35349. this.unexpected(refShorthandDefaultPos.start);
  35350. }
  35351. if (awaitAt > -1) {
  35352. this.unexpected(awaitAt);
  35353. }
  35354. return this.parseFor(node, init);
  35355. };
  35356. _proto.parseFunctionStatement = function parseFunctionStatement(node, isAsync, declarationPosition) {
  35357. this.next();
  35358. return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), isAsync);
  35359. };
  35360. _proto.parseIfStatement = function parseIfStatement(node) {
  35361. this.next();
  35362. node.test = this.parseHeaderExpression();
  35363. node.consequent = this.parseStatement("if");
  35364. node.alternate = this.eat(types._else) ? this.parseStatement("if") : null;
  35365. return this.finishNode(node, "IfStatement");
  35366. };
  35367. _proto.parseReturnStatement = function parseReturnStatement(node) {
  35368. if (!this.scope.inFunction && !this.options.allowReturnOutsideFunction) {
  35369. this.raise(this.state.start, "'return' outside of function");
  35370. }
  35371. this.next();
  35372. if (this.isLineTerminator()) {
  35373. node.argument = null;
  35374. } else {
  35375. node.argument = this.parseExpression();
  35376. this.semicolon();
  35377. }
  35378. return this.finishNode(node, "ReturnStatement");
  35379. };
  35380. _proto.parseSwitchStatement = function parseSwitchStatement(node) {
  35381. this.next();
  35382. node.discriminant = this.parseHeaderExpression();
  35383. var cases = node.cases = [];
  35384. this.expect(types.braceL);
  35385. this.state.labels.push(switchLabel);
  35386. this.scope.enter(SCOPE_OTHER);
  35387. var cur;
  35388. for (var sawDefault; !this.match(types.braceR);) {
  35389. if (this.match(types._case) || this.match(types._default)) {
  35390. var isCase = this.match(types._case);
  35391. if (cur) this.finishNode(cur, "SwitchCase");
  35392. cases.push(cur = this.startNode());
  35393. cur.consequent = [];
  35394. this.next();
  35395. if (isCase) {
  35396. cur.test = this.parseExpression();
  35397. } else {
  35398. if (sawDefault) {
  35399. this.raise(this.state.lastTokStart, "Multiple default clauses");
  35400. }
  35401. sawDefault = true;
  35402. cur.test = null;
  35403. }
  35404. this.expect(types.colon);
  35405. } else {
  35406. if (cur) {
  35407. cur.consequent.push(this.parseStatement(null));
  35408. } else {
  35409. this.unexpected();
  35410. }
  35411. }
  35412. }
  35413. this.scope.exit();
  35414. if (cur) this.finishNode(cur, "SwitchCase");
  35415. this.next();
  35416. this.state.labels.pop();
  35417. return this.finishNode(node, "SwitchStatement");
  35418. };
  35419. _proto.parseThrowStatement = function parseThrowStatement(node) {
  35420. this.next();
  35421. if (lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start))) {
  35422. this.raise(this.state.lastTokEnd, "Illegal newline after throw");
  35423. }
  35424. node.argument = this.parseExpression();
  35425. this.semicolon();
  35426. return this.finishNode(node, "ThrowStatement");
  35427. };
  35428. _proto.parseTryStatement = function parseTryStatement(node) {
  35429. var _this2 = this;
  35430. this.next();
  35431. node.block = this.parseBlock();
  35432. node.handler = null;
  35433. if (this.match(types._catch)) {
  35434. var clause = this.startNode();
  35435. this.next();
  35436. if (this.match(types.parenL)) {
  35437. this.expect(types.parenL);
  35438. clause.param = this.parseBindingAtom();
  35439. var simple = clause.param.type === "Identifier";
  35440. this.scope.enter(simple ? SCOPE_SIMPLE_CATCH : 0);
  35441. this.checkLVal(clause.param, BIND_LEXICAL, null, "catch clause");
  35442. this.expect(types.parenR);
  35443. } else {
  35444. clause.param = null;
  35445. this.scope.enter(SCOPE_OTHER);
  35446. }
  35447. clause.body = this.withTopicForbiddingContext(function () {
  35448. return _this2.parseBlock(false, false);
  35449. });
  35450. this.scope.exit();
  35451. node.handler = this.finishNode(clause, "CatchClause");
  35452. }
  35453. node.finalizer = this.eat(types._finally) ? this.parseBlock() : null;
  35454. if (!node.handler && !node.finalizer) {
  35455. this.raise(node.start, "Missing catch or finally clause");
  35456. }
  35457. return this.finishNode(node, "TryStatement");
  35458. };
  35459. _proto.parseVarStatement = function parseVarStatement(node, kind) {
  35460. this.next();
  35461. this.parseVar(node, false, kind);
  35462. this.semicolon();
  35463. return this.finishNode(node, "VariableDeclaration");
  35464. };
  35465. _proto.parseWhileStatement = function parseWhileStatement(node) {
  35466. var _this3 = this;
  35467. this.next();
  35468. node.test = this.parseHeaderExpression();
  35469. this.state.labels.push(loopLabel);
  35470. node.body = this.withTopicForbiddingContext(function () {
  35471. return _this3.parseStatement("while");
  35472. });
  35473. this.state.labels.pop();
  35474. return this.finishNode(node, "WhileStatement");
  35475. };
  35476. _proto.parseWithStatement = function parseWithStatement(node) {
  35477. var _this4 = this;
  35478. if (this.state.strict) {
  35479. this.raise(this.state.start, "'with' in strict mode");
  35480. }
  35481. this.next();
  35482. node.object = this.parseHeaderExpression();
  35483. node.body = this.withTopicForbiddingContext(function () {
  35484. return _this4.parseStatement("with");
  35485. });
  35486. return this.finishNode(node, "WithStatement");
  35487. };
  35488. _proto.parseEmptyStatement = function parseEmptyStatement(node) {
  35489. this.next();
  35490. return this.finishNode(node, "EmptyStatement");
  35491. };
  35492. _proto.parseLabeledStatement = function parseLabeledStatement(node, maybeName, expr, context) {
  35493. for (var _i4 = 0, _this$state$labels2 = this.state.labels; _i4 < _this$state$labels2.length; _i4++) {
  35494. var label = _this$state$labels2[_i4];
  35495. if (label.name === maybeName) {
  35496. this.raise(expr.start, "Label '" + maybeName + "' is already declared");
  35497. }
  35498. }
  35499. var kind = this.state.type.isLoop ? "loop" : this.match(types._switch) ? "switch" : null;
  35500. for (var i = this.state.labels.length - 1; i >= 0; i--) {
  35501. var _label = this.state.labels[i];
  35502. if (_label.statementStart === node.start) {
  35503. _label.statementStart = this.state.start;
  35504. _label.kind = kind;
  35505. } else {
  35506. break;
  35507. }
  35508. }
  35509. this.state.labels.push({
  35510. name: maybeName,
  35511. kind: kind,
  35512. statementStart: this.state.start
  35513. });
  35514. node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label");
  35515. this.state.labels.pop();
  35516. node.label = expr;
  35517. return this.finishNode(node, "LabeledStatement");
  35518. };
  35519. _proto.parseExpressionStatement = function parseExpressionStatement(node, expr) {
  35520. node.expression = expr;
  35521. this.semicolon();
  35522. return this.finishNode(node, "ExpressionStatement");
  35523. };
  35524. _proto.parseBlock = function parseBlock(allowDirectives, createNewLexicalScope) {
  35525. if (allowDirectives === void 0) {
  35526. allowDirectives = false;
  35527. }
  35528. if (createNewLexicalScope === void 0) {
  35529. createNewLexicalScope = true;
  35530. }
  35531. var node = this.startNode();
  35532. this.expect(types.braceL);
  35533. if (createNewLexicalScope) {
  35534. this.scope.enter(SCOPE_OTHER);
  35535. }
  35536. this.parseBlockBody(node, allowDirectives, false, types.braceR);
  35537. if (createNewLexicalScope) {
  35538. this.scope.exit();
  35539. }
  35540. return this.finishNode(node, "BlockStatement");
  35541. };
  35542. _proto.isValidDirective = function isValidDirective(stmt) {
  35543. return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized;
  35544. };
  35545. _proto.parseBlockBody = function parseBlockBody(node, allowDirectives, topLevel, end) {
  35546. var body = node.body = [];
  35547. var directives = node.directives = [];
  35548. this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : undefined, topLevel, end);
  35549. };
  35550. _proto.parseBlockOrModuleBlockBody = function parseBlockOrModuleBlockBody(body, directives, topLevel, end) {
  35551. var parsedNonDirective = false;
  35552. var oldStrict;
  35553. var octalPosition;
  35554. while (!this.eat(end)) {
  35555. if (!parsedNonDirective && this.state.containsOctal && !octalPosition) {
  35556. octalPosition = this.state.octalPosition;
  35557. }
  35558. var stmt = this.parseStatement(null, topLevel);
  35559. if (directives && !parsedNonDirective && this.isValidDirective(stmt)) {
  35560. var directive = this.stmtToDirective(stmt);
  35561. directives.push(directive);
  35562. if (oldStrict === undefined && directive.value.value === "use strict") {
  35563. oldStrict = this.state.strict;
  35564. this.setStrict(true);
  35565. if (octalPosition) {
  35566. this.raise(octalPosition, "Octal literal in strict mode");
  35567. }
  35568. }
  35569. continue;
  35570. }
  35571. parsedNonDirective = true;
  35572. body.push(stmt);
  35573. }
  35574. if (oldStrict === false) {
  35575. this.setStrict(false);
  35576. }
  35577. };
  35578. _proto.parseFor = function parseFor(node, init) {
  35579. var _this5 = this;
  35580. node.init = init;
  35581. this.expect(types.semi);
  35582. node.test = this.match(types.semi) ? null : this.parseExpression();
  35583. this.expect(types.semi);
  35584. node.update = this.match(types.parenR) ? null : this.parseExpression();
  35585. this.expect(types.parenR);
  35586. node.body = this.withTopicForbiddingContext(function () {
  35587. return _this5.parseStatement("for");
  35588. });
  35589. this.scope.exit();
  35590. this.state.labels.pop();
  35591. return this.finishNode(node, "ForStatement");
  35592. };
  35593. _proto.parseForIn = function parseForIn(node, init, awaitAt) {
  35594. var _this6 = this;
  35595. var isForIn = this.match(types._in);
  35596. this.next();
  35597. if (isForIn) {
  35598. if (awaitAt > -1) this.unexpected(awaitAt);
  35599. } else {
  35600. node["await"] = awaitAt > -1;
  35601. }
  35602. if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.state.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) {
  35603. this.raise(init.start, (isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer");
  35604. } else if (init.type === "AssignmentPattern") {
  35605. this.raise(init.start, "Invalid left-hand side in for-loop");
  35606. }
  35607. node.left = init;
  35608. node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign();
  35609. this.expect(types.parenR);
  35610. node.body = this.withTopicForbiddingContext(function () {
  35611. return _this6.parseStatement("for");
  35612. });
  35613. this.scope.exit();
  35614. this.state.labels.pop();
  35615. return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement");
  35616. };
  35617. _proto.parseVar = function parseVar(node, isFor, kind) {
  35618. var declarations = node.declarations = [];
  35619. var isTypescript = this.hasPlugin("typescript");
  35620. node.kind = kind;
  35621. for (;;) {
  35622. var decl = this.startNode();
  35623. this.parseVarId(decl, kind);
  35624. if (this.eat(types.eq)) {
  35625. decl.init = this.parseMaybeAssign(isFor);
  35626. } else {
  35627. if (kind === "const" && !(this.match(types._in) || this.isContextual("of"))) {
  35628. if (!isTypescript) {
  35629. this.unexpected();
  35630. }
  35631. } else if (decl.id.type !== "Identifier" && !(isFor && (this.match(types._in) || this.isContextual("of")))) {
  35632. this.raise(this.state.lastTokEnd, "Complex binding patterns require an initialization value");
  35633. }
  35634. decl.init = null;
  35635. }
  35636. declarations.push(this.finishNode(decl, "VariableDeclarator"));
  35637. if (!this.eat(types.comma)) break;
  35638. }
  35639. return node;
  35640. };
  35641. _proto.parseVarId = function parseVarId(decl, kind) {
  35642. decl.id = this.parseBindingAtom();
  35643. this.checkLVal(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, undefined, "variable declaration", kind !== "var");
  35644. };
  35645. _proto.parseFunction = function parseFunction(node, statement, isAsync) {
  35646. var _this7 = this;
  35647. if (statement === void 0) {
  35648. statement = FUNC_NO_FLAGS;
  35649. }
  35650. if (isAsync === void 0) {
  35651. isAsync = false;
  35652. }
  35653. var isStatement = statement & FUNC_STATEMENT;
  35654. var isHangingStatement = statement & FUNC_HANGING_STATEMENT;
  35655. var requireId = !!isStatement && !(statement & FUNC_NULLABLE_ID);
  35656. this.initFunction(node, isAsync);
  35657. if (this.match(types.star) && isHangingStatement) {
  35658. this.raise(this.state.start, "Generators can only be declared at the top level or inside a block");
  35659. }
  35660. node.generator = this.eat(types.star);
  35661. if (isStatement) {
  35662. node.id = this.parseFunctionId(requireId);
  35663. }
  35664. var oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  35665. var oldYieldPos = this.state.yieldPos;
  35666. var oldAwaitPos = this.state.awaitPos;
  35667. this.state.maybeInArrowParameters = false;
  35668. this.state.yieldPos = -1;
  35669. this.state.awaitPos = -1;
  35670. this.scope.enter(functionFlags(node.async, node.generator));
  35671. if (!isStatement) {
  35672. node.id = this.parseFunctionId();
  35673. }
  35674. this.parseFunctionParams(node);
  35675. this.withTopicForbiddingContext(function () {
  35676. _this7.parseFunctionBodyAndFinish(node, isStatement ? "FunctionDeclaration" : "FunctionExpression");
  35677. });
  35678. this.scope.exit();
  35679. if (isStatement && !isHangingStatement) {
  35680. this.registerFunctionStatementId(node);
  35681. }
  35682. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  35683. this.state.yieldPos = oldYieldPos;
  35684. this.state.awaitPos = oldAwaitPos;
  35685. return node;
  35686. };
  35687. _proto.parseFunctionId = function parseFunctionId(requireId) {
  35688. return requireId || this.match(types.name) ? this.parseIdentifier() : null;
  35689. };
  35690. _proto.parseFunctionParams = function parseFunctionParams(node, allowModifiers) {
  35691. var oldInParameters = this.state.inParameters;
  35692. this.state.inParameters = true;
  35693. this.expect(types.parenL);
  35694. node.params = this.parseBindingList(types.parenR, 41, false, allowModifiers);
  35695. this.state.inParameters = oldInParameters;
  35696. this.checkYieldAwaitInDefaultParams();
  35697. };
  35698. _proto.registerFunctionStatementId = function registerFunctionStatementId(node) {
  35699. if (!node.id) return;
  35700. 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);
  35701. };
  35702. _proto.parseClass = function parseClass(node, isStatement, optionalId) {
  35703. this.next();
  35704. this.takeDecorators(node);
  35705. var oldStrict = this.state.strict;
  35706. this.state.strict = true;
  35707. this.parseClassId(node, isStatement, optionalId);
  35708. this.parseClassSuper(node);
  35709. node.body = this.parseClassBody(!!node.superClass);
  35710. this.state.strict = oldStrict;
  35711. return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
  35712. };
  35713. _proto.isClassProperty = function isClassProperty() {
  35714. return this.match(types.eq) || this.match(types.semi) || this.match(types.braceR);
  35715. };
  35716. _proto.isClassMethod = function isClassMethod() {
  35717. return this.match(types.parenL);
  35718. };
  35719. _proto.isNonstaticConstructor = function isNonstaticConstructor(method) {
  35720. return !method.computed && !method["static"] && (method.key.name === "constructor" || method.key.value === "constructor");
  35721. };
  35722. _proto.parseClassBody = function parseClassBody(constructorAllowsSuper) {
  35723. var _this8 = this;
  35724. this.classScope.enter();
  35725. var state = {
  35726. hadConstructor: false
  35727. };
  35728. var decorators = [];
  35729. var classBody = this.startNode();
  35730. classBody.body = [];
  35731. this.expect(types.braceL);
  35732. this.withTopicForbiddingContext(function () {
  35733. while (!_this8.eat(types.braceR)) {
  35734. if (_this8.eat(types.semi)) {
  35735. if (decorators.length > 0) {
  35736. throw _this8.raise(_this8.state.lastTokEnd, "Decorators must not be followed by a semicolon");
  35737. }
  35738. continue;
  35739. }
  35740. if (_this8.match(types.at)) {
  35741. decorators.push(_this8.parseDecorator());
  35742. continue;
  35743. }
  35744. var member = _this8.startNode();
  35745. if (decorators.length) {
  35746. member.decorators = decorators;
  35747. _this8.resetStartLocationFromNode(member, decorators[0]);
  35748. decorators = [];
  35749. }
  35750. _this8.parseClassMember(classBody, member, state, constructorAllowsSuper);
  35751. if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) {
  35752. _this8.raise(member.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?");
  35753. }
  35754. }
  35755. });
  35756. if (decorators.length) {
  35757. throw this.raise(this.state.start, "You have trailing decorators with no method");
  35758. }
  35759. this.classScope.exit();
  35760. return this.finishNode(classBody, "ClassBody");
  35761. };
  35762. _proto.parseClassMember = function parseClassMember(classBody, member, state, constructorAllowsSuper) {
  35763. var isStatic = false;
  35764. var containsEsc = this.state.containsEsc;
  35765. if (this.match(types.name) && this.state.value === "static") {
  35766. var key = this.parseIdentifier(true);
  35767. if (this.isClassMethod()) {
  35768. var method = member;
  35769. method.kind = "method";
  35770. method.computed = false;
  35771. method.key = key;
  35772. method["static"] = false;
  35773. this.pushClassMethod(classBody, method, false, false, false, false);
  35774. return;
  35775. } else if (this.isClassProperty()) {
  35776. var prop = member;
  35777. prop.computed = false;
  35778. prop.key = key;
  35779. prop["static"] = false;
  35780. classBody.body.push(this.parseClassProperty(prop));
  35781. return;
  35782. } else if (containsEsc) {
  35783. throw this.unexpected();
  35784. }
  35785. isStatic = true;
  35786. }
  35787. this.parseClassMemberWithIsStatic(classBody, member, state, isStatic, constructorAllowsSuper);
  35788. };
  35789. _proto.parseClassMemberWithIsStatic = function parseClassMemberWithIsStatic(classBody, member, state, isStatic, constructorAllowsSuper) {
  35790. var publicMethod = member;
  35791. var privateMethod = member;
  35792. var publicProp = member;
  35793. var privateProp = member;
  35794. var method = publicMethod;
  35795. var publicMember = publicMethod;
  35796. member["static"] = isStatic;
  35797. if (this.eat(types.star)) {
  35798. method.kind = "method";
  35799. this.parseClassPropertyName(method);
  35800. if (method.key.type === "PrivateName") {
  35801. this.pushClassPrivateMethod(classBody, privateMethod, true, false);
  35802. return;
  35803. }
  35804. if (this.isNonstaticConstructor(publicMethod)) {
  35805. this.raise(publicMethod.key.start, "Constructor can't be a generator");
  35806. }
  35807. this.pushClassMethod(classBody, publicMethod, true, false, false, false);
  35808. return;
  35809. }
  35810. var containsEsc = this.state.containsEsc;
  35811. var key = this.parseClassPropertyName(member);
  35812. var isPrivate = key.type === "PrivateName";
  35813. var isSimple = key.type === "Identifier";
  35814. var maybeQuestionTokenStart = this.state.start;
  35815. this.parsePostMemberNameModifiers(publicMember);
  35816. if (this.isClassMethod()) {
  35817. method.kind = "method";
  35818. if (isPrivate) {
  35819. this.pushClassPrivateMethod(classBody, privateMethod, false, false);
  35820. return;
  35821. }
  35822. var isConstructor = this.isNonstaticConstructor(publicMethod);
  35823. var allowsDirectSuper = false;
  35824. if (isConstructor) {
  35825. publicMethod.kind = "constructor";
  35826. if (state.hadConstructor && !this.hasPlugin("typescript")) {
  35827. this.raise(key.start, "Duplicate constructor in the same class");
  35828. }
  35829. state.hadConstructor = true;
  35830. allowsDirectSuper = constructorAllowsSuper;
  35831. }
  35832. this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper);
  35833. } else if (this.isClassProperty()) {
  35834. if (isPrivate) {
  35835. this.pushClassPrivateProperty(classBody, privateProp);
  35836. } else {
  35837. this.pushClassProperty(classBody, publicProp);
  35838. }
  35839. } else if (isSimple && key.name === "async" && !containsEsc && !this.isLineTerminator()) {
  35840. var isGenerator = this.eat(types.star);
  35841. if (publicMember.optional) {
  35842. this.unexpected(maybeQuestionTokenStart);
  35843. }
  35844. method.kind = "method";
  35845. this.parseClassPropertyName(method);
  35846. this.parsePostMemberNameModifiers(publicMember);
  35847. if (method.key.type === "PrivateName") {
  35848. this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true);
  35849. } else {
  35850. if (this.isNonstaticConstructor(publicMethod)) {
  35851. this.raise(publicMethod.key.start, "Constructor can't be an async function");
  35852. }
  35853. this.pushClassMethod(classBody, publicMethod, isGenerator, true, false, false);
  35854. }
  35855. } else if (isSimple && (key.name === "get" || key.name === "set") && !containsEsc && !(this.match(types.star) && this.isLineTerminator())) {
  35856. method.kind = key.name;
  35857. this.parseClassPropertyName(publicMethod);
  35858. if (method.key.type === "PrivateName") {
  35859. this.pushClassPrivateMethod(classBody, privateMethod, false, false);
  35860. } else {
  35861. if (this.isNonstaticConstructor(publicMethod)) {
  35862. this.raise(publicMethod.key.start, "Constructor can't have get/set modifier");
  35863. }
  35864. this.pushClassMethod(classBody, publicMethod, false, false, false, false);
  35865. }
  35866. this.checkGetterSetterParams(publicMethod);
  35867. } else if (this.isLineTerminator()) {
  35868. if (isPrivate) {
  35869. this.pushClassPrivateProperty(classBody, privateProp);
  35870. } else {
  35871. this.pushClassProperty(classBody, publicProp);
  35872. }
  35873. } else {
  35874. this.unexpected();
  35875. }
  35876. };
  35877. _proto.parseClassPropertyName = function parseClassPropertyName(member) {
  35878. var key = this.parsePropertyName(member, true);
  35879. if (!member.computed && member["static"] && (key.name === "prototype" || key.value === "prototype")) {
  35880. this.raise(key.start, "Classes may not have static property named prototype");
  35881. }
  35882. if (key.type === "PrivateName" && key.id.name === "constructor") {
  35883. this.raise(key.start, "Classes may not have a private field named '#constructor'");
  35884. }
  35885. return key;
  35886. };
  35887. _proto.pushClassProperty = function pushClassProperty(classBody, prop) {
  35888. if (!prop.computed && (prop.key.name === "constructor" || prop.key.value === "constructor")) {
  35889. this.raise(prop.key.start, "Classes may not have a field named 'constructor'");
  35890. }
  35891. classBody.body.push(this.parseClassProperty(prop));
  35892. };
  35893. _proto.pushClassPrivateProperty = function pushClassPrivateProperty(classBody, prop) {
  35894. this.expectPlugin("classPrivateProperties", prop.key.start);
  35895. var node = this.parseClassPrivateProperty(prop);
  35896. classBody.body.push(node);
  35897. this.classScope.declarePrivateName(node.key.id.name, CLASS_ELEMENT_OTHER, node.key.start);
  35898. };
  35899. _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  35900. classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true));
  35901. };
  35902. _proto.pushClassPrivateMethod = function pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  35903. this.expectPlugin("classPrivateMethods", method.key.start);
  35904. var node = this.parseMethod(method, isGenerator, isAsync, false, false, "ClassPrivateMethod", true);
  35905. classBody.body.push(node);
  35906. 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;
  35907. this.classScope.declarePrivateName(node.key.id.name, kind, node.key.start);
  35908. };
  35909. _proto.parsePostMemberNameModifiers = function parsePostMemberNameModifiers(methodOrProp) {};
  35910. _proto.parseAccessModifier = function parseAccessModifier() {
  35911. return undefined;
  35912. };
  35913. _proto.parseClassPrivateProperty = function parseClassPrivateProperty(node) {
  35914. this.scope.enter(SCOPE_CLASS | SCOPE_SUPER);
  35915. node.value = this.eat(types.eq) ? this.parseMaybeAssign() : null;
  35916. this.semicolon();
  35917. this.scope.exit();
  35918. return this.finishNode(node, "ClassPrivateProperty");
  35919. };
  35920. _proto.parseClassProperty = function parseClassProperty(node) {
  35921. if (!node.typeAnnotation) {
  35922. this.expectPlugin("classProperties");
  35923. }
  35924. this.scope.enter(SCOPE_CLASS | SCOPE_SUPER);
  35925. if (this.match(types.eq)) {
  35926. this.expectPlugin("classProperties");
  35927. this.next();
  35928. node.value = this.parseMaybeAssign();
  35929. } else {
  35930. node.value = null;
  35931. }
  35932. this.semicolon();
  35933. this.scope.exit();
  35934. return this.finishNode(node, "ClassProperty");
  35935. };
  35936. _proto.parseClassId = function parseClassId(node, isStatement, optionalId, bindingType) {
  35937. if (bindingType === void 0) {
  35938. bindingType = BIND_CLASS;
  35939. }
  35940. if (this.match(types.name)) {
  35941. node.id = this.parseIdentifier();
  35942. if (isStatement) {
  35943. this.checkLVal(node.id, bindingType, undefined, "class name");
  35944. }
  35945. } else {
  35946. if (optionalId || !isStatement) {
  35947. node.id = null;
  35948. } else {
  35949. this.unexpected(null, "A class name is required");
  35950. }
  35951. }
  35952. };
  35953. _proto.parseClassSuper = function parseClassSuper(node) {
  35954. node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null;
  35955. };
  35956. _proto.parseExport = function parseExport(node) {
  35957. var hasDefault = this.maybeParseExportDefaultSpecifier(node);
  35958. var parseAfterDefault = !hasDefault || this.eat(types.comma);
  35959. var hasStar = parseAfterDefault && this.eatExportStar(node);
  35960. var hasNamespace = hasStar && this.maybeParseExportNamespaceSpecifier(node);
  35961. var parseAfterNamespace = parseAfterDefault && (!hasNamespace || this.eat(types.comma));
  35962. var isFromRequired = hasDefault || hasStar;
  35963. if (hasStar && !hasNamespace) {
  35964. if (hasDefault) this.unexpected();
  35965. this.parseExportFrom(node, true);
  35966. return this.finishNode(node, "ExportAllDeclaration");
  35967. }
  35968. var hasSpecifiers = this.maybeParseExportNamedSpecifiers(node);
  35969. if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers || hasNamespace && parseAfterNamespace && !hasSpecifiers) {
  35970. throw this.unexpected(null, types.braceL);
  35971. }
  35972. var hasDeclaration;
  35973. if (isFromRequired || hasSpecifiers) {
  35974. hasDeclaration = false;
  35975. this.parseExportFrom(node, isFromRequired);
  35976. } else {
  35977. hasDeclaration = this.maybeParseExportDeclaration(node);
  35978. }
  35979. if (isFromRequired || hasSpecifiers || hasDeclaration) {
  35980. this.checkExport(node, true, false, !!node.source);
  35981. return this.finishNode(node, "ExportNamedDeclaration");
  35982. }
  35983. if (this.eat(types._default)) {
  35984. node.declaration = this.parseExportDefaultExpression();
  35985. this.checkExport(node, true, true);
  35986. return this.finishNode(node, "ExportDefaultDeclaration");
  35987. }
  35988. throw this.unexpected(null, types.braceL);
  35989. };
  35990. _proto.eatExportStar = function eatExportStar(node) {
  35991. return this.eat(types.star);
  35992. };
  35993. _proto.maybeParseExportDefaultSpecifier = function maybeParseExportDefaultSpecifier(node) {
  35994. if (this.isExportDefaultSpecifier()) {
  35995. this.expectPlugin("exportDefaultFrom");
  35996. var specifier = this.startNode();
  35997. specifier.exported = this.parseIdentifier(true);
  35998. node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
  35999. return true;
  36000. }
  36001. return false;
  36002. };
  36003. _proto.maybeParseExportNamespaceSpecifier = function maybeParseExportNamespaceSpecifier(node) {
  36004. if (this.isContextual("as")) {
  36005. if (!node.specifiers) node.specifiers = [];
  36006. var specifier = this.startNodeAt(this.state.lastTokStart, this.state.lastTokStartLoc);
  36007. this.next();
  36008. specifier.exported = this.parseIdentifier(true);
  36009. node.specifiers.push(this.finishNode(specifier, "ExportNamespaceSpecifier"));
  36010. return true;
  36011. }
  36012. return false;
  36013. };
  36014. _proto.maybeParseExportNamedSpecifiers = function maybeParseExportNamedSpecifiers(node) {
  36015. if (this.match(types.braceL)) {
  36016. var _node$specifiers;
  36017. if (!node.specifiers) node.specifiers = [];
  36018. (_node$specifiers = node.specifiers).push.apply(_node$specifiers, this.parseExportSpecifiers());
  36019. node.source = null;
  36020. node.declaration = null;
  36021. return true;
  36022. }
  36023. return false;
  36024. };
  36025. _proto.maybeParseExportDeclaration = function maybeParseExportDeclaration(node) {
  36026. if (this.shouldParseExportDeclaration()) {
  36027. if (this.isContextual("async")) {
  36028. var next = this.nextTokenStart();
  36029. if (!this.isUnparsedContextual(next, "function")) {
  36030. this.unexpected(next, "Unexpected token, expected \"function\"");
  36031. }
  36032. }
  36033. node.specifiers = [];
  36034. node.source = null;
  36035. node.declaration = this.parseExportDeclaration(node);
  36036. return true;
  36037. }
  36038. return false;
  36039. };
  36040. _proto.isAsyncFunction = function isAsyncFunction() {
  36041. if (!this.isContextual("async")) return false;
  36042. var next = this.nextTokenStart();
  36043. return !lineBreak.test(this.input.slice(this.state.pos, next)) && this.isUnparsedContextual(next, "function");
  36044. };
  36045. _proto.parseExportDefaultExpression = function parseExportDefaultExpression() {
  36046. var expr = this.startNode();
  36047. var isAsync = this.isAsyncFunction();
  36048. if (this.match(types._function) || isAsync) {
  36049. this.next();
  36050. if (isAsync) {
  36051. this.next();
  36052. }
  36053. return this.parseFunction(expr, FUNC_STATEMENT | FUNC_NULLABLE_ID, isAsync);
  36054. } else if (this.match(types._class)) {
  36055. return this.parseClass(expr, true, true);
  36056. } else if (this.match(types.at)) {
  36057. if (this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport")) {
  36058. this.raise(this.state.start, "Decorators must be placed *before* the 'export' keyword." + " You can set the 'decoratorsBeforeExport' option to false to use" + " the 'export @decorator class {}' syntax");
  36059. }
  36060. this.parseDecorators(false);
  36061. return this.parseClass(expr, true, true);
  36062. } else if (this.match(types._const) || this.match(types._var) || this.isLet()) {
  36063. throw this.raise(this.state.start, "Only expressions, functions or classes are allowed as the `default` export.");
  36064. } else {
  36065. var res = this.parseMaybeAssign();
  36066. this.semicolon();
  36067. return res;
  36068. }
  36069. };
  36070. _proto.parseExportDeclaration = function parseExportDeclaration(node) {
  36071. return this.parseStatement(null);
  36072. };
  36073. _proto.isExportDefaultSpecifier = function isExportDefaultSpecifier() {
  36074. if (this.match(types.name)) {
  36075. return this.state.value !== "async" && this.state.value !== "let";
  36076. }
  36077. if (!this.match(types._default)) {
  36078. return false;
  36079. }
  36080. var next = this.nextTokenStart();
  36081. return this.input.charCodeAt(next) === 44 || this.isUnparsedContextual(next, "from");
  36082. };
  36083. _proto.parseExportFrom = function parseExportFrom(node, expect) {
  36084. if (this.eatContextual("from")) {
  36085. node.source = this.parseImportSource();
  36086. this.checkExport(node);
  36087. } else {
  36088. if (expect) {
  36089. this.unexpected();
  36090. } else {
  36091. node.source = null;
  36092. }
  36093. }
  36094. this.semicolon();
  36095. };
  36096. _proto.shouldParseExportDeclaration = function shouldParseExportDeclaration() {
  36097. if (this.match(types.at)) {
  36098. this.expectOnePlugin(["decorators", "decorators-legacy"]);
  36099. if (this.hasPlugin("decorators")) {
  36100. if (this.getPluginOption("decorators", "decoratorsBeforeExport")) {
  36101. this.unexpected(this.state.start, "Decorators must be placed *before* the 'export' keyword." + " You can set the 'decoratorsBeforeExport' option to false to use" + " the 'export @decorator class {}' syntax");
  36102. } else {
  36103. return true;
  36104. }
  36105. }
  36106. }
  36107. 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();
  36108. };
  36109. _proto.checkExport = function checkExport(node, checkNames, isDefault, isFrom) {
  36110. if (checkNames) {
  36111. if (isDefault) {
  36112. this.checkDuplicateExports(node, "default");
  36113. } else if (node.specifiers && node.specifiers.length) {
  36114. for (var _i6 = 0, _node$specifiers3 = node.specifiers; _i6 < _node$specifiers3.length; _i6++) {
  36115. var specifier = _node$specifiers3[_i6];
  36116. this.checkDuplicateExports(specifier, specifier.exported.name);
  36117. if (!isFrom && specifier.local) {
  36118. this.checkReservedWord(specifier.local.name, specifier.local.start, true, false);
  36119. this.scope.checkLocalExport(specifier.local);
  36120. }
  36121. }
  36122. } else if (node.declaration) {
  36123. if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") {
  36124. var id = node.declaration.id;
  36125. if (!id) throw new Error("Assertion failure");
  36126. this.checkDuplicateExports(node, id.name);
  36127. } else if (node.declaration.type === "VariableDeclaration") {
  36128. for (var _i8 = 0, _node$declaration$dec2 = node.declaration.declarations; _i8 < _node$declaration$dec2.length; _i8++) {
  36129. var declaration = _node$declaration$dec2[_i8];
  36130. this.checkDeclaration(declaration.id);
  36131. }
  36132. }
  36133. }
  36134. }
  36135. var currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
  36136. if (currentContextDecorators.length) {
  36137. var isClass = node.declaration && (node.declaration.type === "ClassDeclaration" || node.declaration.type === "ClassExpression");
  36138. if (!node.declaration || !isClass) {
  36139. throw this.raise(node.start, "You can only use decorators on an export when exporting a class");
  36140. }
  36141. this.takeDecorators(node.declaration);
  36142. }
  36143. };
  36144. _proto.checkDeclaration = function checkDeclaration(node) {
  36145. if (node.type === "Identifier") {
  36146. this.checkDuplicateExports(node, node.name);
  36147. } else if (node.type === "ObjectPattern") {
  36148. for (var _i10 = 0, _node$properties2 = node.properties; _i10 < _node$properties2.length; _i10++) {
  36149. var prop = _node$properties2[_i10];
  36150. this.checkDeclaration(prop);
  36151. }
  36152. } else if (node.type === "ArrayPattern") {
  36153. for (var _i12 = 0, _node$elements2 = node.elements; _i12 < _node$elements2.length; _i12++) {
  36154. var elem = _node$elements2[_i12];
  36155. if (elem) {
  36156. this.checkDeclaration(elem);
  36157. }
  36158. }
  36159. } else if (node.type === "ObjectProperty") {
  36160. this.checkDeclaration(node.value);
  36161. } else if (node.type === "RestElement") {
  36162. this.checkDeclaration(node.argument);
  36163. } else if (node.type === "AssignmentPattern") {
  36164. this.checkDeclaration(node.left);
  36165. }
  36166. };
  36167. _proto.checkDuplicateExports = function checkDuplicateExports(node, name) {
  36168. if (this.state.exportedIdentifiers.indexOf(name) > -1) {
  36169. this.raise(node.start, name === "default" ? "Only one default export allowed per module." : "`" + name + "` has already been exported. Exported identifiers must be unique.");
  36170. }
  36171. this.state.exportedIdentifiers.push(name);
  36172. };
  36173. _proto.parseExportSpecifiers = function parseExportSpecifiers() {
  36174. var nodes = [];
  36175. var first = true;
  36176. this.expect(types.braceL);
  36177. while (!this.eat(types.braceR)) {
  36178. if (first) {
  36179. first = false;
  36180. } else {
  36181. this.expect(types.comma);
  36182. if (this.eat(types.braceR)) break;
  36183. }
  36184. var node = this.startNode();
  36185. node.local = this.parseIdentifier(true);
  36186. node.exported = this.eatContextual("as") ? this.parseIdentifier(true) : node.local.__clone();
  36187. nodes.push(this.finishNode(node, "ExportSpecifier"));
  36188. }
  36189. return nodes;
  36190. };
  36191. _proto.parseImport = function parseImport(node) {
  36192. node.specifiers = [];
  36193. if (!this.match(types.string)) {
  36194. var hasDefault = this.maybeParseDefaultImportSpecifier(node);
  36195. var parseNext = !hasDefault || this.eat(types.comma);
  36196. var hasStar = parseNext && this.maybeParseStarImportSpecifier(node);
  36197. if (parseNext && !hasStar) this.parseNamedImportSpecifiers(node);
  36198. this.expectContextual("from");
  36199. }
  36200. node.source = this.parseImportSource();
  36201. this.semicolon();
  36202. return this.finishNode(node, "ImportDeclaration");
  36203. };
  36204. _proto.parseImportSource = function parseImportSource() {
  36205. if (!this.match(types.string)) this.unexpected();
  36206. return this.parseExprAtom();
  36207. };
  36208. _proto.shouldParseDefaultImport = function shouldParseDefaultImport(node) {
  36209. return this.match(types.name);
  36210. };
  36211. _proto.parseImportSpecifierLocal = function parseImportSpecifierLocal(node, specifier, type, contextDescription) {
  36212. specifier.local = this.parseIdentifier();
  36213. this.checkLVal(specifier.local, BIND_LEXICAL, undefined, contextDescription);
  36214. node.specifiers.push(this.finishNode(specifier, type));
  36215. };
  36216. _proto.maybeParseDefaultImportSpecifier = function maybeParseDefaultImportSpecifier(node) {
  36217. if (this.shouldParseDefaultImport(node)) {
  36218. this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier", "default import specifier");
  36219. return true;
  36220. }
  36221. return false;
  36222. };
  36223. _proto.maybeParseStarImportSpecifier = function maybeParseStarImportSpecifier(node) {
  36224. if (this.match(types.star)) {
  36225. var specifier = this.startNode();
  36226. this.next();
  36227. this.expectContextual("as");
  36228. this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier", "import namespace specifier");
  36229. return true;
  36230. }
  36231. return false;
  36232. };
  36233. _proto.parseNamedImportSpecifiers = function parseNamedImportSpecifiers(node) {
  36234. var first = true;
  36235. this.expect(types.braceL);
  36236. while (!this.eat(types.braceR)) {
  36237. if (first) {
  36238. first = false;
  36239. } else {
  36240. if (this.eat(types.colon)) {
  36241. throw this.raise(this.state.start, "ES2015 named imports do not destructure. " + "Use another statement for destructuring after the import.");
  36242. }
  36243. this.expect(types.comma);
  36244. if (this.eat(types.braceR)) break;
  36245. }
  36246. this.parseImportSpecifier(node);
  36247. }
  36248. };
  36249. _proto.parseImportSpecifier = function parseImportSpecifier(node) {
  36250. var specifier = this.startNode();
  36251. specifier.imported = this.parseIdentifier(true);
  36252. if (this.eatContextual("as")) {
  36253. specifier.local = this.parseIdentifier();
  36254. } else {
  36255. this.checkReservedWord(specifier.imported.name, specifier.start, true, true);
  36256. specifier.local = specifier.imported.__clone();
  36257. }
  36258. this.checkLVal(specifier.local, BIND_LEXICAL, undefined, "import specifier");
  36259. node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
  36260. };
  36261. return StatementParser;
  36262. }(ExpressionParser);
  36263. var ClassScope = function ClassScope() {
  36264. this.privateNames = new Set();
  36265. this.loneAccessors = new Map();
  36266. this.undefinedPrivateNames = new Map();
  36267. };
  36268. var ClassScopeHandler = function () {
  36269. function ClassScopeHandler(raise) {
  36270. this.stack = [];
  36271. this.undefinedPrivateNames = new Map();
  36272. this.raise = raise;
  36273. }
  36274. var _proto = ClassScopeHandler.prototype;
  36275. _proto.current = function current() {
  36276. return this.stack[this.stack.length - 1];
  36277. };
  36278. _proto.enter = function enter() {
  36279. this.stack.push(new ClassScope());
  36280. };
  36281. _proto.exit = function exit() {
  36282. var oldClassScope = this.stack.pop();
  36283. var current = this.current();
  36284. for (var _i2 = 0, _Array$from2 = Array.from(oldClassScope.undefinedPrivateNames); _i2 < _Array$from2.length; _i2++) {
  36285. var _Array$from2$_i = _Array$from2[_i2],
  36286. name = _Array$from2$_i[0],
  36287. pos = _Array$from2$_i[1];
  36288. if (current) {
  36289. if (!current.undefinedPrivateNames.has(name)) {
  36290. current.undefinedPrivateNames.set(name, pos);
  36291. }
  36292. } else {
  36293. this.raiseUndeclaredPrivateName(name, pos);
  36294. }
  36295. }
  36296. };
  36297. _proto.declarePrivateName = function declarePrivateName(name, elementType, pos) {
  36298. var classScope = this.current();
  36299. var redefined = classScope.privateNames.has(name);
  36300. if (elementType & CLASS_ELEMENT_KIND_ACCESSOR) {
  36301. var accessor = redefined && classScope.loneAccessors.get(name);
  36302. if (accessor) {
  36303. var oldStatic = accessor & CLASS_ELEMENT_FLAG_STATIC;
  36304. var newStatic = elementType & CLASS_ELEMENT_FLAG_STATIC;
  36305. var oldKind = accessor & CLASS_ELEMENT_KIND_ACCESSOR;
  36306. var newKind = elementType & CLASS_ELEMENT_KIND_ACCESSOR;
  36307. redefined = oldKind === newKind || oldStatic !== newStatic;
  36308. if (!redefined) classScope.loneAccessors["delete"](name);
  36309. } else if (!redefined) {
  36310. classScope.loneAccessors.set(name, elementType);
  36311. }
  36312. }
  36313. if (redefined) {
  36314. this.raise(pos, "Duplicate private name #" + name);
  36315. }
  36316. classScope.privateNames.add(name);
  36317. classScope.undefinedPrivateNames["delete"](name);
  36318. };
  36319. _proto.usePrivateName = function usePrivateName(name, pos) {
  36320. var classScope;
  36321. for (var _i4 = 0, _this$stack2 = this.stack; _i4 < _this$stack2.length; _i4++) {
  36322. classScope = _this$stack2[_i4];
  36323. if (classScope.privateNames.has(name)) return;
  36324. }
  36325. if (classScope) {
  36326. classScope.undefinedPrivateNames.set(name, pos);
  36327. } else {
  36328. this.raiseUndeclaredPrivateName(name, pos);
  36329. }
  36330. };
  36331. _proto.raiseUndeclaredPrivateName = function raiseUndeclaredPrivateName(name, pos) {
  36332. this.raise(pos, "Private name #" + name + " is not defined");
  36333. };
  36334. return ClassScopeHandler;
  36335. }();
  36336. var Parser = function (_StatementParser) {
  36337. _inheritsLoose(Parser, _StatementParser);
  36338. function Parser(options, input) {
  36339. var _this;
  36340. options = getOptions(options);
  36341. _this = _StatementParser.call(this, options, input) || this;
  36342. var ScopeHandler = _this.getScopeHandler();
  36343. _this.options = options;
  36344. _this.inModule = _this.options.sourceType === "module";
  36345. _this.scope = new ScopeHandler(_this.raise.bind(_assertThisInitialized(_this)), _this.inModule);
  36346. _this.classScope = new ClassScopeHandler(_this.raise.bind(_assertThisInitialized(_this)));
  36347. _this.plugins = pluginsMap(_this.options.plugins);
  36348. _this.filename = options.sourceFilename;
  36349. return _this;
  36350. }
  36351. var _proto = Parser.prototype;
  36352. _proto.getScopeHandler = function getScopeHandler() {
  36353. return ScopeHandler;
  36354. };
  36355. _proto.parse = function parse() {
  36356. var scopeFlags = SCOPE_PROGRAM;
  36357. if (this.hasPlugin("topLevelAwait") && this.inModule) {
  36358. scopeFlags |= SCOPE_ASYNC;
  36359. }
  36360. this.scope.enter(scopeFlags);
  36361. var file = this.startNode();
  36362. var program = this.startNode();
  36363. this.nextToken();
  36364. file.errors = null;
  36365. this.parseTopLevel(file, program);
  36366. file.errors = this.state.errors;
  36367. return file;
  36368. };
  36369. return Parser;
  36370. }(StatementParser);
  36371. function pluginsMap(plugins) {
  36372. var pluginMap = new Map();
  36373. for (var _i2 = 0; _i2 < plugins.length; _i2++) {
  36374. var plugin = plugins[_i2];
  36375. var _ref = Array.isArray(plugin) ? plugin : [plugin, {}],
  36376. name = _ref[0],
  36377. options = _ref[1];
  36378. if (!pluginMap.has(name)) pluginMap.set(name, options || {});
  36379. }
  36380. return pluginMap;
  36381. }
  36382. function parse$1(input, options) {
  36383. if (options && options.sourceType === "unambiguous") {
  36384. options = Object.assign({}, options);
  36385. try {
  36386. options.sourceType = "module";
  36387. var parser = getParser(options, input);
  36388. var ast = parser.parse();
  36389. if (parser.sawUnambiguousESM) {
  36390. return ast;
  36391. }
  36392. if (parser.ambiguousScriptDifferentAst) {
  36393. try {
  36394. options.sourceType = "script";
  36395. return getParser(options, input).parse();
  36396. } catch (_unused) {}
  36397. } else {
  36398. ast.program.sourceType = "script";
  36399. }
  36400. return ast;
  36401. } catch (moduleError) {
  36402. try {
  36403. options.sourceType = "script";
  36404. return getParser(options, input).parse();
  36405. } catch (_unused2) {}
  36406. throw moduleError;
  36407. }
  36408. } else {
  36409. return getParser(options, input).parse();
  36410. }
  36411. }
  36412. function getParser(options, input) {
  36413. var cls = Parser;
  36414. if (options && options.plugins) {
  36415. validatePlugins(options.plugins);
  36416. cls = getParserClass(options.plugins);
  36417. }
  36418. return new cls(options, input);
  36419. }
  36420. var parserClassCache = {};
  36421. function getParserClass(pluginsFromOptions) {
  36422. var pluginList = mixinPluginNames.filter(function (name) {
  36423. return hasPlugin(pluginsFromOptions, name);
  36424. });
  36425. var key = pluginList.join("/");
  36426. var cls = parserClassCache[key];
  36427. if (!cls) {
  36428. cls = Parser;
  36429. for (var _i2 = 0; _i2 < pluginList.length; _i2++) {
  36430. var plugin = pluginList[_i2];
  36431. cls = mixinPlugins[plugin](cls);
  36432. }
  36433. parserClassCache[key] = cls;
  36434. }
  36435. return cls;
  36436. }
  36437. var hoistVariablesVisitor = {
  36438. Function: function Function(path) {
  36439. path.skip();
  36440. },
  36441. VariableDeclaration: function VariableDeclaration(path) {
  36442. if (path.node.kind !== "var") return;
  36443. var bindings = path.getBindingIdentifiers();
  36444. for (var _i = 0, _Object$keys = Object.keys(bindings); _i < _Object$keys.length; _i++) {
  36445. var key = _Object$keys[_i];
  36446. path.scope.push({
  36447. id: bindings[key]
  36448. });
  36449. }
  36450. var exprs = [];
  36451. for (var _i2 = 0, _arr = path.node.declarations; _i2 < _arr.length; _i2++) {
  36452. var declar = _arr[_i2];
  36453. if (declar.init) {
  36454. exprs.push(ExpressionStatement(AssignmentExpression("=", declar.id, declar.init)));
  36455. }
  36456. }
  36457. path.replaceWithMultiple(exprs);
  36458. }
  36459. };
  36460. function replaceWithMultiple(nodes) {
  36461. this.resync();
  36462. nodes = this._verifyNodeList(nodes);
  36463. inheritLeadingComments(nodes[0], this.node);
  36464. inheritTrailingComments(nodes[nodes.length - 1], this.node);
  36465. this.node = this.container[this.key] = null;
  36466. var paths = this.insertAfter(nodes);
  36467. if (this.node) {
  36468. this.requeue();
  36469. } else {
  36470. this.remove();
  36471. }
  36472. return paths;
  36473. }
  36474. function replaceWithSourceString(replacement) {
  36475. this.resync();
  36476. try {
  36477. replacement = "(" + replacement + ")";
  36478. replacement = parse$1(replacement);
  36479. } catch (err) {
  36480. var loc = err.loc;
  36481. if (loc) {
  36482. err.message += " - make sure this is an expression.\n" + codeFrameColumns(replacement, {
  36483. start: {
  36484. line: loc.line,
  36485. column: loc.column + 1
  36486. }
  36487. });
  36488. err.code = "BABEL_REPLACE_SOURCE_ERROR";
  36489. }
  36490. throw err;
  36491. }
  36492. replacement = replacement.program.body[0].expression;
  36493. traverse$1.removeProperties(replacement);
  36494. return this.replaceWith(replacement);
  36495. }
  36496. function replaceWith(replacement) {
  36497. this.resync();
  36498. if (this.removed) {
  36499. throw new Error("You can't replace this node, we've already removed it");
  36500. }
  36501. if (replacement instanceof NodePath) {
  36502. replacement = replacement.node;
  36503. }
  36504. if (!replacement) {
  36505. throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");
  36506. }
  36507. if (this.node === replacement) {
  36508. return [this];
  36509. }
  36510. if (this.isProgram() && !isProgram(replacement)) {
  36511. throw new Error("You can only replace a Program root node with another Program node");
  36512. }
  36513. if (Array.isArray(replacement)) {
  36514. throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");
  36515. }
  36516. if (typeof replacement === "string") {
  36517. throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");
  36518. }
  36519. var nodePath = "";
  36520. if (this.isNodeType("Statement") && isExpression(replacement)) {
  36521. if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement) && !this.parentPath.isExportDefaultDeclaration()) {
  36522. replacement = ExpressionStatement(replacement);
  36523. nodePath = "expression";
  36524. }
  36525. }
  36526. if (this.isNodeType("Expression") && isStatement(replacement)) {
  36527. if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) {
  36528. return this.replaceExpressionWithStatements([replacement]);
  36529. }
  36530. }
  36531. var oldNode = this.node;
  36532. if (oldNode) {
  36533. inheritsComments(replacement, oldNode);
  36534. removeComments(oldNode);
  36535. }
  36536. this._replaceWith(replacement);
  36537. this.type = replacement.type;
  36538. this.setScope();
  36539. this.requeue();
  36540. return [nodePath ? this.get(nodePath) : this];
  36541. }
  36542. function _replaceWith(node) {
  36543. if (!this.container) {
  36544. throw new ReferenceError("Container is falsy");
  36545. }
  36546. if (this.inList) {
  36547. validate(this.parent, this.key, [node]);
  36548. } else {
  36549. validate(this.parent, this.key, node);
  36550. }
  36551. this.debug("Replace with " + (node && node.type));
  36552. this.node = this.container[this.key] = node;
  36553. }
  36554. function replaceExpressionWithStatements(nodes) {
  36555. this.resync();
  36556. var toSequenceExpression$1 = toSequenceExpression(nodes, this.scope);
  36557. if (toSequenceExpression$1) {
  36558. return this.replaceWith(toSequenceExpression$1)[0].get("expressions");
  36559. }
  36560. var functionParent = this.getFunctionParent();
  36561. var isParentAsync = functionParent && functionParent.is("async");
  36562. var container = ArrowFunctionExpression([], BlockStatement(nodes));
  36563. this.replaceWith(CallExpression(container, []));
  36564. this.traverse(hoistVariablesVisitor);
  36565. var completionRecords = this.get("callee").getCompletionRecords();
  36566. for (var _iterator = completionRecords, _isArray = Array.isArray(_iterator), _i3 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  36567. var _ref;
  36568. if (_isArray) {
  36569. if (_i3 >= _iterator.length) break;
  36570. _ref = _iterator[_i3++];
  36571. } else {
  36572. _i3 = _iterator.next();
  36573. if (_i3.done) break;
  36574. _ref = _i3.value;
  36575. }
  36576. var path = _ref;
  36577. if (!path.isExpressionStatement()) continue;
  36578. var loop = path.findParent(function (path) {
  36579. return path.isLoop();
  36580. });
  36581. if (loop) {
  36582. var uid = loop.getData("expressionReplacementReturnUid");
  36583. if (!uid) {
  36584. var _callee = this.get("callee");
  36585. uid = _callee.scope.generateDeclaredUidIdentifier("ret");
  36586. _callee.get("body").pushContainer("body", ReturnStatement(cloneNode(uid)));
  36587. loop.setData("expressionReplacementReturnUid", uid);
  36588. } else {
  36589. uid = Identifier(uid.name);
  36590. }
  36591. path.get("expression").replaceWith(AssignmentExpression("=", cloneNode(uid), path.node.expression));
  36592. } else {
  36593. path.replaceWith(ReturnStatement(path.node.expression));
  36594. }
  36595. }
  36596. var callee = this.get("callee");
  36597. callee.arrowFunctionToExpression();
  36598. if (isParentAsync && traverse$1.hasType(this.get("callee.body").node, "AwaitExpression", FUNCTION_TYPES)) {
  36599. callee.set("async", true);
  36600. this.replaceWith(AwaitExpression(this.node));
  36601. }
  36602. return callee.get("body.body");
  36603. }
  36604. function replaceInline(nodes) {
  36605. this.resync();
  36606. if (Array.isArray(nodes)) {
  36607. if (Array.isArray(this.container)) {
  36608. nodes = this._verifyNodeList(nodes);
  36609. var paths = this._containerInsertAfter(nodes);
  36610. this.remove();
  36611. return paths;
  36612. } else {
  36613. return this.replaceWithMultiple(nodes);
  36614. }
  36615. } else {
  36616. return this.replaceWith(nodes);
  36617. }
  36618. }
  36619. var NodePath_replacement = /*#__PURE__*/Object.freeze({
  36620. __proto__: null,
  36621. replaceWithMultiple: replaceWithMultiple,
  36622. replaceWithSourceString: replaceWithSourceString,
  36623. replaceWith: replaceWith,
  36624. _replaceWith: _replaceWith,
  36625. replaceExpressionWithStatements: replaceExpressionWithStatements,
  36626. replaceInline: replaceInline
  36627. });
  36628. var VALID_CALLEES = ["String", "Number", "Math"];
  36629. var INVALID_METHODS = ["random"];
  36630. function evaluateTruthy() {
  36631. var res = this.evaluate();
  36632. if (res.confident) return !!res.value;
  36633. }
  36634. function deopt(path, state) {
  36635. if (!state.confident) return;
  36636. state.deoptPath = path;
  36637. state.confident = false;
  36638. }
  36639. function evaluateCached(path, state) {
  36640. var node = path.node;
  36641. var seen = state.seen;
  36642. if (seen.has(node)) {
  36643. var existing = seen.get(node);
  36644. if (existing.resolved) {
  36645. return existing.value;
  36646. } else {
  36647. deopt(path, state);
  36648. return;
  36649. }
  36650. } else {
  36651. var item = {
  36652. resolved: false
  36653. };
  36654. seen.set(node, item);
  36655. var val = _evaluate(path, state);
  36656. if (state.confident) {
  36657. item.resolved = true;
  36658. item.value = val;
  36659. }
  36660. return val;
  36661. }
  36662. }
  36663. function _evaluate(path, state) {
  36664. if (!state.confident) return;
  36665. var node = path.node;
  36666. if (path.isSequenceExpression()) {
  36667. var exprs = path.get("expressions");
  36668. return evaluateCached(exprs[exprs.length - 1], state);
  36669. }
  36670. if (path.isStringLiteral() || path.isNumericLiteral() || path.isBooleanLiteral()) {
  36671. return node.value;
  36672. }
  36673. if (path.isNullLiteral()) {
  36674. return null;
  36675. }
  36676. if (path.isTemplateLiteral()) {
  36677. return evaluateQuasis(path, node.quasis, state);
  36678. }
  36679. if (path.isTaggedTemplateExpression() && path.get("tag").isMemberExpression()) {
  36680. var object = path.get("tag.object");
  36681. var name = object.node.name;
  36682. var property = path.get("tag.property");
  36683. if (object.isIdentifier() && name === "String" && !path.scope.getBinding(name, true) && property.isIdentifier && property.node.name === "raw") {
  36684. return evaluateQuasis(path, node.quasi.quasis, state, true);
  36685. }
  36686. }
  36687. if (path.isConditionalExpression()) {
  36688. var testResult = evaluateCached(path.get("test"), state);
  36689. if (!state.confident) return;
  36690. if (testResult) {
  36691. return evaluateCached(path.get("consequent"), state);
  36692. } else {
  36693. return evaluateCached(path.get("alternate"), state);
  36694. }
  36695. }
  36696. if (path.isExpressionWrapper()) {
  36697. return evaluateCached(path.get("expression"), state);
  36698. }
  36699. if (path.isMemberExpression() && !path.parentPath.isCallExpression({
  36700. callee: node
  36701. })) {
  36702. var _property = path.get("property");
  36703. var _object = path.get("object");
  36704. if (_object.isLiteral() && _property.isIdentifier()) {
  36705. var value = _object.node.value;
  36706. var type = typeof value;
  36707. if (type === "number" || type === "string") {
  36708. return value[_property.node.name];
  36709. }
  36710. }
  36711. }
  36712. if (path.isReferencedIdentifier()) {
  36713. var binding = path.scope.getBinding(node.name);
  36714. if (binding && binding.constantViolations.length > 0) {
  36715. return deopt(binding.path, state);
  36716. }
  36717. if (binding && path.node.start < binding.path.node.end) {
  36718. return deopt(binding.path, state);
  36719. }
  36720. if (binding && binding.hasValue) {
  36721. return binding.value;
  36722. } else {
  36723. if (node.name === "undefined") {
  36724. return binding ? deopt(binding.path, state) : undefined;
  36725. } else if (node.name === "Infinity") {
  36726. return binding ? deopt(binding.path, state) : Infinity;
  36727. } else if (node.name === "NaN") {
  36728. return binding ? deopt(binding.path, state) : NaN;
  36729. }
  36730. var resolved = path.resolve();
  36731. if (resolved === path) {
  36732. return deopt(path, state);
  36733. } else {
  36734. return evaluateCached(resolved, state);
  36735. }
  36736. }
  36737. }
  36738. if (path.isUnaryExpression({
  36739. prefix: true
  36740. })) {
  36741. if (node.operator === "void") {
  36742. return undefined;
  36743. }
  36744. var argument = path.get("argument");
  36745. if (node.operator === "typeof" && (argument.isFunction() || argument.isClass())) {
  36746. return "function";
  36747. }
  36748. var arg = evaluateCached(argument, state);
  36749. if (!state.confident) return;
  36750. switch (node.operator) {
  36751. case "!":
  36752. return !arg;
  36753. case "+":
  36754. return +arg;
  36755. case "-":
  36756. return -arg;
  36757. case "~":
  36758. return ~arg;
  36759. case "typeof":
  36760. return typeof arg;
  36761. }
  36762. }
  36763. if (path.isArrayExpression()) {
  36764. var arr = [];
  36765. var elems = path.get("elements");
  36766. for (var _iterator = elems, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  36767. var _ref;
  36768. if (_isArray) {
  36769. if (_i >= _iterator.length) break;
  36770. _ref = _iterator[_i++];
  36771. } else {
  36772. _i = _iterator.next();
  36773. if (_i.done) break;
  36774. _ref = _i.value;
  36775. }
  36776. var elem = _ref;
  36777. var elemValue = elem.evaluate();
  36778. if (elemValue.confident) {
  36779. arr.push(elemValue.value);
  36780. } else {
  36781. return deopt(elem, state);
  36782. }
  36783. }
  36784. return arr;
  36785. }
  36786. if (path.isObjectExpression()) {
  36787. var obj = {};
  36788. var props = path.get("properties");
  36789. for (var _iterator2 = props, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  36790. var _ref2;
  36791. if (_isArray2) {
  36792. if (_i2 >= _iterator2.length) break;
  36793. _ref2 = _iterator2[_i2++];
  36794. } else {
  36795. _i2 = _iterator2.next();
  36796. if (_i2.done) break;
  36797. _ref2 = _i2.value;
  36798. }
  36799. var prop = _ref2;
  36800. if (prop.isObjectMethod() || prop.isSpreadElement()) {
  36801. return deopt(prop, state);
  36802. }
  36803. var keyPath = prop.get("key");
  36804. var key = keyPath;
  36805. if (prop.node.computed) {
  36806. key = key.evaluate();
  36807. if (!key.confident) {
  36808. return deopt(keyPath, state);
  36809. }
  36810. key = key.value;
  36811. } else if (key.isIdentifier()) {
  36812. key = key.node.name;
  36813. } else {
  36814. key = key.node.value;
  36815. }
  36816. var valuePath = prop.get("value");
  36817. var _value = valuePath.evaluate();
  36818. if (!_value.confident) {
  36819. return deopt(valuePath, state);
  36820. }
  36821. _value = _value.value;
  36822. obj[key] = _value;
  36823. }
  36824. return obj;
  36825. }
  36826. if (path.isLogicalExpression()) {
  36827. var wasConfident = state.confident;
  36828. var left = evaluateCached(path.get("left"), state);
  36829. var leftConfident = state.confident;
  36830. state.confident = wasConfident;
  36831. var right = evaluateCached(path.get("right"), state);
  36832. var rightConfident = state.confident;
  36833. switch (node.operator) {
  36834. case "||":
  36835. state.confident = leftConfident && (!!left || rightConfident);
  36836. if (!state.confident) return;
  36837. return left || right;
  36838. case "&&":
  36839. state.confident = leftConfident && (!left || rightConfident);
  36840. if (!state.confident) return;
  36841. return left && right;
  36842. }
  36843. }
  36844. if (path.isBinaryExpression()) {
  36845. var _left = evaluateCached(path.get("left"), state);
  36846. if (!state.confident) return;
  36847. var _right = evaluateCached(path.get("right"), state);
  36848. if (!state.confident) return;
  36849. switch (node.operator) {
  36850. case "-":
  36851. return _left - _right;
  36852. case "+":
  36853. return _left + _right;
  36854. case "/":
  36855. return _left / _right;
  36856. case "*":
  36857. return _left * _right;
  36858. case "%":
  36859. return _left % _right;
  36860. case "**":
  36861. return Math.pow(_left, _right);
  36862. case "<":
  36863. return _left < _right;
  36864. case ">":
  36865. return _left > _right;
  36866. case "<=":
  36867. return _left <= _right;
  36868. case ">=":
  36869. return _left >= _right;
  36870. case "==":
  36871. return _left == _right;
  36872. case "!=":
  36873. return _left != _right;
  36874. case "===":
  36875. return _left === _right;
  36876. case "!==":
  36877. return _left !== _right;
  36878. case "|":
  36879. return _left | _right;
  36880. case "&":
  36881. return _left & _right;
  36882. case "^":
  36883. return _left ^ _right;
  36884. case "<<":
  36885. return _left << _right;
  36886. case ">>":
  36887. return _left >> _right;
  36888. case ">>>":
  36889. return _left >>> _right;
  36890. }
  36891. }
  36892. if (path.isCallExpression()) {
  36893. var callee = path.get("callee");
  36894. var context;
  36895. var func;
  36896. if (callee.isIdentifier() && !path.scope.getBinding(callee.node.name, true) && VALID_CALLEES.indexOf(callee.node.name) >= 0) {
  36897. func = global$1[node.callee.name];
  36898. }
  36899. if (callee.isMemberExpression()) {
  36900. var _object2 = callee.get("object");
  36901. var _property2 = callee.get("property");
  36902. if (_object2.isIdentifier() && _property2.isIdentifier() && VALID_CALLEES.indexOf(_object2.node.name) >= 0 && INVALID_METHODS.indexOf(_property2.node.name) < 0) {
  36903. context = global$1[_object2.node.name];
  36904. func = context[_property2.node.name];
  36905. }
  36906. if (_object2.isLiteral() && _property2.isIdentifier()) {
  36907. var _type = typeof _object2.node.value;
  36908. if (_type === "string" || _type === "number") {
  36909. context = _object2.node.value;
  36910. func = context[_property2.node.name];
  36911. }
  36912. }
  36913. }
  36914. if (func) {
  36915. var args = path.get("arguments").map(function (arg) {
  36916. return evaluateCached(arg, state);
  36917. });
  36918. if (!state.confident) return;
  36919. return func.apply(context, args);
  36920. }
  36921. }
  36922. deopt(path, state);
  36923. }
  36924. function evaluateQuasis(path, quasis, state, raw) {
  36925. if (raw === void 0) {
  36926. raw = false;
  36927. }
  36928. var str = "";
  36929. var i = 0;
  36930. var exprs = path.get("expressions");
  36931. for (var _iterator3 = quasis, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
  36932. var _ref3;
  36933. if (_isArray3) {
  36934. if (_i3 >= _iterator3.length) break;
  36935. _ref3 = _iterator3[_i3++];
  36936. } else {
  36937. _i3 = _iterator3.next();
  36938. if (_i3.done) break;
  36939. _ref3 = _i3.value;
  36940. }
  36941. var elem = _ref3;
  36942. if (!state.confident) break;
  36943. str += raw ? elem.value.raw : elem.value.cooked;
  36944. var expr = exprs[i++];
  36945. if (expr) str += String(evaluateCached(expr, state));
  36946. }
  36947. if (!state.confident) return;
  36948. return str;
  36949. }
  36950. function evaluate() {
  36951. var state = {
  36952. confident: true,
  36953. deoptPath: null,
  36954. seen: new Map()
  36955. };
  36956. var value = evaluateCached(this, state);
  36957. if (!state.confident) value = undefined;
  36958. return {
  36959. confident: state.confident,
  36960. deopt: state.deoptPath,
  36961. value: value
  36962. };
  36963. }
  36964. var NodePath_evaluation = /*#__PURE__*/Object.freeze({
  36965. __proto__: null,
  36966. evaluateTruthy: evaluateTruthy,
  36967. evaluate: evaluate
  36968. });
  36969. function getFunctionArity (node) {
  36970. var params = node.params;
  36971. for (var i = 0; i < params.length; i++) {
  36972. var param = params[i];
  36973. if (isAssignmentPattern(param) || isRestElement(param)) {
  36974. return i;
  36975. }
  36976. }
  36977. return params.length;
  36978. }
  36979. function makeStatementFormatter(fn) {
  36980. return {
  36981. code: function code(str) {
  36982. return "/* @babel/template */;\n" + str;
  36983. },
  36984. validate: function validate() {},
  36985. unwrap: function unwrap(ast) {
  36986. return fn(ast.program.body.slice(1));
  36987. }
  36988. };
  36989. }
  36990. var smart = makeStatementFormatter(function (body) {
  36991. if (body.length > 1) {
  36992. return body;
  36993. } else {
  36994. return body[0];
  36995. }
  36996. });
  36997. var statements = makeStatementFormatter(function (body) {
  36998. return body;
  36999. });
  37000. var statement = makeStatementFormatter(function (body) {
  37001. if (body.length === 0) {
  37002. throw new Error("Found nothing to return.");
  37003. }
  37004. if (body.length > 1) {
  37005. throw new Error("Found multiple statements but wanted one");
  37006. }
  37007. return body[0];
  37008. });
  37009. var expression = {
  37010. code: function code(str) {
  37011. return "(\n" + str + "\n)";
  37012. },
  37013. validate: function validate(_ref) {
  37014. var program = _ref.program;
  37015. if (program.body.length > 1) {
  37016. throw new Error("Found multiple statements but wanted one");
  37017. }
  37018. var expression = program.body[0].expression;
  37019. if (expression.start === 0) {
  37020. throw new Error("Parse result included parens.");
  37021. }
  37022. },
  37023. unwrap: function unwrap(ast) {
  37024. return ast.program.body[0].expression;
  37025. }
  37026. };
  37027. var program = {
  37028. code: function code(str) {
  37029. return str;
  37030. },
  37031. validate: function validate() {},
  37032. unwrap: function unwrap(ast) {
  37033. return ast.program;
  37034. }
  37035. };
  37036. function merge(a, b) {
  37037. var _b$placeholderWhiteli = b.placeholderWhitelist,
  37038. placeholderWhitelist = _b$placeholderWhiteli === void 0 ? a.placeholderWhitelist : _b$placeholderWhiteli,
  37039. _b$placeholderPattern = b.placeholderPattern,
  37040. placeholderPattern = _b$placeholderPattern === void 0 ? a.placeholderPattern : _b$placeholderPattern,
  37041. _b$preserveComments = b.preserveComments,
  37042. preserveComments = _b$preserveComments === void 0 ? a.preserveComments : _b$preserveComments,
  37043. _b$syntacticPlacehold = b.syntacticPlaceholders,
  37044. syntacticPlaceholders = _b$syntacticPlacehold === void 0 ? a.syntacticPlaceholders : _b$syntacticPlacehold;
  37045. return {
  37046. parser: Object.assign({}, a.parser, {}, b.parser),
  37047. placeholderWhitelist: placeholderWhitelist,
  37048. placeholderPattern: placeholderPattern,
  37049. preserveComments: preserveComments,
  37050. syntacticPlaceholders: syntacticPlaceholders
  37051. };
  37052. }
  37053. function validate$2(opts) {
  37054. if (opts != null && typeof opts !== "object") {
  37055. throw new Error("Unknown template options.");
  37056. }
  37057. var _ref = opts || {},
  37058. placeholderWhitelist = _ref.placeholderWhitelist,
  37059. placeholderPattern = _ref.placeholderPattern,
  37060. preserveComments = _ref.preserveComments,
  37061. syntacticPlaceholders = _ref.syntacticPlaceholders,
  37062. parser = _objectWithoutPropertiesLoose(_ref, ["placeholderWhitelist", "placeholderPattern", "preserveComments", "syntacticPlaceholders"]);
  37063. if (placeholderWhitelist != null && !(placeholderWhitelist instanceof Set)) {
  37064. throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined");
  37065. }
  37066. if (placeholderPattern != null && !(placeholderPattern instanceof RegExp) && placeholderPattern !== false) {
  37067. throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined");
  37068. }
  37069. if (preserveComments != null && typeof preserveComments !== "boolean") {
  37070. throw new Error("'.preserveComments' must be a boolean, null, or undefined");
  37071. }
  37072. if (syntacticPlaceholders != null && typeof syntacticPlaceholders !== "boolean") {
  37073. throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined");
  37074. }
  37075. if (syntacticPlaceholders === true && (placeholderWhitelist != null || placeholderPattern != null)) {
  37076. throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible" + " with '.syntacticPlaceholders: true'");
  37077. }
  37078. return {
  37079. parser: parser,
  37080. placeholderWhitelist: placeholderWhitelist || undefined,
  37081. placeholderPattern: placeholderPattern == null ? undefined : placeholderPattern,
  37082. preserveComments: preserveComments == null ? false : preserveComments,
  37083. syntacticPlaceholders: syntacticPlaceholders == null ? undefined : syntacticPlaceholders
  37084. };
  37085. }
  37086. function normalizeReplacements(replacements) {
  37087. if (Array.isArray(replacements)) {
  37088. return replacements.reduce(function (acc, replacement, i) {
  37089. acc["$" + i] = replacement;
  37090. return acc;
  37091. }, {});
  37092. } else if (typeof replacements === "object" || replacements == null) {
  37093. return replacements || undefined;
  37094. }
  37095. throw new Error("Template replacements must be an array, object, null, or undefined");
  37096. }
  37097. var PATTERN = /^[_$A-Z0-9]+$/;
  37098. function parseAndBuildMetadata(formatter, code, opts) {
  37099. var ast = parseWithCodeFrame(code, opts.parser);
  37100. var placeholderWhitelist = opts.placeholderWhitelist,
  37101. placeholderPattern = opts.placeholderPattern,
  37102. preserveComments = opts.preserveComments,
  37103. syntacticPlaceholders = opts.syntacticPlaceholders;
  37104. removePropertiesDeep(ast, {
  37105. preserveComments: preserveComments
  37106. });
  37107. formatter.validate(ast);
  37108. var syntactic = {
  37109. placeholders: [],
  37110. placeholderNames: new Set()
  37111. };
  37112. var legacy = {
  37113. placeholders: [],
  37114. placeholderNames: new Set()
  37115. };
  37116. var isLegacyRef = {
  37117. value: undefined
  37118. };
  37119. traverse(ast, placeholderVisitorHandler, {
  37120. syntactic: syntactic,
  37121. legacy: legacy,
  37122. isLegacyRef: isLegacyRef,
  37123. placeholderWhitelist: placeholderWhitelist,
  37124. placeholderPattern: placeholderPattern,
  37125. syntacticPlaceholders: syntacticPlaceholders
  37126. });
  37127. return Object.assign({
  37128. ast: ast
  37129. }, isLegacyRef.value ? legacy : syntactic);
  37130. }
  37131. function placeholderVisitorHandler(node, ancestors, state) {
  37132. var name;
  37133. if (isPlaceholder(node)) {
  37134. if (state.syntacticPlaceholders === false) {
  37135. throw new Error("%%foo%%-style placeholders can't be used when " + "'.syntacticPlaceholders' is false.");
  37136. } else {
  37137. name = node.name.name;
  37138. state.isLegacyRef.value = false;
  37139. }
  37140. } else if (state.isLegacyRef.value === false || state.syntacticPlaceholders) {
  37141. return;
  37142. } else if (isIdentifier(node) || isJSXIdentifier(node)) {
  37143. name = node.name;
  37144. state.isLegacyRef.value = true;
  37145. } else if (isStringLiteral(node)) {
  37146. name = node.value;
  37147. state.isLegacyRef.value = true;
  37148. } else {
  37149. return;
  37150. }
  37151. if (!state.isLegacyRef.value && (state.placeholderPattern != null || state.placeholderWhitelist != null)) {
  37152. throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible" + " with '.syntacticPlaceholders: true'");
  37153. }
  37154. if (state.isLegacyRef.value && (state.placeholderPattern === false || !(state.placeholderPattern || PATTERN).test(name)) && (!state.placeholderWhitelist || !state.placeholderWhitelist.has(name))) {
  37155. return;
  37156. }
  37157. ancestors = ancestors.slice();
  37158. var _ancestors = ancestors[ancestors.length - 1],
  37159. parent = _ancestors.node,
  37160. key = _ancestors.key;
  37161. var type;
  37162. if (isStringLiteral(node) || isPlaceholder(node, {
  37163. expectedNode: "StringLiteral"
  37164. })) {
  37165. type = "string";
  37166. } else if (isNewExpression(parent) && key === "arguments" || isCallExpression(parent) && key === "arguments" || isFunction(parent) && key === "params") {
  37167. type = "param";
  37168. } else if (isExpressionStatement(parent) && !isPlaceholder(node)) {
  37169. type = "statement";
  37170. ancestors = ancestors.slice(0, -1);
  37171. } else if (isStatement(node) && isPlaceholder(node)) {
  37172. type = "statement";
  37173. } else {
  37174. type = "other";
  37175. }
  37176. var _ref = state.isLegacyRef.value ? state.legacy : state.syntactic,
  37177. placeholders = _ref.placeholders,
  37178. placeholderNames = _ref.placeholderNames;
  37179. placeholders.push({
  37180. name: name,
  37181. type: type,
  37182. resolve: function resolve(ast) {
  37183. return resolveAncestors(ast, ancestors);
  37184. },
  37185. isDuplicate: placeholderNames.has(name)
  37186. });
  37187. placeholderNames.add(name);
  37188. }
  37189. function resolveAncestors(ast, ancestors) {
  37190. var parent = ast;
  37191. for (var i = 0; i < ancestors.length - 1; i++) {
  37192. var _ancestors$i = ancestors[i],
  37193. _key = _ancestors$i.key,
  37194. _index = _ancestors$i.index;
  37195. if (_index === undefined) {
  37196. parent = parent[_key];
  37197. } else {
  37198. parent = parent[_key][_index];
  37199. }
  37200. }
  37201. var _ancestors2 = ancestors[ancestors.length - 1],
  37202. key = _ancestors2.key,
  37203. index = _ancestors2.index;
  37204. return {
  37205. parent: parent,
  37206. key: key,
  37207. index: index
  37208. };
  37209. }
  37210. function parseWithCodeFrame(code, parserOpts) {
  37211. parserOpts = Object.assign({
  37212. allowReturnOutsideFunction: true,
  37213. allowSuperOutsideMethod: true,
  37214. sourceType: "module"
  37215. }, parserOpts, {
  37216. plugins: (parserOpts.plugins || []).concat("placeholders")
  37217. });
  37218. try {
  37219. return parse$1(code, parserOpts);
  37220. } catch (err) {
  37221. var loc = err.loc;
  37222. if (loc) {
  37223. err.message += "\n" + codeFrameColumns(code, {
  37224. start: loc
  37225. });
  37226. err.code = "BABEL_TEMPLATE_PARSE_ERROR";
  37227. }
  37228. throw err;
  37229. }
  37230. }
  37231. function populatePlaceholders(metadata, replacements) {
  37232. var ast = cloneNode(metadata.ast);
  37233. if (replacements) {
  37234. metadata.placeholders.forEach(function (placeholder) {
  37235. if (!Object.prototype.hasOwnProperty.call(replacements, placeholder.name)) {
  37236. var placeholderName = placeholder.name;
  37237. 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 + "$/ }");
  37238. }
  37239. });
  37240. Object.keys(replacements).forEach(function (key) {
  37241. if (!metadata.placeholderNames.has(key)) {
  37242. throw new Error("Unknown substitution \"" + key + "\" given");
  37243. }
  37244. });
  37245. }
  37246. metadata.placeholders.slice().reverse().forEach(function (placeholder) {
  37247. try {
  37248. applyReplacement(placeholder, ast, replacements && replacements[placeholder.name] || null);
  37249. } catch (e) {
  37250. e.message = "@babel/template placeholder \"" + placeholder.name + "\": " + e.message;
  37251. throw e;
  37252. }
  37253. });
  37254. return ast;
  37255. }
  37256. function applyReplacement(placeholder, ast, replacement) {
  37257. if (placeholder.isDuplicate) {
  37258. if (Array.isArray(replacement)) {
  37259. replacement = replacement.map(function (node) {
  37260. return cloneNode(node);
  37261. });
  37262. } else if (typeof replacement === "object") {
  37263. replacement = cloneNode(replacement);
  37264. }
  37265. }
  37266. var _placeholder$resolve = placeholder.resolve(ast),
  37267. parent = _placeholder$resolve.parent,
  37268. key = _placeholder$resolve.key,
  37269. index = _placeholder$resolve.index;
  37270. if (placeholder.type === "string") {
  37271. if (typeof replacement === "string") {
  37272. replacement = StringLiteral(replacement);
  37273. }
  37274. if (!replacement || !isStringLiteral(replacement)) {
  37275. throw new Error("Expected string substitution");
  37276. }
  37277. } else if (placeholder.type === "statement") {
  37278. if (index === undefined) {
  37279. if (!replacement) {
  37280. replacement = EmptyStatement();
  37281. } else if (Array.isArray(replacement)) {
  37282. replacement = BlockStatement(replacement);
  37283. } else if (typeof replacement === "string") {
  37284. replacement = ExpressionStatement(Identifier(replacement));
  37285. } else if (!isStatement(replacement)) {
  37286. replacement = ExpressionStatement(replacement);
  37287. }
  37288. } else {
  37289. if (replacement && !Array.isArray(replacement)) {
  37290. if (typeof replacement === "string") {
  37291. replacement = Identifier(replacement);
  37292. }
  37293. if (!isStatement(replacement)) {
  37294. replacement = ExpressionStatement(replacement);
  37295. }
  37296. }
  37297. }
  37298. } else if (placeholder.type === "param") {
  37299. if (typeof replacement === "string") {
  37300. replacement = Identifier(replacement);
  37301. }
  37302. if (index === undefined) throw new Error("Assertion failure.");
  37303. } else {
  37304. if (typeof replacement === "string") {
  37305. replacement = Identifier(replacement);
  37306. }
  37307. if (Array.isArray(replacement)) {
  37308. throw new Error("Cannot replace single expression with an array.");
  37309. }
  37310. }
  37311. if (index === undefined) {
  37312. validate(parent, key, replacement);
  37313. parent[key] = replacement;
  37314. } else {
  37315. var items = parent[key].slice();
  37316. if (placeholder.type === "statement" || placeholder.type === "param") {
  37317. if (replacement == null) {
  37318. items.splice(index, 1);
  37319. } else if (Array.isArray(replacement)) {
  37320. items.splice.apply(items, [index, 1].concat(replacement));
  37321. } else {
  37322. items[index] = replacement;
  37323. }
  37324. } else {
  37325. items[index] = replacement;
  37326. }
  37327. validate(parent, key, items);
  37328. parent[key] = items;
  37329. }
  37330. }
  37331. function stringTemplate(formatter, code, opts) {
  37332. code = formatter.code(code);
  37333. var metadata;
  37334. return function (arg) {
  37335. var replacements = normalizeReplacements(arg);
  37336. if (!metadata) metadata = parseAndBuildMetadata(formatter, code, opts);
  37337. return formatter.unwrap(populatePlaceholders(metadata, replacements));
  37338. };
  37339. }
  37340. function literalTemplate(formatter, tpl, opts) {
  37341. var _buildLiteralData = buildLiteralData(formatter, tpl, opts),
  37342. metadata = _buildLiteralData.metadata,
  37343. names = _buildLiteralData.names;
  37344. return function (arg) {
  37345. var defaultReplacements = arg.reduce(function (acc, replacement, i) {
  37346. acc[names[i]] = replacement;
  37347. return acc;
  37348. }, {});
  37349. return function (arg) {
  37350. var replacements = normalizeReplacements(arg);
  37351. if (replacements) {
  37352. Object.keys(replacements).forEach(function (key) {
  37353. if (Object.prototype.hasOwnProperty.call(defaultReplacements, key)) {
  37354. throw new Error("Unexpected replacement overlap.");
  37355. }
  37356. });
  37357. }
  37358. return formatter.unwrap(populatePlaceholders(metadata, replacements ? Object.assign(replacements, defaultReplacements) : defaultReplacements));
  37359. };
  37360. };
  37361. }
  37362. function buildLiteralData(formatter, tpl, opts) {
  37363. var names;
  37364. var nameSet;
  37365. var metadata;
  37366. var prefix = "";
  37367. do {
  37368. prefix += "$";
  37369. var result = buildTemplateCode(tpl, prefix);
  37370. names = result.names;
  37371. nameSet = new Set(names);
  37372. metadata = parseAndBuildMetadata(formatter, formatter.code(result.code), {
  37373. parser: opts.parser,
  37374. placeholderWhitelist: new Set(result.names.concat(opts.placeholderWhitelist ? Array.from(opts.placeholderWhitelist) : [])),
  37375. placeholderPattern: opts.placeholderPattern,
  37376. preserveComments: opts.preserveComments,
  37377. syntacticPlaceholders: opts.syntacticPlaceholders
  37378. });
  37379. } while (metadata.placeholders.some(function (placeholder) {
  37380. return placeholder.isDuplicate && nameSet.has(placeholder.name);
  37381. }));
  37382. return {
  37383. metadata: metadata,
  37384. names: names
  37385. };
  37386. }
  37387. function buildTemplateCode(tpl, prefix) {
  37388. var names = [];
  37389. var code = tpl[0];
  37390. for (var i = 1; i < tpl.length; i++) {
  37391. var value = "" + prefix + (i - 1);
  37392. names.push(value);
  37393. code += value + tpl[i];
  37394. }
  37395. return {
  37396. names: names,
  37397. code: code
  37398. };
  37399. }
  37400. var NO_PLACEHOLDER = validate$2({
  37401. placeholderPattern: false
  37402. });
  37403. function createTemplateBuilder(formatter, defaultOpts) {
  37404. var templateFnCache = new WeakMap();
  37405. var templateAstCache = new WeakMap();
  37406. var cachedOpts = defaultOpts || validate$2(null);
  37407. return Object.assign(function (tpl) {
  37408. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  37409. args[_key - 1] = arguments[_key];
  37410. }
  37411. if (typeof tpl === "string") {
  37412. if (args.length > 1) throw new Error("Unexpected extra params.");
  37413. return extendedTrace(stringTemplate(formatter, tpl, merge(cachedOpts, validate$2(args[0]))));
  37414. } else if (Array.isArray(tpl)) {
  37415. var builder = templateFnCache.get(tpl);
  37416. if (!builder) {
  37417. builder = literalTemplate(formatter, tpl, cachedOpts);
  37418. templateFnCache.set(tpl, builder);
  37419. }
  37420. return extendedTrace(builder(args));
  37421. } else if (typeof tpl === "object" && tpl) {
  37422. if (args.length > 0) throw new Error("Unexpected extra params.");
  37423. return createTemplateBuilder(formatter, merge(cachedOpts, validate$2(tpl)));
  37424. }
  37425. throw new Error("Unexpected template param " + typeof tpl);
  37426. }, {
  37427. ast: function ast(tpl) {
  37428. for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  37429. args[_key2 - 1] = arguments[_key2];
  37430. }
  37431. if (typeof tpl === "string") {
  37432. if (args.length > 1) throw new Error("Unexpected extra params.");
  37433. return stringTemplate(formatter, tpl, merge(merge(cachedOpts, validate$2(args[0])), NO_PLACEHOLDER))();
  37434. } else if (Array.isArray(tpl)) {
  37435. var builder = templateAstCache.get(tpl);
  37436. if (!builder) {
  37437. builder = literalTemplate(formatter, tpl, merge(cachedOpts, NO_PLACEHOLDER));
  37438. templateAstCache.set(tpl, builder);
  37439. }
  37440. return builder(args)();
  37441. }
  37442. throw new Error("Unexpected template param " + typeof tpl);
  37443. }
  37444. });
  37445. }
  37446. function extendedTrace(fn) {
  37447. var rootStack = "";
  37448. try {
  37449. throw new Error();
  37450. } catch (error) {
  37451. if (error.stack) {
  37452. rootStack = error.stack.split("\n").slice(3).join("\n");
  37453. }
  37454. }
  37455. return function (arg) {
  37456. try {
  37457. return fn(arg);
  37458. } catch (err) {
  37459. err.stack += "\n =============\n" + rootStack;
  37460. throw err;
  37461. }
  37462. };
  37463. }
  37464. var smart$1 = createTemplateBuilder(smart);
  37465. var statement$1 = createTemplateBuilder(statement);
  37466. var statements$1 = createTemplateBuilder(statements);
  37467. var expression$1 = createTemplateBuilder(expression);
  37468. var program$1 = createTemplateBuilder(program);
  37469. var template = Object.assign(smart$1.bind(undefined), {
  37470. smart: smart$1,
  37471. statement: statement$1,
  37472. statements: statements$1,
  37473. expression: expression$1,
  37474. program: program$1,
  37475. ast: smart$1.ast
  37476. });
  37477. var buildPropertyMethodAssignmentWrapper = template("\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");
  37478. var buildGeneratorPropertyMethodAssignmentWrapper = template("\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");
  37479. var visitor = {
  37480. "ReferencedIdentifier|BindingIdentifier": function ReferencedIdentifierBindingIdentifier(path, state) {
  37481. if (path.node.name !== state.name) return;
  37482. var localDeclar = path.scope.getBindingIdentifier(state.name);
  37483. if (localDeclar !== state.outerDeclar) return;
  37484. state.selfReference = true;
  37485. path.stop();
  37486. }
  37487. };
  37488. function getNameFromLiteralId(id) {
  37489. if (isNullLiteral(id)) {
  37490. return "null";
  37491. }
  37492. if (isRegExpLiteral(id)) {
  37493. return "_" + id.pattern + "_" + id.flags;
  37494. }
  37495. if (isTemplateLiteral(id)) {
  37496. return id.quasis.map(function (quasi) {
  37497. return quasi.value.raw;
  37498. }).join("");
  37499. }
  37500. if (id.value !== undefined) {
  37501. return id.value + "";
  37502. }
  37503. return "";
  37504. }
  37505. function wrap(state, method, id, scope) {
  37506. if (state.selfReference) {
  37507. if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) {
  37508. scope.rename(id.name);
  37509. } else {
  37510. if (!isFunction(method)) return;
  37511. var build = buildPropertyMethodAssignmentWrapper;
  37512. if (method.generator) {
  37513. build = buildGeneratorPropertyMethodAssignmentWrapper;
  37514. }
  37515. var _template = build({
  37516. FUNCTION: method,
  37517. FUNCTION_ID: id,
  37518. FUNCTION_KEY: scope.generateUidIdentifier(id.name)
  37519. }).expression;
  37520. var params = _template.callee.body.body[0].params;
  37521. for (var i = 0, len = getFunctionArity(method); i < len; i++) {
  37522. params.push(scope.generateUidIdentifier("x"));
  37523. }
  37524. return _template;
  37525. }
  37526. }
  37527. method.id = id;
  37528. scope.getProgramParent().references[id.name] = true;
  37529. }
  37530. function visit(node, name, scope) {
  37531. var state = {
  37532. selfAssignment: false,
  37533. selfReference: false,
  37534. outerDeclar: scope.getBindingIdentifier(name),
  37535. references: [],
  37536. name: name
  37537. };
  37538. var binding = scope.getOwnBinding(name);
  37539. if (binding) {
  37540. if (binding.kind === "param") {
  37541. state.selfReference = true;
  37542. }
  37543. } else if (state.outerDeclar || scope.hasGlobal(name)) {
  37544. scope.traverse(node, visitor, state);
  37545. }
  37546. return state;
  37547. }
  37548. function nameFunction (_ref, localBinding) {
  37549. var node = _ref.node,
  37550. parent = _ref.parent,
  37551. scope = _ref.scope,
  37552. id = _ref.id;
  37553. if (localBinding === void 0) {
  37554. localBinding = false;
  37555. }
  37556. if (node.id) return;
  37557. if ((isObjectProperty(parent) || isObjectMethod(parent, {
  37558. kind: "method"
  37559. })) && (!parent.computed || isLiteral(parent.key))) {
  37560. id = parent.key;
  37561. } else if (isVariableDeclarator(parent)) {
  37562. id = parent.id;
  37563. if (isIdentifier(id) && !localBinding) {
  37564. var binding = scope.parent.getBinding(id.name);
  37565. if (binding && binding.constant && scope.getBinding(id.name) === binding) {
  37566. node.id = cloneNode(id);
  37567. node.id[NOT_LOCAL_BINDING] = true;
  37568. return;
  37569. }
  37570. }
  37571. } else if (isAssignmentExpression(parent)) {
  37572. id = parent.left;
  37573. } else if (!id) {
  37574. return;
  37575. }
  37576. var name;
  37577. if (id && isLiteral(id)) {
  37578. name = getNameFromLiteralId(id);
  37579. } else if (id && isIdentifier(id)) {
  37580. name = id.name;
  37581. }
  37582. if (name === undefined) {
  37583. return;
  37584. }
  37585. name = toBindingIdentifierName(name);
  37586. id = Identifier(name);
  37587. id[NOT_LOCAL_BINDING] = true;
  37588. var state = visit(node, name, scope);
  37589. return wrap(state, node, id, scope) || node;
  37590. }
  37591. function toComputedKey$1() {
  37592. var node = this.node;
  37593. var key;
  37594. if (this.isMemberExpression()) {
  37595. key = node.property;
  37596. } else if (this.isProperty() || this.isMethod()) {
  37597. key = node.key;
  37598. } else {
  37599. throw new ReferenceError("todo");
  37600. }
  37601. if (!node.computed) {
  37602. if (isIdentifier(key)) key = StringLiteral(key.name);
  37603. }
  37604. return key;
  37605. }
  37606. function ensureBlock$1() {
  37607. var body = this.get("body");
  37608. var bodyNode = body.node;
  37609. if (Array.isArray(body)) {
  37610. throw new Error("Can't convert array path to a block statement");
  37611. }
  37612. if (!bodyNode) {
  37613. throw new Error("Can't convert node without a body");
  37614. }
  37615. if (body.isBlockStatement()) {
  37616. return bodyNode;
  37617. }
  37618. var statements = [];
  37619. var stringPath = "body";
  37620. var key;
  37621. var listKey;
  37622. if (body.isStatement()) {
  37623. listKey = "body";
  37624. key = 0;
  37625. statements.push(body.node);
  37626. } else {
  37627. stringPath += ".body.0";
  37628. if (this.isFunction()) {
  37629. key = "argument";
  37630. statements.push(ReturnStatement(body.node));
  37631. } else {
  37632. key = "expression";
  37633. statements.push(ExpressionStatement(body.node));
  37634. }
  37635. }
  37636. this.node.body = BlockStatement(statements);
  37637. var parentPath = this.get(stringPath);
  37638. body.setup(parentPath, listKey ? parentPath.node[listKey] : parentPath.node, listKey, key);
  37639. return this.node;
  37640. }
  37641. function arrowFunctionToShadowed() {
  37642. if (!this.isArrowFunctionExpression()) return;
  37643. this.arrowFunctionToExpression();
  37644. }
  37645. function unwrapFunctionEnvironment() {
  37646. if (!this.isArrowFunctionExpression() && !this.isFunctionExpression() && !this.isFunctionDeclaration()) {
  37647. throw this.buildCodeFrameError("Can only unwrap the environment of a function.");
  37648. }
  37649. hoistFunctionEnvironment(this);
  37650. }
  37651. function arrowFunctionToExpression(_temp) {
  37652. var _ref = _temp === void 0 ? {} : _temp,
  37653. _ref$allowInsertArrow = _ref.allowInsertArrow,
  37654. allowInsertArrow = _ref$allowInsertArrow === void 0 ? true : _ref$allowInsertArrow,
  37655. _ref$specCompliant = _ref.specCompliant,
  37656. specCompliant = _ref$specCompliant === void 0 ? false : _ref$specCompliant;
  37657. if (!this.isArrowFunctionExpression()) {
  37658. throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.");
  37659. }
  37660. var thisBinding = hoistFunctionEnvironment(this, specCompliant, allowInsertArrow);
  37661. this.ensureBlock();
  37662. this.node.type = "FunctionExpression";
  37663. if (specCompliant) {
  37664. var checkBinding = thisBinding ? null : this.parentPath.scope.generateUidIdentifier("arrowCheckId");
  37665. if (checkBinding) {
  37666. this.parentPath.scope.push({
  37667. id: checkBinding,
  37668. init: ObjectExpression([])
  37669. });
  37670. }
  37671. this.get("body").unshiftContainer("body", ExpressionStatement(CallExpression(this.hub.addHelper("newArrowCheck"), [ThisExpression(), checkBinding ? Identifier(checkBinding.name) : Identifier(thisBinding)])));
  37672. this.replaceWith(CallExpression(MemberExpression(nameFunction(this, true) || this.node, Identifier("bind")), [checkBinding ? Identifier(checkBinding.name) : ThisExpression()]));
  37673. }
  37674. }
  37675. function hoistFunctionEnvironment(fnPath, specCompliant, allowInsertArrow) {
  37676. if (specCompliant === void 0) {
  37677. specCompliant = false;
  37678. }
  37679. if (allowInsertArrow === void 0) {
  37680. allowInsertArrow = true;
  37681. }
  37682. var thisEnvFn = fnPath.findParent(function (p) {
  37683. return p.isFunction() && !p.isArrowFunctionExpression() || p.isProgram() || p.isClassProperty({
  37684. "static": false
  37685. });
  37686. });
  37687. var inConstructor = thisEnvFn && thisEnvFn.node.kind === "constructor";
  37688. if (thisEnvFn.isClassProperty()) {
  37689. throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property");
  37690. }
  37691. var _getScopeInformation = getScopeInformation(fnPath),
  37692. thisPaths = _getScopeInformation.thisPaths,
  37693. argumentsPaths = _getScopeInformation.argumentsPaths,
  37694. newTargetPaths = _getScopeInformation.newTargetPaths,
  37695. superProps = _getScopeInformation.superProps,
  37696. superCalls = _getScopeInformation.superCalls;
  37697. if (inConstructor && superCalls.length > 0) {
  37698. if (!allowInsertArrow) {
  37699. throw superCalls[0].buildCodeFrameError("Unable to handle nested super() usage in arrow");
  37700. }
  37701. var allSuperCalls = [];
  37702. thisEnvFn.traverse({
  37703. Function: function Function(child) {
  37704. if (child.isArrowFunctionExpression()) return;
  37705. child.skip();
  37706. },
  37707. ClassProperty: function ClassProperty(child) {
  37708. child.skip();
  37709. },
  37710. CallExpression: function CallExpression(child) {
  37711. if (!child.get("callee").isSuper()) return;
  37712. allSuperCalls.push(child);
  37713. }
  37714. });
  37715. var superBinding = getSuperBinding(thisEnvFn);
  37716. allSuperCalls.forEach(function (superCall) {
  37717. var callee = Identifier(superBinding);
  37718. callee.loc = superCall.node.callee.loc;
  37719. superCall.get("callee").replaceWith(callee);
  37720. });
  37721. }
  37722. if (argumentsPaths.length > 0) {
  37723. var argumentsBinding = getBinding(thisEnvFn, "arguments", function () {
  37724. return Identifier("arguments");
  37725. });
  37726. argumentsPaths.forEach(function (argumentsChild) {
  37727. var argsRef = Identifier(argumentsBinding);
  37728. argsRef.loc = argumentsChild.node.loc;
  37729. argumentsChild.replaceWith(argsRef);
  37730. });
  37731. }
  37732. if (newTargetPaths.length > 0) {
  37733. var newTargetBinding = getBinding(thisEnvFn, "newtarget", function () {
  37734. return MetaProperty(Identifier("new"), Identifier("target"));
  37735. });
  37736. newTargetPaths.forEach(function (targetChild) {
  37737. var targetRef = Identifier(newTargetBinding);
  37738. targetRef.loc = targetChild.node.loc;
  37739. targetChild.replaceWith(targetRef);
  37740. });
  37741. }
  37742. if (superProps.length > 0) {
  37743. if (!allowInsertArrow) {
  37744. throw superProps[0].buildCodeFrameError("Unable to handle nested super.prop usage");
  37745. }
  37746. var flatSuperProps = superProps.reduce(function (acc, superProp) {
  37747. return acc.concat(standardizeSuperProperty(superProp));
  37748. }, []);
  37749. flatSuperProps.forEach(function (superProp) {
  37750. var key = superProp.node.computed ? "" : superProp.get("property").node.name;
  37751. var isAssignment = superProp.parentPath.isAssignmentExpression({
  37752. left: superProp.node
  37753. });
  37754. var isCall = superProp.parentPath.isCallExpression({
  37755. callee: superProp.node
  37756. });
  37757. var superBinding = getSuperPropBinding(thisEnvFn, isAssignment, key);
  37758. var args = [];
  37759. if (superProp.node.computed) {
  37760. args.push(superProp.get("property").node);
  37761. }
  37762. if (isAssignment) {
  37763. var value = superProp.parentPath.node.right;
  37764. args.push(value);
  37765. }
  37766. var call = CallExpression(Identifier(superBinding), args);
  37767. if (isCall) {
  37768. superProp.parentPath.unshiftContainer("arguments", ThisExpression());
  37769. superProp.replaceWith(MemberExpression(call, Identifier("call")));
  37770. thisPaths.push(superProp.parentPath.get("arguments.0"));
  37771. } else if (isAssignment) {
  37772. superProp.parentPath.replaceWith(call);
  37773. } else {
  37774. superProp.replaceWith(call);
  37775. }
  37776. });
  37777. }
  37778. var thisBinding;
  37779. if (thisPaths.length > 0 || specCompliant) {
  37780. thisBinding = getThisBinding(thisEnvFn, inConstructor);
  37781. if (!specCompliant || inConstructor && hasSuperClass(thisEnvFn)) {
  37782. thisPaths.forEach(function (thisChild) {
  37783. var thisRef = thisChild.isJSX() ? JSXIdentifier(thisBinding) : Identifier(thisBinding);
  37784. thisRef.loc = thisChild.node.loc;
  37785. thisChild.replaceWith(thisRef);
  37786. });
  37787. if (specCompliant) thisBinding = null;
  37788. }
  37789. }
  37790. return thisBinding;
  37791. }
  37792. function standardizeSuperProperty(superProp) {
  37793. if (superProp.parentPath.isAssignmentExpression() && superProp.parentPath.node.operator !== "=") {
  37794. var assignmentPath = superProp.parentPath;
  37795. var op = assignmentPath.node.operator.slice(0, -1);
  37796. var value = assignmentPath.node.right;
  37797. assignmentPath.node.operator = "=";
  37798. if (superProp.node.computed) {
  37799. var tmp = superProp.scope.generateDeclaredUidIdentifier("tmp");
  37800. assignmentPath.get("left").replaceWith(MemberExpression(superProp.node.object, AssignmentExpression("=", tmp, superProp.node.property), true));
  37801. assignmentPath.get("right").replaceWith(BinaryExpression(op, MemberExpression(superProp.node.object, Identifier(tmp.name), true), value));
  37802. } else {
  37803. assignmentPath.get("left").replaceWith(MemberExpression(superProp.node.object, superProp.node.property));
  37804. assignmentPath.get("right").replaceWith(BinaryExpression(op, MemberExpression(superProp.node.object, Identifier(superProp.node.property.name)), value));
  37805. }
  37806. return [assignmentPath.get("left"), assignmentPath.get("right").get("left")];
  37807. } else if (superProp.parentPath.isUpdateExpression()) {
  37808. var updateExpr = superProp.parentPath;
  37809. var _tmp = superProp.scope.generateDeclaredUidIdentifier("tmp");
  37810. var computedKey = superProp.node.computed ? superProp.scope.generateDeclaredUidIdentifier("prop") : null;
  37811. 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)))];
  37812. if (!superProp.parentPath.node.prefix) {
  37813. parts.push(Identifier(_tmp.name));
  37814. }
  37815. updateExpr.replaceWith(SequenceExpression(parts));
  37816. var left = updateExpr.get("expressions.0.right");
  37817. var right = updateExpr.get("expressions.1.left");
  37818. return [left, right];
  37819. }
  37820. return [superProp];
  37821. }
  37822. function hasSuperClass(thisEnvFn) {
  37823. return thisEnvFn.isClassMethod() && !!thisEnvFn.parentPath.parentPath.node.superClass;
  37824. }
  37825. function getThisBinding(thisEnvFn, inConstructor) {
  37826. return getBinding(thisEnvFn, "this", function (thisBinding) {
  37827. if (!inConstructor || !hasSuperClass(thisEnvFn)) return ThisExpression();
  37828. var supers = new WeakSet();
  37829. thisEnvFn.traverse({
  37830. Function: function Function(child) {
  37831. if (child.isArrowFunctionExpression()) return;
  37832. child.skip();
  37833. },
  37834. ClassProperty: function ClassProperty(child) {
  37835. child.skip();
  37836. },
  37837. CallExpression: function CallExpression(child) {
  37838. if (!child.get("callee").isSuper()) return;
  37839. if (supers.has(child.node)) return;
  37840. supers.add(child.node);
  37841. child.replaceWithMultiple([child.node, AssignmentExpression("=", Identifier(thisBinding), Identifier("this"))]);
  37842. }
  37843. });
  37844. });
  37845. }
  37846. function getSuperBinding(thisEnvFn) {
  37847. return getBinding(thisEnvFn, "supercall", function () {
  37848. var argsBinding = thisEnvFn.scope.generateUidIdentifier("args");
  37849. return ArrowFunctionExpression([RestElement(argsBinding)], CallExpression(Super(), [SpreadElement(Identifier(argsBinding.name))]));
  37850. });
  37851. }
  37852. function getSuperPropBinding(thisEnvFn, isAssignment, propName) {
  37853. var op = isAssignment ? "set" : "get";
  37854. return getBinding(thisEnvFn, "superprop_" + op + ":" + (propName || ""), function () {
  37855. var argsList = [];
  37856. var fnBody;
  37857. if (propName) {
  37858. fnBody = MemberExpression(Super(), Identifier(propName));
  37859. } else {
  37860. var method = thisEnvFn.scope.generateUidIdentifier("prop");
  37861. argsList.unshift(method);
  37862. fnBody = MemberExpression(Super(), Identifier(method.name), true);
  37863. }
  37864. if (isAssignment) {
  37865. var valueIdent = thisEnvFn.scope.generateUidIdentifier("value");
  37866. argsList.push(valueIdent);
  37867. fnBody = AssignmentExpression("=", fnBody, Identifier(valueIdent.name));
  37868. }
  37869. return ArrowFunctionExpression(argsList, fnBody);
  37870. });
  37871. }
  37872. function getBinding(thisEnvFn, key, init) {
  37873. var cacheKey = "binding:" + key;
  37874. var data = thisEnvFn.getData(cacheKey);
  37875. if (!data) {
  37876. var id = thisEnvFn.scope.generateUidIdentifier(key);
  37877. data = id.name;
  37878. thisEnvFn.setData(cacheKey, data);
  37879. thisEnvFn.scope.push({
  37880. id: id,
  37881. init: init(data)
  37882. });
  37883. }
  37884. return data;
  37885. }
  37886. function getScopeInformation(fnPath) {
  37887. var thisPaths = [];
  37888. var argumentsPaths = [];
  37889. var newTargetPaths = [];
  37890. var superProps = [];
  37891. var superCalls = [];
  37892. fnPath.traverse({
  37893. ClassProperty: function ClassProperty(child) {
  37894. child.skip();
  37895. },
  37896. Function: function Function(child) {
  37897. if (child.isArrowFunctionExpression()) return;
  37898. child.skip();
  37899. },
  37900. ThisExpression: function ThisExpression(child) {
  37901. thisPaths.push(child);
  37902. },
  37903. JSXIdentifier: function JSXIdentifier(child) {
  37904. if (child.node.name !== "this") return;
  37905. if (!child.parentPath.isJSXMemberExpression({
  37906. object: child.node
  37907. }) && !child.parentPath.isJSXOpeningElement({
  37908. name: child.node
  37909. })) {
  37910. return;
  37911. }
  37912. thisPaths.push(child);
  37913. },
  37914. CallExpression: function CallExpression(child) {
  37915. if (child.get("callee").isSuper()) superCalls.push(child);
  37916. },
  37917. MemberExpression: function MemberExpression(child) {
  37918. if (child.get("object").isSuper()) superProps.push(child);
  37919. },
  37920. ReferencedIdentifier: function ReferencedIdentifier(child) {
  37921. if (child.node.name !== "arguments") return;
  37922. argumentsPaths.push(child);
  37923. },
  37924. MetaProperty: function MetaProperty(child) {
  37925. if (!child.get("meta").isIdentifier({
  37926. name: "new"
  37927. })) return;
  37928. if (!child.get("property").isIdentifier({
  37929. name: "target"
  37930. })) return;
  37931. newTargetPaths.push(child);
  37932. }
  37933. });
  37934. return {
  37935. thisPaths: thisPaths,
  37936. argumentsPaths: argumentsPaths,
  37937. newTargetPaths: newTargetPaths,
  37938. superProps: superProps,
  37939. superCalls: superCalls
  37940. };
  37941. }
  37942. var NodePath_conversion = /*#__PURE__*/Object.freeze({
  37943. __proto__: null,
  37944. toComputedKey: toComputedKey$1,
  37945. ensureBlock: ensureBlock$1,
  37946. arrowFunctionToShadowed: arrowFunctionToShadowed,
  37947. unwrapFunctionEnvironment: unwrapFunctionEnvironment,
  37948. arrowFunctionToExpression: arrowFunctionToExpression
  37949. });
  37950. function matchesPattern$1(pattern, allowPartial) {
  37951. return matchesPattern(this.node, pattern, allowPartial);
  37952. }
  37953. function has$2(key) {
  37954. var val = this.node && this.node[key];
  37955. if (val && Array.isArray(val)) {
  37956. return !!val.length;
  37957. } else {
  37958. return !!val;
  37959. }
  37960. }
  37961. function isStatic() {
  37962. return this.scope.isStatic(this.node);
  37963. }
  37964. var is$1 = has$2;
  37965. function isnt(key) {
  37966. return !this.has(key);
  37967. }
  37968. function equals(key, value) {
  37969. return this.node[key] === value;
  37970. }
  37971. function isNodeType(type) {
  37972. return isType(this.type, type);
  37973. }
  37974. function canHaveVariableDeclarationOrExpression() {
  37975. return (this.key === "init" || this.key === "left") && this.parentPath.isFor();
  37976. }
  37977. function canSwapBetweenExpressionAndStatement(replacement) {
  37978. if (this.key !== "body" || !this.parentPath.isArrowFunctionExpression()) {
  37979. return false;
  37980. }
  37981. if (this.isExpression()) {
  37982. return isBlockStatement(replacement);
  37983. } else if (this.isBlockStatement()) {
  37984. return isExpression(replacement);
  37985. }
  37986. return false;
  37987. }
  37988. function isCompletionRecord(allowInsideFunction) {
  37989. var path = this;
  37990. var first = true;
  37991. do {
  37992. var container = path.container;
  37993. if (path.isFunction() && !first) {
  37994. return !!allowInsideFunction;
  37995. }
  37996. first = false;
  37997. if (Array.isArray(container) && path.key !== container.length - 1) {
  37998. return false;
  37999. }
  38000. } while ((path = path.parentPath) && !path.isProgram());
  38001. return true;
  38002. }
  38003. function isStatementOrBlock() {
  38004. if (this.parentPath.isLabeledStatement() || isBlockStatement(this.container)) {
  38005. return false;
  38006. } else {
  38007. return includes_1(STATEMENT_OR_BLOCK_KEYS, this.key);
  38008. }
  38009. }
  38010. function referencesImport(moduleSource, importName) {
  38011. if (!this.isReferencedIdentifier()) return false;
  38012. var binding = this.scope.getBinding(this.node.name);
  38013. if (!binding || binding.kind !== "module") return false;
  38014. var path = binding.path;
  38015. var parent = path.parentPath;
  38016. if (!parent.isImportDeclaration()) return false;
  38017. if (parent.node.source.value === moduleSource) {
  38018. if (!importName) return true;
  38019. } else {
  38020. return false;
  38021. }
  38022. if (path.isImportDefaultSpecifier() && importName === "default") {
  38023. return true;
  38024. }
  38025. if (path.isImportNamespaceSpecifier() && importName === "*") {
  38026. return true;
  38027. }
  38028. if (path.isImportSpecifier() && path.node.imported.name === importName) {
  38029. return true;
  38030. }
  38031. return false;
  38032. }
  38033. function getSource() {
  38034. var node = this.node;
  38035. if (node.end) {
  38036. var code = this.hub.getCode();
  38037. if (code) return code.slice(node.start, node.end);
  38038. }
  38039. return "";
  38040. }
  38041. function willIMaybeExecuteBefore(target) {
  38042. return this._guessExecutionStatusRelativeTo(target) !== "after";
  38043. }
  38044. function getOuterFunction(path) {
  38045. return (path.scope.getFunctionParent() || path.scope.getProgramParent()).path;
  38046. }
  38047. function isExecutionUncertain(type, key) {
  38048. switch (type) {
  38049. case "LogicalExpression":
  38050. return key === "right";
  38051. case "ConditionalExpression":
  38052. case "IfStatement":
  38053. return key === "consequent" || key === "alternate";
  38054. case "WhileStatement":
  38055. case "DoWhileStatement":
  38056. case "ForInStatement":
  38057. case "ForOfStatement":
  38058. return key === "body";
  38059. case "ForStatement":
  38060. return key === "body" || key === "update";
  38061. case "SwitchStatement":
  38062. return key === "cases";
  38063. case "TryStatement":
  38064. return key === "handler";
  38065. case "AssignmentPattern":
  38066. return key === "right";
  38067. case "OptionalMemberExpression":
  38068. return key === "property";
  38069. case "OptionalCallExpression":
  38070. return key === "arguments";
  38071. default:
  38072. return false;
  38073. }
  38074. }
  38075. function isExecutionUncertainInList(paths, maxIndex) {
  38076. for (var i = 0; i < maxIndex; i++) {
  38077. var path = paths[i];
  38078. if (isExecutionUncertain(path.parent.type, path.parentKey)) {
  38079. return true;
  38080. }
  38081. }
  38082. return false;
  38083. }
  38084. function _guessExecutionStatusRelativeTo(target) {
  38085. var funcParent = {
  38086. "this": getOuterFunction(this),
  38087. target: getOuterFunction(target)
  38088. };
  38089. if (funcParent.target.node !== funcParent["this"].node) {
  38090. return this._guessExecutionStatusRelativeToDifferentFunctions(funcParent.target);
  38091. }
  38092. var paths = {
  38093. target: target.getAncestry(),
  38094. "this": this.getAncestry()
  38095. };
  38096. if (paths.target.indexOf(this) >= 0) return "after";
  38097. if (paths["this"].indexOf(target) >= 0) return "before";
  38098. var commonPath;
  38099. var commonIndex = {
  38100. target: 0,
  38101. "this": 0
  38102. };
  38103. while (!commonPath && commonIndex["this"] < paths["this"].length) {
  38104. var path = paths["this"][commonIndex["this"]];
  38105. commonIndex.target = paths.target.indexOf(path);
  38106. if (commonIndex.target >= 0) {
  38107. commonPath = path;
  38108. } else {
  38109. commonIndex["this"]++;
  38110. }
  38111. }
  38112. if (!commonPath) {
  38113. throw new Error("Internal Babel error - The two compared nodes" + " don't appear to belong to the same program.");
  38114. }
  38115. if (isExecutionUncertainInList(paths["this"], commonIndex["this"] - 1) || isExecutionUncertainInList(paths.target, commonIndex.target - 1)) {
  38116. return "unknown";
  38117. }
  38118. var divergence = {
  38119. "this": paths["this"][commonIndex["this"] - 1],
  38120. target: paths.target[commonIndex.target - 1]
  38121. };
  38122. if (divergence.target.listKey && divergence["this"].listKey && divergence.target.container === divergence["this"].container) {
  38123. return divergence.target.key > divergence["this"].key ? "before" : "after";
  38124. }
  38125. var keys = VISITOR_KEYS[commonPath.type];
  38126. var keyPosition = {
  38127. "this": keys.indexOf(divergence["this"].parentKey),
  38128. target: keys.indexOf(divergence.target.parentKey)
  38129. };
  38130. return keyPosition.target > keyPosition["this"] ? "before" : "after";
  38131. }
  38132. var executionOrderCheckedNodes = new WeakSet();
  38133. function _guessExecutionStatusRelativeToDifferentFunctions(target) {
  38134. if (!target.isFunctionDeclaration() || target.parentPath.isExportDeclaration()) {
  38135. return "unknown";
  38136. }
  38137. var binding = target.scope.getBinding(target.node.id.name);
  38138. if (!binding.references) return "before";
  38139. var referencePaths = binding.referencePaths;
  38140. var allStatus;
  38141. for (var _iterator = referencePaths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  38142. var _ref;
  38143. if (_isArray) {
  38144. if (_i >= _iterator.length) break;
  38145. _ref = _iterator[_i++];
  38146. } else {
  38147. _i = _iterator.next();
  38148. if (_i.done) break;
  38149. _ref = _i.value;
  38150. }
  38151. var path = _ref;
  38152. var childOfFunction = !!path.find(function (path) {
  38153. return path.node === target.node;
  38154. });
  38155. if (childOfFunction) continue;
  38156. if (path.key !== "callee" || !path.parentPath.isCallExpression()) {
  38157. return "unknown";
  38158. }
  38159. if (executionOrderCheckedNodes.has(path.node)) continue;
  38160. executionOrderCheckedNodes.add(path.node);
  38161. var status = this._guessExecutionStatusRelativeTo(path);
  38162. executionOrderCheckedNodes["delete"](path.node);
  38163. if (allStatus && allStatus !== status) {
  38164. return "unknown";
  38165. } else {
  38166. allStatus = status;
  38167. }
  38168. }
  38169. return allStatus;
  38170. }
  38171. function resolve(dangerous, resolved) {
  38172. return this._resolve(dangerous, resolved) || this;
  38173. }
  38174. function _resolve(dangerous, resolved) {
  38175. if (resolved && resolved.indexOf(this) >= 0) return;
  38176. resolved = resolved || [];
  38177. resolved.push(this);
  38178. if (this.isVariableDeclarator()) {
  38179. if (this.get("id").isIdentifier()) {
  38180. return this.get("init").resolve(dangerous, resolved);
  38181. }
  38182. } else if (this.isReferencedIdentifier()) {
  38183. var binding = this.scope.getBinding(this.node.name);
  38184. if (!binding) return;
  38185. if (!binding.constant) return;
  38186. if (binding.kind === "module") return;
  38187. if (binding.path !== this) {
  38188. var ret = binding.path.resolve(dangerous, resolved);
  38189. if (this.find(function (parent) {
  38190. return parent.node === ret.node;
  38191. })) return;
  38192. return ret;
  38193. }
  38194. } else if (this.isTypeCastExpression()) {
  38195. return this.get("expression").resolve(dangerous, resolved);
  38196. } else if (dangerous && this.isMemberExpression()) {
  38197. var targetKey = this.toComputedKey();
  38198. if (!isLiteral(targetKey)) return;
  38199. var targetName = targetKey.value;
  38200. var target = this.get("object").resolve(dangerous, resolved);
  38201. if (target.isObjectExpression()) {
  38202. var props = target.get("properties");
  38203. for (var _i2 = 0, _arr = props; _i2 < _arr.length; _i2++) {
  38204. var prop = _arr[_i2];
  38205. if (!prop.isProperty()) continue;
  38206. var key = prop.get("key");
  38207. var match = prop.isnt("computed") && key.isIdentifier({
  38208. name: targetName
  38209. });
  38210. match = match || key.isLiteral({
  38211. value: targetName
  38212. });
  38213. if (match) return prop.get("value").resolve(dangerous, resolved);
  38214. }
  38215. } else if (target.isArrayExpression() && !isNaN(+targetName)) {
  38216. var elems = target.get("elements");
  38217. var elem = elems[targetName];
  38218. if (elem) return elem.resolve(dangerous, resolved);
  38219. }
  38220. }
  38221. }
  38222. function isConstantExpression() {
  38223. if (this.isIdentifier()) {
  38224. var binding = this.scope.getBinding(this.node.name);
  38225. if (!binding) return false;
  38226. return binding.constant;
  38227. }
  38228. if (this.isLiteral()) {
  38229. if (this.isRegExpLiteral()) {
  38230. return false;
  38231. }
  38232. if (this.isTemplateLiteral()) {
  38233. return this.get("expressions").every(function (expression) {
  38234. return expression.isConstantExpression();
  38235. });
  38236. }
  38237. return true;
  38238. }
  38239. if (this.isUnaryExpression()) {
  38240. if (this.get("operator").node !== "void") {
  38241. return false;
  38242. }
  38243. return this.get("argument").isConstantExpression();
  38244. }
  38245. if (this.isBinaryExpression()) {
  38246. return this.get("left").isConstantExpression() && this.get("right").isConstantExpression();
  38247. }
  38248. return false;
  38249. }
  38250. function isInStrictMode() {
  38251. var start = this.isProgram() ? this : this.parentPath;
  38252. var strictParent = start.find(function (path) {
  38253. if (path.isProgram({
  38254. sourceType: "module"
  38255. })) return true;
  38256. if (path.isClass()) return true;
  38257. if (!path.isProgram() && !path.isFunction()) return false;
  38258. if (path.isArrowFunctionExpression() && !path.get("body").isBlockStatement()) {
  38259. return false;
  38260. }
  38261. var node = path.node;
  38262. if (path.isFunction()) node = node.body;
  38263. for (var _iterator2 = node.directives, _isArray2 = Array.isArray(_iterator2), _i3 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  38264. var _ref2;
  38265. if (_isArray2) {
  38266. if (_i3 >= _iterator2.length) break;
  38267. _ref2 = _iterator2[_i3++];
  38268. } else {
  38269. _i3 = _iterator2.next();
  38270. if (_i3.done) break;
  38271. _ref2 = _i3.value;
  38272. }
  38273. var directive = _ref2;
  38274. if (directive.value.value === "use strict") {
  38275. return true;
  38276. }
  38277. }
  38278. });
  38279. return !!strictParent;
  38280. }
  38281. var NodePath_introspection = /*#__PURE__*/Object.freeze({
  38282. __proto__: null,
  38283. matchesPattern: matchesPattern$1,
  38284. has: has$2,
  38285. isStatic: isStatic,
  38286. is: is$1,
  38287. isnt: isnt,
  38288. equals: equals,
  38289. isNodeType: isNodeType,
  38290. canHaveVariableDeclarationOrExpression: canHaveVariableDeclarationOrExpression,
  38291. canSwapBetweenExpressionAndStatement: canSwapBetweenExpressionAndStatement,
  38292. isCompletionRecord: isCompletionRecord,
  38293. isStatementOrBlock: isStatementOrBlock,
  38294. referencesImport: referencesImport,
  38295. getSource: getSource,
  38296. willIMaybeExecuteBefore: willIMaybeExecuteBefore,
  38297. _guessExecutionStatusRelativeTo: _guessExecutionStatusRelativeTo,
  38298. _guessExecutionStatusRelativeToDifferentFunctions: _guessExecutionStatusRelativeToDifferentFunctions,
  38299. resolve: resolve,
  38300. _resolve: _resolve,
  38301. isConstantExpression: isConstantExpression,
  38302. isInStrictMode: isInStrictMode
  38303. });
  38304. function call(key) {
  38305. var opts = this.opts;
  38306. this.debug(key);
  38307. if (this.node) {
  38308. if (this._call(opts[key])) return true;
  38309. }
  38310. if (this.node) {
  38311. return this._call(opts[this.node.type] && opts[this.node.type][key]);
  38312. }
  38313. return false;
  38314. }
  38315. function _call(fns) {
  38316. if (!fns) return false;
  38317. for (var _iterator = fns, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  38318. var _ref;
  38319. if (_isArray) {
  38320. if (_i >= _iterator.length) break;
  38321. _ref = _iterator[_i++];
  38322. } else {
  38323. _i = _iterator.next();
  38324. if (_i.done) break;
  38325. _ref = _i.value;
  38326. }
  38327. var fn = _ref;
  38328. if (!fn) continue;
  38329. var node = this.node;
  38330. if (!node) return true;
  38331. var ret = fn.call(this.state, this, this.state);
  38332. if (ret && typeof ret === "object" && typeof ret.then === "function") {
  38333. 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.");
  38334. }
  38335. if (ret) {
  38336. throw new Error("Unexpected return value from visitor method " + fn);
  38337. }
  38338. if (this.node !== node) return true;
  38339. if (this._traverseFlags > 0) return true;
  38340. }
  38341. return false;
  38342. }
  38343. function isBlacklisted() {
  38344. var blacklist = this.opts.blacklist;
  38345. return blacklist && blacklist.indexOf(this.node.type) > -1;
  38346. }
  38347. function visit$1() {
  38348. if (!this.node) {
  38349. return false;
  38350. }
  38351. if (this.isBlacklisted()) {
  38352. return false;
  38353. }
  38354. if (this.opts.shouldSkip && this.opts.shouldSkip(this)) {
  38355. return false;
  38356. }
  38357. if (this.shouldSkip || this.call("enter") || this.shouldSkip) {
  38358. this.debug("Skip...");
  38359. return this.shouldStop;
  38360. }
  38361. this.debug("Recursing into...");
  38362. traverse$1.node(this.node, this.opts, this.scope, this.state, this, this.skipKeys);
  38363. this.call("exit");
  38364. return this.shouldStop;
  38365. }
  38366. function skip() {
  38367. this.shouldSkip = true;
  38368. }
  38369. function skipKey(key) {
  38370. if (this.skipKeys == null) {
  38371. this.skipKeys = {};
  38372. }
  38373. this.skipKeys[key] = true;
  38374. }
  38375. function stop() {
  38376. this._traverseFlags |= SHOULD_SKIP | SHOULD_STOP;
  38377. }
  38378. function setScope() {
  38379. if (this.opts && this.opts.noScope) return;
  38380. var path = this.parentPath;
  38381. var target;
  38382. while (path && !target) {
  38383. if (path.opts && path.opts.noScope) return;
  38384. target = path.scope;
  38385. path = path.parentPath;
  38386. }
  38387. this.scope = this.getScope(target);
  38388. if (this.scope) this.scope.init();
  38389. }
  38390. function setContext(context) {
  38391. if (this.skipKeys != null) {
  38392. this.skipKeys = {};
  38393. }
  38394. this._traverseFlags = 0;
  38395. if (context) {
  38396. this.context = context;
  38397. this.state = context.state;
  38398. this.opts = context.opts;
  38399. }
  38400. this.setScope();
  38401. return this;
  38402. }
  38403. function resync() {
  38404. if (this.removed) return;
  38405. this._resyncParent();
  38406. this._resyncList();
  38407. this._resyncKey();
  38408. }
  38409. function _resyncParent() {
  38410. if (this.parentPath) {
  38411. this.parent = this.parentPath.node;
  38412. }
  38413. }
  38414. function _resyncKey() {
  38415. if (!this.container) return;
  38416. if (this.node === this.container[this.key]) return;
  38417. if (Array.isArray(this.container)) {
  38418. for (var i = 0; i < this.container.length; i++) {
  38419. if (this.container[i] === this.node) {
  38420. return this.setKey(i);
  38421. }
  38422. }
  38423. } else {
  38424. for (var _i2 = 0, _Object$keys = Object.keys(this.container); _i2 < _Object$keys.length; _i2++) {
  38425. var key = _Object$keys[_i2];
  38426. if (this.container[key] === this.node) {
  38427. return this.setKey(key);
  38428. }
  38429. }
  38430. }
  38431. this.key = null;
  38432. }
  38433. function _resyncList() {
  38434. if (!this.parent || !this.inList) return;
  38435. var newContainer = this.parent[this.listKey];
  38436. if (this.container === newContainer) return;
  38437. this.container = newContainer || null;
  38438. }
  38439. function _resyncRemoved() {
  38440. if (this.key == null || !this.container || this.container[this.key] !== this.node) {
  38441. this._markRemoved();
  38442. }
  38443. }
  38444. function popContext() {
  38445. this.contexts.pop();
  38446. if (this.contexts.length > 0) {
  38447. this.setContext(this.contexts[this.contexts.length - 1]);
  38448. } else {
  38449. this.setContext(undefined);
  38450. }
  38451. }
  38452. function pushContext(context) {
  38453. this.contexts.push(context);
  38454. this.setContext(context);
  38455. }
  38456. function setup$1(parentPath, container, listKey, key) {
  38457. this.listKey = listKey;
  38458. this.container = container;
  38459. this.parentPath = parentPath || this.parentPath;
  38460. this.setKey(key);
  38461. }
  38462. function setKey(key) {
  38463. this.key = key;
  38464. this.node = this.container[this.key];
  38465. this.type = this.node && this.node.type;
  38466. }
  38467. function requeue(pathToQueue) {
  38468. if (pathToQueue === void 0) {
  38469. pathToQueue = this;
  38470. }
  38471. if (pathToQueue.removed) return;
  38472. var contexts = this.contexts;
  38473. for (var _iterator2 = contexts, _isArray2 = Array.isArray(_iterator2), _i3 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  38474. var _ref2;
  38475. if (_isArray2) {
  38476. if (_i3 >= _iterator2.length) break;
  38477. _ref2 = _iterator2[_i3++];
  38478. } else {
  38479. _i3 = _iterator2.next();
  38480. if (_i3.done) break;
  38481. _ref2 = _i3.value;
  38482. }
  38483. var context = _ref2;
  38484. context.maybeQueue(pathToQueue);
  38485. }
  38486. }
  38487. function _getQueueContexts() {
  38488. var path = this;
  38489. var contexts = this.contexts;
  38490. while (!contexts.length) {
  38491. path = path.parentPath;
  38492. if (!path) break;
  38493. contexts = path.contexts;
  38494. }
  38495. return contexts;
  38496. }
  38497. var NodePath_context = /*#__PURE__*/Object.freeze({
  38498. __proto__: null,
  38499. call: call,
  38500. _call: _call,
  38501. isBlacklisted: isBlacklisted,
  38502. visit: visit$1,
  38503. skip: skip,
  38504. skipKey: skipKey,
  38505. stop: stop,
  38506. setScope: setScope,
  38507. setContext: setContext,
  38508. resync: resync,
  38509. _resyncParent: _resyncParent,
  38510. _resyncKey: _resyncKey,
  38511. _resyncList: _resyncList,
  38512. _resyncRemoved: _resyncRemoved,
  38513. popContext: popContext,
  38514. pushContext: pushContext,
  38515. setup: setup$1,
  38516. setKey: setKey,
  38517. requeue: requeue,
  38518. _getQueueContexts: _getQueueContexts
  38519. });
  38520. var hooks = [function (self, parent) {
  38521. 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();
  38522. if (removeParent) {
  38523. parent.remove();
  38524. return true;
  38525. }
  38526. }, function (self, parent) {
  38527. if (parent.isSequenceExpression() && parent.node.expressions.length === 1) {
  38528. parent.replaceWith(parent.node.expressions[0]);
  38529. return true;
  38530. }
  38531. }, function (self, parent) {
  38532. if (parent.isBinary()) {
  38533. if (self.key === "left") {
  38534. parent.replaceWith(parent.node.right);
  38535. } else {
  38536. parent.replaceWith(parent.node.left);
  38537. }
  38538. return true;
  38539. }
  38540. }, function (self, parent) {
  38541. if (parent.isIfStatement() && (self.key === "consequent" || self.key === "alternate") || self.key === "body" && (parent.isLoop() || parent.isArrowFunctionExpression())) {
  38542. self.replaceWith({
  38543. type: "BlockStatement",
  38544. body: []
  38545. });
  38546. return true;
  38547. }
  38548. }];
  38549. function remove() {
  38550. this._assertUnremoved();
  38551. this.resync();
  38552. this._removeFromScope();
  38553. if (this._callRemovalHooks()) {
  38554. this._markRemoved();
  38555. return;
  38556. }
  38557. this.shareCommentsWithSiblings();
  38558. this._remove();
  38559. this._markRemoved();
  38560. }
  38561. function _removeFromScope() {
  38562. var _this = this;
  38563. var bindings = this.getBindingIdentifiers();
  38564. Object.keys(bindings).forEach(function (name) {
  38565. return _this.scope.removeBinding(name);
  38566. });
  38567. }
  38568. function _callRemovalHooks() {
  38569. for (var _i = 0, _arr = hooks; _i < _arr.length; _i++) {
  38570. var fn = _arr[_i];
  38571. if (fn(this, this.parentPath)) return true;
  38572. }
  38573. }
  38574. function _remove() {
  38575. if (Array.isArray(this.container)) {
  38576. this.container.splice(this.key, 1);
  38577. this.updateSiblingKeys(this.key, -1);
  38578. } else {
  38579. this._replaceWith(null);
  38580. }
  38581. }
  38582. function _markRemoved() {
  38583. this._traverseFlags |= SHOULD_SKIP | REMOVED;
  38584. this.node = null;
  38585. }
  38586. function _assertUnremoved() {
  38587. if (this.removed) {
  38588. throw this.buildCodeFrameError("NodePath has been removed so is read-only.");
  38589. }
  38590. }
  38591. var NodePath_removal = /*#__PURE__*/Object.freeze({
  38592. __proto__: null,
  38593. remove: remove,
  38594. _removeFromScope: _removeFromScope,
  38595. _callRemovalHooks: _callRemovalHooks,
  38596. _remove: _remove,
  38597. _markRemoved: _markRemoved,
  38598. _assertUnremoved: _assertUnremoved
  38599. });
  38600. var referenceVisitor = {
  38601. ReferencedIdentifier: function ReferencedIdentifier(path, state) {
  38602. if (path.isJSXIdentifier() && react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) {
  38603. return;
  38604. }
  38605. if (path.node.name === "this") {
  38606. var scope = path.scope;
  38607. do {
  38608. if (scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) {
  38609. break;
  38610. }
  38611. } while (scope = scope.parent);
  38612. if (scope) state.breakOnScopePaths.push(scope.path);
  38613. }
  38614. var binding = path.scope.getBinding(path.node.name);
  38615. if (!binding) return;
  38616. for (var _iterator = binding.constantViolations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  38617. var _ref;
  38618. if (_isArray) {
  38619. if (_i >= _iterator.length) break;
  38620. _ref = _iterator[_i++];
  38621. } else {
  38622. _i = _iterator.next();
  38623. if (_i.done) break;
  38624. _ref = _i.value;
  38625. }
  38626. var violation = _ref;
  38627. if (violation.scope !== binding.path.scope) {
  38628. state.mutableBinding = true;
  38629. path.stop();
  38630. return;
  38631. }
  38632. }
  38633. if (binding !== state.scope.getBinding(path.node.name)) return;
  38634. state.bindings[path.node.name] = binding;
  38635. }
  38636. };
  38637. var PathHoister = function () {
  38638. function PathHoister(path, scope) {
  38639. this.breakOnScopePaths = [];
  38640. this.bindings = {};
  38641. this.mutableBinding = false;
  38642. this.scopes = [];
  38643. this.scope = scope;
  38644. this.path = path;
  38645. this.attachAfter = false;
  38646. }
  38647. var _proto = PathHoister.prototype;
  38648. _proto.isCompatibleScope = function isCompatibleScope(scope) {
  38649. for (var _i2 = 0, _Object$keys = Object.keys(this.bindings); _i2 < _Object$keys.length; _i2++) {
  38650. var key = _Object$keys[_i2];
  38651. var binding = this.bindings[key];
  38652. if (!scope.bindingIdentifierEquals(key, binding.identifier)) {
  38653. return false;
  38654. }
  38655. }
  38656. return true;
  38657. };
  38658. _proto.getCompatibleScopes = function getCompatibleScopes() {
  38659. var scope = this.path.scope;
  38660. do {
  38661. if (this.isCompatibleScope(scope)) {
  38662. this.scopes.push(scope);
  38663. } else {
  38664. break;
  38665. }
  38666. if (this.breakOnScopePaths.indexOf(scope.path) >= 0) {
  38667. break;
  38668. }
  38669. } while (scope = scope.parent);
  38670. };
  38671. _proto.getAttachmentPath = function getAttachmentPath() {
  38672. var path = this._getAttachmentPath();
  38673. if (!path) return;
  38674. var targetScope = path.scope;
  38675. if (targetScope.path === path) {
  38676. targetScope = path.scope.parent;
  38677. }
  38678. if (targetScope.path.isProgram() || targetScope.path.isFunction()) {
  38679. for (var _i3 = 0, _Object$keys2 = Object.keys(this.bindings); _i3 < _Object$keys2.length; _i3++) {
  38680. var name = _Object$keys2[_i3];
  38681. if (!targetScope.hasOwnBinding(name)) continue;
  38682. var binding = this.bindings[name];
  38683. if (binding.kind === "param" || binding.path.parentKey === "params") {
  38684. continue;
  38685. }
  38686. var bindingParentPath = this.getAttachmentParentForPath(binding.path);
  38687. if (bindingParentPath.key >= path.key) {
  38688. this.attachAfter = true;
  38689. path = binding.path;
  38690. for (var _i4 = 0, _arr = binding.constantViolations; _i4 < _arr.length; _i4++) {
  38691. var violationPath = _arr[_i4];
  38692. if (this.getAttachmentParentForPath(violationPath).key > path.key) {
  38693. path = violationPath;
  38694. }
  38695. }
  38696. }
  38697. }
  38698. }
  38699. return path;
  38700. };
  38701. _proto._getAttachmentPath = function _getAttachmentPath() {
  38702. var scopes = this.scopes;
  38703. var scope = scopes.pop();
  38704. if (!scope) return;
  38705. if (scope.path.isFunction()) {
  38706. if (this.hasOwnParamBindings(scope)) {
  38707. if (this.scope === scope) return;
  38708. var bodies = scope.path.get("body").get("body");
  38709. for (var i = 0; i < bodies.length; i++) {
  38710. if (bodies[i].node._blockHoist) continue;
  38711. return bodies[i];
  38712. }
  38713. } else {
  38714. return this.getNextScopeAttachmentParent();
  38715. }
  38716. } else if (scope.path.isProgram()) {
  38717. return this.getNextScopeAttachmentParent();
  38718. }
  38719. };
  38720. _proto.getNextScopeAttachmentParent = function getNextScopeAttachmentParent() {
  38721. var scope = this.scopes.pop();
  38722. if (scope) return this.getAttachmentParentForPath(scope.path);
  38723. };
  38724. _proto.getAttachmentParentForPath = function getAttachmentParentForPath(path) {
  38725. do {
  38726. if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
  38727. return path;
  38728. }
  38729. } while (path = path.parentPath);
  38730. };
  38731. _proto.hasOwnParamBindings = function hasOwnParamBindings(scope) {
  38732. for (var _i5 = 0, _Object$keys3 = Object.keys(this.bindings); _i5 < _Object$keys3.length; _i5++) {
  38733. var name = _Object$keys3[_i5];
  38734. if (!scope.hasOwnBinding(name)) continue;
  38735. var binding = this.bindings[name];
  38736. if (binding.kind === "param" && binding.constant) return true;
  38737. }
  38738. return false;
  38739. };
  38740. _proto.run = function run() {
  38741. this.path.traverse(referenceVisitor, this);
  38742. if (this.mutableBinding) return;
  38743. this.getCompatibleScopes();
  38744. var attachTo = this.getAttachmentPath();
  38745. if (!attachTo) return;
  38746. if (attachTo.getFunctionParent() === this.path.getFunctionParent()) return;
  38747. var uid = attachTo.scope.generateUidIdentifier("ref");
  38748. var declarator = VariableDeclarator(uid, this.path.node);
  38749. var insertFn = this.attachAfter ? "insertAfter" : "insertBefore";
  38750. var _attachTo$insertFn = attachTo[insertFn]([attachTo.isVariableDeclarator() ? declarator : VariableDeclaration("var", [declarator])]),
  38751. attached = _attachTo$insertFn[0];
  38752. var parent = this.path.parentPath;
  38753. if (parent.isJSXElement() && this.path.container === parent.node.children) {
  38754. uid = JSXExpressionContainer(uid);
  38755. }
  38756. this.path.replaceWith(cloneNode(uid));
  38757. return attachTo.isVariableDeclarator() ? attached.get("init") : attached.get("declarations.0.init");
  38758. };
  38759. return PathHoister;
  38760. }();
  38761. function insertBefore(nodes) {
  38762. this._assertUnremoved();
  38763. nodes = this._verifyNodeList(nodes);
  38764. var parentPath = this.parentPath;
  38765. if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) {
  38766. return parentPath.insertBefore(nodes);
  38767. } else if (this.isNodeType("Expression") && !this.isJSXElement() || parentPath.isForStatement() && this.key === "init") {
  38768. if (this.node) nodes.push(this.node);
  38769. return this.replaceExpressionWithStatements(nodes);
  38770. } else if (Array.isArray(this.container)) {
  38771. return this._containerInsertBefore(nodes);
  38772. } else if (this.isStatementOrBlock()) {
  38773. var shouldInsertCurrentNode = this.node && (!this.isExpressionStatement() || this.node.expression != null);
  38774. this.replaceWith(BlockStatement(shouldInsertCurrentNode ? [this.node] : []));
  38775. return this.unshiftContainer("body", nodes);
  38776. } else {
  38777. 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?");
  38778. }
  38779. }
  38780. function _containerInsert(from, nodes) {
  38781. var _this$container;
  38782. this.updateSiblingKeys(from, nodes.length);
  38783. var paths = [];
  38784. (_this$container = this.container).splice.apply(_this$container, [from, 0].concat(nodes));
  38785. for (var i = 0; i < nodes.length; i++) {
  38786. var to = from + i;
  38787. var path = this.getSibling(to);
  38788. paths.push(path);
  38789. if (this.context && this.context.queue) {
  38790. path.pushContext(this.context);
  38791. }
  38792. }
  38793. var contexts = this._getQueueContexts();
  38794. for (var _i = 0, _paths = paths; _i < _paths.length; _i++) {
  38795. var _path = _paths[_i];
  38796. _path.setScope();
  38797. _path.debug("Inserted.");
  38798. for (var _iterator = contexts, _isArray = Array.isArray(_iterator), _i2 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  38799. var _ref;
  38800. if (_isArray) {
  38801. if (_i2 >= _iterator.length) break;
  38802. _ref = _iterator[_i2++];
  38803. } else {
  38804. _i2 = _iterator.next();
  38805. if (_i2.done) break;
  38806. _ref = _i2.value;
  38807. }
  38808. var context = _ref;
  38809. context.maybeQueue(_path, true);
  38810. }
  38811. }
  38812. return paths;
  38813. }
  38814. function _containerInsertBefore(nodes) {
  38815. return this._containerInsert(this.key, nodes);
  38816. }
  38817. function _containerInsertAfter(nodes) {
  38818. return this._containerInsert(this.key + 1, nodes);
  38819. }
  38820. function insertAfter(nodes) {
  38821. this._assertUnremoved();
  38822. nodes = this._verifyNodeList(nodes);
  38823. var parentPath = this.parentPath;
  38824. if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) {
  38825. return parentPath.insertAfter(nodes.map(function (node) {
  38826. return isExpression(node) ? ExpressionStatement(node) : node;
  38827. }));
  38828. } else if (this.isNodeType("Expression") && !this.isJSXElement() && !parentPath.isJSXElement() || parentPath.isForStatement() && this.key === "init") {
  38829. if (this.node) {
  38830. var scope = this.scope;
  38831. if (parentPath.isMethod({
  38832. computed: true,
  38833. key: this.node
  38834. })) {
  38835. scope = scope.parent;
  38836. }
  38837. var temp = scope.generateDeclaredUidIdentifier();
  38838. nodes.unshift(ExpressionStatement(AssignmentExpression("=", cloneNode(temp), this.node)));
  38839. nodes.push(ExpressionStatement(cloneNode(temp)));
  38840. }
  38841. return this.replaceExpressionWithStatements(nodes);
  38842. } else if (Array.isArray(this.container)) {
  38843. return this._containerInsertAfter(nodes);
  38844. } else if (this.isStatementOrBlock()) {
  38845. var shouldInsertCurrentNode = this.node && (!this.isExpressionStatement() || this.node.expression != null);
  38846. this.replaceWith(BlockStatement(shouldInsertCurrentNode ? [this.node] : []));
  38847. return this.pushContainer("body", nodes);
  38848. } else {
  38849. 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?");
  38850. }
  38851. }
  38852. function updateSiblingKeys(fromIndex, incrementBy) {
  38853. if (!this.parent) return;
  38854. var paths = path.get(this.parent);
  38855. for (var i = 0; i < paths.length; i++) {
  38856. var path$1 = paths[i];
  38857. if (path$1.key >= fromIndex) {
  38858. path$1.key += incrementBy;
  38859. }
  38860. }
  38861. }
  38862. function _verifyNodeList(nodes) {
  38863. if (!nodes) {
  38864. return [];
  38865. }
  38866. if (nodes.constructor !== Array) {
  38867. nodes = [nodes];
  38868. }
  38869. for (var i = 0; i < nodes.length; i++) {
  38870. var node = nodes[i];
  38871. var msg = void 0;
  38872. if (!node) {
  38873. msg = "has falsy node";
  38874. } else if (typeof node !== "object") {
  38875. msg = "contains a non-object node";
  38876. } else if (!node.type) {
  38877. msg = "without a type";
  38878. } else if (node instanceof NodePath) {
  38879. msg = "has a NodePath when it expected a raw object";
  38880. }
  38881. if (msg) {
  38882. var type = Array.isArray(node) ? "array" : typeof node;
  38883. throw new Error("Node list " + msg + " with the index of " + i + " and type of " + type);
  38884. }
  38885. }
  38886. return nodes;
  38887. }
  38888. function unshiftContainer(listKey, nodes) {
  38889. this._assertUnremoved();
  38890. nodes = this._verifyNodeList(nodes);
  38891. var path = NodePath.get({
  38892. parentPath: this,
  38893. parent: this.node,
  38894. container: this.node[listKey],
  38895. listKey: listKey,
  38896. key: 0
  38897. });
  38898. return path._containerInsertBefore(nodes);
  38899. }
  38900. function pushContainer(listKey, nodes) {
  38901. this._assertUnremoved();
  38902. nodes = this._verifyNodeList(nodes);
  38903. var container = this.node[listKey];
  38904. var path = NodePath.get({
  38905. parentPath: this,
  38906. parent: this.node,
  38907. container: container,
  38908. listKey: listKey,
  38909. key: container.length
  38910. });
  38911. return path.replaceWithMultiple(nodes);
  38912. }
  38913. function hoist(scope) {
  38914. if (scope === void 0) {
  38915. scope = this.scope;
  38916. }
  38917. var hoister = new PathHoister(this, scope);
  38918. return hoister.run();
  38919. }
  38920. var NodePath_modification = /*#__PURE__*/Object.freeze({
  38921. __proto__: null,
  38922. insertBefore: insertBefore,
  38923. _containerInsert: _containerInsert,
  38924. _containerInsertBefore: _containerInsertBefore,
  38925. _containerInsertAfter: _containerInsertAfter,
  38926. insertAfter: insertAfter,
  38927. updateSiblingKeys: updateSiblingKeys,
  38928. _verifyNodeList: _verifyNodeList,
  38929. unshiftContainer: unshiftContainer,
  38930. pushContainer: pushContainer,
  38931. hoist: hoist
  38932. });
  38933. function getOpposite() {
  38934. if (this.key === "left") {
  38935. return this.getSibling("right");
  38936. } else if (this.key === "right") {
  38937. return this.getSibling("left");
  38938. }
  38939. }
  38940. function addCompletionRecords(path, paths) {
  38941. if (path) return paths.concat(path.getCompletionRecords());
  38942. return paths;
  38943. }
  38944. function completionRecordForSwitch(cases, paths) {
  38945. var isLastCaseWithConsequent = true;
  38946. for (var i = cases.length - 1; i >= 0; i--) {
  38947. var switchCase = cases[i];
  38948. var consequent = switchCase.get("consequent");
  38949. var breakStatement = void 0;
  38950. findBreak: for (var _iterator = consequent, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  38951. var _ref;
  38952. if (_isArray) {
  38953. if (_i >= _iterator.length) break;
  38954. _ref = _iterator[_i++];
  38955. } else {
  38956. _i = _iterator.next();
  38957. if (_i.done) break;
  38958. _ref = _i.value;
  38959. }
  38960. var statement = _ref;
  38961. if (statement.isBlockStatement()) {
  38962. for (var _iterator2 = statement.get("body"), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  38963. var _ref2;
  38964. if (_isArray2) {
  38965. if (_i2 >= _iterator2.length) break;
  38966. _ref2 = _iterator2[_i2++];
  38967. } else {
  38968. _i2 = _iterator2.next();
  38969. if (_i2.done) break;
  38970. _ref2 = _i2.value;
  38971. }
  38972. var statementInBlock = _ref2;
  38973. if (statementInBlock.isBreakStatement()) {
  38974. breakStatement = statementInBlock;
  38975. break findBreak;
  38976. }
  38977. }
  38978. } else if (statement.isBreakStatement()) {
  38979. breakStatement = statement;
  38980. break;
  38981. }
  38982. }
  38983. if (breakStatement) {
  38984. while (breakStatement.key === 0 && breakStatement.parentPath.isBlockStatement()) {
  38985. breakStatement = breakStatement.parentPath;
  38986. }
  38987. var prevSibling = breakStatement.getPrevSibling();
  38988. if (breakStatement.key > 0 && (prevSibling.isExpressionStatement() || prevSibling.isBlockStatement())) {
  38989. paths = addCompletionRecords(prevSibling, paths);
  38990. breakStatement.remove();
  38991. } else {
  38992. breakStatement.replaceWith(breakStatement.scope.buildUndefinedNode());
  38993. paths = addCompletionRecords(breakStatement, paths);
  38994. }
  38995. } else if (isLastCaseWithConsequent) {
  38996. (function () {
  38997. var statementFinder = function statementFinder(statement) {
  38998. return !statement.isBlockStatement() || statement.get("body").some(statementFinder);
  38999. };
  39000. var hasConsequent = consequent.some(statementFinder);
  39001. if (hasConsequent) {
  39002. paths = addCompletionRecords(consequent[consequent.length - 1], paths);
  39003. isLastCaseWithConsequent = false;
  39004. }
  39005. })();
  39006. }
  39007. }
  39008. return paths;
  39009. }
  39010. function getCompletionRecords() {
  39011. var paths = [];
  39012. if (this.isIfStatement()) {
  39013. paths = addCompletionRecords(this.get("consequent"), paths);
  39014. paths = addCompletionRecords(this.get("alternate"), paths);
  39015. } else if (this.isDoExpression() || this.isFor() || this.isWhile()) {
  39016. paths = addCompletionRecords(this.get("body"), paths);
  39017. } else if (this.isProgram() || this.isBlockStatement()) {
  39018. paths = addCompletionRecords(this.get("body").pop(), paths);
  39019. } else if (this.isFunction()) {
  39020. return this.get("body").getCompletionRecords();
  39021. } else if (this.isTryStatement()) {
  39022. paths = addCompletionRecords(this.get("block"), paths);
  39023. paths = addCompletionRecords(this.get("handler"), paths);
  39024. } else if (this.isCatchClause()) {
  39025. paths = addCompletionRecords(this.get("body"), paths);
  39026. } else if (this.isSwitchStatement()) {
  39027. paths = completionRecordForSwitch(this.get("cases"), paths);
  39028. } else {
  39029. paths.push(this);
  39030. }
  39031. return paths;
  39032. }
  39033. function getSibling(key) {
  39034. return NodePath.get({
  39035. parentPath: this.parentPath,
  39036. parent: this.parent,
  39037. container: this.container,
  39038. listKey: this.listKey,
  39039. key: key
  39040. });
  39041. }
  39042. function getPrevSibling() {
  39043. return this.getSibling(this.key - 1);
  39044. }
  39045. function getNextSibling() {
  39046. return this.getSibling(this.key + 1);
  39047. }
  39048. function getAllNextSiblings() {
  39049. var _key = this.key;
  39050. var sibling = this.getSibling(++_key);
  39051. var siblings = [];
  39052. while (sibling.node) {
  39053. siblings.push(sibling);
  39054. sibling = this.getSibling(++_key);
  39055. }
  39056. return siblings;
  39057. }
  39058. function getAllPrevSiblings() {
  39059. var _key = this.key;
  39060. var sibling = this.getSibling(--_key);
  39061. var siblings = [];
  39062. while (sibling.node) {
  39063. siblings.push(sibling);
  39064. sibling = this.getSibling(--_key);
  39065. }
  39066. return siblings;
  39067. }
  39068. function get(key, context) {
  39069. if (context === true) context = this.context;
  39070. var parts = key.split(".");
  39071. if (parts.length === 1) {
  39072. return this._getKey(key, context);
  39073. } else {
  39074. return this._getPattern(parts, context);
  39075. }
  39076. }
  39077. function _getKey(key, context) {
  39078. var _this = this;
  39079. var node = this.node;
  39080. var container = node[key];
  39081. if (Array.isArray(container)) {
  39082. return container.map(function (_, i) {
  39083. return NodePath.get({
  39084. listKey: key,
  39085. parentPath: _this,
  39086. parent: node,
  39087. container: container,
  39088. key: i
  39089. }).setContext(context);
  39090. });
  39091. } else {
  39092. return NodePath.get({
  39093. parentPath: this,
  39094. parent: node,
  39095. container: node,
  39096. key: key
  39097. }).setContext(context);
  39098. }
  39099. }
  39100. function _getPattern(parts, context) {
  39101. var path = this;
  39102. for (var _iterator3 = parts, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
  39103. var _ref3;
  39104. if (_isArray3) {
  39105. if (_i3 >= _iterator3.length) break;
  39106. _ref3 = _iterator3[_i3++];
  39107. } else {
  39108. _i3 = _iterator3.next();
  39109. if (_i3.done) break;
  39110. _ref3 = _i3.value;
  39111. }
  39112. var part = _ref3;
  39113. if (part === ".") {
  39114. path = path.parentPath;
  39115. } else {
  39116. if (Array.isArray(path)) {
  39117. path = path[part];
  39118. } else {
  39119. path = path.get(part, context);
  39120. }
  39121. }
  39122. }
  39123. return path;
  39124. }
  39125. function getBindingIdentifiers$1(duplicates) {
  39126. return getBindingIdentifiers(this.node, duplicates);
  39127. }
  39128. function getOuterBindingIdentifiers$1(duplicates) {
  39129. return getOuterBindingIdentifiers(this.node, duplicates);
  39130. }
  39131. function getBindingIdentifierPaths(duplicates, outerOnly) {
  39132. if (duplicates === void 0) {
  39133. duplicates = false;
  39134. }
  39135. if (outerOnly === void 0) {
  39136. outerOnly = false;
  39137. }
  39138. var path = this;
  39139. var search = [].concat(path);
  39140. var ids = Object.create(null);
  39141. while (search.length) {
  39142. var id = search.shift();
  39143. if (!id) continue;
  39144. if (!id.node) continue;
  39145. var keys = getBindingIdentifiers.keys[id.node.type];
  39146. if (id.isIdentifier()) {
  39147. if (duplicates) {
  39148. var _ids = ids[id.node.name] = ids[id.node.name] || [];
  39149. _ids.push(id);
  39150. } else {
  39151. ids[id.node.name] = id;
  39152. }
  39153. continue;
  39154. }
  39155. if (id.isExportDeclaration()) {
  39156. var declaration = id.get("declaration");
  39157. if (declaration.isDeclaration()) {
  39158. search.push(declaration);
  39159. }
  39160. continue;
  39161. }
  39162. if (outerOnly) {
  39163. if (id.isFunctionDeclaration()) {
  39164. search.push(id.get("id"));
  39165. continue;
  39166. }
  39167. if (id.isFunctionExpression()) {
  39168. continue;
  39169. }
  39170. }
  39171. if (keys) {
  39172. for (var i = 0; i < keys.length; i++) {
  39173. var key = keys[i];
  39174. var child = id.get(key);
  39175. if (Array.isArray(child) || child.node) {
  39176. search = search.concat(child);
  39177. }
  39178. }
  39179. }
  39180. }
  39181. return ids;
  39182. }
  39183. function getOuterBindingIdentifierPaths(duplicates) {
  39184. return this.getBindingIdentifierPaths(duplicates, true);
  39185. }
  39186. var NodePath_family = /*#__PURE__*/Object.freeze({
  39187. __proto__: null,
  39188. getOpposite: getOpposite,
  39189. getCompletionRecords: getCompletionRecords,
  39190. getSibling: getSibling,
  39191. getPrevSibling: getPrevSibling,
  39192. getNextSibling: getNextSibling,
  39193. getAllNextSiblings: getAllNextSiblings,
  39194. getAllPrevSiblings: getAllPrevSiblings,
  39195. get: get,
  39196. _getKey: _getKey,
  39197. _getPattern: _getPattern,
  39198. getBindingIdentifiers: getBindingIdentifiers$1,
  39199. getOuterBindingIdentifiers: getOuterBindingIdentifiers$1,
  39200. getBindingIdentifierPaths: getBindingIdentifierPaths,
  39201. getOuterBindingIdentifierPaths: getOuterBindingIdentifierPaths
  39202. });
  39203. function shareCommentsWithSiblings() {
  39204. if (typeof this.key === "string") return;
  39205. var node = this.node;
  39206. if (!node) return;
  39207. var trailing = node.trailingComments;
  39208. var leading = node.leadingComments;
  39209. if (!trailing && !leading) return;
  39210. var prev = this.getSibling(this.key - 1);
  39211. var next = this.getSibling(this.key + 1);
  39212. var hasPrev = Boolean(prev.node);
  39213. var hasNext = Boolean(next.node);
  39214. if (hasPrev && hasNext) ; else if (hasPrev) {
  39215. prev.addComments("trailing", trailing);
  39216. } else if (hasNext) {
  39217. next.addComments("leading", leading);
  39218. }
  39219. }
  39220. function addComment$1(type, content, line) {
  39221. addComment(this.node, type, content, line);
  39222. }
  39223. function addComments$1(type, comments) {
  39224. addComments(this.node, type, comments);
  39225. }
  39226. var NodePath_comments = /*#__PURE__*/Object.freeze({
  39227. __proto__: null,
  39228. shareCommentsWithSiblings: shareCommentsWithSiblings,
  39229. addComment: addComment$1,
  39230. addComments: addComments$1
  39231. });
  39232. var _debug = browser$1("babel");
  39233. var REMOVED = 1 << 0;
  39234. var SHOULD_STOP = 1 << 1;
  39235. var SHOULD_SKIP = 1 << 2;
  39236. var NodePath = function () {
  39237. function NodePath(hub, parent) {
  39238. this.parent = parent;
  39239. this.hub = hub;
  39240. this.contexts = [];
  39241. this.data = null;
  39242. this._traverseFlags = 0;
  39243. this.state = null;
  39244. this.opts = null;
  39245. this.skipKeys = null;
  39246. this.parentPath = null;
  39247. this.context = null;
  39248. this.container = null;
  39249. this.listKey = null;
  39250. this.key = null;
  39251. this.node = null;
  39252. this.scope = null;
  39253. this.type = null;
  39254. }
  39255. NodePath.get = function get(_ref) {
  39256. var hub = _ref.hub,
  39257. parentPath = _ref.parentPath,
  39258. parent = _ref.parent,
  39259. container = _ref.container,
  39260. listKey = _ref.listKey,
  39261. key = _ref.key;
  39262. if (!hub && parentPath) {
  39263. hub = parentPath.hub;
  39264. }
  39265. if (!parent) {
  39266. throw new Error("To get a node path the parent needs to exist");
  39267. }
  39268. var targetNode = container[key];
  39269. var paths = path.get(parent) || [];
  39270. if (!path.has(parent)) {
  39271. path.set(parent, paths);
  39272. }
  39273. var path$1;
  39274. for (var i = 0; i < paths.length; i++) {
  39275. var pathCheck = paths[i];
  39276. if (pathCheck.node === targetNode) {
  39277. path$1 = pathCheck;
  39278. break;
  39279. }
  39280. }
  39281. if (!path$1) {
  39282. path$1 = new NodePath(hub, parent);
  39283. paths.push(path$1);
  39284. }
  39285. path$1.setup(parentPath, container, listKey, key);
  39286. return path$1;
  39287. };
  39288. var _proto = NodePath.prototype;
  39289. _proto.getScope = function getScope(scope) {
  39290. return this.isScope() ? new Scope$1(this) : scope;
  39291. };
  39292. _proto.setData = function setData(key, val) {
  39293. if (this.data == null) {
  39294. this.data = Object.create(null);
  39295. }
  39296. return this.data[key] = val;
  39297. };
  39298. _proto.getData = function getData(key, def) {
  39299. if (this.data == null) {
  39300. this.data = Object.create(null);
  39301. }
  39302. var val = this.data[key];
  39303. if (val === undefined && def !== undefined) val = this.data[key] = def;
  39304. return val;
  39305. };
  39306. _proto.buildCodeFrameError = function buildCodeFrameError(msg, Error) {
  39307. if (Error === void 0) {
  39308. Error = SyntaxError;
  39309. }
  39310. return this.hub.buildError(this.node, msg, Error);
  39311. };
  39312. _proto.traverse = function traverse(visitor, state) {
  39313. traverse$1(this.node, visitor, this.scope, state, this);
  39314. };
  39315. _proto.set = function set(key, node) {
  39316. validate(this.node, key, node);
  39317. this.node[key] = node;
  39318. };
  39319. _proto.getPathLocation = function getPathLocation() {
  39320. var parts = [];
  39321. var path = this;
  39322. do {
  39323. var key = path.key;
  39324. if (path.inList) key = path.listKey + "[" + key + "]";
  39325. parts.unshift(key);
  39326. } while (path = path.parentPath);
  39327. return parts.join(".");
  39328. };
  39329. _proto.debug = function debug(message) {
  39330. if (!_debug.enabled) return;
  39331. _debug(this.getPathLocation() + " " + this.type + ": " + message);
  39332. };
  39333. _proto.toString = function toString() {
  39334. return generateCode(this.node).code;
  39335. };
  39336. _createClass(NodePath, [{
  39337. key: "inList",
  39338. get: function get() {
  39339. return !!this.listKey;
  39340. },
  39341. set: function set(inList) {
  39342. if (!inList) {
  39343. this.listKey = null;
  39344. }
  39345. }
  39346. }, {
  39347. key: "parentKey",
  39348. get: function get() {
  39349. return this.listKey || this.key;
  39350. }
  39351. }, {
  39352. key: "shouldSkip",
  39353. get: function get() {
  39354. return !!(this._traverseFlags & SHOULD_SKIP);
  39355. },
  39356. set: function set(v) {
  39357. if (v) {
  39358. this._traverseFlags |= SHOULD_SKIP;
  39359. } else {
  39360. this._traverseFlags &= ~SHOULD_SKIP;
  39361. }
  39362. }
  39363. }, {
  39364. key: "shouldStop",
  39365. get: function get() {
  39366. return !!(this._traverseFlags & SHOULD_STOP);
  39367. },
  39368. set: function set(v) {
  39369. if (v) {
  39370. this._traverseFlags |= SHOULD_STOP;
  39371. } else {
  39372. this._traverseFlags &= ~SHOULD_STOP;
  39373. }
  39374. }
  39375. }, {
  39376. key: "removed",
  39377. get: function get() {
  39378. return !!(this._traverseFlags & REMOVED);
  39379. },
  39380. set: function set(v) {
  39381. if (v) {
  39382. this._traverseFlags |= REMOVED;
  39383. } else {
  39384. this._traverseFlags &= ~REMOVED;
  39385. }
  39386. }
  39387. }]);
  39388. return NodePath;
  39389. }();
  39390. 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);
  39391. var _loop = function _loop() {
  39392. var type = _arr[_i$2];
  39393. var typeKey = "is" + type;
  39394. var fn = t[typeKey];
  39395. NodePath.prototype[typeKey] = function (opts) {
  39396. return fn(this.node, opts);
  39397. };
  39398. NodePath.prototype["assert" + type] = function (opts) {
  39399. if (!fn(this.node, opts)) {
  39400. throw new TypeError("Expected node path of type " + type);
  39401. }
  39402. };
  39403. };
  39404. for (var _i$2 = 0, _arr = TYPES; _i$2 < _arr.length; _i$2++) {
  39405. _loop();
  39406. }
  39407. var _loop2 = function _loop2() {
  39408. var type = _Object$keys[_i2];
  39409. if (type[0] === "_") return "continue";
  39410. if (TYPES.indexOf(type) < 0) TYPES.push(type);
  39411. var virtualType = virtualTypes[type];
  39412. NodePath.prototype["is" + type] = function (opts) {
  39413. return virtualType.checkPath(this, opts);
  39414. };
  39415. };
  39416. for (var _i2 = 0, _Object$keys = Object.keys(virtualTypes); _i2 < _Object$keys.length; _i2++) {
  39417. var _ret = _loop2();
  39418. if (_ret === "continue") continue;
  39419. }
  39420. var TraversalContext = function () {
  39421. function TraversalContext(scope, opts, state, parentPath) {
  39422. this.queue = null;
  39423. this.parentPath = parentPath;
  39424. this.scope = scope;
  39425. this.state = state;
  39426. this.opts = opts;
  39427. }
  39428. var _proto = TraversalContext.prototype;
  39429. _proto.shouldVisit = function shouldVisit(node) {
  39430. var opts = this.opts;
  39431. if (opts.enter || opts.exit) return true;
  39432. if (opts[node.type]) return true;
  39433. var keys = VISITOR_KEYS[node.type];
  39434. if (!keys || !keys.length) return false;
  39435. for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  39436. var _ref;
  39437. if (_isArray) {
  39438. if (_i >= _iterator.length) break;
  39439. _ref = _iterator[_i++];
  39440. } else {
  39441. _i = _iterator.next();
  39442. if (_i.done) break;
  39443. _ref = _i.value;
  39444. }
  39445. var key = _ref;
  39446. if (node[key]) return true;
  39447. }
  39448. return false;
  39449. };
  39450. _proto.create = function create(node, obj, key, listKey) {
  39451. return NodePath.get({
  39452. parentPath: this.parentPath,
  39453. parent: node,
  39454. container: obj,
  39455. key: key,
  39456. listKey: listKey
  39457. });
  39458. };
  39459. _proto.maybeQueue = function maybeQueue(path, notPriority) {
  39460. if (this.trap) {
  39461. throw new Error("Infinite cycle detected");
  39462. }
  39463. if (this.queue) {
  39464. if (notPriority) {
  39465. this.queue.push(path);
  39466. } else {
  39467. this.priorityQueue.push(path);
  39468. }
  39469. }
  39470. };
  39471. _proto.visitMultiple = function visitMultiple(container, parent, listKey) {
  39472. if (container.length === 0) return false;
  39473. var queue = [];
  39474. for (var key = 0; key < container.length; key++) {
  39475. var node = container[key];
  39476. if (node && this.shouldVisit(node)) {
  39477. queue.push(this.create(parent, container, key, listKey));
  39478. }
  39479. }
  39480. return this.visitQueue(queue);
  39481. };
  39482. _proto.visitSingle = function visitSingle(node, key) {
  39483. if (this.shouldVisit(node[key])) {
  39484. return this.visitQueue([this.create(node, node, key)]);
  39485. } else {
  39486. return false;
  39487. }
  39488. };
  39489. _proto.visitQueue = function visitQueue(queue) {
  39490. this.queue = queue;
  39491. this.priorityQueue = [];
  39492. var visited = [];
  39493. var stop = false;
  39494. for (var _iterator2 = queue, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  39495. var _ref2;
  39496. if (_isArray2) {
  39497. if (_i2 >= _iterator2.length) break;
  39498. _ref2 = _iterator2[_i2++];
  39499. } else {
  39500. _i2 = _iterator2.next();
  39501. if (_i2.done) break;
  39502. _ref2 = _i2.value;
  39503. }
  39504. var path = _ref2;
  39505. path.resync();
  39506. if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) {
  39507. path.pushContext(this);
  39508. }
  39509. if (path.key === null) continue;
  39510. if (visited.indexOf(path.node) >= 0) continue;
  39511. visited.push(path.node);
  39512. if (path.visit()) {
  39513. stop = true;
  39514. break;
  39515. }
  39516. if (this.priorityQueue.length) {
  39517. stop = this.visitQueue(this.priorityQueue);
  39518. this.priorityQueue = [];
  39519. this.queue = queue;
  39520. if (stop) break;
  39521. }
  39522. }
  39523. for (var _iterator3 = queue, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
  39524. var _ref3;
  39525. if (_isArray3) {
  39526. if (_i3 >= _iterator3.length) break;
  39527. _ref3 = _iterator3[_i3++];
  39528. } else {
  39529. _i3 = _iterator3.next();
  39530. if (_i3.done) break;
  39531. _ref3 = _i3.value;
  39532. }
  39533. var _path = _ref3;
  39534. _path.popContext();
  39535. }
  39536. this.queue = null;
  39537. return stop;
  39538. };
  39539. _proto.visit = function visit(node, key) {
  39540. var nodes = node[key];
  39541. if (!nodes) return false;
  39542. if (Array.isArray(nodes)) {
  39543. return this.visitMultiple(nodes, node, key);
  39544. } else {
  39545. return this.visitSingle(node, key);
  39546. }
  39547. };
  39548. return TraversalContext;
  39549. }();
  39550. function explode(visitor) {
  39551. if (visitor._exploded) return visitor;
  39552. visitor._exploded = true;
  39553. for (var _i = 0, _Object$keys = Object.keys(visitor); _i < _Object$keys.length; _i++) {
  39554. var nodeType = _Object$keys[_i];
  39555. if (shouldIgnoreKey(nodeType)) continue;
  39556. var parts = nodeType.split("|");
  39557. if (parts.length === 1) continue;
  39558. var fns = visitor[nodeType];
  39559. delete visitor[nodeType];
  39560. for (var _iterator = parts, _isArray = Array.isArray(_iterator), _i5 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  39561. var _ref;
  39562. if (_isArray) {
  39563. if (_i5 >= _iterator.length) break;
  39564. _ref = _iterator[_i5++];
  39565. } else {
  39566. _i5 = _iterator.next();
  39567. if (_i5.done) break;
  39568. _ref = _i5.value;
  39569. }
  39570. var part = _ref;
  39571. visitor[part] = fns;
  39572. }
  39573. }
  39574. verify(visitor);
  39575. delete visitor.__esModule;
  39576. ensureEntranceObjects(visitor);
  39577. ensureCallbackArrays(visitor);
  39578. for (var _i2 = 0, _arr = Object.keys(visitor); _i2 < _arr.length; _i2++) {
  39579. var _nodeType = _arr[_i2];
  39580. if (shouldIgnoreKey(_nodeType)) continue;
  39581. var wrapper = virtualTypes[_nodeType];
  39582. if (!wrapper) continue;
  39583. var _fns = visitor[_nodeType];
  39584. for (var _i6 = 0, _Object$keys4 = Object.keys(_fns); _i6 < _Object$keys4.length; _i6++) {
  39585. var _type = _Object$keys4[_i6];
  39586. _fns[_type] = wrapCheck(wrapper, _fns[_type]);
  39587. }
  39588. delete visitor[_nodeType];
  39589. if (wrapper.types) {
  39590. for (var _i7 = 0, _arr2 = wrapper.types; _i7 < _arr2.length; _i7++) {
  39591. var type = _arr2[_i7];
  39592. if (visitor[type]) {
  39593. mergePair(visitor[type], _fns);
  39594. } else {
  39595. visitor[type] = _fns;
  39596. }
  39597. }
  39598. } else {
  39599. mergePair(visitor, _fns);
  39600. }
  39601. }
  39602. for (var _i3 = 0, _Object$keys2 = Object.keys(visitor); _i3 < _Object$keys2.length; _i3++) {
  39603. var _nodeType2 = _Object$keys2[_i3];
  39604. if (shouldIgnoreKey(_nodeType2)) continue;
  39605. var _fns2 = visitor[_nodeType2];
  39606. var aliases = FLIPPED_ALIAS_KEYS[_nodeType2];
  39607. var deprecratedKey = DEPRECATED_KEYS[_nodeType2];
  39608. if (deprecratedKey) {
  39609. console.trace("Visitor defined for " + _nodeType2 + " but it has been renamed to " + deprecratedKey);
  39610. aliases = [deprecratedKey];
  39611. }
  39612. if (!aliases) continue;
  39613. delete visitor[_nodeType2];
  39614. for (var _iterator2 = aliases, _isArray2 = Array.isArray(_iterator2), _i8 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  39615. var _ref2;
  39616. if (_isArray2) {
  39617. if (_i8 >= _iterator2.length) break;
  39618. _ref2 = _iterator2[_i8++];
  39619. } else {
  39620. _i8 = _iterator2.next();
  39621. if (_i8.done) break;
  39622. _ref2 = _i8.value;
  39623. }
  39624. var alias = _ref2;
  39625. var existing = visitor[alias];
  39626. if (existing) {
  39627. mergePair(existing, _fns2);
  39628. } else {
  39629. visitor[alias] = clone_1(_fns2);
  39630. }
  39631. }
  39632. }
  39633. for (var _i4 = 0, _Object$keys3 = Object.keys(visitor); _i4 < _Object$keys3.length; _i4++) {
  39634. var _nodeType3 = _Object$keys3[_i4];
  39635. if (shouldIgnoreKey(_nodeType3)) continue;
  39636. ensureCallbackArrays(visitor[_nodeType3]);
  39637. }
  39638. return visitor;
  39639. }
  39640. function verify(visitor) {
  39641. if (visitor._verified) return;
  39642. if (typeof visitor === "function") {
  39643. throw new Error("You passed `traverse()` a function when it expected a visitor object, " + "are you sure you didn't mean `{ enter: Function }`?");
  39644. }
  39645. for (var _i9 = 0, _Object$keys5 = Object.keys(visitor); _i9 < _Object$keys5.length; _i9++) {
  39646. var nodeType = _Object$keys5[_i9];
  39647. if (nodeType === "enter" || nodeType === "exit") {
  39648. validateVisitorMethods(nodeType, visitor[nodeType]);
  39649. }
  39650. if (shouldIgnoreKey(nodeType)) continue;
  39651. if (TYPES.indexOf(nodeType) < 0) {
  39652. throw new Error("You gave us a visitor for the node type " + nodeType + " but it's not a valid type");
  39653. }
  39654. var visitors = visitor[nodeType];
  39655. if (typeof visitors === "object") {
  39656. for (var _i10 = 0, _Object$keys6 = Object.keys(visitors); _i10 < _Object$keys6.length; _i10++) {
  39657. var visitorKey = _Object$keys6[_i10];
  39658. if (visitorKey === "enter" || visitorKey === "exit") {
  39659. validateVisitorMethods(nodeType + "." + visitorKey, visitors[visitorKey]);
  39660. } else {
  39661. throw new Error("You passed `traverse()` a visitor object with the property " + (nodeType + " that has the invalid property " + visitorKey));
  39662. }
  39663. }
  39664. }
  39665. }
  39666. visitor._verified = true;
  39667. }
  39668. function validateVisitorMethods(path, val) {
  39669. var fns = [].concat(val);
  39670. for (var _iterator3 = fns, _isArray3 = Array.isArray(_iterator3), _i11 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
  39671. var _ref3;
  39672. if (_isArray3) {
  39673. if (_i11 >= _iterator3.length) break;
  39674. _ref3 = _iterator3[_i11++];
  39675. } else {
  39676. _i11 = _iterator3.next();
  39677. if (_i11.done) break;
  39678. _ref3 = _i11.value;
  39679. }
  39680. var fn = _ref3;
  39681. if (typeof fn !== "function") {
  39682. throw new TypeError("Non-function found defined in " + path + " with type " + typeof fn);
  39683. }
  39684. }
  39685. }
  39686. function merge$1(visitors, states, wrapper) {
  39687. if (states === void 0) {
  39688. states = [];
  39689. }
  39690. var rootVisitor = {};
  39691. for (var i = 0; i < visitors.length; i++) {
  39692. var visitor = visitors[i];
  39693. var state = states[i];
  39694. explode(visitor);
  39695. for (var _i12 = 0, _Object$keys7 = Object.keys(visitor); _i12 < _Object$keys7.length; _i12++) {
  39696. var type = _Object$keys7[_i12];
  39697. var visitorType = visitor[type];
  39698. if (state || wrapper) {
  39699. visitorType = wrapWithStateOrWrapper(visitorType, state, wrapper);
  39700. }
  39701. var nodeVisitor = rootVisitor[type] = rootVisitor[type] || {};
  39702. mergePair(nodeVisitor, visitorType);
  39703. }
  39704. }
  39705. return rootVisitor;
  39706. }
  39707. function wrapWithStateOrWrapper(oldVisitor, state, wrapper) {
  39708. var newVisitor = {};
  39709. var _loop = function _loop() {
  39710. var key = _Object$keys8[_i13];
  39711. var fns = oldVisitor[key];
  39712. if (!Array.isArray(fns)) return "continue";
  39713. fns = fns.map(function (fn) {
  39714. var newFn = fn;
  39715. if (state) {
  39716. newFn = function newFn(path) {
  39717. return fn.call(state, path, state);
  39718. };
  39719. }
  39720. if (wrapper) {
  39721. newFn = wrapper(state.key, key, newFn);
  39722. }
  39723. if (newFn !== fn) {
  39724. newFn.toString = function () {
  39725. return fn.toString();
  39726. };
  39727. }
  39728. return newFn;
  39729. });
  39730. newVisitor[key] = fns;
  39731. };
  39732. for (var _i13 = 0, _Object$keys8 = Object.keys(oldVisitor); _i13 < _Object$keys8.length; _i13++) {
  39733. var _ret = _loop();
  39734. if (_ret === "continue") continue;
  39735. }
  39736. return newVisitor;
  39737. }
  39738. function ensureEntranceObjects(obj) {
  39739. for (var _i14 = 0, _Object$keys9 = Object.keys(obj); _i14 < _Object$keys9.length; _i14++) {
  39740. var key = _Object$keys9[_i14];
  39741. if (shouldIgnoreKey(key)) continue;
  39742. var fns = obj[key];
  39743. if (typeof fns === "function") {
  39744. obj[key] = {
  39745. enter: fns
  39746. };
  39747. }
  39748. }
  39749. }
  39750. function ensureCallbackArrays(obj) {
  39751. if (obj.enter && !Array.isArray(obj.enter)) obj.enter = [obj.enter];
  39752. if (obj.exit && !Array.isArray(obj.exit)) obj.exit = [obj.exit];
  39753. }
  39754. function wrapCheck(wrapper, fn) {
  39755. var newFn = function newFn(path) {
  39756. if (wrapper.checkPath(path)) {
  39757. return fn.apply(this, arguments);
  39758. }
  39759. };
  39760. newFn.toString = function () {
  39761. return fn.toString();
  39762. };
  39763. return newFn;
  39764. }
  39765. function shouldIgnoreKey(key) {
  39766. if (key[0] === "_") return true;
  39767. if (key === "enter" || key === "exit" || key === "shouldSkip") return true;
  39768. if (key === "blacklist" || key === "noScope" || key === "skipKeys") {
  39769. return true;
  39770. }
  39771. return false;
  39772. }
  39773. function mergePair(dest, src) {
  39774. for (var _i15 = 0, _Object$keys10 = Object.keys(src); _i15 < _Object$keys10.length; _i15++) {
  39775. var key = _Object$keys10[_i15];
  39776. dest[key] = [].concat(dest[key] || [], src[key]);
  39777. }
  39778. }
  39779. var visitors = /*#__PURE__*/Object.freeze({
  39780. __proto__: null,
  39781. explode: explode,
  39782. verify: verify,
  39783. merge: merge$1
  39784. });
  39785. function traverse$1(parent, opts, scope, state, parentPath) {
  39786. if (!parent) return;
  39787. if (!opts) opts = {};
  39788. if (!opts.noScope && !scope) {
  39789. if (parent.type !== "Program" && parent.type !== "File") {
  39790. 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.");
  39791. }
  39792. }
  39793. if (!VISITOR_KEYS[parent.type]) {
  39794. return;
  39795. }
  39796. explode(opts);
  39797. traverse$1.node(parent, opts, scope, state, parentPath);
  39798. }
  39799. traverse$1.visitors = visitors;
  39800. traverse$1.verify = verify;
  39801. traverse$1.explode = explode;
  39802. traverse$1.cheap = function (node, enter) {
  39803. return traverseFast(node, enter);
  39804. };
  39805. traverse$1.node = function (node, opts, scope, state, parentPath, skipKeys) {
  39806. var keys = VISITOR_KEYS[node.type];
  39807. if (!keys) return;
  39808. var context = new TraversalContext(scope, opts, state, parentPath);
  39809. for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  39810. var _ref;
  39811. if (_isArray) {
  39812. if (_i >= _iterator.length) break;
  39813. _ref = _iterator[_i++];
  39814. } else {
  39815. _i = _iterator.next();
  39816. if (_i.done) break;
  39817. _ref = _i.value;
  39818. }
  39819. var key = _ref;
  39820. if (skipKeys && skipKeys[key]) continue;
  39821. if (context.visit(node, key)) return;
  39822. }
  39823. };
  39824. traverse$1.clearNode = function (node, opts) {
  39825. removeProperties(node, opts);
  39826. path["delete"](node);
  39827. };
  39828. traverse$1.removeProperties = function (tree, opts) {
  39829. traverseFast(tree, traverse$1.clearNode, opts);
  39830. return tree;
  39831. };
  39832. function hasBlacklistedType(path, state) {
  39833. if (path.node.type === state.type) {
  39834. state.has = true;
  39835. path.stop();
  39836. }
  39837. }
  39838. traverse$1.hasType = function (tree, type, blacklistTypes) {
  39839. if (includes_1(blacklistTypes, tree.type)) return false;
  39840. if (tree.type === type) return true;
  39841. var state = {
  39842. has: false,
  39843. type: type
  39844. };
  39845. traverse$1(tree, {
  39846. noScope: true,
  39847. blacklist: blacklistTypes,
  39848. enter: hasBlacklistedType
  39849. }, null, state);
  39850. return state.has;
  39851. };
  39852. traverse$1.cache = cache;
  39853. function _templateObject73() {
  39854. var data = _taggedTemplateLiteralLoose(["\n import wrapNativeSuper from \"wrapNativeSuper\";\n import getPrototypeOf from \"getPrototypeOf\";\n import possibleConstructorReturn from \"possibleConstructorReturn\";\n import inherits from \"inherits\";\n\n export default function _wrapRegExp(re, groups) {\n _wrapRegExp = function(re, groups) {\n return new BabelRegExp(re, undefined, groups);\n };\n\n var _RegExp = wrapNativeSuper(RegExp);\n var _super = RegExp.prototype;\n var _groups = new WeakMap();\n\n function BabelRegExp(re, flags, groups) {\n var _this = _RegExp.call(this, re, flags);\n // if the regex is recreated with 'g' flag\n _groups.set(_this, groups || _groups.get(re));\n return _this;\n }\n inherits(BabelRegExp, _RegExp);\n\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(\n this,\n str,\n function() {\n var args = [];\n args.push.apply(args, arguments);\n if (typeof args[args.length - 1] !== \"object\") {\n // Modern engines already pass result.groups as the last arg.\n args.push(buildGroups(args, _this));\n }\n return substitution.apply(this, args);\n }\n );\n } else {\n return _super[Symbol.replace].call(this, str, substitution);\n }\n }\n\n function buildGroups(result, re) {\n // NOTE: This function should return undefined if there are no groups,\n // but in that case Babel doesn't add the wrapper anyway.\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\n return _wrapRegExp.apply(this, arguments);\n }\n"], ["\n import wrapNativeSuper from \"wrapNativeSuper\";\n import getPrototypeOf from \"getPrototypeOf\";\n import possibleConstructorReturn from \"possibleConstructorReturn\";\n import inherits from \"inherits\";\n\n export default function _wrapRegExp(re, groups) {\n _wrapRegExp = function(re, groups) {\n return new BabelRegExp(re, undefined, groups);\n };\n\n var _RegExp = wrapNativeSuper(RegExp);\n var _super = RegExp.prototype;\n var _groups = new WeakMap();\n\n function BabelRegExp(re, flags, groups) {\n var _this = _RegExp.call(this, re, flags);\n // if the regex is recreated with 'g' flag\n _groups.set(_this, groups || _groups.get(re));\n return _this;\n }\n inherits(BabelRegExp, _RegExp);\n\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(\n this,\n str,\n function() {\n var args = [];\n args.push.apply(args, arguments);\n if (typeof args[args.length - 1] !== \"object\") {\n // Modern engines already pass result.groups as the last arg.\n args.push(buildGroups(args, _this));\n }\n return substitution.apply(this, args);\n }\n );\n } else {\n return _super[Symbol.replace].call(this, str, substitution);\n }\n }\n\n function buildGroups(result, re) {\n // NOTE: This function should return undefined if there are no groups,\n // but in that case Babel doesn't add the wrapper anyway.\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\n return _wrapRegExp.apply(this, arguments);\n }\n"]);
  39855. _templateObject73 = function _templateObject73() {
  39856. return data;
  39857. };
  39858. return data;
  39859. }
  39860. function _templateObject72() {
  39861. var data = _taggedTemplateLiteralLoose(["\n export default function _classPrivateMethodSet() {\n throw new TypeError(\"attempted to reassign private method\");\n }\n"]);
  39862. _templateObject72 = function _templateObject72() {
  39863. return data;
  39864. };
  39865. return data;
  39866. }
  39867. function _templateObject71() {
  39868. var data = _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"]);
  39869. _templateObject71 = function _templateObject71() {
  39870. return data;
  39871. };
  39872. return data;
  39873. }
  39874. function _templateObject70() {
  39875. var data = _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"]);
  39876. _templateObject70 = function _templateObject70() {
  39877. return data;
  39878. };
  39879. return data;
  39880. }
  39881. function _templateObject69() {
  39882. var data = _taggedTemplateLiteralLoose(["\n export default function _classStaticPrivateMethodSet() {\n throw new TypeError(\"attempted to set read only static private field\");\n }\n"]);
  39883. _templateObject69 = function _templateObject69() {
  39884. return data;
  39885. };
  39886. return data;
  39887. }
  39888. function _templateObject68() {
  39889. var data = _taggedTemplateLiteralLoose(["\n export default function _classStaticPrivateMethodGet(receiver, classConstructor, method) {\n if (receiver !== classConstructor) {\n throw new TypeError(\"Private static access of wrong provenance\");\n }\n return method;\n }\n"]);
  39890. _templateObject68 = function _templateObject68() {
  39891. return data;
  39892. };
  39893. return data;
  39894. }
  39895. function _templateObject67() {
  39896. var data = _taggedTemplateLiteralLoose(["\n export default function _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) {\n if (receiver !== classConstructor) {\n throw new TypeError(\"Private static access of wrong provenance\");\n }\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 return value;\n }\n"]);
  39897. _templateObject67 = function _templateObject67() {
  39898. return data;
  39899. };
  39900. return data;
  39901. }
  39902. function _templateObject66() {
  39903. var data = _taggedTemplateLiteralLoose(["\n export default function _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor) {\n if (receiver !== classConstructor) {\n throw new TypeError(\"Private static access of wrong provenance\");\n }\n if (descriptor.get) {\n return descriptor.get.call(receiver);\n }\n return descriptor.value;\n }\n"]);
  39904. _templateObject66 = function _templateObject66() {
  39905. return data;
  39906. };
  39907. return data;
  39908. }
  39909. function _templateObject65() {
  39910. var data = _taggedTemplateLiteralLoose(["\n export default function _classPrivateFieldDestructureSet(receiver, privateMap) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to set private field on non-instance\");\n }\n var descriptor = privateMap.get(receiver);\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"]);
  39911. _templateObject65 = function _templateObject65() {
  39912. return data;
  39913. };
  39914. return data;
  39915. }
  39916. function _templateObject64() {
  39917. var data = _taggedTemplateLiteralLoose(["\n export default function _classPrivateFieldSet(receiver, privateMap, value) {\n var descriptor = privateMap.get(receiver);\n if (!descriptor) {\n throw new TypeError(\"attempted to set private field on non-instance\");\n }\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\n descriptor.value = value;\n }\n\n return value;\n }\n"]);
  39918. _templateObject64 = function _templateObject64() {
  39919. return data;
  39920. };
  39921. return data;
  39922. }
  39923. function _templateObject63() {
  39924. var data = _taggedTemplateLiteralLoose(["\n export default function _classPrivateFieldGet(receiver, privateMap) {\n var descriptor = privateMap.get(receiver);\n if (!descriptor) {\n throw new TypeError(\"attempted to get private field on non-instance\");\n }\n if (descriptor.get) {\n return descriptor.get.call(receiver);\n }\n return descriptor.value;\n }\n"]);
  39925. _templateObject63 = function _templateObject63() {
  39926. return data;
  39927. };
  39928. return data;
  39929. }
  39930. function _templateObject62() {
  39931. var data = _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"]);
  39932. _templateObject62 = function _templateObject62() {
  39933. return data;
  39934. };
  39935. return data;
  39936. }
  39937. function _templateObject61() {
  39938. var data = _taggedTemplateLiteralLoose(["\n var id = 0;\n export default function _classPrivateFieldKey(name) {\n return \"__private_\" + (id++) + \"_\" + name;\n }\n"]);
  39939. _templateObject61 = function _templateObject61() {
  39940. return data;
  39941. };
  39942. return data;
  39943. }
  39944. function _templateObject60() {
  39945. var data = _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 // This is a hack to avoid this being processed by 'transform-runtime'.\n // See issue #9.\n Object.defineProperty(target, property, desc);\n desc = null;\n }\n\n return desc;\n }\n"]);
  39946. _templateObject60 = function _templateObject60() {
  39947. return data;
  39948. };
  39949. return data;
  39950. }
  39951. function _templateObject59() {
  39952. var data = _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"]);
  39953. _templateObject59 = function _templateObject59() {
  39954. return data;
  39955. };
  39956. return data;
  39957. }
  39958. function _templateObject58() {
  39959. var data = _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"]);
  39960. _templateObject58 = function _templateObject58() {
  39961. return data;
  39962. };
  39963. return data;
  39964. }
  39965. function _templateObject57() {
  39966. var data = _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"]);
  39967. _templateObject57 = function _templateObject57() {
  39968. return data;
  39969. };
  39970. return data;
  39971. }
  39972. function _templateObject56() {
  39973. var data = _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"]);
  39974. _templateObject56 = function _templateObject56() {
  39975. return data;
  39976. };
  39977. return data;
  39978. }
  39979. function _templateObject55() {
  39980. var data = _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"]);
  39981. _templateObject55 = function _templateObject55() {
  39982. return data;
  39983. };
  39984. return data;
  39985. }
  39986. function _templateObject54() {
  39987. var data = _taggedTemplateLiteralLoose(["\n export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n"]);
  39988. _templateObject54 = function _templateObject54() {
  39989. return data;
  39990. };
  39991. return data;
  39992. }
  39993. function _templateObject53() {
  39994. var data = _taggedTemplateLiteralLoose(["\n export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n }\n"]);
  39995. _templateObject53 = function _templateObject53() {
  39996. return data;
  39997. };
  39998. return data;
  39999. }
  40000. function _templateObject52() {
  40001. var data = _taggedTemplateLiteralLoose(["\n export default function _iterableToArrayLimitLoose(arr, i) {\n if (!(\n Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\"\n )) { return }\n var _arr = [];\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n if (i && _arr.length === i) break;\n }\n return _arr;\n }\n"]);
  40002. _templateObject52 = function _templateObject52() {
  40003. return data;
  40004. };
  40005. return data;
  40006. }
  40007. function _templateObject51() {
  40008. var data = _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 if (!(\n Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\"\n )) { return }\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_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 if (!(\n Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\"\n )) { return }\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_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"]);
  40009. _templateObject51 = function _templateObject51() {
  40010. return data;
  40011. };
  40012. return data;
  40013. }
  40014. function _templateObject50() {
  40015. var data = _taggedTemplateLiteralLoose(["\n export default function _iterableToArray(iter) {\n if (\n Symbol.iterator in Object(iter) ||\n Object.prototype.toString.call(iter) === \"[object Arguments]\"\n ) return Array.from(iter);\n }\n"]);
  40016. _templateObject50 = function _templateObject50() {
  40017. return data;
  40018. };
  40019. return data;
  40020. }
  40021. function _templateObject49() {
  40022. var data = _taggedTemplateLiteralLoose(["\n export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n }\n"]);
  40023. _templateObject49 = function _templateObject49() {
  40024. return data;
  40025. };
  40026. return data;
  40027. }
  40028. function _templateObject48() {
  40029. var data = _taggedTemplateLiteralLoose(["\n export default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n return arr2;\n }\n }\n"]);
  40030. _templateObject48 = function _templateObject48() {
  40031. return data;
  40032. };
  40033. return data;
  40034. }
  40035. function _templateObject47() {
  40036. var data = _taggedTemplateLiteralLoose(["\n import arrayWithoutHoles from \"arrayWithoutHoles\";\n import iterableToArray from \"iterableToArray\";\n import nonIterableSpread from \"nonIterableSpread\";\n\n export default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();\n }\n"]);
  40037. _templateObject47 = function _templateObject47() {
  40038. return data;
  40039. };
  40040. return data;
  40041. }
  40042. function _templateObject46() {
  40043. var data = _taggedTemplateLiteralLoose(["\n import arrayWithHoles from \"arrayWithHoles\";\n import iterableToArray from \"iterableToArray\";\n import nonIterableRest from \"nonIterableRest\";\n\n export default function _toArray(arr) {\n return arrayWithHoles(arr) || iterableToArray(arr) || nonIterableRest();\n }\n"]);
  40044. _templateObject46 = function _templateObject46() {
  40045. return data;
  40046. };
  40047. return data;
  40048. }
  40049. function _templateObject45() {
  40050. var data = _taggedTemplateLiteralLoose(["\n import arrayWithHoles from \"arrayWithHoles\";\n import iterableToArrayLimitLoose from \"iterableToArrayLimitLoose\";\n import nonIterableRest from \"nonIterableRest\";\n\n export default function _slicedToArrayLoose(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimitLoose(arr, i) || nonIterableRest();\n }\n"]);
  40051. _templateObject45 = function _templateObject45() {
  40052. return data;
  40053. };
  40054. return data;
  40055. }
  40056. function _templateObject44() {
  40057. var data = _taggedTemplateLiteralLoose(["\n import arrayWithHoles from \"arrayWithHoles\";\n import iterableToArrayLimit from \"iterableToArrayLimit\";\n import nonIterableRest from \"nonIterableRest\";\n\n export default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();\n }\n"]);
  40058. _templateObject44 = function _templateObject44() {
  40059. return data;
  40060. };
  40061. return data;
  40062. }
  40063. function _templateObject43() {
  40064. var data = _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"]);
  40065. _templateObject43 = function _templateObject43() {
  40066. return data;
  40067. };
  40068. return data;
  40069. }
  40070. function _templateObject42() {
  40071. var data = _taggedTemplateLiteralLoose(["\n export default function _tdzError(name) {\n throw new ReferenceError(name + \" is not defined - temporal dead zone\");\n }\n"]);
  40072. _templateObject42 = function _templateObject42() {
  40073. return data;
  40074. };
  40075. return data;
  40076. }
  40077. function _templateObject41() {
  40078. var data = _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"]);
  40079. _templateObject41 = function _templateObject41() {
  40080. return data;
  40081. };
  40082. return data;
  40083. }
  40084. function _templateObject40() {
  40085. var data = _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"]);
  40086. _templateObject40 = function _templateObject40() {
  40087. return data;
  40088. };
  40089. return data;
  40090. }
  40091. function _templateObject39() {
  40092. var data = _taggedTemplateLiteralLoose(["\n export default function _readOnlyError(name) {\n throw new Error(\"\\\"\" + name + \"\\\" is read-only\");\n }\n"], ["\n export default function _readOnlyError(name) {\n throw new Error(\"\\\\\"\" + name + \"\\\\\" is read-only\");\n }\n"]);
  40093. _templateObject39 = function _templateObject39() {
  40094. return data;
  40095. };
  40096. return data;
  40097. }
  40098. function _templateObject38() {
  40099. var data = _taggedTemplateLiteralLoose(["\n export default function _taggedTemplateLiteralLoose(strings, raw) {\n if (!raw) { raw = strings.slice(0); }\n strings.raw = raw;\n return strings;\n }\n"]);
  40100. _templateObject38 = function _templateObject38() {
  40101. return data;
  40102. };
  40103. return data;
  40104. }
  40105. function _templateObject37() {
  40106. var data = _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"]);
  40107. _templateObject37 = function _templateObject37() {
  40108. return data;
  40109. };
  40110. return data;
  40111. }
  40112. function _templateObject36() {
  40113. var data = _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"]);
  40114. _templateObject36 = function _templateObject36() {
  40115. return data;
  40116. };
  40117. return data;
  40118. }
  40119. function _templateObject35() {
  40120. var data = _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"]);
  40121. _templateObject35 = function _templateObject35() {
  40122. return data;
  40123. };
  40124. return data;
  40125. }
  40126. function _templateObject34() {
  40127. var data = _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"]);
  40128. _templateObject34 = function _templateObject34() {
  40129. return data;
  40130. };
  40131. return data;
  40132. }
  40133. function _templateObject33() {
  40134. var data = _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"]);
  40135. _templateObject33 = function _templateObject33() {
  40136. return data;
  40137. };
  40138. return data;
  40139. }
  40140. function _templateObject32() {
  40141. var data = _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"]);
  40142. _templateObject32 = function _templateObject32() {
  40143. return data;
  40144. };
  40145. return data;
  40146. }
  40147. function _templateObject31() {
  40148. var data = _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"]);
  40149. _templateObject31 = function _templateObject31() {
  40150. return data;
  40151. };
  40152. return data;
  40153. }
  40154. function _templateObject30() {
  40155. var data = _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"]);
  40156. _templateObject30 = function _templateObject30() {
  40157. return data;
  40158. };
  40159. return data;
  40160. }
  40161. function _templateObject29() {
  40162. var data = _taggedTemplateLiteralLoose(["\n export default function _objectDestructuringEmpty(obj) {\n if (obj == null) throw new TypeError(\"Cannot destructure undefined\");\n }\n"]);
  40163. _templateObject29 = function _templateObject29() {
  40164. return data;
  40165. };
  40166. return data;
  40167. }
  40168. function _templateObject28() {
  40169. var data = _taggedTemplateLiteralLoose(["\n export default function _newArrowCheck(innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError(\"Cannot instantiate an arrow function\");\n }\n }\n"]);
  40170. _templateObject28 = function _templateObject28() {
  40171. return data;
  40172. };
  40173. return data;
  40174. }
  40175. function _templateObject27() {
  40176. var data = _taggedTemplateLiteralLoose(["\n function _getRequireWildcardCache() {\n if (typeof WeakMap !== \"function\") return null;\n\n var cache = new WeakMap();\n _getRequireWildcardCache = function () { return cache; };\n return cache;\n }\n\n export default function _interopRequireWildcard(obj) {\n if (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();\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 (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"]);
  40177. _templateObject27 = function _templateObject27() {
  40178. return data;
  40179. };
  40180. return data;
  40181. }
  40182. function _templateObject26() {
  40183. var data = _taggedTemplateLiteralLoose(["\n export default function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n }\n"]);
  40184. _templateObject26 = function _templateObject26() {
  40185. return data;
  40186. };
  40187. return data;
  40188. }
  40189. function _templateObject25() {
  40190. var data = _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"]);
  40191. _templateObject25 = function _templateObject25() {
  40192. return data;
  40193. };
  40194. return data;
  40195. }
  40196. function _templateObject24() {
  40197. var data = _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"]);
  40198. _templateObject24 = function _templateObject24() {
  40199. return data;
  40200. };
  40201. return data;
  40202. }
  40203. function _templateObject23() {
  40204. var data = _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"]);
  40205. _templateObject23 = function _templateObject23() {
  40206. return data;
  40207. };
  40208. return data;
  40209. }
  40210. function _templateObject22() {
  40211. var data = _taggedTemplateLiteralLoose(["\n import setPrototypeOf from \"setPrototypeOf\";\n\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 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"]);
  40212. _templateObject22 = function _templateObject22() {
  40213. return data;
  40214. };
  40215. return data;
  40216. }
  40217. function _templateObject21() {
  40218. var data = _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"]);
  40219. _templateObject21 = function _templateObject21() {
  40220. return data;
  40221. };
  40222. return data;
  40223. }
  40224. function _templateObject20() {
  40225. var data = _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"]);
  40226. _templateObject20 = function _templateObject20() {
  40227. return data;
  40228. };
  40229. return data;
  40230. }
  40231. function _templateObject19() {
  40232. var data = _taggedTemplateLiteralLoose(["\n export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n }\n"]);
  40233. _templateObject19 = function _templateObject19() {
  40234. return data;
  40235. };
  40236. return data;
  40237. }
  40238. function _templateObject18() {
  40239. var data = _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"]);
  40240. _templateObject18 = function _templateObject18() {
  40241. return data;
  40242. };
  40243. return data;
  40244. }
  40245. function _templateObject17() {
  40246. var data = _taggedTemplateLiteralLoose(["\n import defineProperty from \"defineProperty\";\n\n // This function is different to \"Reflect.ownKeys\". The enumerableOnly\n // filters on symbol properties only. Returned string properties are always\n // enumerable. It is good to use in objectSpread.\n\n function ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n return keys;\n }\n\n export 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"]);
  40247. _templateObject17 = function _templateObject17() {
  40248. return data;
  40249. };
  40250. return data;
  40251. }
  40252. function _templateObject16() {
  40253. var data = _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"]);
  40254. _templateObject16 = function _templateObject16() {
  40255. return data;
  40256. };
  40257. return data;
  40258. }
  40259. function _templateObject15() {
  40260. var data = _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"]);
  40261. _templateObject15 = function _templateObject15() {
  40262. return data;
  40263. };
  40264. return data;
  40265. }
  40266. function _templateObject14() {
  40267. var data = _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"]);
  40268. _templateObject14 = function _templateObject14() {
  40269. return data;
  40270. };
  40271. return data;
  40272. }
  40273. function _templateObject13() {
  40274. var data = _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"]);
  40275. _templateObject13 = function _templateObject13() {
  40276. return data;
  40277. };
  40278. return data;
  40279. }
  40280. function _templateObject12() {
  40281. var data = _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"]);
  40282. _templateObject12 = function _templateObject12() {
  40283. return data;
  40284. };
  40285. return data;
  40286. }
  40287. function _templateObject11() {
  40288. var data = _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"]);
  40289. _templateObject11 = function _templateObject11() {
  40290. return data;
  40291. };
  40292. return data;
  40293. }
  40294. function _templateObject10() {
  40295. var data = _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"]);
  40296. _templateObject10 = function _templateObject10() {
  40297. return data;
  40298. };
  40299. return data;
  40300. }
  40301. function _templateObject9() {
  40302. var data = _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"]);
  40303. _templateObject9 = function _templateObject9() {
  40304. return data;
  40305. };
  40306. return data;
  40307. }
  40308. function _templateObject8() {
  40309. var data = _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 if (typeof Symbol === \"function\" && Symbol.iterator) {\n iter[Symbol.iterator] = function () { return this; };\n }\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"]);
  40310. _templateObject8 = function _templateObject8() {
  40311. return data;
  40312. };
  40313. return data;
  40314. }
  40315. function _templateObject7() {
  40316. var data = _taggedTemplateLiteralLoose(["\n import AwaitValue from \"AwaitValue\";\n\n export default function _awaitAsyncGenerator(value) {\n return new AwaitValue(value);\n }\n"]);
  40317. _templateObject7 = function _templateObject7() {
  40318. return data;
  40319. };
  40320. return data;
  40321. }
  40322. function _templateObject6() {
  40323. var data = _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"]);
  40324. _templateObject6 = function _templateObject6() {
  40325. return data;
  40326. };
  40327. return data;
  40328. }
  40329. function _templateObject5() {
  40330. var data = _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 if (typeof Symbol === \"function\" && Symbol.asyncIterator) {\n AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; };\n }\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"]);
  40331. _templateObject5 = function _templateObject5() {
  40332. return data;
  40333. };
  40334. return data;
  40335. }
  40336. function _templateObject4() {
  40337. var data = _taggedTemplateLiteralLoose(["\n export default function _AwaitValue(value) {\n this.wrapped = value;\n }\n"]);
  40338. _templateObject4 = function _templateObject4() {
  40339. return data;
  40340. };
  40341. return data;
  40342. }
  40343. function _templateObject3() {
  40344. var data = _taggedTemplateLiteralLoose(["\n export default function _asyncIterator(iterable) {\n var method\n if (typeof Symbol !== \"undefined\") {\n if (Symbol.asyncIterator) {\n method = iterable[Symbol.asyncIterator]\n if (method != null) return method.call(iterable);\n }\n if (Symbol.iterator) {\n method = iterable[Symbol.iterator]\n if (method != null) return method.call(iterable);\n }\n }\n throw new TypeError(\"Object is not async iterable\");\n }\n"]);
  40345. _templateObject3 = function _templateObject3() {
  40346. return data;
  40347. };
  40348. return data;
  40349. }
  40350. function _templateObject2() {
  40351. var data = _taggedTemplateLiteralLoose(["\n var REACT_ELEMENT_TYPE;\n\n export default function _createRawReactElement(type, props, key, children) {\n if (!REACT_ELEMENT_TYPE) {\n REACT_ELEMENT_TYPE = (\n typeof Symbol === \"function\" && Symbol[\"for\"] && Symbol[\"for\"](\"react.element\")\n ) || 0xeac7;\n }\n\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n // If we're going to assign props.children, we create a new object now\n // to avoid mutating defaultProps.\n props = {\n children: void 0,\n };\n }\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\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\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"]);
  40352. _templateObject2 = function _templateObject2() {
  40353. return data;
  40354. };
  40355. return data;
  40356. }
  40357. function _templateObject() {
  40358. var data = _taggedTemplateLiteralLoose(["\n export default function _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) { return typeof obj; };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype\n ? \"symbol\"\n : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n"]);
  40359. _templateObject = function _templateObject() {
  40360. return data;
  40361. };
  40362. return data;
  40363. }
  40364. var helpers = Object.create(null);
  40365. var helper = function helper(minVersion) {
  40366. return function (tpl) {
  40367. return {
  40368. minVersion: minVersion,
  40369. ast: function ast() {
  40370. return template.program.ast(tpl);
  40371. }
  40372. };
  40373. };
  40374. };
  40375. helpers["typeof"] = helper("7.0.0-beta.0")(_templateObject());
  40376. helpers.jsx = helper("7.0.0-beta.0")(_templateObject2());
  40377. helpers.asyncIterator = helper("7.0.0-beta.0")(_templateObject3());
  40378. helpers.AwaitValue = helper("7.0.0-beta.0")(_templateObject4());
  40379. helpers.AsyncGenerator = helper("7.0.0-beta.0")(_templateObject5());
  40380. helpers.wrapAsyncGenerator = helper("7.0.0-beta.0")(_templateObject6());
  40381. helpers.awaitAsyncGenerator = helper("7.0.0-beta.0")(_templateObject7());
  40382. helpers.asyncGeneratorDelegate = helper("7.0.0-beta.0")(_templateObject8());
  40383. helpers.asyncToGenerator = helper("7.0.0-beta.0")(_templateObject9());
  40384. helpers.classCallCheck = helper("7.0.0-beta.0")(_templateObject10());
  40385. helpers.createClass = helper("7.0.0-beta.0")(_templateObject11());
  40386. helpers.defineEnumerableProperties = helper("7.0.0-beta.0")(_templateObject12());
  40387. helpers.defaults = helper("7.0.0-beta.0")(_templateObject13());
  40388. helpers.defineProperty = helper("7.0.0-beta.0")(_templateObject14());
  40389. helpers["extends"] = helper("7.0.0-beta.0")(_templateObject15());
  40390. helpers.objectSpread = helper("7.0.0-beta.0")(_templateObject16());
  40391. helpers.objectSpread2 = helper("7.5.0")(_templateObject17());
  40392. helpers.inherits = helper("7.0.0-beta.0")(_templateObject18());
  40393. helpers.inheritsLoose = helper("7.0.0-beta.0")(_templateObject19());
  40394. helpers.getPrototypeOf = helper("7.0.0-beta.0")(_templateObject20());
  40395. helpers.setPrototypeOf = helper("7.0.0-beta.0")(_templateObject21());
  40396. helpers.construct = helper("7.0.0-beta.0")(_templateObject22());
  40397. helpers.isNativeFunction = helper("7.0.0-beta.0")(_templateObject23());
  40398. helpers.wrapNativeSuper = helper("7.0.0-beta.0")(_templateObject24());
  40399. helpers["instanceof"] = helper("7.0.0-beta.0")(_templateObject25());
  40400. helpers.interopRequireDefault = helper("7.0.0-beta.0")(_templateObject26());
  40401. helpers.interopRequireWildcard = helper("7.0.0-beta.0")(_templateObject27());
  40402. helpers.newArrowCheck = helper("7.0.0-beta.0")(_templateObject28());
  40403. helpers.objectDestructuringEmpty = helper("7.0.0-beta.0")(_templateObject29());
  40404. helpers.objectWithoutPropertiesLoose = helper("7.0.0-beta.0")(_templateObject30());
  40405. helpers.objectWithoutProperties = helper("7.0.0-beta.0")(_templateObject31());
  40406. helpers.assertThisInitialized = helper("7.0.0-beta.0")(_templateObject32());
  40407. helpers.possibleConstructorReturn = helper("7.0.0-beta.0")(_templateObject33());
  40408. helpers.superPropBase = helper("7.0.0-beta.0")(_templateObject34());
  40409. helpers.get = helper("7.0.0-beta.0")(_templateObject35());
  40410. helpers.set = helper("7.0.0-beta.0")(_templateObject36());
  40411. helpers.taggedTemplateLiteral = helper("7.0.0-beta.0")(_templateObject37());
  40412. helpers.taggedTemplateLiteralLoose = helper("7.0.0-beta.0")(_templateObject38());
  40413. helpers.readOnlyError = helper("7.0.0-beta.0")(_templateObject39());
  40414. helpers.classNameTDZError = helper("7.0.0-beta.0")(_templateObject40());
  40415. helpers.temporalUndefined = helper("7.0.0-beta.0")(_templateObject41());
  40416. helpers.tdz = helper("7.5.5")(_templateObject42());
  40417. helpers.temporalRef = helper("7.0.0-beta.0")(_templateObject43());
  40418. helpers.slicedToArray = helper("7.0.0-beta.0")(_templateObject44());
  40419. helpers.slicedToArrayLoose = helper("7.0.0-beta.0")(_templateObject45());
  40420. helpers.toArray = helper("7.0.0-beta.0")(_templateObject46());
  40421. helpers.toConsumableArray = helper("7.0.0-beta.0")(_templateObject47());
  40422. helpers.arrayWithoutHoles = helper("7.0.0-beta.0")(_templateObject48());
  40423. helpers.arrayWithHoles = helper("7.0.0-beta.0")(_templateObject49());
  40424. helpers.iterableToArray = helper("7.0.0-beta.0")(_templateObject50());
  40425. helpers.iterableToArrayLimit = helper("7.0.0-beta.0")(_templateObject51());
  40426. helpers.iterableToArrayLimitLoose = helper("7.0.0-beta.0")(_templateObject52());
  40427. helpers.nonIterableSpread = helper("7.0.0-beta.0")(_templateObject53());
  40428. helpers.nonIterableRest = helper("7.0.0-beta.0")(_templateObject54());
  40429. helpers.skipFirstGeneratorNext = helper("7.0.0-beta.0")(_templateObject55());
  40430. helpers.toPrimitive = helper("7.1.5")(_templateObject56());
  40431. helpers.toPropertyKey = helper("7.1.5")(_templateObject57());
  40432. helpers.initializerWarningHelper = helper("7.0.0-beta.0")(_templateObject58());
  40433. helpers.initializerDefineProperty = helper("7.0.0-beta.0")(_templateObject59());
  40434. helpers.applyDecoratedDescriptor = helper("7.0.0-beta.0")(_templateObject60());
  40435. helpers.classPrivateFieldLooseKey = helper("7.0.0-beta.0")(_templateObject61());
  40436. helpers.classPrivateFieldLooseBase = helper("7.0.0-beta.0")(_templateObject62());
  40437. helpers.classPrivateFieldGet = helper("7.0.0-beta.0")(_templateObject63());
  40438. helpers.classPrivateFieldSet = helper("7.0.0-beta.0")(_templateObject64());
  40439. helpers.classPrivateFieldDestructureSet = helper("7.4.4")(_templateObject65());
  40440. helpers.classStaticPrivateFieldSpecGet = helper("7.0.2")(_templateObject66());
  40441. helpers.classStaticPrivateFieldSpecSet = helper("7.0.2")(_templateObject67());
  40442. helpers.classStaticPrivateMethodGet = helper("7.3.2")(_templateObject68());
  40443. helpers.classStaticPrivateMethodSet = helper("7.3.2")(_templateObject69());
  40444. helpers.decorate = helper("7.1.5")(_templateObject70());
  40445. helpers.classPrivateMethodGet = helper("7.1.6")(_templateObject71());
  40446. helpers.classPrivateMethodSet = helper("7.1.6")(_templateObject72());
  40447. helpers.wrapRegExp = helper("7.2.6")(_templateObject73());
  40448. function makePath(path) {
  40449. var parts = [];
  40450. for (; path.parentPath; path = path.parentPath) {
  40451. parts.push(path.key);
  40452. if (path.inList) parts.push(path.listKey);
  40453. }
  40454. return parts.reverse().join(".");
  40455. }
  40456. function getHelperMetadata(file) {
  40457. var globals = new Set();
  40458. var localBindingNames = new Set();
  40459. var dependencies = new Map();
  40460. var exportName;
  40461. var exportPath;
  40462. var exportBindingAssignments = [];
  40463. var importPaths = [];
  40464. var importBindingsReferences = [];
  40465. traverse$1(file, {
  40466. ImportDeclaration: function ImportDeclaration(child) {
  40467. var name = child.node.source.value;
  40468. if (!helpers[name]) {
  40469. throw child.buildCodeFrameError("Unknown helper " + name);
  40470. }
  40471. if (child.get("specifiers").length !== 1 || !child.get("specifiers.0").isImportDefaultSpecifier()) {
  40472. throw child.buildCodeFrameError("Helpers can only import a default value");
  40473. }
  40474. var bindingIdentifier = child.node.specifiers[0].local;
  40475. dependencies.set(bindingIdentifier, name);
  40476. importPaths.push(makePath(child));
  40477. },
  40478. ExportDefaultDeclaration: function ExportDefaultDeclaration(child) {
  40479. var decl = child.get("declaration");
  40480. if (decl.isFunctionDeclaration()) {
  40481. if (!decl.node.id) {
  40482. throw decl.buildCodeFrameError("Helpers should give names to their exported func declaration");
  40483. }
  40484. exportName = decl.node.id.name;
  40485. }
  40486. exportPath = makePath(child);
  40487. },
  40488. ExportAllDeclaration: function ExportAllDeclaration(child) {
  40489. throw child.buildCodeFrameError("Helpers can only export default");
  40490. },
  40491. ExportNamedDeclaration: function ExportNamedDeclaration(child) {
  40492. throw child.buildCodeFrameError("Helpers can only export default");
  40493. },
  40494. Statement: function Statement(child) {
  40495. if (child.isModuleDeclaration()) return;
  40496. child.skip();
  40497. }
  40498. });
  40499. traverse$1(file, {
  40500. Program: function Program(path) {
  40501. var bindings = path.scope.getAllBindings();
  40502. Object.keys(bindings).forEach(function (name) {
  40503. if (name === exportName) return;
  40504. if (dependencies.has(bindings[name].identifier)) return;
  40505. localBindingNames.add(name);
  40506. });
  40507. },
  40508. ReferencedIdentifier: function ReferencedIdentifier(child) {
  40509. var name = child.node.name;
  40510. var binding = child.scope.getBinding(name, true);
  40511. if (!binding) {
  40512. globals.add(name);
  40513. } else if (dependencies.has(binding.identifier)) {
  40514. importBindingsReferences.push(makePath(child));
  40515. }
  40516. },
  40517. AssignmentExpression: function AssignmentExpression(child) {
  40518. var left = child.get("left");
  40519. if (!(exportName in left.getBindingIdentifiers())) return;
  40520. if (!left.isIdentifier()) {
  40521. throw left.buildCodeFrameError("Only simple assignments to exports are allowed in helpers");
  40522. }
  40523. var binding = child.scope.getBinding(exportName);
  40524. if (binding && binding.scope.path.isProgram()) {
  40525. exportBindingAssignments.push(makePath(child));
  40526. }
  40527. }
  40528. });
  40529. if (!exportPath) throw new Error("Helpers must default-export something.");
  40530. exportBindingAssignments.reverse();
  40531. return {
  40532. globals: Array.from(globals),
  40533. localBindingNames: Array.from(localBindingNames),
  40534. dependencies: dependencies,
  40535. exportBindingAssignments: exportBindingAssignments,
  40536. exportPath: exportPath,
  40537. exportName: exportName,
  40538. importBindingsReferences: importBindingsReferences,
  40539. importPaths: importPaths
  40540. };
  40541. }
  40542. function permuteHelperAST(file, metadata, id, localBindings, getDependency) {
  40543. if (localBindings && !id) {
  40544. throw new Error("Unexpected local bindings for module-based helpers.");
  40545. }
  40546. if (!id) return;
  40547. var localBindingNames = metadata.localBindingNames,
  40548. dependencies = metadata.dependencies,
  40549. exportBindingAssignments = metadata.exportBindingAssignments,
  40550. exportPath = metadata.exportPath,
  40551. exportName = metadata.exportName,
  40552. importBindingsReferences = metadata.importBindingsReferences,
  40553. importPaths = metadata.importPaths;
  40554. var dependenciesRefs = {};
  40555. dependencies.forEach(function (name, id) {
  40556. dependenciesRefs[id.name] = typeof getDependency === "function" && getDependency(name) || id;
  40557. });
  40558. var toRename = {};
  40559. var bindings = new Set(localBindings || []);
  40560. localBindingNames.forEach(function (name) {
  40561. var newName = name;
  40562. while (bindings.has(newName)) {
  40563. newName = "_" + newName;
  40564. }
  40565. if (newName !== name) toRename[name] = newName;
  40566. });
  40567. if (id.type === "Identifier" && exportName !== id.name) {
  40568. toRename[exportName] = id.name;
  40569. }
  40570. traverse$1(file, {
  40571. Program: function Program(path) {
  40572. var exp = path.get(exportPath);
  40573. var imps = importPaths.map(function (p) {
  40574. return path.get(p);
  40575. });
  40576. var impsBindingRefs = importBindingsReferences.map(function (p) {
  40577. return path.get(p);
  40578. });
  40579. var decl = exp.get("declaration");
  40580. if (id.type === "Identifier") {
  40581. if (decl.isFunctionDeclaration()) {
  40582. exp.replaceWith(decl);
  40583. } else {
  40584. exp.replaceWith(VariableDeclaration("var", [VariableDeclarator(id, decl.node)]));
  40585. }
  40586. } else if (id.type === "MemberExpression") {
  40587. if (decl.isFunctionDeclaration()) {
  40588. exportBindingAssignments.forEach(function (assignPath) {
  40589. var assign = path.get(assignPath);
  40590. assign.replaceWith(AssignmentExpression("=", id, assign.node));
  40591. });
  40592. exp.replaceWith(decl);
  40593. path.pushContainer("body", ExpressionStatement(AssignmentExpression("=", id, Identifier(exportName))));
  40594. } else {
  40595. exp.replaceWith(ExpressionStatement(AssignmentExpression("=", id, decl.node)));
  40596. }
  40597. } else {
  40598. throw new Error("Unexpected helper format.");
  40599. }
  40600. Object.keys(toRename).forEach(function (name) {
  40601. path.scope.rename(name, toRename[name]);
  40602. });
  40603. for (var _iterator = imps, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  40604. var _ref;
  40605. if (_isArray) {
  40606. if (_i >= _iterator.length) break;
  40607. _ref = _iterator[_i++];
  40608. } else {
  40609. _i = _iterator.next();
  40610. if (_i.done) break;
  40611. _ref = _i.value;
  40612. }
  40613. var _path = _ref;
  40614. _path.remove();
  40615. }
  40616. for (var _iterator2 = impsBindingRefs, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  40617. var _ref2;
  40618. if (_isArray2) {
  40619. if (_i2 >= _iterator2.length) break;
  40620. _ref2 = _iterator2[_i2++];
  40621. } else {
  40622. _i2 = _iterator2.next();
  40623. if (_i2.done) break;
  40624. _ref2 = _i2.value;
  40625. }
  40626. var _path2 = _ref2;
  40627. var node = cloneNode(dependenciesRefs[_path2.node.name]);
  40628. _path2.replaceWith(node);
  40629. }
  40630. path.stop();
  40631. }
  40632. });
  40633. }
  40634. var helperData = Object.create(null);
  40635. function loadHelper(name) {
  40636. if (!helperData[name]) {
  40637. var helper = helpers[name];
  40638. if (!helper) {
  40639. throw Object.assign(new ReferenceError("Unknown helper " + name), {
  40640. code: "BABEL_HELPER_UNKNOWN",
  40641. helper: name
  40642. });
  40643. }
  40644. var fn = function fn() {
  40645. return File(helper.ast());
  40646. };
  40647. var metadata = getHelperMetadata(fn());
  40648. helperData[name] = {
  40649. build: function build(getDependency, id, localBindings) {
  40650. var file = fn();
  40651. permuteHelperAST(file, metadata, id, localBindings, getDependency);
  40652. return {
  40653. nodes: file.program.body,
  40654. globals: metadata.globals
  40655. };
  40656. },
  40657. minVersion: function minVersion() {
  40658. return helper.minVersion;
  40659. },
  40660. dependencies: metadata.dependencies
  40661. };
  40662. }
  40663. return helperData[name];
  40664. }
  40665. function get$1(name, getDependency, id, localBindings) {
  40666. return loadHelper(name).build(getDependency, id, localBindings);
  40667. }
  40668. function minVersion(name) {
  40669. return loadHelper(name).minVersion();
  40670. }
  40671. function getDependencies(name) {
  40672. return Array.from(loadHelper(name).dependencies.values());
  40673. }
  40674. function ensure(name) {
  40675. loadHelper(name);
  40676. }
  40677. var list$1 = Object.keys(helpers).map(function (name) {
  40678. return name.replace(/^_/, "");
  40679. }).filter(function (name) {
  40680. return name !== "__esModule";
  40681. });
  40682. var semver = createCommonjsModule(function (module, exports) {
  40683. exports = module.exports = SemVer;
  40684. var debug;
  40685. if (typeof process === 'object' && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) {
  40686. debug = function debug() {
  40687. var args = Array.prototype.slice.call(arguments, 0);
  40688. args.unshift('SEMVER');
  40689. console.log.apply(console, args);
  40690. };
  40691. } else {
  40692. debug = function debug() {};
  40693. }
  40694. exports.SEMVER_SPEC_VERSION = '2.0.0';
  40695. var MAX_LENGTH = 256;
  40696. var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
  40697. var MAX_SAFE_COMPONENT_LENGTH = 16;
  40698. var re = exports.re = [];
  40699. var src = exports.src = [];
  40700. var t = exports.tokens = {};
  40701. var R = 0;
  40702. function tok(n) {
  40703. t[n] = R++;
  40704. }
  40705. tok('NUMERICIDENTIFIER');
  40706. src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*';
  40707. tok('NUMERICIDENTIFIERLOOSE');
  40708. src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+';
  40709. tok('NONNUMERICIDENTIFIER');
  40710. src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
  40711. tok('MAINVERSION');
  40712. src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + '(' + src[t.NUMERICIDENTIFIER] + ')';
  40713. tok('MAINVERSIONLOOSE');
  40714. src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')';
  40715. tok('PRERELEASEIDENTIFIER');
  40716. src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] + '|' + src[t.NONNUMERICIDENTIFIER] + ')';
  40717. tok('PRERELEASEIDENTIFIERLOOSE');
  40718. src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] + '|' + src[t.NONNUMERICIDENTIFIER] + ')';
  40719. tok('PRERELEASE');
  40720. src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] + '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))';
  40721. tok('PRERELEASELOOSE');
  40722. src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] + '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))';
  40723. tok('BUILDIDENTIFIER');
  40724. src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+';
  40725. tok('BUILD');
  40726. src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] + '(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))';
  40727. tok('FULL');
  40728. tok('FULLPLAIN');
  40729. src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] + src[t.PRERELEASE] + '?' + src[t.BUILD] + '?';
  40730. src[t.FULL] = '^' + src[t.FULLPLAIN] + '$';
  40731. tok('LOOSEPLAIN');
  40732. src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + '?' + src[t.BUILD] + '?';
  40733. tok('LOOSE');
  40734. src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$';
  40735. tok('GTLT');
  40736. src[t.GTLT] = '((?:<|>)?=?)';
  40737. tok('XRANGEIDENTIFIERLOOSE');
  40738. src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
  40739. tok('XRANGEIDENTIFIER');
  40740. src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*';
  40741. tok('XRANGEPLAIN');
  40742. src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + '(?:' + src[t.PRERELEASE] + ')?' + src[t.BUILD] + '?' + ')?)?';
  40743. tok('XRANGEPLAINLOOSE');
  40744. src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + '(?:' + src[t.PRERELEASELOOSE] + ')?' + src[t.BUILD] + '?' + ')?)?';
  40745. tok('XRANGE');
  40746. src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$';
  40747. tok('XRANGELOOSE');
  40748. src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$';
  40749. tok('COERCE');
  40750. src[t.COERCE] = '(^|[^\\d])' + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:$|[^\\d])';
  40751. tok('COERCERTL');
  40752. re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g');
  40753. tok('LONETILDE');
  40754. src[t.LONETILDE] = '(?:~>?)';
  40755. tok('TILDETRIM');
  40756. src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+';
  40757. re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g');
  40758. var tildeTrimReplace = '$1~';
  40759. tok('TILDE');
  40760. src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$';
  40761. tok('TILDELOOSE');
  40762. src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$';
  40763. tok('LONECARET');
  40764. src[t.LONECARET] = '(?:\\^)';
  40765. tok('CARETTRIM');
  40766. src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+';
  40767. re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g');
  40768. var caretTrimReplace = '$1^';
  40769. tok('CARET');
  40770. src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$';
  40771. tok('CARETLOOSE');
  40772. src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$';
  40773. tok('COMPARATORLOOSE');
  40774. src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$';
  40775. tok('COMPARATOR');
  40776. src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$';
  40777. tok('COMPARATORTRIM');
  40778. src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')';
  40779. re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g');
  40780. var comparatorTrimReplace = '$1$2$3';
  40781. tok('HYPHENRANGE');
  40782. src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' + '\\s+-\\s+' + '(' + src[t.XRANGEPLAIN] + ')' + '\\s*$';
  40783. tok('HYPHENRANGELOOSE');
  40784. src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' + '\\s+-\\s+' + '(' + src[t.XRANGEPLAINLOOSE] + ')' + '\\s*$';
  40785. tok('STAR');
  40786. src[t.STAR] = '(<|>)?=?\\s*\\*';
  40787. for (var i = 0; i < R; i++) {
  40788. debug(i, src[i]);
  40789. if (!re[i]) {
  40790. re[i] = new RegExp(src[i]);
  40791. }
  40792. }
  40793. exports.parse = parse;
  40794. function parse(version, options) {
  40795. if (!options || typeof options !== 'object') {
  40796. options = {
  40797. loose: !!options,
  40798. includePrerelease: false
  40799. };
  40800. }
  40801. if (version instanceof SemVer) {
  40802. return version;
  40803. }
  40804. if (typeof version !== 'string') {
  40805. return null;
  40806. }
  40807. if (version.length > MAX_LENGTH) {
  40808. return null;
  40809. }
  40810. var r = options.loose ? re[t.LOOSE] : re[t.FULL];
  40811. if (!r.test(version)) {
  40812. return null;
  40813. }
  40814. try {
  40815. return new SemVer(version, options);
  40816. } catch (er) {
  40817. return null;
  40818. }
  40819. }
  40820. exports.valid = valid;
  40821. function valid(version, options) {
  40822. var v = parse(version, options);
  40823. return v ? v.version : null;
  40824. }
  40825. exports.clean = clean;
  40826. function clean(version, options) {
  40827. var s = parse(version.trim().replace(/^[=v]+/, ''), options);
  40828. return s ? s.version : null;
  40829. }
  40830. exports.SemVer = SemVer;
  40831. function SemVer(version, options) {
  40832. if (!options || typeof options !== 'object') {
  40833. options = {
  40834. loose: !!options,
  40835. includePrerelease: false
  40836. };
  40837. }
  40838. if (version instanceof SemVer) {
  40839. if (version.loose === options.loose) {
  40840. return version;
  40841. } else {
  40842. version = version.version;
  40843. }
  40844. } else if (typeof version !== 'string') {
  40845. throw new TypeError('Invalid Version: ' + version);
  40846. }
  40847. if (version.length > MAX_LENGTH) {
  40848. throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters');
  40849. }
  40850. if (!(this instanceof SemVer)) {
  40851. return new SemVer(version, options);
  40852. }
  40853. debug('SemVer', version, options);
  40854. this.options = options;
  40855. this.loose = !!options.loose;
  40856. var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
  40857. if (!m) {
  40858. throw new TypeError('Invalid Version: ' + version);
  40859. }
  40860. this.raw = version;
  40861. this.major = +m[1];
  40862. this.minor = +m[2];
  40863. this.patch = +m[3];
  40864. if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
  40865. throw new TypeError('Invalid major version');
  40866. }
  40867. if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
  40868. throw new TypeError('Invalid minor version');
  40869. }
  40870. if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
  40871. throw new TypeError('Invalid patch version');
  40872. }
  40873. if (!m[4]) {
  40874. this.prerelease = [];
  40875. } else {
  40876. this.prerelease = m[4].split('.').map(function (id) {
  40877. if (/^[0-9]+$/.test(id)) {
  40878. var num = +id;
  40879. if (num >= 0 && num < MAX_SAFE_INTEGER) {
  40880. return num;
  40881. }
  40882. }
  40883. return id;
  40884. });
  40885. }
  40886. this.build = m[5] ? m[5].split('.') : [];
  40887. this.format();
  40888. }
  40889. SemVer.prototype.format = function () {
  40890. this.version = this.major + '.' + this.minor + '.' + this.patch;
  40891. if (this.prerelease.length) {
  40892. this.version += '-' + this.prerelease.join('.');
  40893. }
  40894. return this.version;
  40895. };
  40896. SemVer.prototype.toString = function () {
  40897. return this.version;
  40898. };
  40899. SemVer.prototype.compare = function (other) {
  40900. debug('SemVer.compare', this.version, this.options, other);
  40901. if (!(other instanceof SemVer)) {
  40902. other = new SemVer(other, this.options);
  40903. }
  40904. return this.compareMain(other) || this.comparePre(other);
  40905. };
  40906. SemVer.prototype.compareMain = function (other) {
  40907. if (!(other instanceof SemVer)) {
  40908. other = new SemVer(other, this.options);
  40909. }
  40910. return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
  40911. };
  40912. SemVer.prototype.comparePre = function (other) {
  40913. if (!(other instanceof SemVer)) {
  40914. other = new SemVer(other, this.options);
  40915. }
  40916. if (this.prerelease.length && !other.prerelease.length) {
  40917. return -1;
  40918. } else if (!this.prerelease.length && other.prerelease.length) {
  40919. return 1;
  40920. } else if (!this.prerelease.length && !other.prerelease.length) {
  40921. return 0;
  40922. }
  40923. var i = 0;
  40924. do {
  40925. var a = this.prerelease[i];
  40926. var b = other.prerelease[i];
  40927. debug('prerelease compare', i, a, b);
  40928. if (a === undefined && b === undefined) {
  40929. return 0;
  40930. } else if (b === undefined) {
  40931. return 1;
  40932. } else if (a === undefined) {
  40933. return -1;
  40934. } else if (a === b) {
  40935. continue;
  40936. } else {
  40937. return compareIdentifiers(a, b);
  40938. }
  40939. } while (++i);
  40940. };
  40941. SemVer.prototype.compareBuild = function (other) {
  40942. if (!(other instanceof SemVer)) {
  40943. other = new SemVer(other, this.options);
  40944. }
  40945. var i = 0;
  40946. do {
  40947. var a = this.build[i];
  40948. var b = other.build[i];
  40949. debug('prerelease compare', i, a, b);
  40950. if (a === undefined && b === undefined) {
  40951. return 0;
  40952. } else if (b === undefined) {
  40953. return 1;
  40954. } else if (a === undefined) {
  40955. return -1;
  40956. } else if (a === b) {
  40957. continue;
  40958. } else {
  40959. return compareIdentifiers(a, b);
  40960. }
  40961. } while (++i);
  40962. };
  40963. SemVer.prototype.inc = function (release, identifier) {
  40964. switch (release) {
  40965. case 'premajor':
  40966. this.prerelease.length = 0;
  40967. this.patch = 0;
  40968. this.minor = 0;
  40969. this.major++;
  40970. this.inc('pre', identifier);
  40971. break;
  40972. case 'preminor':
  40973. this.prerelease.length = 0;
  40974. this.patch = 0;
  40975. this.minor++;
  40976. this.inc('pre', identifier);
  40977. break;
  40978. case 'prepatch':
  40979. this.prerelease.length = 0;
  40980. this.inc('patch', identifier);
  40981. this.inc('pre', identifier);
  40982. break;
  40983. case 'prerelease':
  40984. if (this.prerelease.length === 0) {
  40985. this.inc('patch', identifier);
  40986. }
  40987. this.inc('pre', identifier);
  40988. break;
  40989. case 'major':
  40990. if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
  40991. this.major++;
  40992. }
  40993. this.minor = 0;
  40994. this.patch = 0;
  40995. this.prerelease = [];
  40996. break;
  40997. case 'minor':
  40998. if (this.patch !== 0 || this.prerelease.length === 0) {
  40999. this.minor++;
  41000. }
  41001. this.patch = 0;
  41002. this.prerelease = [];
  41003. break;
  41004. case 'patch':
  41005. if (this.prerelease.length === 0) {
  41006. this.patch++;
  41007. }
  41008. this.prerelease = [];
  41009. break;
  41010. case 'pre':
  41011. if (this.prerelease.length === 0) {
  41012. this.prerelease = [0];
  41013. } else {
  41014. var i = this.prerelease.length;
  41015. while (--i >= 0) {
  41016. if (typeof this.prerelease[i] === 'number') {
  41017. this.prerelease[i]++;
  41018. i = -2;
  41019. }
  41020. }
  41021. if (i === -1) {
  41022. this.prerelease.push(0);
  41023. }
  41024. }
  41025. if (identifier) {
  41026. if (this.prerelease[0] === identifier) {
  41027. if (isNaN(this.prerelease[1])) {
  41028. this.prerelease = [identifier, 0];
  41029. }
  41030. } else {
  41031. this.prerelease = [identifier, 0];
  41032. }
  41033. }
  41034. break;
  41035. default:
  41036. throw new Error('invalid increment argument: ' + release);
  41037. }
  41038. this.format();
  41039. this.raw = this.version;
  41040. return this;
  41041. };
  41042. exports.inc = inc;
  41043. function inc(version, release, loose, identifier) {
  41044. if (typeof loose === 'string') {
  41045. identifier = loose;
  41046. loose = undefined;
  41047. }
  41048. try {
  41049. return new SemVer(version, loose).inc(release, identifier).version;
  41050. } catch (er) {
  41051. return null;
  41052. }
  41053. }
  41054. exports.diff = diff;
  41055. function diff(version1, version2) {
  41056. if (eq(version1, version2)) {
  41057. return null;
  41058. } else {
  41059. var v1 = parse(version1);
  41060. var v2 = parse(version2);
  41061. var prefix = '';
  41062. if (v1.prerelease.length || v2.prerelease.length) {
  41063. prefix = 'pre';
  41064. var defaultResult = 'prerelease';
  41065. }
  41066. for (var key in v1) {
  41067. if (key === 'major' || key === 'minor' || key === 'patch') {
  41068. if (v1[key] !== v2[key]) {
  41069. return prefix + key;
  41070. }
  41071. }
  41072. }
  41073. return defaultResult;
  41074. }
  41075. }
  41076. exports.compareIdentifiers = compareIdentifiers;
  41077. var numeric = /^[0-9]+$/;
  41078. function compareIdentifiers(a, b) {
  41079. var anum = numeric.test(a);
  41080. var bnum = numeric.test(b);
  41081. if (anum && bnum) {
  41082. a = +a;
  41083. b = +b;
  41084. }
  41085. return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
  41086. }
  41087. exports.rcompareIdentifiers = rcompareIdentifiers;
  41088. function rcompareIdentifiers(a, b) {
  41089. return compareIdentifiers(b, a);
  41090. }
  41091. exports.major = major;
  41092. function major(a, loose) {
  41093. return new SemVer(a, loose).major;
  41094. }
  41095. exports.minor = minor;
  41096. function minor(a, loose) {
  41097. return new SemVer(a, loose).minor;
  41098. }
  41099. exports.patch = patch;
  41100. function patch(a, loose) {
  41101. return new SemVer(a, loose).patch;
  41102. }
  41103. exports.compare = compare;
  41104. function compare(a, b, loose) {
  41105. return new SemVer(a, loose).compare(new SemVer(b, loose));
  41106. }
  41107. exports.compareLoose = compareLoose;
  41108. function compareLoose(a, b) {
  41109. return compare(a, b, true);
  41110. }
  41111. exports.compareBuild = compareBuild;
  41112. function compareBuild(a, b, loose) {
  41113. var versionA = new SemVer(a, loose);
  41114. var versionB = new SemVer(b, loose);
  41115. return versionA.compare(versionB) || versionA.compareBuild(versionB);
  41116. }
  41117. exports.rcompare = rcompare;
  41118. function rcompare(a, b, loose) {
  41119. return compare(b, a, loose);
  41120. }
  41121. exports.sort = sort;
  41122. function sort(list, loose) {
  41123. return list.sort(function (a, b) {
  41124. return exports.compareBuild(a, b, loose);
  41125. });
  41126. }
  41127. exports.rsort = rsort;
  41128. function rsort(list, loose) {
  41129. return list.sort(function (a, b) {
  41130. return exports.compareBuild(b, a, loose);
  41131. });
  41132. }
  41133. exports.gt = gt;
  41134. function gt(a, b, loose) {
  41135. return compare(a, b, loose) > 0;
  41136. }
  41137. exports.lt = lt;
  41138. function lt(a, b, loose) {
  41139. return compare(a, b, loose) < 0;
  41140. }
  41141. exports.eq = eq;
  41142. function eq(a, b, loose) {
  41143. return compare(a, b, loose) === 0;
  41144. }
  41145. exports.neq = neq;
  41146. function neq(a, b, loose) {
  41147. return compare(a, b, loose) !== 0;
  41148. }
  41149. exports.gte = gte;
  41150. function gte(a, b, loose) {
  41151. return compare(a, b, loose) >= 0;
  41152. }
  41153. exports.lte = lte;
  41154. function lte(a, b, loose) {
  41155. return compare(a, b, loose) <= 0;
  41156. }
  41157. exports.cmp = cmp;
  41158. function cmp(a, op, b, loose) {
  41159. switch (op) {
  41160. case '===':
  41161. if (typeof a === 'object') a = a.version;
  41162. if (typeof b === 'object') b = b.version;
  41163. return a === b;
  41164. case '!==':
  41165. if (typeof a === 'object') a = a.version;
  41166. if (typeof b === 'object') b = b.version;
  41167. return a !== b;
  41168. case '':
  41169. case '=':
  41170. case '==':
  41171. return eq(a, b, loose);
  41172. case '!=':
  41173. return neq(a, b, loose);
  41174. case '>':
  41175. return gt(a, b, loose);
  41176. case '>=':
  41177. return gte(a, b, loose);
  41178. case '<':
  41179. return lt(a, b, loose);
  41180. case '<=':
  41181. return lte(a, b, loose);
  41182. default:
  41183. throw new TypeError('Invalid operator: ' + op);
  41184. }
  41185. }
  41186. exports.Comparator = Comparator;
  41187. function Comparator(comp, options) {
  41188. if (!options || typeof options !== 'object') {
  41189. options = {
  41190. loose: !!options,
  41191. includePrerelease: false
  41192. };
  41193. }
  41194. if (comp instanceof Comparator) {
  41195. if (comp.loose === !!options.loose) {
  41196. return comp;
  41197. } else {
  41198. comp = comp.value;
  41199. }
  41200. }
  41201. if (!(this instanceof Comparator)) {
  41202. return new Comparator(comp, options);
  41203. }
  41204. debug('comparator', comp, options);
  41205. this.options = options;
  41206. this.loose = !!options.loose;
  41207. this.parse(comp);
  41208. if (this.semver === ANY) {
  41209. this.value = '';
  41210. } else {
  41211. this.value = this.operator + this.semver.version;
  41212. }
  41213. debug('comp', this);
  41214. }
  41215. var ANY = {};
  41216. Comparator.prototype.parse = function (comp) {
  41217. var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
  41218. var m = comp.match(r);
  41219. if (!m) {
  41220. throw new TypeError('Invalid comparator: ' + comp);
  41221. }
  41222. this.operator = m[1] !== undefined ? m[1] : '';
  41223. if (this.operator === '=') {
  41224. this.operator = '';
  41225. }
  41226. if (!m[2]) {
  41227. this.semver = ANY;
  41228. } else {
  41229. this.semver = new SemVer(m[2], this.options.loose);
  41230. }
  41231. };
  41232. Comparator.prototype.toString = function () {
  41233. return this.value;
  41234. };
  41235. Comparator.prototype.test = function (version) {
  41236. debug('Comparator.test', version, this.options.loose);
  41237. if (this.semver === ANY || version === ANY) {
  41238. return true;
  41239. }
  41240. if (typeof version === 'string') {
  41241. try {
  41242. version = new SemVer(version, this.options);
  41243. } catch (er) {
  41244. return false;
  41245. }
  41246. }
  41247. return cmp(version, this.operator, this.semver, this.options);
  41248. };
  41249. Comparator.prototype.intersects = function (comp, options) {
  41250. if (!(comp instanceof Comparator)) {
  41251. throw new TypeError('a Comparator is required');
  41252. }
  41253. if (!options || typeof options !== 'object') {
  41254. options = {
  41255. loose: !!options,
  41256. includePrerelease: false
  41257. };
  41258. }
  41259. var rangeTmp;
  41260. if (this.operator === '') {
  41261. if (this.value === '') {
  41262. return true;
  41263. }
  41264. rangeTmp = new Range(comp.value, options);
  41265. return satisfies(this.value, rangeTmp, options);
  41266. } else if (comp.operator === '') {
  41267. if (comp.value === '') {
  41268. return true;
  41269. }
  41270. rangeTmp = new Range(this.value, options);
  41271. return satisfies(comp.semver, rangeTmp, options);
  41272. }
  41273. var sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>');
  41274. var sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<');
  41275. var sameSemVer = this.semver.version === comp.semver.version;
  41276. var differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<=');
  41277. var oppositeDirectionsLessThan = cmp(this.semver, '<', comp.semver, options) && (this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<');
  41278. var oppositeDirectionsGreaterThan = cmp(this.semver, '>', comp.semver, options) && (this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>');
  41279. return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
  41280. };
  41281. exports.Range = Range;
  41282. function Range(range, options) {
  41283. if (!options || typeof options !== 'object') {
  41284. options = {
  41285. loose: !!options,
  41286. includePrerelease: false
  41287. };
  41288. }
  41289. if (range instanceof Range) {
  41290. if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
  41291. return range;
  41292. } else {
  41293. return new Range(range.raw, options);
  41294. }
  41295. }
  41296. if (range instanceof Comparator) {
  41297. return new Range(range.value, options);
  41298. }
  41299. if (!(this instanceof Range)) {
  41300. return new Range(range, options);
  41301. }
  41302. this.options = options;
  41303. this.loose = !!options.loose;
  41304. this.includePrerelease = !!options.includePrerelease;
  41305. this.raw = range;
  41306. this.set = range.split(/\s*\|\|\s*/).map(function (range) {
  41307. return this.parseRange(range.trim());
  41308. }, this).filter(function (c) {
  41309. return c.length;
  41310. });
  41311. if (!this.set.length) {
  41312. throw new TypeError('Invalid SemVer Range: ' + range);
  41313. }
  41314. this.format();
  41315. }
  41316. Range.prototype.format = function () {
  41317. this.range = this.set.map(function (comps) {
  41318. return comps.join(' ').trim();
  41319. }).join('||').trim();
  41320. return this.range;
  41321. };
  41322. Range.prototype.toString = function () {
  41323. return this.range;
  41324. };
  41325. Range.prototype.parseRange = function (range) {
  41326. var loose = this.options.loose;
  41327. range = range.trim();
  41328. var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
  41329. range = range.replace(hr, hyphenReplace);
  41330. debug('hyphen replace', range);
  41331. range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
  41332. debug('comparator trim', range, re[t.COMPARATORTRIM]);
  41333. range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
  41334. range = range.replace(re[t.CARETTRIM], caretTrimReplace);
  41335. range = range.split(/\s+/).join(' ');
  41336. var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
  41337. var set = range.split(' ').map(function (comp) {
  41338. return parseComparator(comp, this.options);
  41339. }, this).join(' ').split(/\s+/);
  41340. if (this.options.loose) {
  41341. set = set.filter(function (comp) {
  41342. return !!comp.match(compRe);
  41343. });
  41344. }
  41345. set = set.map(function (comp) {
  41346. return new Comparator(comp, this.options);
  41347. }, this);
  41348. return set;
  41349. };
  41350. Range.prototype.intersects = function (range, options) {
  41351. if (!(range instanceof Range)) {
  41352. throw new TypeError('a Range is required');
  41353. }
  41354. return this.set.some(function (thisComparators) {
  41355. return isSatisfiable(thisComparators, options) && range.set.some(function (rangeComparators) {
  41356. return isSatisfiable(rangeComparators, options) && thisComparators.every(function (thisComparator) {
  41357. return rangeComparators.every(function (rangeComparator) {
  41358. return thisComparator.intersects(rangeComparator, options);
  41359. });
  41360. });
  41361. });
  41362. });
  41363. };
  41364. function isSatisfiable(comparators, options) {
  41365. var result = true;
  41366. var remainingComparators = comparators.slice();
  41367. var testComparator = remainingComparators.pop();
  41368. while (result && remainingComparators.length) {
  41369. result = remainingComparators.every(function (otherComparator) {
  41370. return testComparator.intersects(otherComparator, options);
  41371. });
  41372. testComparator = remainingComparators.pop();
  41373. }
  41374. return result;
  41375. }
  41376. exports.toComparators = toComparators;
  41377. function toComparators(range, options) {
  41378. return new Range(range, options).set.map(function (comp) {
  41379. return comp.map(function (c) {
  41380. return c.value;
  41381. }).join(' ').trim().split(' ');
  41382. });
  41383. }
  41384. function parseComparator(comp, options) {
  41385. debug('comp', comp, options);
  41386. comp = replaceCarets(comp, options);
  41387. debug('caret', comp);
  41388. comp = replaceTildes(comp, options);
  41389. debug('tildes', comp);
  41390. comp = replaceXRanges(comp, options);
  41391. debug('xrange', comp);
  41392. comp = replaceStars(comp, options);
  41393. debug('stars', comp);
  41394. return comp;
  41395. }
  41396. function isX(id) {
  41397. return !id || id.toLowerCase() === 'x' || id === '*';
  41398. }
  41399. function replaceTildes(comp, options) {
  41400. return comp.trim().split(/\s+/).map(function (comp) {
  41401. return replaceTilde(comp, options);
  41402. }).join(' ');
  41403. }
  41404. function replaceTilde(comp, options) {
  41405. var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
  41406. return comp.replace(r, function (_, M, m, p, pr) {
  41407. debug('tilde', comp, _, M, m, p, pr);
  41408. var ret;
  41409. if (isX(M)) {
  41410. ret = '';
  41411. } else if (isX(m)) {
  41412. ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
  41413. } else if (isX(p)) {
  41414. ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
  41415. } else if (pr) {
  41416. debug('replaceTilde pr', pr);
  41417. ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + (+m + 1) + '.0';
  41418. } else {
  41419. ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0';
  41420. }
  41421. debug('tilde return', ret);
  41422. return ret;
  41423. });
  41424. }
  41425. function replaceCarets(comp, options) {
  41426. return comp.trim().split(/\s+/).map(function (comp) {
  41427. return replaceCaret(comp, options);
  41428. }).join(' ');
  41429. }
  41430. function replaceCaret(comp, options) {
  41431. debug('caret', comp, options);
  41432. var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
  41433. return comp.replace(r, function (_, M, m, p, pr) {
  41434. debug('caret', comp, _, M, m, p, pr);
  41435. var ret;
  41436. if (isX(M)) {
  41437. ret = '';
  41438. } else if (isX(m)) {
  41439. ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
  41440. } else if (isX(p)) {
  41441. if (M === '0') {
  41442. ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
  41443. } else {
  41444. ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';
  41445. }
  41446. } else if (pr) {
  41447. debug('replaceCaret pr', pr);
  41448. if (M === '0') {
  41449. if (m === '0') {
  41450. ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + m + '.' + (+p + 1);
  41451. } else {
  41452. ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + (+m + 1) + '.0';
  41453. }
  41454. } else {
  41455. ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + (+M + 1) + '.0.0';
  41456. }
  41457. } else {
  41458. debug('no pr');
  41459. if (M === '0') {
  41460. if (m === '0') {
  41461. ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + m + '.' + (+p + 1);
  41462. } else {
  41463. ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0';
  41464. }
  41465. } else {
  41466. ret = '>=' + M + '.' + m + '.' + p + ' <' + (+M + 1) + '.0.0';
  41467. }
  41468. }
  41469. debug('caret return', ret);
  41470. return ret;
  41471. });
  41472. }
  41473. function replaceXRanges(comp, options) {
  41474. debug('replaceXRanges', comp, options);
  41475. return comp.split(/\s+/).map(function (comp) {
  41476. return replaceXRange(comp, options);
  41477. }).join(' ');
  41478. }
  41479. function replaceXRange(comp, options) {
  41480. comp = comp.trim();
  41481. var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
  41482. return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
  41483. debug('xRange', comp, ret, gtlt, M, m, p, pr);
  41484. var xM = isX(M);
  41485. var xm = xM || isX(m);
  41486. var xp = xm || isX(p);
  41487. var anyX = xp;
  41488. if (gtlt === '=' && anyX) {
  41489. gtlt = '';
  41490. }
  41491. pr = options.includePrerelease ? '-0' : '';
  41492. if (xM) {
  41493. if (gtlt === '>' || gtlt === '<') {
  41494. ret = '<0.0.0-0';
  41495. } else {
  41496. ret = '*';
  41497. }
  41498. } else if (gtlt && anyX) {
  41499. if (xm) {
  41500. m = 0;
  41501. }
  41502. p = 0;
  41503. if (gtlt === '>') {
  41504. gtlt = '>=';
  41505. if (xm) {
  41506. M = +M + 1;
  41507. m = 0;
  41508. p = 0;
  41509. } else {
  41510. m = +m + 1;
  41511. p = 0;
  41512. }
  41513. } else if (gtlt === '<=') {
  41514. gtlt = '<';
  41515. if (xm) {
  41516. M = +M + 1;
  41517. } else {
  41518. m = +m + 1;
  41519. }
  41520. }
  41521. ret = gtlt + M + '.' + m + '.' + p + pr;
  41522. } else if (xm) {
  41523. ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr;
  41524. } else if (xp) {
  41525. ret = '>=' + M + '.' + m + '.0' + pr + ' <' + M + '.' + (+m + 1) + '.0' + pr;
  41526. }
  41527. debug('xRange return', ret);
  41528. return ret;
  41529. });
  41530. }
  41531. function replaceStars(comp, options) {
  41532. debug('replaceStars', comp, options);
  41533. return comp.trim().replace(re[t.STAR], '');
  41534. }
  41535. function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) {
  41536. if (isX(fM)) {
  41537. from = '';
  41538. } else if (isX(fm)) {
  41539. from = '>=' + fM + '.0.0';
  41540. } else if (isX(fp)) {
  41541. from = '>=' + fM + '.' + fm + '.0';
  41542. } else {
  41543. from = '>=' + from;
  41544. }
  41545. if (isX(tM)) {
  41546. to = '';
  41547. } else if (isX(tm)) {
  41548. to = '<' + (+tM + 1) + '.0.0';
  41549. } else if (isX(tp)) {
  41550. to = '<' + tM + '.' + (+tm + 1) + '.0';
  41551. } else if (tpr) {
  41552. to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
  41553. } else {
  41554. to = '<=' + to;
  41555. }
  41556. return (from + ' ' + to).trim();
  41557. }
  41558. Range.prototype.test = function (version) {
  41559. if (!version) {
  41560. return false;
  41561. }
  41562. if (typeof version === 'string') {
  41563. try {
  41564. version = new SemVer(version, this.options);
  41565. } catch (er) {
  41566. return false;
  41567. }
  41568. }
  41569. for (var i = 0; i < this.set.length; i++) {
  41570. if (testSet(this.set[i], version, this.options)) {
  41571. return true;
  41572. }
  41573. }
  41574. return false;
  41575. };
  41576. function testSet(set, version, options) {
  41577. for (var i = 0; i < set.length; i++) {
  41578. if (!set[i].test(version)) {
  41579. return false;
  41580. }
  41581. }
  41582. if (version.prerelease.length && !options.includePrerelease) {
  41583. for (i = 0; i < set.length; i++) {
  41584. debug(set[i].semver);
  41585. if (set[i].semver === ANY) {
  41586. continue;
  41587. }
  41588. if (set[i].semver.prerelease.length > 0) {
  41589. var allowed = set[i].semver;
  41590. if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
  41591. return true;
  41592. }
  41593. }
  41594. }
  41595. return false;
  41596. }
  41597. return true;
  41598. }
  41599. exports.satisfies = satisfies;
  41600. function satisfies(version, range, options) {
  41601. try {
  41602. range = new Range(range, options);
  41603. } catch (er) {
  41604. return false;
  41605. }
  41606. return range.test(version);
  41607. }
  41608. exports.maxSatisfying = maxSatisfying;
  41609. function maxSatisfying(versions, range, options) {
  41610. var max = null;
  41611. var maxSV = null;
  41612. try {
  41613. var rangeObj = new Range(range, options);
  41614. } catch (er) {
  41615. return null;
  41616. }
  41617. versions.forEach(function (v) {
  41618. if (rangeObj.test(v)) {
  41619. if (!max || maxSV.compare(v) === -1) {
  41620. max = v;
  41621. maxSV = new SemVer(max, options);
  41622. }
  41623. }
  41624. });
  41625. return max;
  41626. }
  41627. exports.minSatisfying = minSatisfying;
  41628. function minSatisfying(versions, range, options) {
  41629. var min = null;
  41630. var minSV = null;
  41631. try {
  41632. var rangeObj = new Range(range, options);
  41633. } catch (er) {
  41634. return null;
  41635. }
  41636. versions.forEach(function (v) {
  41637. if (rangeObj.test(v)) {
  41638. if (!min || minSV.compare(v) === 1) {
  41639. min = v;
  41640. minSV = new SemVer(min, options);
  41641. }
  41642. }
  41643. });
  41644. return min;
  41645. }
  41646. exports.minVersion = minVersion;
  41647. function minVersion(range, loose) {
  41648. range = new Range(range, loose);
  41649. var minver = new SemVer('0.0.0');
  41650. if (range.test(minver)) {
  41651. return minver;
  41652. }
  41653. minver = new SemVer('0.0.0-0');
  41654. if (range.test(minver)) {
  41655. return minver;
  41656. }
  41657. minver = null;
  41658. for (var i = 0; i < range.set.length; ++i) {
  41659. var comparators = range.set[i];
  41660. comparators.forEach(function (comparator) {
  41661. var compver = new SemVer(comparator.semver.version);
  41662. switch (comparator.operator) {
  41663. case '>':
  41664. if (compver.prerelease.length === 0) {
  41665. compver.patch++;
  41666. } else {
  41667. compver.prerelease.push(0);
  41668. }
  41669. compver.raw = compver.format();
  41670. case '':
  41671. case '>=':
  41672. if (!minver || gt(minver, compver)) {
  41673. minver = compver;
  41674. }
  41675. break;
  41676. case '<':
  41677. case '<=':
  41678. break;
  41679. default:
  41680. throw new Error('Unexpected operation: ' + comparator.operator);
  41681. }
  41682. });
  41683. }
  41684. if (minver && range.test(minver)) {
  41685. return minver;
  41686. }
  41687. return null;
  41688. }
  41689. exports.validRange = validRange;
  41690. function validRange(range, options) {
  41691. try {
  41692. return new Range(range, options).range || '*';
  41693. } catch (er) {
  41694. return null;
  41695. }
  41696. }
  41697. exports.ltr = ltr;
  41698. function ltr(version, range, options) {
  41699. return outside(version, range, '<', options);
  41700. }
  41701. exports.gtr = gtr;
  41702. function gtr(version, range, options) {
  41703. return outside(version, range, '>', options);
  41704. }
  41705. exports.outside = outside;
  41706. function outside(version, range, hilo, options) {
  41707. version = new SemVer(version, options);
  41708. range = new Range(range, options);
  41709. var gtfn, ltefn, ltfn, comp, ecomp;
  41710. switch (hilo) {
  41711. case '>':
  41712. gtfn = gt;
  41713. ltefn = lte;
  41714. ltfn = lt;
  41715. comp = '>';
  41716. ecomp = '>=';
  41717. break;
  41718. case '<':
  41719. gtfn = lt;
  41720. ltefn = gte;
  41721. ltfn = gt;
  41722. comp = '<';
  41723. ecomp = '<=';
  41724. break;
  41725. default:
  41726. throw new TypeError('Must provide a hilo val of "<" or ">"');
  41727. }
  41728. if (satisfies(version, range, options)) {
  41729. return false;
  41730. }
  41731. for (var i = 0; i < range.set.length; ++i) {
  41732. var comparators = range.set[i];
  41733. var high = null;
  41734. var low = null;
  41735. comparators.forEach(function (comparator) {
  41736. if (comparator.semver === ANY) {
  41737. comparator = new Comparator('>=0.0.0');
  41738. }
  41739. high = high || comparator;
  41740. low = low || comparator;
  41741. if (gtfn(comparator.semver, high.semver, options)) {
  41742. high = comparator;
  41743. } else if (ltfn(comparator.semver, low.semver, options)) {
  41744. low = comparator;
  41745. }
  41746. });
  41747. if (high.operator === comp || high.operator === ecomp) {
  41748. return false;
  41749. }
  41750. if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
  41751. return false;
  41752. } else if (low.operator === ecomp && ltfn(version, low.semver)) {
  41753. return false;
  41754. }
  41755. }
  41756. return true;
  41757. }
  41758. exports.prerelease = prerelease;
  41759. function prerelease(version, options) {
  41760. var parsed = parse(version, options);
  41761. return parsed && parsed.prerelease.length ? parsed.prerelease : null;
  41762. }
  41763. exports.intersects = intersects;
  41764. function intersects(r1, r2, options) {
  41765. r1 = new Range(r1, options);
  41766. r2 = new Range(r2, options);
  41767. return r1.intersects(r2);
  41768. }
  41769. exports.coerce = coerce;
  41770. function coerce(version, options) {
  41771. if (version instanceof SemVer) {
  41772. return version;
  41773. }
  41774. if (typeof version === 'number') {
  41775. version = String(version);
  41776. }
  41777. if (typeof version !== 'string') {
  41778. return null;
  41779. }
  41780. options = options || {};
  41781. var match = null;
  41782. if (!options.rtl) {
  41783. match = version.match(re[t.COERCE]);
  41784. } else {
  41785. var next;
  41786. while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) {
  41787. if (!match || next.index + next[0].length !== match.index + match[0].length) {
  41788. match = next;
  41789. }
  41790. re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
  41791. }
  41792. re[t.COERCERTL].lastIndex = -1;
  41793. }
  41794. if (match === null) {
  41795. return null;
  41796. }
  41797. return parse(match[2] + '.' + (match[3] || '0') + '.' + (match[4] || '0'), options);
  41798. }
  41799. });
  41800. var semver_1 = semver.SEMVER_SPEC_VERSION;
  41801. var semver_2 = semver.re;
  41802. var semver_3 = semver.src;
  41803. var semver_4 = semver.tokens;
  41804. var semver_5 = semver.parse;
  41805. var semver_6 = semver.valid;
  41806. var semver_7 = semver.clean;
  41807. var semver_8 = semver.SemVer;
  41808. var semver_9 = semver.inc;
  41809. var semver_10 = semver.diff;
  41810. var semver_11 = semver.compareIdentifiers;
  41811. var semver_12 = semver.rcompareIdentifiers;
  41812. var semver_13 = semver.major;
  41813. var semver_14 = semver.minor;
  41814. var semver_15 = semver.patch;
  41815. var semver_16 = semver.compare;
  41816. var semver_17 = semver.compareLoose;
  41817. var semver_18 = semver.compareBuild;
  41818. var semver_19 = semver.rcompare;
  41819. var semver_20 = semver.sort;
  41820. var semver_21 = semver.rsort;
  41821. var semver_22 = semver.gt;
  41822. var semver_23 = semver.lt;
  41823. var semver_24 = semver.eq;
  41824. var semver_25 = semver.neq;
  41825. var semver_26 = semver.gte;
  41826. var semver_27 = semver.lte;
  41827. var semver_28 = semver.cmp;
  41828. var semver_29 = semver.Comparator;
  41829. var semver_30 = semver.Range;
  41830. var semver_31 = semver.toComparators;
  41831. var semver_32 = semver.satisfies;
  41832. var semver_33 = semver.maxSatisfying;
  41833. var semver_34 = semver.minSatisfying;
  41834. var semver_35 = semver.minVersion;
  41835. var semver_36 = semver.validRange;
  41836. var semver_37 = semver.ltr;
  41837. var semver_38 = semver.gtr;
  41838. var semver_39 = semver.outside;
  41839. var semver_40 = semver.prerelease;
  41840. var semver_41 = semver.intersects;
  41841. var semver_42 = semver.coerce;
  41842. var errorVisitor = {
  41843. enter: function enter(path, state) {
  41844. var loc = path.node.loc;
  41845. if (loc) {
  41846. state.loc = loc;
  41847. path.stop();
  41848. }
  41849. }
  41850. };
  41851. var File$2 = function () {
  41852. function File(options, _ref) {
  41853. var _this = this;
  41854. var code = _ref.code,
  41855. ast = _ref.ast,
  41856. inputMap = _ref.inputMap;
  41857. this._map = new Map();
  41858. this.declarations = {};
  41859. this.path = null;
  41860. this.ast = {};
  41861. this.metadata = {};
  41862. this.code = "";
  41863. this.inputMap = null;
  41864. this.hub = {
  41865. file: this,
  41866. getCode: function getCode() {
  41867. return _this.code;
  41868. },
  41869. getScope: function getScope() {
  41870. return _this.scope;
  41871. },
  41872. addHelper: this.addHelper.bind(this),
  41873. buildError: this.buildCodeFrameError.bind(this)
  41874. };
  41875. this.opts = options;
  41876. this.code = code;
  41877. this.ast = ast;
  41878. this.inputMap = inputMap;
  41879. this.path = NodePath.get({
  41880. hub: this.hub,
  41881. parentPath: null,
  41882. parent: this.ast,
  41883. container: this.ast,
  41884. key: "program"
  41885. }).setContext();
  41886. this.scope = this.path.scope;
  41887. }
  41888. var _proto = File.prototype;
  41889. _proto.set = function set(key, val) {
  41890. if (key === "helpersNamespace") {
  41891. 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()'.");
  41892. }
  41893. this._map.set(key, val);
  41894. };
  41895. _proto.get = function get(key) {
  41896. return this._map.get(key);
  41897. };
  41898. _proto.has = function has(key) {
  41899. return this._map.has(key);
  41900. };
  41901. _proto.getModuleName = function getModuleName() {
  41902. var _this$opts = this.opts,
  41903. filename = _this$opts.filename,
  41904. _this$opts$filenameRe = _this$opts.filenameRelative,
  41905. filenameRelative = _this$opts$filenameRe === void 0 ? filename : _this$opts$filenameRe,
  41906. moduleId = _this$opts.moduleId,
  41907. _this$opts$moduleIds = _this$opts.moduleIds,
  41908. moduleIds = _this$opts$moduleIds === void 0 ? !!moduleId : _this$opts$moduleIds,
  41909. getModuleId = _this$opts.getModuleId,
  41910. sourceRootTmp = _this$opts.sourceRoot,
  41911. _this$opts$moduleRoot = _this$opts.moduleRoot,
  41912. moduleRoot = _this$opts$moduleRoot === void 0 ? sourceRootTmp : _this$opts$moduleRoot,
  41913. _this$opts$sourceRoot = _this$opts.sourceRoot,
  41914. sourceRoot = _this$opts$sourceRoot === void 0 ? moduleRoot : _this$opts$sourceRoot;
  41915. if (!moduleIds) return null;
  41916. if (moduleId != null && !getModuleId) {
  41917. return moduleId;
  41918. }
  41919. var moduleName = moduleRoot != null ? moduleRoot + "/" : "";
  41920. if (filenameRelative) {
  41921. var sourceRootReplacer = sourceRoot != null ? new RegExp("^" + sourceRoot + "/?") : "";
  41922. moduleName += filenameRelative.replace(sourceRootReplacer, "").replace(/\.(\w*?)$/, "");
  41923. }
  41924. moduleName = moduleName.replace(/\\/g, "/");
  41925. if (getModuleId) {
  41926. return getModuleId(moduleName) || moduleName;
  41927. } else {
  41928. return moduleName;
  41929. }
  41930. };
  41931. _proto.addImport = function addImport() {
  41932. 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'.");
  41933. };
  41934. _proto.availableHelper = function availableHelper(name, versionRange) {
  41935. var minVersion$1;
  41936. try {
  41937. minVersion$1 = minVersion(name);
  41938. } catch (err) {
  41939. if (err.code !== "BABEL_HELPER_UNKNOWN") throw err;
  41940. return false;
  41941. }
  41942. if (typeof versionRange !== "string") return true;
  41943. if (semver.valid(versionRange)) versionRange = "^" + versionRange;
  41944. return !semver.intersects("<" + minVersion$1, versionRange) && !semver.intersects(">=8.0.0", versionRange);
  41945. };
  41946. _proto.addHelper = function addHelper(name) {
  41947. var _this2 = this;
  41948. var declar = this.declarations[name];
  41949. if (declar) return cloneNode(declar);
  41950. var generator = this.get("helperGenerator");
  41951. if (generator) {
  41952. var res = generator(name);
  41953. if (res) return res;
  41954. }
  41955. ensure(name);
  41956. var uid = this.declarations[name] = this.scope.generateUidIdentifier(name);
  41957. var dependencies = {};
  41958. for (var _iterator = getDependencies(name), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  41959. var _ref2;
  41960. if (_isArray) {
  41961. if (_i >= _iterator.length) break;
  41962. _ref2 = _iterator[_i++];
  41963. } else {
  41964. _i = _iterator.next();
  41965. if (_i.done) break;
  41966. _ref2 = _i.value;
  41967. }
  41968. var dep = _ref2;
  41969. dependencies[dep] = this.addHelper(dep);
  41970. }
  41971. var _helpers$get = get$1(name, function (dep) {
  41972. return dependencies[dep];
  41973. }, uid, Object.keys(this.scope.getAllBindings())),
  41974. nodes = _helpers$get.nodes,
  41975. globals = _helpers$get.globals;
  41976. globals.forEach(function (name) {
  41977. if (_this2.path.scope.hasBinding(name, true)) {
  41978. _this2.path.scope.rename(name);
  41979. }
  41980. });
  41981. nodes.forEach(function (node) {
  41982. node._compact = true;
  41983. });
  41984. this.path.unshiftContainer("body", nodes);
  41985. this.path.get("body").forEach(function (path) {
  41986. if (nodes.indexOf(path.node) === -1) return;
  41987. if (path.isVariableDeclaration()) _this2.scope.registerDeclaration(path);
  41988. });
  41989. return uid;
  41990. };
  41991. _proto.addTemplateObject = function addTemplateObject() {
  41992. throw new Error("This function has been moved into the template literal transform itself.");
  41993. };
  41994. _proto.buildCodeFrameError = function buildCodeFrameError(node, msg, Error) {
  41995. if (Error === void 0) {
  41996. Error = SyntaxError;
  41997. }
  41998. var loc = node && (node.loc || node._loc);
  41999. if (!loc && node) {
  42000. var state = {
  42001. loc: null
  42002. };
  42003. traverse$1(node, errorVisitor, this.scope, state);
  42004. loc = state.loc;
  42005. var txt = "This is an error on an internal node. Probably an internal error.";
  42006. if (loc) txt += " Location has been estimated.";
  42007. msg += " (" + txt + ")";
  42008. }
  42009. if (loc) {
  42010. var _this$opts$highlightC = this.opts.highlightCode,
  42011. highlightCode = _this$opts$highlightC === void 0 ? true : _this$opts$highlightC;
  42012. msg += "\n" + codeFrameColumns(this.code, {
  42013. start: {
  42014. line: loc.start.line,
  42015. column: loc.start.column + 1
  42016. },
  42017. end: loc.end && loc.start.line === loc.end.line ? {
  42018. line: loc.end.line,
  42019. column: loc.end.column + 1
  42020. } : undefined
  42021. }, {
  42022. highlightCode: highlightCode
  42023. });
  42024. }
  42025. return new Error(msg);
  42026. };
  42027. _createClass(File, [{
  42028. key: "shebang",
  42029. get: function get() {
  42030. var interpreter = this.path.node.interpreter;
  42031. return interpreter ? interpreter.value : "";
  42032. },
  42033. set: function set(value) {
  42034. if (value) {
  42035. this.path.get("interpreter").replaceWith(InterpreterDirective(value));
  42036. } else {
  42037. this.path.get("interpreter").remove();
  42038. }
  42039. }
  42040. }]);
  42041. return File;
  42042. }();
  42043. function _templateObject$1() {
  42044. var data = _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 "]);
  42045. _templateObject$1 = function _templateObject() {
  42046. return data;
  42047. };
  42048. return data;
  42049. }
  42050. var buildUmdWrapper = function buildUmdWrapper(replacements) {
  42051. return template(_templateObject$1())(replacements);
  42052. };
  42053. function buildGlobal(whitelist) {
  42054. var namespace = Identifier("babelHelpers");
  42055. var body = [];
  42056. var container = FunctionExpression(null, [Identifier("global")], BlockStatement(body));
  42057. var tree = Program([ExpressionStatement(CallExpression(container, [ConditionalExpression(BinaryExpression("===", UnaryExpression("typeof", Identifier("global")), StringLiteral("undefined")), Identifier("self"), Identifier("global"))]))]);
  42058. body.push(VariableDeclaration("var", [VariableDeclarator(namespace, AssignmentExpression("=", MemberExpression(Identifier("global"), namespace), ObjectExpression([])))]));
  42059. buildHelpers(body, namespace, whitelist);
  42060. return tree;
  42061. }
  42062. function buildModule(whitelist) {
  42063. var body = [];
  42064. var refs = buildHelpers(body, null, whitelist);
  42065. body.unshift(ExportNamedDeclaration(null, Object.keys(refs).map(function (name) {
  42066. return ExportSpecifier(cloneNode(refs[name]), Identifier(name));
  42067. })));
  42068. return Program(body, [], "module");
  42069. }
  42070. function buildUmd(whitelist) {
  42071. var namespace = Identifier("babelHelpers");
  42072. var body = [];
  42073. body.push(VariableDeclaration("var", [VariableDeclarator(namespace, Identifier("global"))]));
  42074. buildHelpers(body, namespace, whitelist);
  42075. return Program([buildUmdWrapper({
  42076. FACTORY_PARAMETERS: Identifier("global"),
  42077. BROWSER_ARGUMENTS: AssignmentExpression("=", MemberExpression(Identifier("root"), namespace), ObjectExpression([])),
  42078. COMMON_ARGUMENTS: Identifier("exports"),
  42079. AMD_ARGUMENTS: ArrayExpression([StringLiteral("exports")]),
  42080. FACTORY_BODY: body,
  42081. UMD_ROOT: Identifier("this")
  42082. })]);
  42083. }
  42084. function buildVar(whitelist) {
  42085. var namespace = Identifier("babelHelpers");
  42086. var body = [];
  42087. body.push(VariableDeclaration("var", [VariableDeclarator(namespace, ObjectExpression([]))]));
  42088. var tree = Program(body);
  42089. buildHelpers(body, namespace, whitelist);
  42090. body.push(ExpressionStatement(namespace));
  42091. return tree;
  42092. }
  42093. function buildHelpers(body, namespace, whitelist) {
  42094. var getHelperReference = function getHelperReference(name) {
  42095. return namespace ? MemberExpression(namespace, Identifier(name)) : Identifier("_" + name);
  42096. };
  42097. var refs = {};
  42098. list$1.forEach(function (name) {
  42099. if (whitelist && whitelist.indexOf(name) < 0) return;
  42100. var ref = refs[name] = getHelperReference(name);
  42101. var _helpers$get = get$1(name, getHelperReference, ref),
  42102. nodes = _helpers$get.nodes;
  42103. body.push.apply(body, nodes);
  42104. });
  42105. return refs;
  42106. }
  42107. function babelBuildExternalHelpers (whitelist, outputType) {
  42108. if (outputType === void 0) {
  42109. outputType = "global";
  42110. }
  42111. var tree;
  42112. var build = {
  42113. global: buildGlobal,
  42114. module: buildModule,
  42115. umd: buildUmd,
  42116. "var": buildVar
  42117. }[outputType];
  42118. if (build) {
  42119. tree = build(whitelist);
  42120. } else {
  42121. throw new Error("Unsupported output type " + outputType);
  42122. }
  42123. return generateCode(tree).code;
  42124. }
  42125. var runtime_1 = createCommonjsModule(function (module) {
  42126. var runtime = function (exports) {
  42127. var Op = Object.prototype;
  42128. var hasOwn = Op.hasOwnProperty;
  42129. var undefined$1;
  42130. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  42131. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  42132. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  42133. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  42134. function wrap(innerFn, outerFn, self, tryLocsList) {
  42135. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  42136. var generator = Object.create(protoGenerator.prototype);
  42137. var context = new Context(tryLocsList || []);
  42138. generator._invoke = makeInvokeMethod(innerFn, self, context);
  42139. return generator;
  42140. }
  42141. exports.wrap = wrap;
  42142. function tryCatch(fn, obj, arg) {
  42143. try {
  42144. return {
  42145. type: "normal",
  42146. arg: fn.call(obj, arg)
  42147. };
  42148. } catch (err) {
  42149. return {
  42150. type: "throw",
  42151. arg: err
  42152. };
  42153. }
  42154. }
  42155. var GenStateSuspendedStart = "suspendedStart";
  42156. var GenStateSuspendedYield = "suspendedYield";
  42157. var GenStateExecuting = "executing";
  42158. var GenStateCompleted = "completed";
  42159. var ContinueSentinel = {};
  42160. function Generator() {}
  42161. function GeneratorFunction() {}
  42162. function GeneratorFunctionPrototype() {}
  42163. var IteratorPrototype = {};
  42164. IteratorPrototype[iteratorSymbol] = function () {
  42165. return this;
  42166. };
  42167. var getProto = Object.getPrototypeOf;
  42168. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  42169. if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  42170. IteratorPrototype = NativeIteratorPrototype;
  42171. }
  42172. var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
  42173. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  42174. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  42175. GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction";
  42176. function defineIteratorMethods(prototype) {
  42177. ["next", "throw", "return"].forEach(function (method) {
  42178. prototype[method] = function (arg) {
  42179. return this._invoke(method, arg);
  42180. };
  42181. });
  42182. }
  42183. exports.isGeneratorFunction = function (genFun) {
  42184. var ctor = typeof genFun === "function" && genFun.constructor;
  42185. return ctor ? ctor === GeneratorFunction || (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
  42186. };
  42187. exports.mark = function (genFun) {
  42188. if (Object.setPrototypeOf) {
  42189. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  42190. } else {
  42191. genFun.__proto__ = GeneratorFunctionPrototype;
  42192. if (!(toStringTagSymbol in genFun)) {
  42193. genFun[toStringTagSymbol] = "GeneratorFunction";
  42194. }
  42195. }
  42196. genFun.prototype = Object.create(Gp);
  42197. return genFun;
  42198. };
  42199. exports.awrap = function (arg) {
  42200. return {
  42201. __await: arg
  42202. };
  42203. };
  42204. function AsyncIterator(generator) {
  42205. function invoke(method, arg, resolve, reject) {
  42206. var record = tryCatch(generator[method], generator, arg);
  42207. if (record.type === "throw") {
  42208. reject(record.arg);
  42209. } else {
  42210. var result = record.arg;
  42211. var value = result.value;
  42212. if (value && typeof value === "object" && hasOwn.call(value, "__await")) {
  42213. return Promise.resolve(value.__await).then(function (value) {
  42214. invoke("next", value, resolve, reject);
  42215. }, function (err) {
  42216. invoke("throw", err, resolve, reject);
  42217. });
  42218. }
  42219. return Promise.resolve(value).then(function (unwrapped) {
  42220. result.value = unwrapped;
  42221. resolve(result);
  42222. }, function (error) {
  42223. return invoke("throw", error, resolve, reject);
  42224. });
  42225. }
  42226. }
  42227. var previousPromise;
  42228. function enqueue(method, arg) {
  42229. function callInvokeWithMethodAndArg() {
  42230. return new Promise(function (resolve, reject) {
  42231. invoke(method, arg, resolve, reject);
  42232. });
  42233. }
  42234. return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  42235. }
  42236. this._invoke = enqueue;
  42237. }
  42238. defineIteratorMethods(AsyncIterator.prototype);
  42239. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  42240. return this;
  42241. };
  42242. exports.AsyncIterator = AsyncIterator;
  42243. exports.async = function (innerFn, outerFn, self, tryLocsList) {
  42244. var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList));
  42245. return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
  42246. return result.done ? result.value : iter.next();
  42247. });
  42248. };
  42249. function makeInvokeMethod(innerFn, self, context) {
  42250. var state = GenStateSuspendedStart;
  42251. return function invoke(method, arg) {
  42252. if (state === GenStateExecuting) {
  42253. throw new Error("Generator is already running");
  42254. }
  42255. if (state === GenStateCompleted) {
  42256. if (method === "throw") {
  42257. throw arg;
  42258. }
  42259. return doneResult();
  42260. }
  42261. context.method = method;
  42262. context.arg = arg;
  42263. while (true) {
  42264. var delegate = context.delegate;
  42265. if (delegate) {
  42266. var delegateResult = maybeInvokeDelegate(delegate, context);
  42267. if (delegateResult) {
  42268. if (delegateResult === ContinueSentinel) continue;
  42269. return delegateResult;
  42270. }
  42271. }
  42272. if (context.method === "next") {
  42273. context.sent = context._sent = context.arg;
  42274. } else if (context.method === "throw") {
  42275. if (state === GenStateSuspendedStart) {
  42276. state = GenStateCompleted;
  42277. throw context.arg;
  42278. }
  42279. context.dispatchException(context.arg);
  42280. } else if (context.method === "return") {
  42281. context.abrupt("return", context.arg);
  42282. }
  42283. state = GenStateExecuting;
  42284. var record = tryCatch(innerFn, self, context);
  42285. if (record.type === "normal") {
  42286. state = context.done ? GenStateCompleted : GenStateSuspendedYield;
  42287. if (record.arg === ContinueSentinel) {
  42288. continue;
  42289. }
  42290. return {
  42291. value: record.arg,
  42292. done: context.done
  42293. };
  42294. } else if (record.type === "throw") {
  42295. state = GenStateCompleted;
  42296. context.method = "throw";
  42297. context.arg = record.arg;
  42298. }
  42299. }
  42300. };
  42301. }
  42302. function maybeInvokeDelegate(delegate, context) {
  42303. var method = delegate.iterator[context.method];
  42304. if (method === undefined$1) {
  42305. context.delegate = null;
  42306. if (context.method === "throw") {
  42307. if (delegate.iterator["return"]) {
  42308. context.method = "return";
  42309. context.arg = undefined$1;
  42310. maybeInvokeDelegate(delegate, context);
  42311. if (context.method === "throw") {
  42312. return ContinueSentinel;
  42313. }
  42314. }
  42315. context.method = "throw";
  42316. context.arg = new TypeError("The iterator does not provide a 'throw' method");
  42317. }
  42318. return ContinueSentinel;
  42319. }
  42320. var record = tryCatch(method, delegate.iterator, context.arg);
  42321. if (record.type === "throw") {
  42322. context.method = "throw";
  42323. context.arg = record.arg;
  42324. context.delegate = null;
  42325. return ContinueSentinel;
  42326. }
  42327. var info = record.arg;
  42328. if (!info) {
  42329. context.method = "throw";
  42330. context.arg = new TypeError("iterator result is not an object");
  42331. context.delegate = null;
  42332. return ContinueSentinel;
  42333. }
  42334. if (info.done) {
  42335. context[delegate.resultName] = info.value;
  42336. context.next = delegate.nextLoc;
  42337. if (context.method !== "return") {
  42338. context.method = "next";
  42339. context.arg = undefined$1;
  42340. }
  42341. } else {
  42342. return info;
  42343. }
  42344. context.delegate = null;
  42345. return ContinueSentinel;
  42346. }
  42347. defineIteratorMethods(Gp);
  42348. Gp[toStringTagSymbol] = "Generator";
  42349. Gp[iteratorSymbol] = function () {
  42350. return this;
  42351. };
  42352. Gp.toString = function () {
  42353. return "[object Generator]";
  42354. };
  42355. function pushTryEntry(locs) {
  42356. var entry = {
  42357. tryLoc: locs[0]
  42358. };
  42359. if (1 in locs) {
  42360. entry.catchLoc = locs[1];
  42361. }
  42362. if (2 in locs) {
  42363. entry.finallyLoc = locs[2];
  42364. entry.afterLoc = locs[3];
  42365. }
  42366. this.tryEntries.push(entry);
  42367. }
  42368. function resetTryEntry(entry) {
  42369. var record = entry.completion || {};
  42370. record.type = "normal";
  42371. delete record.arg;
  42372. entry.completion = record;
  42373. }
  42374. function Context(tryLocsList) {
  42375. this.tryEntries = [{
  42376. tryLoc: "root"
  42377. }];
  42378. tryLocsList.forEach(pushTryEntry, this);
  42379. this.reset(true);
  42380. }
  42381. exports.keys = function (object) {
  42382. var keys = [];
  42383. for (var key in object) {
  42384. keys.push(key);
  42385. }
  42386. keys.reverse();
  42387. return function next() {
  42388. while (keys.length) {
  42389. var key = keys.pop();
  42390. if (key in object) {
  42391. next.value = key;
  42392. next.done = false;
  42393. return next;
  42394. }
  42395. }
  42396. next.done = true;
  42397. return next;
  42398. };
  42399. };
  42400. function values(iterable) {
  42401. if (iterable) {
  42402. var iteratorMethod = iterable[iteratorSymbol];
  42403. if (iteratorMethod) {
  42404. return iteratorMethod.call(iterable);
  42405. }
  42406. if (typeof iterable.next === "function") {
  42407. return iterable;
  42408. }
  42409. if (!isNaN(iterable.length)) {
  42410. var i = -1,
  42411. next = function next() {
  42412. while (++i < iterable.length) {
  42413. if (hasOwn.call(iterable, i)) {
  42414. next.value = iterable[i];
  42415. next.done = false;
  42416. return next;
  42417. }
  42418. }
  42419. next.value = undefined$1;
  42420. next.done = true;
  42421. return next;
  42422. };
  42423. return next.next = next;
  42424. }
  42425. }
  42426. return {
  42427. next: doneResult
  42428. };
  42429. }
  42430. exports.values = values;
  42431. function doneResult() {
  42432. return {
  42433. value: undefined$1,
  42434. done: true
  42435. };
  42436. }
  42437. Context.prototype = {
  42438. constructor: Context,
  42439. reset: function reset(skipTempReset) {
  42440. this.prev = 0;
  42441. this.next = 0;
  42442. this.sent = this._sent = undefined$1;
  42443. this.done = false;
  42444. this.delegate = null;
  42445. this.method = "next";
  42446. this.arg = undefined$1;
  42447. this.tryEntries.forEach(resetTryEntry);
  42448. if (!skipTempReset) {
  42449. for (var name in this) {
  42450. if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
  42451. this[name] = undefined$1;
  42452. }
  42453. }
  42454. }
  42455. },
  42456. stop: function stop() {
  42457. this.done = true;
  42458. var rootEntry = this.tryEntries[0];
  42459. var rootRecord = rootEntry.completion;
  42460. if (rootRecord.type === "throw") {
  42461. throw rootRecord.arg;
  42462. }
  42463. return this.rval;
  42464. },
  42465. dispatchException: function dispatchException(exception) {
  42466. if (this.done) {
  42467. throw exception;
  42468. }
  42469. var context = this;
  42470. function handle(loc, caught) {
  42471. record.type = "throw";
  42472. record.arg = exception;
  42473. context.next = loc;
  42474. if (caught) {
  42475. context.method = "next";
  42476. context.arg = undefined$1;
  42477. }
  42478. return !!caught;
  42479. }
  42480. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  42481. var entry = this.tryEntries[i];
  42482. var record = entry.completion;
  42483. if (entry.tryLoc === "root") {
  42484. return handle("end");
  42485. }
  42486. if (entry.tryLoc <= this.prev) {
  42487. var hasCatch = hasOwn.call(entry, "catchLoc");
  42488. var hasFinally = hasOwn.call(entry, "finallyLoc");
  42489. if (hasCatch && hasFinally) {
  42490. if (this.prev < entry.catchLoc) {
  42491. return handle(entry.catchLoc, true);
  42492. } else if (this.prev < entry.finallyLoc) {
  42493. return handle(entry.finallyLoc);
  42494. }
  42495. } else if (hasCatch) {
  42496. if (this.prev < entry.catchLoc) {
  42497. return handle(entry.catchLoc, true);
  42498. }
  42499. } else if (hasFinally) {
  42500. if (this.prev < entry.finallyLoc) {
  42501. return handle(entry.finallyLoc);
  42502. }
  42503. } else {
  42504. throw new Error("try statement without catch or finally");
  42505. }
  42506. }
  42507. }
  42508. },
  42509. abrupt: function abrupt(type, arg) {
  42510. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  42511. var entry = this.tryEntries[i];
  42512. if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
  42513. var finallyEntry = entry;
  42514. break;
  42515. }
  42516. }
  42517. if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
  42518. finallyEntry = null;
  42519. }
  42520. var record = finallyEntry ? finallyEntry.completion : {};
  42521. record.type = type;
  42522. record.arg = arg;
  42523. if (finallyEntry) {
  42524. this.method = "next";
  42525. this.next = finallyEntry.finallyLoc;
  42526. return ContinueSentinel;
  42527. }
  42528. return this.complete(record);
  42529. },
  42530. complete: function complete(record, afterLoc) {
  42531. if (record.type === "throw") {
  42532. throw record.arg;
  42533. }
  42534. if (record.type === "break" || record.type === "continue") {
  42535. this.next = record.arg;
  42536. } else if (record.type === "return") {
  42537. this.rval = this.arg = record.arg;
  42538. this.method = "return";
  42539. this.next = "end";
  42540. } else if (record.type === "normal" && afterLoc) {
  42541. this.next = afterLoc;
  42542. }
  42543. return ContinueSentinel;
  42544. },
  42545. finish: function finish(finallyLoc) {
  42546. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  42547. var entry = this.tryEntries[i];
  42548. if (entry.finallyLoc === finallyLoc) {
  42549. this.complete(entry.completion, entry.afterLoc);
  42550. resetTryEntry(entry);
  42551. return ContinueSentinel;
  42552. }
  42553. }
  42554. },
  42555. "catch": function _catch(tryLoc) {
  42556. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  42557. var entry = this.tryEntries[i];
  42558. if (entry.tryLoc === tryLoc) {
  42559. var record = entry.completion;
  42560. if (record.type === "throw") {
  42561. var thrown = record.arg;
  42562. resetTryEntry(entry);
  42563. }
  42564. return thrown;
  42565. }
  42566. }
  42567. throw new Error("illegal catch attempt");
  42568. },
  42569. delegateYield: function delegateYield(iterable, resultName, nextLoc) {
  42570. this.delegate = {
  42571. iterator: values(iterable),
  42572. resultName: resultName,
  42573. nextLoc: nextLoc
  42574. };
  42575. if (this.method === "next") {
  42576. this.arg = undefined$1;
  42577. }
  42578. return ContinueSentinel;
  42579. }
  42580. };
  42581. return exports;
  42582. }( module.exports );
  42583. try {
  42584. regeneratorRuntime = runtime;
  42585. } catch (accidentalStrictMode) {
  42586. Function("r", "regeneratorRuntime = r")(runtime);
  42587. }
  42588. });
  42589. var regenerator = runtime_1;
  42590. var _marked = regenerator.mark(findConfigUpwards),
  42591. _marked2 = regenerator.mark(findPackageData),
  42592. _marked3 = regenerator.mark(findRelativeConfig),
  42593. _marked4 = regenerator.mark(findRootConfig),
  42594. _marked5 = regenerator.mark(loadConfig);
  42595. function findConfigUpwards(rootDir) {
  42596. return regenerator.wrap(function findConfigUpwards$(_context) {
  42597. while (1) {
  42598. switch (_context.prev = _context.next) {
  42599. case 0:
  42600. return _context.abrupt("return", null);
  42601. case 1:
  42602. case "end":
  42603. return _context.stop();
  42604. }
  42605. }
  42606. }, _marked);
  42607. }
  42608. function findPackageData(filepath) {
  42609. return regenerator.wrap(function findPackageData$(_context2) {
  42610. while (1) {
  42611. switch (_context2.prev = _context2.next) {
  42612. case 0:
  42613. return _context2.abrupt("return", {
  42614. filepath: filepath,
  42615. directories: [],
  42616. pkg: null,
  42617. isPackage: false
  42618. });
  42619. case 1:
  42620. case "end":
  42621. return _context2.stop();
  42622. }
  42623. }
  42624. }, _marked2);
  42625. }
  42626. function findRelativeConfig(pkgData, envName, caller) {
  42627. return regenerator.wrap(function findRelativeConfig$(_context3) {
  42628. while (1) {
  42629. switch (_context3.prev = _context3.next) {
  42630. case 0:
  42631. return _context3.abrupt("return", {
  42632. pkg: null,
  42633. config: null,
  42634. ignore: null
  42635. });
  42636. case 1:
  42637. case "end":
  42638. return _context3.stop();
  42639. }
  42640. }
  42641. }, _marked3);
  42642. }
  42643. function findRootConfig(dirname, envName, caller) {
  42644. return regenerator.wrap(function findRootConfig$(_context4) {
  42645. while (1) {
  42646. switch (_context4.prev = _context4.next) {
  42647. case 0:
  42648. return _context4.abrupt("return", null);
  42649. case 1:
  42650. case "end":
  42651. return _context4.stop();
  42652. }
  42653. }
  42654. }, _marked4);
  42655. }
  42656. function loadConfig(name, dirname, envName, caller) {
  42657. return regenerator.wrap(function loadConfig$(_context5) {
  42658. while (1) {
  42659. switch (_context5.prev = _context5.next) {
  42660. case 0:
  42661. throw new Error("Cannot load " + name + " relative to " + dirname + " in a browser");
  42662. case 1:
  42663. case "end":
  42664. return _context5.stop();
  42665. }
  42666. }
  42667. }, _marked5);
  42668. }
  42669. var ROOT_CONFIG_FILENAMES = [];
  42670. function resolvePlugin(name, dirname) {
  42671. return null;
  42672. }
  42673. function resolvePreset(name, dirname) {
  42674. return null;
  42675. }
  42676. function loadPlugin(name, dirname) {
  42677. throw new Error("Cannot load plugin " + name + " relative to " + dirname + " in a browser");
  42678. }
  42679. function loadPreset(name, dirname) {
  42680. throw new Error("Cannot load preset " + name + " relative to " + dirname + " in a browser");
  42681. }
  42682. var version$1 = "7.8.3";
  42683. function getEnv(defaultValue) {
  42684. if (defaultValue === void 0) {
  42685. defaultValue = "development";
  42686. }
  42687. return process.env.BABEL_ENV || undefined || defaultValue;
  42688. }
  42689. function normalizeArray(parts, allowAboveRoot) {
  42690. var up = 0;
  42691. for (var i = parts.length - 1; i >= 0; i--) {
  42692. var last = parts[i];
  42693. if (last === '.') {
  42694. parts.splice(i, 1);
  42695. } else if (last === '..') {
  42696. parts.splice(i, 1);
  42697. up++;
  42698. } else if (up) {
  42699. parts.splice(i, 1);
  42700. up--;
  42701. }
  42702. }
  42703. if (allowAboveRoot) {
  42704. for (; up--; up) {
  42705. parts.unshift('..');
  42706. }
  42707. }
  42708. return parts;
  42709. }
  42710. var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
  42711. var splitPath = function splitPath(filename) {
  42712. return splitPathRe.exec(filename).slice(1);
  42713. };
  42714. function resolve$1() {
  42715. var resolvedPath = '',
  42716. resolvedAbsolute = false;
  42717. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  42718. var path = i >= 0 ? arguments[i] : '/';
  42719. if (typeof path !== 'string') {
  42720. throw new TypeError('Arguments to path.resolve must be strings');
  42721. } else if (!path) {
  42722. continue;
  42723. }
  42724. resolvedPath = path + '/' + resolvedPath;
  42725. resolvedAbsolute = path.charAt(0) === '/';
  42726. }
  42727. resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function (p) {
  42728. return !!p;
  42729. }), !resolvedAbsolute).join('/');
  42730. return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';
  42731. }
  42732. function normalize(path) {
  42733. var isPathAbsolute = isAbsolute(path),
  42734. trailingSlash = substr(path, -1) === '/';
  42735. path = normalizeArray(filter(path.split('/'), function (p) {
  42736. return !!p;
  42737. }), !isPathAbsolute).join('/');
  42738. if (!path && !isPathAbsolute) {
  42739. path = '.';
  42740. }
  42741. if (path && trailingSlash) {
  42742. path += '/';
  42743. }
  42744. return (isPathAbsolute ? '/' : '') + path;
  42745. }
  42746. function isAbsolute(path) {
  42747. return path.charAt(0) === '/';
  42748. }
  42749. function join() {
  42750. var paths = Array.prototype.slice.call(arguments, 0);
  42751. return normalize(filter(paths, function (p, index) {
  42752. if (typeof p !== 'string') {
  42753. throw new TypeError('Arguments to path.join must be strings');
  42754. }
  42755. return p;
  42756. }).join('/'));
  42757. }
  42758. function relative(from, to) {
  42759. from = resolve$1(from).substr(1);
  42760. to = resolve$1(to).substr(1);
  42761. function trim(arr) {
  42762. var start = 0;
  42763. for (; start < arr.length; start++) {
  42764. if (arr[start] !== '') break;
  42765. }
  42766. var end = arr.length - 1;
  42767. for (; end >= 0; end--) {
  42768. if (arr[end] !== '') break;
  42769. }
  42770. if (start > end) return [];
  42771. return arr.slice(start, end - start + 1);
  42772. }
  42773. var fromParts = trim(from.split('/'));
  42774. var toParts = trim(to.split('/'));
  42775. var length = Math.min(fromParts.length, toParts.length);
  42776. var samePartsLength = length;
  42777. for (var i = 0; i < length; i++) {
  42778. if (fromParts[i] !== toParts[i]) {
  42779. samePartsLength = i;
  42780. break;
  42781. }
  42782. }
  42783. var outputParts = [];
  42784. for (var i = samePartsLength; i < fromParts.length; i++) {
  42785. outputParts.push('..');
  42786. }
  42787. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  42788. return outputParts.join('/');
  42789. }
  42790. var sep = '/';
  42791. var delimiter = ':';
  42792. function dirname(path) {
  42793. var result = splitPath(path),
  42794. root = result[0],
  42795. dir = result[1];
  42796. if (!root && !dir) {
  42797. return '.';
  42798. }
  42799. if (dir) {
  42800. dir = dir.substr(0, dir.length - 1);
  42801. }
  42802. return root + dir;
  42803. }
  42804. function basename(path, ext) {
  42805. var f = splitPath(path)[2];
  42806. if (ext && f.substr(-1 * ext.length) === ext) {
  42807. f = f.substr(0, f.length - ext.length);
  42808. }
  42809. return f;
  42810. }
  42811. function extname(path) {
  42812. return splitPath(path)[3];
  42813. }
  42814. var path$1 = {
  42815. extname: extname,
  42816. basename: basename,
  42817. dirname: dirname,
  42818. sep: sep,
  42819. delimiter: delimiter,
  42820. relative: relative,
  42821. join: join,
  42822. isAbsolute: isAbsolute,
  42823. normalize: normalize,
  42824. resolve: resolve$1
  42825. };
  42826. function filter(xs, f) {
  42827. if (xs.filter) return xs.filter(f);
  42828. var res = [];
  42829. for (var i = 0; i < xs.length; i++) {
  42830. if (f(xs[i], i, xs)) res.push(xs[i]);
  42831. }
  42832. return res;
  42833. }
  42834. var substr = 'ab'.substr(-1) === 'b' ? function (str, start, len) {
  42835. return str.substr(start, len);
  42836. } : function (str, start, len) {
  42837. if (start < 0) start = str.length + start;
  42838. return str.substr(start, len);
  42839. };
  42840. var GENSYNC_START = Symbol["for"]("gensync:v1:start");
  42841. var GENSYNC_SUSPEND = Symbol["for"]("gensync:v1:suspend");
  42842. var GENSYNC_EXPECTED_START = "GENSYNC_EXPECTED_START";
  42843. var GENSYNC_EXPECTED_SUSPEND = "GENSYNC_EXPECTED_SUSPEND";
  42844. var GENSYNC_OPTIONS_ERROR = "GENSYNC_OPTIONS_ERROR";
  42845. var GENSYNC_RACE_NONEMPTY = "GENSYNC_RACE_NONEMPTY";
  42846. var GENSYNC_ERRBACK_NO_CALLBACK = "GENSYNC_ERRBACK_NO_CALLBACK";
  42847. var gensync = Object.assign(function gensync(optsOrFn) {
  42848. var genFn = optsOrFn;
  42849. if (typeof optsOrFn !== "function") {
  42850. genFn = newGenerator(optsOrFn);
  42851. } else {
  42852. genFn = wrapGenerator(optsOrFn);
  42853. }
  42854. return Object.assign(genFn, makeFunctionAPI(genFn));
  42855. }, {
  42856. all: buildOperation({
  42857. name: "all",
  42858. arity: 1,
  42859. sync: function sync(args) {
  42860. var items = Array.from(args[0]);
  42861. return items.map(function (item) {
  42862. return evaluateSync(item);
  42863. });
  42864. },
  42865. async: function async(args, resolve, reject) {
  42866. var items = Array.from(args[0]);
  42867. var count = 0;
  42868. var results = items.map(function () {
  42869. return undefined;
  42870. });
  42871. items.forEach(function (item, i) {
  42872. evaluateAsync(item, function (val) {
  42873. results[i] = val;
  42874. count += 1;
  42875. if (count === results.length) resolve(results);
  42876. }, reject);
  42877. });
  42878. }
  42879. }),
  42880. race: buildOperation({
  42881. name: "race",
  42882. arity: 1,
  42883. sync: function sync(args) {
  42884. var items = Array.from(args[0]);
  42885. if (items.length === 0) {
  42886. throw makeError("Must race at least 1 item", GENSYNC_RACE_NONEMPTY);
  42887. }
  42888. return evaluateSync(items[0]);
  42889. },
  42890. async: function async(args, resolve, reject) {
  42891. var items = Array.from(args[0]);
  42892. if (items.length === 0) {
  42893. throw makeError("Must race at least 1 item", GENSYNC_RACE_NONEMPTY);
  42894. }
  42895. for (var _i = 0, _items = items; _i < _items.length; _i++) {
  42896. var item = _items[_i];
  42897. evaluateAsync(item, resolve, reject);
  42898. }
  42899. }
  42900. })
  42901. });
  42902. function makeFunctionAPI(genFn) {
  42903. var fns = {
  42904. sync: function sync() {
  42905. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  42906. args[_key] = arguments[_key];
  42907. }
  42908. return evaluateSync(genFn.apply(this, args));
  42909. },
  42910. async: function async() {
  42911. var _this = this;
  42912. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  42913. args[_key2] = arguments[_key2];
  42914. }
  42915. return new Promise(function (resolve, reject) {
  42916. evaluateAsync(genFn.apply(_this, args), resolve, reject);
  42917. });
  42918. },
  42919. errback: function errback() {
  42920. for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  42921. args[_key3] = arguments[_key3];
  42922. }
  42923. var cb = args.pop();
  42924. if (typeof cb !== "function") {
  42925. throw makeError("Asynchronous function called without callback", GENSYNC_ERRBACK_NO_CALLBACK);
  42926. }
  42927. var gen;
  42928. try {
  42929. gen = genFn.apply(this, args);
  42930. } catch (err) {
  42931. cb(err);
  42932. return;
  42933. }
  42934. evaluateAsync(gen, function (val) {
  42935. return cb(undefined, val);
  42936. }, function (err) {
  42937. return cb(err);
  42938. });
  42939. }
  42940. };
  42941. return fns;
  42942. }
  42943. function assertTypeof(type, name, value, allowUndefined) {
  42944. if (typeof value === type || allowUndefined && typeof value === "undefined") {
  42945. return;
  42946. }
  42947. var msg;
  42948. if (allowUndefined) {
  42949. msg = "Expected opts." + name + " to be either a " + type + ", or undefined.";
  42950. } else {
  42951. msg = "Expected opts." + name + " to be a " + type + ".";
  42952. }
  42953. throw makeError(msg, GENSYNC_OPTIONS_ERROR);
  42954. }
  42955. function makeError(msg, code) {
  42956. return Object.assign(new Error(msg), {
  42957. code: code
  42958. });
  42959. }
  42960. function newGenerator(_ref) {
  42961. var name = _ref.name,
  42962. arity = _ref.arity,
  42963. _sync = _ref.sync,
  42964. _async = _ref.async,
  42965. errback = _ref.errback;
  42966. assertTypeof("string", "name", name, true);
  42967. assertTypeof("number", "arity", arity, true);
  42968. assertTypeof("function", "sync", _sync);
  42969. assertTypeof("function", "async", _async, true);
  42970. assertTypeof("function", "errback", errback, true);
  42971. if (_async && errback) {
  42972. throw makeError("Expected one of either opts.async or opts.errback, but got _both_.", GENSYNC_OPTIONS_ERROR);
  42973. }
  42974. if (typeof name !== "string") {
  42975. var fnName;
  42976. if (errback && errback.name && errback.name !== "errback") {
  42977. fnName = errback.name;
  42978. }
  42979. if (_async && _async.name && _async.name !== "async") {
  42980. fnName = _async.name.replace(/Async$/, "");
  42981. }
  42982. if (_sync && _sync.name && _sync.name !== "sync") {
  42983. fnName = _sync.name.replace(/Sync$/, "");
  42984. }
  42985. if (typeof fnName === "string") {
  42986. name = fnName;
  42987. }
  42988. }
  42989. if (typeof arity !== "number") {
  42990. arity = _sync.length;
  42991. }
  42992. return buildOperation({
  42993. name: name,
  42994. arity: arity,
  42995. sync: function sync(args) {
  42996. return _sync.apply(this, args);
  42997. },
  42998. async: function async(args, resolve, reject) {
  42999. if (_async) {
  43000. _async.apply(this, args).then(resolve, reject);
  43001. } else if (errback) {
  43002. errback.call.apply(errback, [this].concat(args, [function (err, value) {
  43003. if (err == null) resolve(value);else reject(err);
  43004. }]));
  43005. } else {
  43006. resolve(_sync.apply(this, args));
  43007. }
  43008. }
  43009. });
  43010. }
  43011. function wrapGenerator(genFn) {
  43012. return setFunctionMetadata(genFn.name, genFn.length, function () {
  43013. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  43014. args[_key4] = arguments[_key4];
  43015. }
  43016. return genFn.apply(this, args);
  43017. });
  43018. }
  43019. function buildOperation(_ref2) {
  43020. var name = _ref2.name,
  43021. arity = _ref2.arity,
  43022. sync = _ref2.sync,
  43023. async = _ref2.async;
  43024. return setFunctionMetadata(name, arity, regenerator.mark(function _callee() {
  43025. var resume,
  43026. _len5,
  43027. args,
  43028. _key5,
  43029. result,
  43030. _args = arguments;
  43031. return regenerator.wrap(function _callee$(_context) {
  43032. while (1) {
  43033. switch (_context.prev = _context.next) {
  43034. case 0:
  43035. _context.next = 2;
  43036. return GENSYNC_START;
  43037. case 2:
  43038. resume = _context.sent;
  43039. for (_len5 = _args.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  43040. args[_key5] = _args[_key5];
  43041. }
  43042. if (resume) {
  43043. _context.next = 6;
  43044. break;
  43045. }
  43046. return _context.abrupt("return", sync.call(this, args));
  43047. case 6:
  43048. try {
  43049. async.call(this, args, function (value) {
  43050. if (result) return;
  43051. result = {
  43052. value: value
  43053. };
  43054. resume();
  43055. }, function (err) {
  43056. if (result) return;
  43057. result = {
  43058. err: err
  43059. };
  43060. resume();
  43061. });
  43062. } catch (err) {
  43063. result = {
  43064. err: err
  43065. };
  43066. resume();
  43067. }
  43068. _context.next = 9;
  43069. return GENSYNC_SUSPEND;
  43070. case 9:
  43071. if (!result.hasOwnProperty("err")) {
  43072. _context.next = 11;
  43073. break;
  43074. }
  43075. throw result.err;
  43076. case 11:
  43077. return _context.abrupt("return", result.value);
  43078. case 12:
  43079. case "end":
  43080. return _context.stop();
  43081. }
  43082. }
  43083. }, _callee, this);
  43084. }));
  43085. }
  43086. function evaluateSync(gen) {
  43087. var value;
  43088. while (!(_gen$next = gen.next(), value = _gen$next.value, _gen$next).done) {
  43089. var _gen$next;
  43090. assertStart(value, gen);
  43091. }
  43092. return value;
  43093. }
  43094. function evaluateAsync(gen, resolve, reject) {
  43095. (function step() {
  43096. try {
  43097. var value;
  43098. var _loop = function _loop() {
  43099. assertStart(value, gen);
  43100. var sync = true;
  43101. var didSyncResume = false;
  43102. var out = gen.next(function () {
  43103. if (sync) {
  43104. didSyncResume = true;
  43105. } else {
  43106. step();
  43107. }
  43108. });
  43109. sync = false;
  43110. assertSuspend(out, gen);
  43111. if (!didSyncResume) {
  43112. return {
  43113. v: void 0
  43114. };
  43115. }
  43116. };
  43117. while (!(_gen$next2 = gen.next(), value = _gen$next2.value, _gen$next2).done) {
  43118. var _gen$next2;
  43119. var _ret = _loop();
  43120. if (typeof _ret === "object") return _ret.v;
  43121. }
  43122. return resolve(value);
  43123. } catch (err) {
  43124. return reject(err);
  43125. }
  43126. })();
  43127. }
  43128. function assertStart(value, gen) {
  43129. if (value === GENSYNC_START) return;
  43130. 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));
  43131. }
  43132. function assertSuspend(_ref3, gen) {
  43133. var value = _ref3.value,
  43134. done = _ref3.done;
  43135. if (!done && value === GENSYNC_SUSPEND) return;
  43136. 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));
  43137. }
  43138. function throwError(gen, err) {
  43139. if (gen["throw"]) gen["throw"](err);
  43140. throw err;
  43141. }
  43142. function setFunctionMetadata(name, arity, fn) {
  43143. if (typeof name === "string") {
  43144. var nameDesc = Object.getOwnPropertyDescriptor(fn, "name");
  43145. if (!nameDesc || nameDesc.configurable) {
  43146. Object.defineProperty(fn, "name", Object.assign(nameDesc || {}, {
  43147. configurable: true,
  43148. value: name
  43149. }));
  43150. }
  43151. }
  43152. if (typeof arity === "number") {
  43153. var lengthDesc = Object.getOwnPropertyDescriptor(fn, "length");
  43154. if (!lengthDesc || lengthDesc.configurable) {
  43155. Object.defineProperty(fn, "length", Object.assign(lengthDesc || {}, {
  43156. configurable: true,
  43157. value: arity
  43158. }));
  43159. }
  43160. }
  43161. return fn;
  43162. }
  43163. var id = function id(x) {
  43164. return x;
  43165. };
  43166. var runGenerator = gensync(regenerator.mark(function _callee(item) {
  43167. return regenerator.wrap(function _callee$(_context) {
  43168. while (1) {
  43169. switch (_context.prev = _context.next) {
  43170. case 0:
  43171. return _context.delegateYield(item, "t0", 1);
  43172. case 1:
  43173. return _context.abrupt("return", _context.t0);
  43174. case 2:
  43175. case "end":
  43176. return _context.stop();
  43177. }
  43178. }
  43179. }, _callee);
  43180. }));
  43181. var isAsync = gensync({
  43182. sync: function sync() {
  43183. return false;
  43184. },
  43185. errback: function errback(cb) {
  43186. return cb(null, true);
  43187. }
  43188. });
  43189. function maybeAsync(fn, message) {
  43190. return gensync({
  43191. sync: function sync() {
  43192. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  43193. args[_key] = arguments[_key];
  43194. }
  43195. var result = fn.apply(this, args);
  43196. if (isThenable(result)) throw new Error(message);
  43197. return result;
  43198. },
  43199. async: function async() {
  43200. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  43201. args[_key2] = arguments[_key2];
  43202. }
  43203. return Promise.resolve(fn.apply(this, args));
  43204. }
  43205. });
  43206. }
  43207. var withKind = gensync({
  43208. sync: function sync(cb) {
  43209. return cb("sync");
  43210. },
  43211. async: function async(cb) {
  43212. return cb("async");
  43213. }
  43214. });
  43215. function forwardAsync(action, cb) {
  43216. var g = gensync(action);
  43217. return withKind(function (kind) {
  43218. var adapted = g[kind];
  43219. return cb(adapted);
  43220. });
  43221. }
  43222. var onFirstPause = gensync({
  43223. name: "onFirstPause",
  43224. arity: 2,
  43225. sync: function sync(item) {
  43226. return runGenerator.sync(item);
  43227. },
  43228. errback: function errback(item, firstPause, cb) {
  43229. var completed = false;
  43230. runGenerator.errback(item, function (err, value) {
  43231. completed = true;
  43232. cb(err, value);
  43233. });
  43234. if (!completed) {
  43235. firstPause();
  43236. }
  43237. }
  43238. });
  43239. var waitFor = gensync({
  43240. sync: id,
  43241. async: id
  43242. });
  43243. function isThenable(val) {
  43244. return !!val && (typeof val === "object" || typeof val === "function") && !!val.then && typeof val.then === "function";
  43245. }
  43246. function mergeOptions(target, source) {
  43247. for (var _i = 0, _Object$keys = Object.keys(source); _i < _Object$keys.length; _i++) {
  43248. var k = _Object$keys[_i];
  43249. if (k === "parserOpts" && source.parserOpts) {
  43250. var parserOpts = source.parserOpts;
  43251. var targetObj = target.parserOpts = target.parserOpts || {};
  43252. mergeDefaultFields(targetObj, parserOpts);
  43253. } else if (k === "generatorOpts" && source.generatorOpts) {
  43254. var generatorOpts = source.generatorOpts;
  43255. var _targetObj = target.generatorOpts = target.generatorOpts || {};
  43256. mergeDefaultFields(_targetObj, generatorOpts);
  43257. } else {
  43258. var val = source[k];
  43259. if (val !== undefined) target[k] = val;
  43260. }
  43261. }
  43262. }
  43263. function mergeDefaultFields(target, source) {
  43264. for (var _i2 = 0, _Object$keys2 = Object.keys(source); _i2 < _Object$keys2.length; _i2++) {
  43265. var k = _Object$keys2[_i2];
  43266. var val = source[k];
  43267. if (val !== undefined) target[k] = val;
  43268. }
  43269. }
  43270. function isIterableIterator(value) {
  43271. return !!value && typeof value.next === "function" && typeof value[Symbol.iterator] === "function";
  43272. }
  43273. var _marked$1 = regenerator.mark(genTrue),
  43274. _marked2$1 = regenerator.mark(getCachedValue),
  43275. _marked3$1 = regenerator.mark(getCachedValueOrWait);
  43276. var synchronize = function synchronize(gen) {
  43277. return gensync(gen).sync;
  43278. };
  43279. function genTrue(data) {
  43280. return regenerator.wrap(function genTrue$(_context) {
  43281. while (1) {
  43282. switch (_context.prev = _context.next) {
  43283. case 0:
  43284. return _context.abrupt("return", true);
  43285. case 1:
  43286. case "end":
  43287. return _context.stop();
  43288. }
  43289. }
  43290. }, _marked$1);
  43291. }
  43292. function makeWeakCache(handler) {
  43293. return makeCachedFunction(WeakMap, handler);
  43294. }
  43295. function makeWeakCacheSync(handler) {
  43296. return synchronize(makeWeakCache(handler));
  43297. }
  43298. function makeStrongCache(handler) {
  43299. return makeCachedFunction(Map, handler);
  43300. }
  43301. function makeStrongCacheSync(handler) {
  43302. return synchronize(makeStrongCache(handler));
  43303. }
  43304. function makeCachedFunction(CallCache, handler) {
  43305. var callCacheSync = new CallCache();
  43306. var callCacheAsync = new CallCache();
  43307. var futureCache = new CallCache();
  43308. return regenerator.mark(function cachedFunction(arg, data) {
  43309. var asyncContext, callCache, cached, cache, handlerResult, finishLock, value, gen;
  43310. return regenerator.wrap(function cachedFunction$(_context2) {
  43311. while (1) {
  43312. switch (_context2.prev = _context2.next) {
  43313. case 0:
  43314. return _context2.delegateYield(isAsync(), "t0", 1);
  43315. case 1:
  43316. asyncContext = _context2.t0;
  43317. callCache = asyncContext ? callCacheAsync : callCacheSync;
  43318. return _context2.delegateYield(getCachedValueOrWait(asyncContext, callCache, futureCache, arg, data), "t1", 4);
  43319. case 4:
  43320. cached = _context2.t1;
  43321. if (!cached.valid) {
  43322. _context2.next = 7;
  43323. break;
  43324. }
  43325. return _context2.abrupt("return", cached.value);
  43326. case 7:
  43327. cache = new CacheConfigurator(data);
  43328. handlerResult = handler(arg, cache);
  43329. if (!isIterableIterator(handlerResult)) {
  43330. _context2.next = 15;
  43331. break;
  43332. }
  43333. gen = handlerResult;
  43334. return _context2.delegateYield(onFirstPause(gen, function () {
  43335. finishLock = setupAsyncLocks(cache, futureCache, arg);
  43336. }), "t2", 12);
  43337. case 12:
  43338. value = _context2.t2;
  43339. _context2.next = 16;
  43340. break;
  43341. case 15:
  43342. value = handlerResult;
  43343. case 16:
  43344. updateFunctionCache(callCache, cache, arg, value);
  43345. if (finishLock) {
  43346. futureCache["delete"](arg);
  43347. finishLock.release(value);
  43348. }
  43349. return _context2.abrupt("return", value);
  43350. case 19:
  43351. case "end":
  43352. return _context2.stop();
  43353. }
  43354. }
  43355. }, cachedFunction);
  43356. });
  43357. }
  43358. function getCachedValue(cache, arg, data) {
  43359. var cachedValue, _iterator, _isArray, _i, _ref, _ref2, _value, valid;
  43360. return regenerator.wrap(function getCachedValue$(_context3) {
  43361. while (1) {
  43362. switch (_context3.prev = _context3.next) {
  43363. case 0:
  43364. cachedValue = cache.get(arg);
  43365. if (!cachedValue) {
  43366. _context3.next = 19;
  43367. break;
  43368. }
  43369. _iterator = cachedValue, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();
  43370. case 3:
  43371. if (!_isArray) {
  43372. _context3.next = 9;
  43373. break;
  43374. }
  43375. if (!(_i >= _iterator.length)) {
  43376. _context3.next = 6;
  43377. break;
  43378. }
  43379. return _context3.abrupt("break", 19);
  43380. case 6:
  43381. _ref = _iterator[_i++];
  43382. _context3.next = 13;
  43383. break;
  43384. case 9:
  43385. _i = _iterator.next();
  43386. if (!_i.done) {
  43387. _context3.next = 12;
  43388. break;
  43389. }
  43390. return _context3.abrupt("break", 19);
  43391. case 12:
  43392. _ref = _i.value;
  43393. case 13:
  43394. _ref2 = _ref, _value = _ref2.value, valid = _ref2.valid;
  43395. return _context3.delegateYield(valid(data), "t0", 15);
  43396. case 15:
  43397. if (!_context3.t0) {
  43398. _context3.next = 17;
  43399. break;
  43400. }
  43401. return _context3.abrupt("return", {
  43402. valid: true,
  43403. value: _value
  43404. });
  43405. case 17:
  43406. _context3.next = 3;
  43407. break;
  43408. case 19:
  43409. return _context3.abrupt("return", {
  43410. valid: false,
  43411. value: null
  43412. });
  43413. case 20:
  43414. case "end":
  43415. return _context3.stop();
  43416. }
  43417. }
  43418. }, _marked2$1);
  43419. }
  43420. function getCachedValueOrWait(asyncContext, callCache, futureCache, arg, data) {
  43421. var cached, _cached, _value2;
  43422. return regenerator.wrap(function getCachedValueOrWait$(_context4) {
  43423. while (1) {
  43424. switch (_context4.prev = _context4.next) {
  43425. case 0:
  43426. return _context4.delegateYield(getCachedValue(callCache, arg, data), "t0", 1);
  43427. case 1:
  43428. cached = _context4.t0;
  43429. if (!cached.valid) {
  43430. _context4.next = 4;
  43431. break;
  43432. }
  43433. return _context4.abrupt("return", cached);
  43434. case 4:
  43435. if (!asyncContext) {
  43436. _context4.next = 11;
  43437. break;
  43438. }
  43439. return _context4.delegateYield(getCachedValue(futureCache, arg, data), "t1", 6);
  43440. case 6:
  43441. _cached = _context4.t1;
  43442. if (!_cached.valid) {
  43443. _context4.next = 11;
  43444. break;
  43445. }
  43446. return _context4.delegateYield(waitFor(_cached.value.promise), "t2", 9);
  43447. case 9:
  43448. _value2 = _context4.t2;
  43449. return _context4.abrupt("return", {
  43450. valid: true,
  43451. value: _value2
  43452. });
  43453. case 11:
  43454. return _context4.abrupt("return", {
  43455. valid: false,
  43456. value: null
  43457. });
  43458. case 12:
  43459. case "end":
  43460. return _context4.stop();
  43461. }
  43462. }
  43463. }, _marked3$1);
  43464. }
  43465. function setupAsyncLocks(config, futureCache, arg) {
  43466. var finishLock = new Lock();
  43467. updateFunctionCache(futureCache, config, arg, finishLock);
  43468. return finishLock;
  43469. }
  43470. function updateFunctionCache(cache, config, arg, value) {
  43471. if (!config.configured()) config.forever();
  43472. var cachedValue = cache.get(arg);
  43473. config.deactivate();
  43474. switch (config.mode()) {
  43475. case "forever":
  43476. cachedValue = [{
  43477. value: value,
  43478. valid: genTrue
  43479. }];
  43480. cache.set(arg, cachedValue);
  43481. break;
  43482. case "invalidate":
  43483. cachedValue = [{
  43484. value: value,
  43485. valid: config.validator()
  43486. }];
  43487. cache.set(arg, cachedValue);
  43488. break;
  43489. case "valid":
  43490. if (cachedValue) {
  43491. cachedValue.push({
  43492. value: value,
  43493. valid: config.validator()
  43494. });
  43495. } else {
  43496. cachedValue = [{
  43497. value: value,
  43498. valid: config.validator()
  43499. }];
  43500. cache.set(arg, cachedValue);
  43501. }
  43502. }
  43503. }
  43504. var CacheConfigurator = function () {
  43505. function CacheConfigurator(data) {
  43506. this._active = true;
  43507. this._never = false;
  43508. this._forever = false;
  43509. this._invalidate = false;
  43510. this._configured = false;
  43511. this._pairs = [];
  43512. this._data = data;
  43513. }
  43514. var _proto = CacheConfigurator.prototype;
  43515. _proto.simple = function simple() {
  43516. return makeSimpleConfigurator(this);
  43517. };
  43518. _proto.mode = function mode() {
  43519. if (this._never) return "never";
  43520. if (this._forever) return "forever";
  43521. if (this._invalidate) return "invalidate";
  43522. return "valid";
  43523. };
  43524. _proto.forever = function forever() {
  43525. if (!this._active) {
  43526. throw new Error("Cannot change caching after evaluation has completed.");
  43527. }
  43528. if (this._never) {
  43529. throw new Error("Caching has already been configured with .never()");
  43530. }
  43531. this._forever = true;
  43532. this._configured = true;
  43533. };
  43534. _proto.never = function never() {
  43535. if (!this._active) {
  43536. throw new Error("Cannot change caching after evaluation has completed.");
  43537. }
  43538. if (this._forever) {
  43539. throw new Error("Caching has already been configured with .forever()");
  43540. }
  43541. this._never = true;
  43542. this._configured = true;
  43543. };
  43544. _proto.using = function using(handler) {
  43545. var _this = this;
  43546. if (!this._active) {
  43547. throw new Error("Cannot change caching after evaluation has completed.");
  43548. }
  43549. if (this._never || this._forever) {
  43550. throw new Error("Caching has already been configured with .never or .forever()");
  43551. }
  43552. this._configured = true;
  43553. var key = handler(this._data);
  43554. var fn = maybeAsync(handler, "You appear to be using an async cache handler, but Babel has been called synchronously");
  43555. if (isThenable(key)) {
  43556. return key.then(function (key) {
  43557. _this._pairs.push([key, fn]);
  43558. return key;
  43559. });
  43560. }
  43561. this._pairs.push([key, fn]);
  43562. return key;
  43563. };
  43564. _proto.invalidate = function invalidate(handler) {
  43565. this._invalidate = true;
  43566. return this.using(handler);
  43567. };
  43568. _proto.validator = function validator() {
  43569. var pairs = this._pairs;
  43570. return regenerator.mark(function _callee(data) {
  43571. var _iterator2, _isArray2, _i2, _ref3, _ref4, key, fn;
  43572. return regenerator.wrap(function _callee$(_context5) {
  43573. while (1) {
  43574. switch (_context5.prev = _context5.next) {
  43575. case 0:
  43576. _iterator2 = pairs, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();
  43577. case 1:
  43578. if (!_isArray2) {
  43579. _context5.next = 7;
  43580. break;
  43581. }
  43582. if (!(_i2 >= _iterator2.length)) {
  43583. _context5.next = 4;
  43584. break;
  43585. }
  43586. return _context5.abrupt("break", 19);
  43587. case 4:
  43588. _ref3 = _iterator2[_i2++];
  43589. _context5.next = 11;
  43590. break;
  43591. case 7:
  43592. _i2 = _iterator2.next();
  43593. if (!_i2.done) {
  43594. _context5.next = 10;
  43595. break;
  43596. }
  43597. return _context5.abrupt("break", 19);
  43598. case 10:
  43599. _ref3 = _i2.value;
  43600. case 11:
  43601. _ref4 = _ref3, key = _ref4[0], fn = _ref4[1];
  43602. _context5.t0 = key;
  43603. return _context5.delegateYield(fn(data), "t1", 14);
  43604. case 14:
  43605. _context5.t2 = _context5.t1;
  43606. if (!(_context5.t0 !== _context5.t2)) {
  43607. _context5.next = 17;
  43608. break;
  43609. }
  43610. return _context5.abrupt("return", false);
  43611. case 17:
  43612. _context5.next = 1;
  43613. break;
  43614. case 19:
  43615. return _context5.abrupt("return", true);
  43616. case 20:
  43617. case "end":
  43618. return _context5.stop();
  43619. }
  43620. }
  43621. }, _callee);
  43622. });
  43623. };
  43624. _proto.deactivate = function deactivate() {
  43625. this._active = false;
  43626. };
  43627. _proto.configured = function configured() {
  43628. return this._configured;
  43629. };
  43630. return CacheConfigurator;
  43631. }();
  43632. function makeSimpleConfigurator(cache) {
  43633. function cacheFn(val) {
  43634. if (typeof val === "boolean") {
  43635. if (val) cache.forever();else cache.never();
  43636. return;
  43637. }
  43638. return cache.using(function () {
  43639. return assertSimpleType(val());
  43640. });
  43641. }
  43642. cacheFn.forever = function () {
  43643. return cache.forever();
  43644. };
  43645. cacheFn.never = function () {
  43646. return cache.never();
  43647. };
  43648. cacheFn.using = function (cb) {
  43649. return cache.using(function () {
  43650. return assertSimpleType(cb());
  43651. });
  43652. };
  43653. cacheFn.invalidate = function (cb) {
  43654. return cache.invalidate(function () {
  43655. return assertSimpleType(cb());
  43656. });
  43657. };
  43658. return cacheFn;
  43659. }
  43660. function assertSimpleType(value) {
  43661. if (isThenable(value)) {
  43662. 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.");
  43663. }
  43664. if (value != null && typeof value !== "string" && typeof value !== "boolean" && typeof value !== "number") {
  43665. throw new Error("Cache keys must be either string, boolean, number, null, or undefined.");
  43666. }
  43667. return value;
  43668. }
  43669. var Lock = function () {
  43670. function Lock() {
  43671. var _this2 = this;
  43672. this.released = false;
  43673. this.promise = new Promise(function (resolve) {
  43674. _this2._resolve = resolve;
  43675. });
  43676. }
  43677. var _proto2 = Lock.prototype;
  43678. _proto2.release = function release(value) {
  43679. this.released = true;
  43680. this._resolve(value);
  43681. };
  43682. return Lock;
  43683. }();
  43684. function isEqualDescriptor(a, b) {
  43685. 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);
  43686. }
  43687. function createCachedDescriptors(dirname, options, alias) {
  43688. var plugins = options.plugins,
  43689. presets = options.presets,
  43690. passPerPreset = options.passPerPreset;
  43691. return {
  43692. options: options,
  43693. plugins: plugins ? function () {
  43694. return createCachedPluginDescriptors(plugins, dirname)(alias);
  43695. } : function () {
  43696. return [];
  43697. },
  43698. presets: presets ? function () {
  43699. return createCachedPresetDescriptors(presets, dirname)(alias)(!!passPerPreset);
  43700. } : function () {
  43701. return [];
  43702. }
  43703. };
  43704. }
  43705. function createUncachedDescriptors(dirname, options, alias) {
  43706. var _plugins;
  43707. var _presets;
  43708. return {
  43709. options: options,
  43710. plugins: function plugins() {
  43711. if (!_plugins) {
  43712. _plugins = createPluginDescriptors(options.plugins || [], dirname, alias);
  43713. }
  43714. return _plugins;
  43715. },
  43716. presets: function presets() {
  43717. if (!_presets) {
  43718. _presets = createPresetDescriptors(options.presets || [], dirname, alias, !!options.passPerPreset);
  43719. }
  43720. return _presets;
  43721. }
  43722. };
  43723. }
  43724. var PRESET_DESCRIPTOR_CACHE = new WeakMap();
  43725. var createCachedPresetDescriptors = makeWeakCacheSync(function (items, cache) {
  43726. var dirname = cache.using(function (dir) {
  43727. return dir;
  43728. });
  43729. return makeStrongCacheSync(function (alias) {
  43730. return makeStrongCacheSync(function (passPerPreset) {
  43731. return createPresetDescriptors(items, dirname, alias, passPerPreset).map(function (desc) {
  43732. return loadCachedDescriptor(PRESET_DESCRIPTOR_CACHE, desc);
  43733. });
  43734. });
  43735. });
  43736. });
  43737. var PLUGIN_DESCRIPTOR_CACHE = new WeakMap();
  43738. var createCachedPluginDescriptors = makeWeakCacheSync(function (items, cache) {
  43739. var dirname = cache.using(function (dir) {
  43740. return dir;
  43741. });
  43742. return makeStrongCacheSync(function (alias) {
  43743. return createPluginDescriptors(items, dirname, alias).map(function (desc) {
  43744. return loadCachedDescriptor(PLUGIN_DESCRIPTOR_CACHE, desc);
  43745. });
  43746. });
  43747. });
  43748. var DEFAULT_OPTIONS = {};
  43749. function loadCachedDescriptor(cache, desc) {
  43750. var value = desc.value,
  43751. _desc$options = desc.options,
  43752. options = _desc$options === void 0 ? DEFAULT_OPTIONS : _desc$options;
  43753. if (options === false) return desc;
  43754. var cacheByOptions = cache.get(value);
  43755. if (!cacheByOptions) {
  43756. cacheByOptions = new WeakMap();
  43757. cache.set(value, cacheByOptions);
  43758. }
  43759. var possibilities = cacheByOptions.get(options);
  43760. if (!possibilities) {
  43761. possibilities = [];
  43762. cacheByOptions.set(options, possibilities);
  43763. }
  43764. if (possibilities.indexOf(desc) === -1) {
  43765. var matches = possibilities.filter(function (possibility) {
  43766. return isEqualDescriptor(possibility, desc);
  43767. });
  43768. if (matches.length > 0) {
  43769. return matches[0];
  43770. }
  43771. possibilities.push(desc);
  43772. }
  43773. return desc;
  43774. }
  43775. function createPresetDescriptors(items, dirname, alias, passPerPreset) {
  43776. return createDescriptors("preset", items, dirname, alias, passPerPreset);
  43777. }
  43778. function createPluginDescriptors(items, dirname, alias) {
  43779. return createDescriptors("plugin", items, dirname, alias);
  43780. }
  43781. function createDescriptors(type, items, dirname, alias, ownPass) {
  43782. var descriptors = items.map(function (item, index) {
  43783. return createDescriptor(item, dirname, {
  43784. type: type,
  43785. alias: alias + "$" + index,
  43786. ownPass: !!ownPass
  43787. });
  43788. });
  43789. assertNoDuplicates(descriptors);
  43790. return descriptors;
  43791. }
  43792. function createDescriptor(pair, dirname, _ref) {
  43793. var type = _ref.type,
  43794. alias = _ref.alias,
  43795. ownPass = _ref.ownPass;
  43796. var desc = getItemDescriptor(pair);
  43797. if (desc) {
  43798. return desc;
  43799. }
  43800. var name;
  43801. var options;
  43802. var value = pair;
  43803. if (Array.isArray(value)) {
  43804. if (value.length === 3) {
  43805. var _value = value;
  43806. value = _value[0];
  43807. options = _value[1];
  43808. name = _value[2];
  43809. } else {
  43810. var _value2 = value;
  43811. value = _value2[0];
  43812. options = _value2[1];
  43813. }
  43814. }
  43815. var file = undefined;
  43816. var filepath = null;
  43817. if (typeof value === "string") {
  43818. if (typeof type !== "string") {
  43819. throw new Error("To resolve a string-based item, the type of item must be given");
  43820. }
  43821. var resolver = type === "plugin" ? loadPlugin : loadPreset;
  43822. var request = value;
  43823. var _resolver = resolver(value, dirname);
  43824. filepath = _resolver.filepath;
  43825. value = _resolver.value;
  43826. file = {
  43827. request: request,
  43828. resolved: filepath
  43829. };
  43830. }
  43831. if (!value) {
  43832. throw new Error("Unexpected falsy value: " + String(value));
  43833. }
  43834. if (typeof value === "object" && value.__esModule) {
  43835. if (value["default"]) {
  43836. value = value["default"];
  43837. } else {
  43838. throw new Error("Must export a default export when using ES6 modules.");
  43839. }
  43840. }
  43841. if (typeof value !== "object" && typeof value !== "function") {
  43842. throw new Error("Unsupported format: " + typeof value + ". Expected an object or a function.");
  43843. }
  43844. if (filepath !== null && typeof value === "object" && value) {
  43845. throw new Error("Plugin/Preset files are not allowed to export objects, only functions. In " + filepath);
  43846. }
  43847. return {
  43848. name: name,
  43849. alias: filepath || alias,
  43850. value: value,
  43851. options: options,
  43852. dirname: dirname,
  43853. ownPass: ownPass,
  43854. file: file
  43855. };
  43856. }
  43857. function assertNoDuplicates(items) {
  43858. var map = new Map();
  43859. var _loop2 = function _loop2() {
  43860. if (_isArray) {
  43861. if (_i >= _iterator.length) return "break";
  43862. _ref2 = _iterator[_i++];
  43863. } else {
  43864. _i = _iterator.next();
  43865. if (_i.done) return "break";
  43866. _ref2 = _i.value;
  43867. }
  43868. var item = _ref2;
  43869. if (typeof item.value !== "function") return "continue";
  43870. var nameMap = map.get(item.value);
  43871. if (!nameMap) {
  43872. nameMap = new Set();
  43873. map.set(item.value, nameMap);
  43874. }
  43875. if (nameMap.has(item.name)) {
  43876. var conflicts = items.filter(function (i) {
  43877. return i.value === item.value;
  43878. });
  43879. 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"));
  43880. }
  43881. nameMap.add(item.name);
  43882. };
  43883. _loop: for (var _iterator = items, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  43884. var _ref2;
  43885. var _ret = _loop2();
  43886. switch (_ret) {
  43887. case "break":
  43888. break _loop;
  43889. case "continue":
  43890. continue;
  43891. }
  43892. }
  43893. }
  43894. function createItemFromDescriptor(desc) {
  43895. return new ConfigItem(desc);
  43896. }
  43897. function createConfigItem(value, _temp) {
  43898. var _ref = _temp === void 0 ? {} : _temp,
  43899. _ref$dirname = _ref.dirname,
  43900. dirname = _ref$dirname === void 0 ? "." : _ref$dirname,
  43901. type = _ref.type;
  43902. var descriptor = createDescriptor(value, path$1.resolve(dirname), {
  43903. type: type,
  43904. alias: "programmatic item"
  43905. });
  43906. return createItemFromDescriptor(descriptor);
  43907. }
  43908. function getItemDescriptor(item) {
  43909. if (item instanceof ConfigItem) {
  43910. return item._descriptor;
  43911. }
  43912. return undefined;
  43913. }
  43914. var ConfigItem = function ConfigItem(descriptor) {
  43915. this._descriptor = descriptor;
  43916. Object.defineProperty(this, "_descriptor", {
  43917. enumerable: false
  43918. });
  43919. this.value = this._descriptor.value;
  43920. this.options = this._descriptor.options;
  43921. this.dirname = this._descriptor.dirname;
  43922. this.name = this._descriptor.name;
  43923. this.file = this._descriptor.file ? {
  43924. request: this._descriptor.file.request,
  43925. resolved: this._descriptor.file.resolved
  43926. } : undefined;
  43927. Object.freeze(this);
  43928. };
  43929. Object.freeze(ConfigItem.prototype);
  43930. var Plugin = function Plugin(plugin, options, key) {
  43931. this.key = plugin.name || key;
  43932. this.manipulateOptions = plugin.manipulateOptions;
  43933. this.post = plugin.post;
  43934. this.pre = plugin.pre;
  43935. this.visitor = plugin.visitor || {};
  43936. this.parserOverride = plugin.parserOverride;
  43937. this.generatorOverride = plugin.generatorOverride;
  43938. this.options = options;
  43939. };
  43940. var s$1 = 1000;
  43941. var m$1 = s$1 * 60;
  43942. var h$1 = m$1 * 60;
  43943. var d$1 = h$1 * 24;
  43944. var w$1 = d$1 * 7;
  43945. var y$1 = d$1 * 365.25;
  43946. var ms$1 = function (val, options) {
  43947. options = options || {};
  43948. var type = typeof val;
  43949. if (type === 'string' && val.length > 0) {
  43950. return parse$2(val);
  43951. } else if (type === 'number' && isFinite(val)) {
  43952. return options["long"] ? fmtLong$1(val) : fmtShort$1(val);
  43953. }
  43954. throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
  43955. };
  43956. function parse$2(str) {
  43957. str = String(str);
  43958. if (str.length > 100) {
  43959. return;
  43960. }
  43961. 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);
  43962. if (!match) {
  43963. return;
  43964. }
  43965. var n = parseFloat(match[1]);
  43966. var type = (match[2] || 'ms').toLowerCase();
  43967. switch (type) {
  43968. case 'years':
  43969. case 'year':
  43970. case 'yrs':
  43971. case 'yr':
  43972. case 'y':
  43973. return n * y$1;
  43974. case 'weeks':
  43975. case 'week':
  43976. case 'w':
  43977. return n * w$1;
  43978. case 'days':
  43979. case 'day':
  43980. case 'd':
  43981. return n * d$1;
  43982. case 'hours':
  43983. case 'hour':
  43984. case 'hrs':
  43985. case 'hr':
  43986. case 'h':
  43987. return n * h$1;
  43988. case 'minutes':
  43989. case 'minute':
  43990. case 'mins':
  43991. case 'min':
  43992. case 'm':
  43993. return n * m$1;
  43994. case 'seconds':
  43995. case 'second':
  43996. case 'secs':
  43997. case 'sec':
  43998. case 's':
  43999. return n * s$1;
  44000. case 'milliseconds':
  44001. case 'millisecond':
  44002. case 'msecs':
  44003. case 'msec':
  44004. case 'ms':
  44005. return n;
  44006. default:
  44007. return undefined;
  44008. }
  44009. }
  44010. function fmtShort$1(ms) {
  44011. var msAbs = Math.abs(ms);
  44012. if (msAbs >= d$1) {
  44013. return Math.round(ms / d$1) + 'd';
  44014. }
  44015. if (msAbs >= h$1) {
  44016. return Math.round(ms / h$1) + 'h';
  44017. }
  44018. if (msAbs >= m$1) {
  44019. return Math.round(ms / m$1) + 'm';
  44020. }
  44021. if (msAbs >= s$1) {
  44022. return Math.round(ms / s$1) + 's';
  44023. }
  44024. return ms + 'ms';
  44025. }
  44026. function fmtLong$1(ms) {
  44027. var msAbs = Math.abs(ms);
  44028. if (msAbs >= d$1) {
  44029. return plural$1(ms, msAbs, d$1, 'day');
  44030. }
  44031. if (msAbs >= h$1) {
  44032. return plural$1(ms, msAbs, h$1, 'hour');
  44033. }
  44034. if (msAbs >= m$1) {
  44035. return plural$1(ms, msAbs, m$1, 'minute');
  44036. }
  44037. if (msAbs >= s$1) {
  44038. return plural$1(ms, msAbs, s$1, 'second');
  44039. }
  44040. return ms + ' ms';
  44041. }
  44042. function plural$1(ms, msAbs, n, name) {
  44043. var isPlural = msAbs >= n * 1.5;
  44044. return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
  44045. }
  44046. function setup$2(env) {
  44047. createDebug.debug = createDebug;
  44048. createDebug["default"] = createDebug;
  44049. createDebug.coerce = coerce;
  44050. createDebug.disable = disable;
  44051. createDebug.enable = enable;
  44052. createDebug.enabled = enabled;
  44053. createDebug.humanize = ms$1;
  44054. Object.keys(env).forEach(function (key) {
  44055. createDebug[key] = env[key];
  44056. });
  44057. createDebug.instances = [];
  44058. createDebug.names = [];
  44059. createDebug.skips = [];
  44060. createDebug.formatters = {};
  44061. function selectColor(namespace) {
  44062. var hash = 0;
  44063. for (var i = 0; i < namespace.length; i++) {
  44064. hash = (hash << 5) - hash + namespace.charCodeAt(i);
  44065. hash |= 0;
  44066. }
  44067. return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
  44068. }
  44069. createDebug.selectColor = selectColor;
  44070. function createDebug(namespace) {
  44071. var prevTime;
  44072. function debug() {
  44073. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  44074. args[_key] = arguments[_key];
  44075. }
  44076. if (!debug.enabled) {
  44077. return;
  44078. }
  44079. var self = debug;
  44080. var curr = Number(new Date());
  44081. var ms = curr - (prevTime || curr);
  44082. self.diff = ms;
  44083. self.prev = prevTime;
  44084. self.curr = curr;
  44085. prevTime = curr;
  44086. args[0] = createDebug.coerce(args[0]);
  44087. if (typeof args[0] !== 'string') {
  44088. args.unshift('%O');
  44089. }
  44090. var index = 0;
  44091. args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
  44092. if (match === '%%') {
  44093. return match;
  44094. }
  44095. index++;
  44096. var formatter = createDebug.formatters[format];
  44097. if (typeof formatter === 'function') {
  44098. var val = args[index];
  44099. match = formatter.call(self, val);
  44100. args.splice(index, 1);
  44101. index--;
  44102. }
  44103. return match;
  44104. });
  44105. createDebug.formatArgs.call(self, args);
  44106. var logFn = self.log || createDebug.log;
  44107. logFn.apply(self, args);
  44108. }
  44109. debug.namespace = namespace;
  44110. debug.enabled = createDebug.enabled(namespace);
  44111. debug.useColors = createDebug.useColors();
  44112. debug.color = selectColor(namespace);
  44113. debug.destroy = destroy;
  44114. debug.extend = extend;
  44115. if (typeof createDebug.init === 'function') {
  44116. createDebug.init(debug);
  44117. }
  44118. createDebug.instances.push(debug);
  44119. return debug;
  44120. }
  44121. function destroy() {
  44122. var index = createDebug.instances.indexOf(this);
  44123. if (index !== -1) {
  44124. createDebug.instances.splice(index, 1);
  44125. return true;
  44126. }
  44127. return false;
  44128. }
  44129. function extend(namespace, delimiter) {
  44130. var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
  44131. newDebug.log = this.log;
  44132. return newDebug;
  44133. }
  44134. function enable(namespaces) {
  44135. createDebug.save(namespaces);
  44136. createDebug.names = [];
  44137. createDebug.skips = [];
  44138. var i;
  44139. var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
  44140. var len = split.length;
  44141. for (i = 0; i < len; i++) {
  44142. if (!split[i]) {
  44143. continue;
  44144. }
  44145. namespaces = split[i].replace(/\*/g, '.*?');
  44146. if (namespaces[0] === '-') {
  44147. createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
  44148. } else {
  44149. createDebug.names.push(new RegExp('^' + namespaces + '$'));
  44150. }
  44151. }
  44152. for (i = 0; i < createDebug.instances.length; i++) {
  44153. var instance = createDebug.instances[i];
  44154. instance.enabled = createDebug.enabled(instance.namespace);
  44155. }
  44156. }
  44157. function disable() {
  44158. var namespaces = [].concat(createDebug.names.map(toNamespace), createDebug.skips.map(toNamespace).map(function (namespace) {
  44159. return '-' + namespace;
  44160. })).join(',');
  44161. createDebug.enable('');
  44162. return namespaces;
  44163. }
  44164. function enabled(name) {
  44165. if (name[name.length - 1] === '*') {
  44166. return true;
  44167. }
  44168. var i;
  44169. var len;
  44170. for (i = 0, len = createDebug.skips.length; i < len; i++) {
  44171. if (createDebug.skips[i].test(name)) {
  44172. return false;
  44173. }
  44174. }
  44175. for (i = 0, len = createDebug.names.length; i < len; i++) {
  44176. if (createDebug.names[i].test(name)) {
  44177. return true;
  44178. }
  44179. }
  44180. return false;
  44181. }
  44182. function toNamespace(regexp) {
  44183. return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*');
  44184. }
  44185. function coerce(val) {
  44186. if (val instanceof Error) {
  44187. return val.stack || val.message;
  44188. }
  44189. return val;
  44190. }
  44191. createDebug.enable(createDebug.load());
  44192. return createDebug;
  44193. }
  44194. var common$1 = setup$2;
  44195. var browser$4 = createCommonjsModule(function (module, exports) {
  44196. exports.log = log;
  44197. exports.formatArgs = formatArgs;
  44198. exports.save = save;
  44199. exports.load = load;
  44200. exports.useColors = useColors;
  44201. exports.storage = localstorage();
  44202. 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'];
  44203. function useColors() {
  44204. if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
  44205. return true;
  44206. }
  44207. if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
  44208. return false;
  44209. }
  44210. 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+)/);
  44211. }
  44212. function formatArgs(args) {
  44213. args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
  44214. if (!this.useColors) {
  44215. return;
  44216. }
  44217. var c = 'color: ' + this.color;
  44218. args.splice(1, 0, c, 'color: inherit');
  44219. var index = 0;
  44220. var lastC = 0;
  44221. args[0].replace(/%[a-zA-Z%]/g, function (match) {
  44222. if (match === '%%') {
  44223. return;
  44224. }
  44225. index++;
  44226. if (match === '%c') {
  44227. lastC = index;
  44228. }
  44229. });
  44230. args.splice(lastC, 0, c);
  44231. }
  44232. function log() {
  44233. var _console;
  44234. return typeof console === 'object' && console.log && (_console = console).log.apply(_console, arguments);
  44235. }
  44236. function save(namespaces) {
  44237. try {
  44238. if (namespaces) {
  44239. exports.storage.setItem('debug', namespaces);
  44240. } else {
  44241. exports.storage.removeItem('debug');
  44242. }
  44243. } catch (error) {}
  44244. }
  44245. function load() {
  44246. var r;
  44247. try {
  44248. r = exports.storage.getItem('debug');
  44249. } catch (error) {}
  44250. if (!r && typeof process !== 'undefined' && 'env' in process) {
  44251. r = process.env.DEBUG;
  44252. }
  44253. return r;
  44254. }
  44255. function localstorage() {
  44256. try {
  44257. return localStorage;
  44258. } catch (error) {}
  44259. }
  44260. module.exports = common$1(exports);
  44261. var formatters = module.exports.formatters;
  44262. formatters.j = function (v) {
  44263. try {
  44264. return JSON.stringify(v);
  44265. } catch (error) {
  44266. return '[UnexpectedJSONParseError]: ' + error.message;
  44267. }
  44268. };
  44269. });
  44270. var browser_1$1 = browser$4.log;
  44271. var browser_2$1 = browser$4.formatArgs;
  44272. var browser_3$1 = browser$4.save;
  44273. var browser_4$1 = browser$4.load;
  44274. var browser_5$1 = browser$4.useColors;
  44275. var browser_6$1 = browser$4.storage;
  44276. var browser_7$1 = browser$4.colors;
  44277. var removed = {
  44278. auxiliaryComment: {
  44279. message: "Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"
  44280. },
  44281. blacklist: {
  44282. message: "Put the specific transforms you want in the `plugins` option"
  44283. },
  44284. breakConfig: {
  44285. message: "This is not a necessary option in Babel 6"
  44286. },
  44287. experimental: {
  44288. message: "Put the specific transforms you want in the `plugins` option"
  44289. },
  44290. externalHelpers: {
  44291. message: "Use the `external-helpers` plugin instead. " + "Check out http://babeljs.io/docs/plugins/external-helpers/"
  44292. },
  44293. extra: {
  44294. message: ""
  44295. },
  44296. jsxPragma: {
  44297. message: "use the `pragma` option in the `react-jsx` plugin. " + "Check out http://babeljs.io/docs/plugins/transform-react-jsx/"
  44298. },
  44299. loose: {
  44300. message: "Specify the `loose` option for the relevant plugin you are using " + "or use a preset that sets the option."
  44301. },
  44302. metadataUsedHelpers: {
  44303. message: "Not required anymore as this is enabled by default"
  44304. },
  44305. modules: {
  44306. message: "Use the corresponding module transform plugin in the `plugins` option. " + "Check out http://babeljs.io/docs/plugins/#modules"
  44307. },
  44308. nonStandard: {
  44309. 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/"
  44310. },
  44311. optional: {
  44312. message: "Put the specific transforms you want in the `plugins` option"
  44313. },
  44314. sourceMapName: {
  44315. message: "The `sourceMapName` option has been removed because it makes more sense for the " + "tooling that calls Babel to assign `map.file` themselves."
  44316. },
  44317. stage: {
  44318. message: "Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"
  44319. },
  44320. whitelist: {
  44321. message: "Put the specific transforms you want in the `plugins` option"
  44322. },
  44323. resolveModuleSource: {
  44324. version: 6,
  44325. message: "Use `babel-plugin-module-resolver@3`'s 'resolvePath' options"
  44326. },
  44327. metadata: {
  44328. version: 6,
  44329. message: "Generated plugin metadata is always included in the output result"
  44330. },
  44331. sourceMapTarget: {
  44332. version: 6,
  44333. message: "The `sourceMapTarget` option has been removed because it makes more sense for the tooling " + "that calls Babel to assign `map.file` themselves."
  44334. }
  44335. };
  44336. function msg(loc) {
  44337. switch (loc.type) {
  44338. case "root":
  44339. return "";
  44340. case "env":
  44341. return msg(loc.parent) + ".env[\"" + loc.name + "\"]";
  44342. case "overrides":
  44343. return msg(loc.parent) + ".overrides[" + loc.index + "]";
  44344. case "option":
  44345. return msg(loc.parent) + "." + loc.name;
  44346. case "access":
  44347. return msg(loc.parent) + "[" + JSON.stringify(loc.name) + "]";
  44348. default:
  44349. throw new Error("Assertion failure: Unknown type " + loc.type);
  44350. }
  44351. }
  44352. function access(loc, name) {
  44353. return {
  44354. type: "access",
  44355. name: name,
  44356. parent: loc
  44357. };
  44358. }
  44359. function assertRootMode(loc, value) {
  44360. if (value !== undefined && value !== "root" && value !== "upward" && value !== "upward-optional") {
  44361. throw new Error(msg(loc) + " must be a \"root\", \"upward\", \"upward-optional\" or undefined");
  44362. }
  44363. return value;
  44364. }
  44365. function assertSourceMaps(loc, value) {
  44366. if (value !== undefined && typeof value !== "boolean" && value !== "inline" && value !== "both") {
  44367. throw new Error(msg(loc) + " must be a boolean, \"inline\", \"both\", or undefined");
  44368. }
  44369. return value;
  44370. }
  44371. function assertCompact(loc, value) {
  44372. if (value !== undefined && typeof value !== "boolean" && value !== "auto") {
  44373. throw new Error(msg(loc) + " must be a boolean, \"auto\", or undefined");
  44374. }
  44375. return value;
  44376. }
  44377. function assertSourceType(loc, value) {
  44378. if (value !== undefined && value !== "module" && value !== "script" && value !== "unambiguous") {
  44379. throw new Error(msg(loc) + " must be \"module\", \"script\", \"unambiguous\", or undefined");
  44380. }
  44381. return value;
  44382. }
  44383. function assertCallerMetadata(loc, value) {
  44384. var obj = assertObject(loc, value);
  44385. if (obj) {
  44386. if (typeof obj["name"] !== "string") {
  44387. throw new Error(msg(loc) + " set but does not contain \"name\" property string");
  44388. }
  44389. for (var _i = 0, _Object$keys = Object.keys(obj); _i < _Object$keys.length; _i++) {
  44390. var prop = _Object$keys[_i];
  44391. var propLoc = access(loc, prop);
  44392. var _value = obj[prop];
  44393. if (_value != null && typeof _value !== "boolean" && typeof _value !== "string" && typeof _value !== "number") {
  44394. throw new Error(msg(propLoc) + " must be null, undefined, a boolean, a string, or a number.");
  44395. }
  44396. }
  44397. }
  44398. return value;
  44399. }
  44400. function assertInputSourceMap(loc, value) {
  44401. if (value !== undefined && typeof value !== "boolean" && (typeof value !== "object" || !value)) {
  44402. throw new Error(msg(loc) + " must be a boolean, object, or undefined");
  44403. }
  44404. return value;
  44405. }
  44406. function assertString(loc, value) {
  44407. if (value !== undefined && typeof value !== "string") {
  44408. throw new Error(msg(loc) + " must be a string, or undefined");
  44409. }
  44410. return value;
  44411. }
  44412. function assertFunction$1(loc, value) {
  44413. if (value !== undefined && typeof value !== "function") {
  44414. throw new Error(msg(loc) + " must be a function, or undefined");
  44415. }
  44416. return value;
  44417. }
  44418. function assertBoolean(loc, value) {
  44419. if (value !== undefined && typeof value !== "boolean") {
  44420. throw new Error(msg(loc) + " must be a boolean, or undefined");
  44421. }
  44422. return value;
  44423. }
  44424. function assertObject(loc, value) {
  44425. if (value !== undefined && (typeof value !== "object" || Array.isArray(value) || !value)) {
  44426. throw new Error(msg(loc) + " must be an object, or undefined");
  44427. }
  44428. return value;
  44429. }
  44430. function assertArray(loc, value) {
  44431. if (value != null && !Array.isArray(value)) {
  44432. throw new Error(msg(loc) + " must be an array, or undefined");
  44433. }
  44434. return value;
  44435. }
  44436. function assertIgnoreList(loc, value) {
  44437. var arr = assertArray(loc, value);
  44438. if (arr) {
  44439. arr.forEach(function (item, i) {
  44440. return assertIgnoreItem(access(loc, i), item);
  44441. });
  44442. }
  44443. return arr;
  44444. }
  44445. function assertIgnoreItem(loc, value) {
  44446. if (typeof value !== "string" && typeof value !== "function" && !(value instanceof RegExp)) {
  44447. throw new Error(msg(loc) + " must be an array of string/Function/RegExp values, or undefined");
  44448. }
  44449. return value;
  44450. }
  44451. function assertConfigApplicableTest(loc, value) {
  44452. if (value === undefined) return value;
  44453. if (Array.isArray(value)) {
  44454. value.forEach(function (item, i) {
  44455. if (!checkValidTest(item)) {
  44456. throw new Error(msg(access(loc, i)) + " must be a string/Function/RegExp.");
  44457. }
  44458. });
  44459. } else if (!checkValidTest(value)) {
  44460. throw new Error(msg(loc) + " must be a string/Function/RegExp, or an array of those");
  44461. }
  44462. return value;
  44463. }
  44464. function checkValidTest(value) {
  44465. return typeof value === "string" || typeof value === "function" || value instanceof RegExp;
  44466. }
  44467. function assertConfigFileSearch(loc, value) {
  44468. if (value !== undefined && typeof value !== "boolean" && typeof value !== "string") {
  44469. throw new Error(msg(loc) + " must be a undefined, a boolean, a string, " + ("got " + JSON.stringify(value)));
  44470. }
  44471. return value;
  44472. }
  44473. function assertBabelrcSearch(loc, value) {
  44474. if (value === undefined || typeof value === "boolean") return value;
  44475. if (Array.isArray(value)) {
  44476. value.forEach(function (item, i) {
  44477. if (!checkValidTest(item)) {
  44478. throw new Error(msg(access(loc, i)) + " must be a string/Function/RegExp.");
  44479. }
  44480. });
  44481. } else if (!checkValidTest(value)) {
  44482. throw new Error(msg(loc) + " must be a undefined, a boolean, a string/Function/RegExp " + ("or an array of those, got " + JSON.stringify(value)));
  44483. }
  44484. return value;
  44485. }
  44486. function assertPluginList(loc, value) {
  44487. var arr = assertArray(loc, value);
  44488. if (arr) {
  44489. arr.forEach(function (item, i) {
  44490. return assertPluginItem(access(loc, i), item);
  44491. });
  44492. }
  44493. return arr;
  44494. }
  44495. function assertPluginItem(loc, value) {
  44496. if (Array.isArray(value)) {
  44497. if (value.length === 0) {
  44498. throw new Error(msg(loc) + " must include an object");
  44499. }
  44500. if (value.length > 3) {
  44501. throw new Error(msg(loc) + " may only be a two-tuple or three-tuple");
  44502. }
  44503. assertPluginTarget(access(loc, 0), value[0]);
  44504. if (value.length > 1) {
  44505. var opts = value[1];
  44506. if (opts !== undefined && opts !== false && (typeof opts !== "object" || Array.isArray(opts) || opts === null)) {
  44507. throw new Error(msg(access(loc, 1)) + " must be an object, false, or undefined");
  44508. }
  44509. }
  44510. if (value.length === 3) {
  44511. var name = value[2];
  44512. if (name !== undefined && typeof name !== "string") {
  44513. throw new Error(msg(access(loc, 2)) + " must be a string, or undefined");
  44514. }
  44515. }
  44516. } else {
  44517. assertPluginTarget(loc, value);
  44518. }
  44519. return value;
  44520. }
  44521. function assertPluginTarget(loc, value) {
  44522. if ((typeof value !== "object" || !value) && typeof value !== "string" && typeof value !== "function") {
  44523. throw new Error(msg(loc) + " must be a string, object, function");
  44524. }
  44525. return value;
  44526. }
  44527. var ROOT_VALIDATORS = {
  44528. cwd: assertString,
  44529. root: assertString,
  44530. rootMode: assertRootMode,
  44531. configFile: assertConfigFileSearch,
  44532. caller: assertCallerMetadata,
  44533. filename: assertString,
  44534. filenameRelative: assertString,
  44535. code: assertBoolean,
  44536. ast: assertBoolean,
  44537. envName: assertString
  44538. };
  44539. var BABELRC_VALIDATORS = {
  44540. babelrc: assertBoolean,
  44541. babelrcRoots: assertBabelrcSearch
  44542. };
  44543. var NONPRESET_VALIDATORS = {
  44544. "extends": assertString,
  44545. ignore: assertIgnoreList,
  44546. only: assertIgnoreList
  44547. };
  44548. var COMMON_VALIDATORS = {
  44549. inputSourceMap: assertInputSourceMap,
  44550. presets: assertPluginList,
  44551. plugins: assertPluginList,
  44552. passPerPreset: assertBoolean,
  44553. env: assertEnvSet,
  44554. overrides: assertOverridesList,
  44555. test: assertConfigApplicableTest,
  44556. include: assertConfigApplicableTest,
  44557. exclude: assertConfigApplicableTest,
  44558. retainLines: assertBoolean,
  44559. comments: assertBoolean,
  44560. shouldPrintComment: assertFunction$1,
  44561. compact: assertCompact,
  44562. minified: assertBoolean,
  44563. auxiliaryCommentBefore: assertString,
  44564. auxiliaryCommentAfter: assertString,
  44565. sourceType: assertSourceType,
  44566. wrapPluginVisitorMethod: assertFunction$1,
  44567. highlightCode: assertBoolean,
  44568. sourceMaps: assertSourceMaps,
  44569. sourceMap: assertSourceMaps,
  44570. sourceFileName: assertString,
  44571. sourceRoot: assertString,
  44572. getModuleId: assertFunction$1,
  44573. moduleRoot: assertString,
  44574. moduleIds: assertBoolean,
  44575. moduleId: assertString,
  44576. parserOpts: assertObject,
  44577. generatorOpts: assertObject
  44578. };
  44579. function getSource$1(loc) {
  44580. return loc.type === "root" ? loc.source : getSource$1(loc.parent);
  44581. }
  44582. function validate$3(type, opts) {
  44583. return validateNested({
  44584. type: "root",
  44585. source: type
  44586. }, opts);
  44587. }
  44588. function validateNested(loc, opts) {
  44589. var type = getSource$1(loc);
  44590. assertNoDuplicateSourcemap(opts);
  44591. Object.keys(opts).forEach(function (key) {
  44592. var optLoc = {
  44593. type: "option",
  44594. name: key,
  44595. parent: loc
  44596. };
  44597. if (type === "preset" && NONPRESET_VALIDATORS[key]) {
  44598. throw new Error(msg(optLoc) + " is not allowed in preset options");
  44599. }
  44600. if (type !== "arguments" && ROOT_VALIDATORS[key]) {
  44601. throw new Error(msg(optLoc) + " is only allowed in root programmatic options");
  44602. }
  44603. if (type !== "arguments" && type !== "configfile" && BABELRC_VALIDATORS[key]) {
  44604. if (type === "babelrcfile" || type === "extendsfile") {
  44605. 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");
  44606. }
  44607. throw new Error(msg(optLoc) + " is only allowed in root programmatic options, or babel.config.js/config file options");
  44608. }
  44609. var validator = COMMON_VALIDATORS[key] || NONPRESET_VALIDATORS[key] || BABELRC_VALIDATORS[key] || ROOT_VALIDATORS[key] || throwUnknownError;
  44610. validator(optLoc, opts[key]);
  44611. });
  44612. return opts;
  44613. }
  44614. function throwUnknownError(loc) {
  44615. var key = loc.name;
  44616. if (removed[key]) {
  44617. var _removed$key = removed[key],
  44618. message = _removed$key.message,
  44619. _removed$key$version = _removed$key.version,
  44620. version = _removed$key$version === void 0 ? 5 : _removed$key$version;
  44621. throw new ReferenceError("Using removed Babel " + version + " option: " + msg(loc) + " - " + message);
  44622. } else {
  44623. var unknownOptErr = "Unknown option: " + msg(loc) + ". Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.";
  44624. throw new ReferenceError(unknownOptErr);
  44625. }
  44626. }
  44627. function has$3(obj, key) {
  44628. return Object.prototype.hasOwnProperty.call(obj, key);
  44629. }
  44630. function assertNoDuplicateSourcemap(opts) {
  44631. if (has$3(opts, "sourceMap") && has$3(opts, "sourceMaps")) {
  44632. throw new Error(".sourceMap is an alias for .sourceMaps, cannot use both");
  44633. }
  44634. }
  44635. function assertEnvSet(loc, value) {
  44636. if (loc.parent.type === "env") {
  44637. throw new Error(msg(loc) + " is not allowed inside of another .env block");
  44638. }
  44639. var parent = loc.parent;
  44640. var obj = assertObject(loc, value);
  44641. if (obj) {
  44642. for (var _i = 0, _Object$keys = Object.keys(obj); _i < _Object$keys.length; _i++) {
  44643. var envName = _Object$keys[_i];
  44644. var env = assertObject(access(loc, envName), obj[envName]);
  44645. if (!env) continue;
  44646. var envLoc = {
  44647. type: "env",
  44648. name: envName,
  44649. parent: parent
  44650. };
  44651. validateNested(envLoc, env);
  44652. }
  44653. }
  44654. return obj;
  44655. }
  44656. function assertOverridesList(loc, value) {
  44657. if (loc.parent.type === "env") {
  44658. throw new Error(msg(loc) + " is not allowed inside an .env block");
  44659. }
  44660. if (loc.parent.type === "overrides") {
  44661. throw new Error(msg(loc) + " is not allowed inside an .overrides block");
  44662. }
  44663. var parent = loc.parent;
  44664. var arr = assertArray(loc, value);
  44665. if (arr) {
  44666. for (var _iterator = arr.entries(), _isArray = Array.isArray(_iterator), _i2 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  44667. var _ref;
  44668. if (_isArray) {
  44669. if (_i2 >= _iterator.length) break;
  44670. _ref = _iterator[_i2++];
  44671. } else {
  44672. _i2 = _iterator.next();
  44673. if (_i2.done) break;
  44674. _ref = _i2.value;
  44675. }
  44676. var _ref2 = _ref,
  44677. index = _ref2[0],
  44678. item = _ref2[1];
  44679. var objLoc = access(loc, index);
  44680. var env = assertObject(objLoc, item);
  44681. if (!env) throw new Error(msg(objLoc) + " must be an object");
  44682. var overridesLoc = {
  44683. type: "overrides",
  44684. index: index,
  44685. parent: parent
  44686. };
  44687. validateNested(overridesLoc, env);
  44688. }
  44689. }
  44690. return arr;
  44691. }
  44692. var reRegExpChar$1 = /[\\^$.*+?()[\]{}|]/g,
  44693. reHasRegExpChar = RegExp(reRegExpChar$1.source);
  44694. function escapeRegExp(string) {
  44695. string = toString_1(string);
  44696. return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar$1, '\\$&') : string;
  44697. }
  44698. var escapeRegExp_1 = escapeRegExp;
  44699. var sep$1 = "\\" + path$1.sep;
  44700. var endSep = "(?:" + sep$1 + "|$)";
  44701. var substitution = "[^" + sep$1 + "]+";
  44702. var starPat = "(?:" + substitution + sep$1 + ")";
  44703. var starPatLast = "(?:" + substitution + endSep + ")";
  44704. var starStarPat = starPat + "*?";
  44705. var starStarPatLast = starPat + "*?" + starPatLast + "?";
  44706. function pathToPattern(pattern, dirname) {
  44707. var parts = path$1.resolve(dirname, pattern).split(path$1.sep);
  44708. return new RegExp(["^"].concat(parts.map(function (part, i) {
  44709. var last = i === parts.length - 1;
  44710. if (part === "**") return last ? starStarPatLast : starStarPat;
  44711. if (part === "*") return last ? starPatLast : starPat;
  44712. if (part.indexOf("*.") === 0) {
  44713. return substitution + escapeRegExp_1(part.slice(1)) + (last ? endSep : sep$1);
  44714. }
  44715. return escapeRegExp_1(part) + (last ? endSep : sep$1);
  44716. })).join(""));
  44717. }
  44718. var _marked$2 = regenerator.mark(buildPresetChain),
  44719. _marked2$2 = regenerator.mark(buildRootChain),
  44720. _marked3$2 = regenerator.mark(mergeExtendsChain);
  44721. var debug = browser$4("babel:config:config-chain");
  44722. function buildPresetChain(arg, context) {
  44723. var chain;
  44724. return regenerator.wrap(function buildPresetChain$(_context) {
  44725. while (1) {
  44726. switch (_context.prev = _context.next) {
  44727. case 0:
  44728. return _context.delegateYield(buildPresetChainWalker(arg, context), "t0", 1);
  44729. case 1:
  44730. chain = _context.t0;
  44731. if (chain) {
  44732. _context.next = 4;
  44733. break;
  44734. }
  44735. return _context.abrupt("return", null);
  44736. case 4:
  44737. return _context.abrupt("return", {
  44738. plugins: dedupDescriptors(chain.plugins),
  44739. presets: dedupDescriptors(chain.presets),
  44740. options: chain.options.map(function (o) {
  44741. return normalizeOptions$1(o);
  44742. })
  44743. });
  44744. case 5:
  44745. case "end":
  44746. return _context.stop();
  44747. }
  44748. }
  44749. }, _marked$2);
  44750. }
  44751. var buildPresetChainWalker = makeChainWalker({
  44752. init: function init(arg) {
  44753. return arg;
  44754. },
  44755. root: function root(preset) {
  44756. return loadPresetDescriptors(preset);
  44757. },
  44758. env: function env(preset, envName) {
  44759. return loadPresetEnvDescriptors(preset)(envName);
  44760. },
  44761. overrides: function overrides(preset, index) {
  44762. return loadPresetOverridesDescriptors(preset)(index);
  44763. },
  44764. overridesEnv: function overridesEnv(preset, index, envName) {
  44765. return loadPresetOverridesEnvDescriptors(preset)(index)(envName);
  44766. }
  44767. });
  44768. var loadPresetDescriptors = makeWeakCacheSync(function (preset) {
  44769. return buildRootDescriptors(preset, preset.alias, createUncachedDescriptors);
  44770. });
  44771. var loadPresetEnvDescriptors = makeWeakCacheSync(function (preset) {
  44772. return makeStrongCacheSync(function (envName) {
  44773. return buildEnvDescriptors(preset, preset.alias, createUncachedDescriptors, envName);
  44774. });
  44775. });
  44776. var loadPresetOverridesDescriptors = makeWeakCacheSync(function (preset) {
  44777. return makeStrongCacheSync(function (index) {
  44778. return buildOverrideDescriptors(preset, preset.alias, createUncachedDescriptors, index);
  44779. });
  44780. });
  44781. var loadPresetOverridesEnvDescriptors = makeWeakCacheSync(function (preset) {
  44782. return makeStrongCacheSync(function (index) {
  44783. return makeStrongCacheSync(function (envName) {
  44784. return buildOverrideEnvDescriptors(preset, preset.alias, createUncachedDescriptors, index, envName);
  44785. });
  44786. });
  44787. });
  44788. function buildRootChain(opts, context) {
  44789. var programmaticChain, configFile, babelrc, babelrcRoots, babelrcRootsDirectory, configFileChain, validatedFile, result, pkgData, ignoreFile, babelrcFile, fileChain, _ref, _result, chain;
  44790. return regenerator.wrap(function buildRootChain$(_context2) {
  44791. while (1) {
  44792. switch (_context2.prev = _context2.next) {
  44793. case 0:
  44794. return _context2.delegateYield(loadProgrammaticChain({
  44795. options: opts,
  44796. dirname: context.cwd
  44797. }, context), "t0", 1);
  44798. case 1:
  44799. programmaticChain = _context2.t0;
  44800. if (programmaticChain) {
  44801. _context2.next = 4;
  44802. break;
  44803. }
  44804. return _context2.abrupt("return", null);
  44805. case 4:
  44806. if (!(typeof opts.configFile === "string")) {
  44807. _context2.next = 9;
  44808. break;
  44809. }
  44810. return _context2.delegateYield(loadConfig(opts.configFile, context.cwd, context.envName, context.caller), "t1", 6);
  44811. case 6:
  44812. configFile = _context2.t1;
  44813. _context2.next = 12;
  44814. break;
  44815. case 9:
  44816. if (!(opts.configFile !== false)) {
  44817. _context2.next = 12;
  44818. break;
  44819. }
  44820. return _context2.delegateYield(findRootConfig(context.root, context.envName, context.caller), "t2", 11);
  44821. case 11:
  44822. configFile = _context2.t2;
  44823. case 12:
  44824. babelrc = opts.babelrc, babelrcRoots = opts.babelrcRoots;
  44825. babelrcRootsDirectory = context.cwd;
  44826. configFileChain = emptyChain();
  44827. if (!configFile) {
  44828. _context2.next = 24;
  44829. break;
  44830. }
  44831. validatedFile = validateConfigFile(configFile);
  44832. return _context2.delegateYield(loadFileChain(validatedFile, context), "t3", 18);
  44833. case 18:
  44834. result = _context2.t3;
  44835. if (result) {
  44836. _context2.next = 21;
  44837. break;
  44838. }
  44839. return _context2.abrupt("return", null);
  44840. case 21:
  44841. if (babelrc === undefined) {
  44842. babelrc = validatedFile.options.babelrc;
  44843. }
  44844. if (babelrcRoots === undefined) {
  44845. babelrcRootsDirectory = validatedFile.dirname;
  44846. babelrcRoots = validatedFile.options.babelrcRoots;
  44847. }
  44848. mergeChain(configFileChain, result);
  44849. case 24:
  44850. if (!(typeof context.filename === "string")) {
  44851. _context2.next = 29;
  44852. break;
  44853. }
  44854. return _context2.delegateYield(findPackageData(context.filename), "t5", 26);
  44855. case 26:
  44856. _context2.t4 = _context2.t5;
  44857. _context2.next = 30;
  44858. break;
  44859. case 29:
  44860. _context2.t4 = null;
  44861. case 30:
  44862. pkgData = _context2.t4;
  44863. fileChain = emptyChain();
  44864. if (!((babelrc === true || babelrc === undefined) && pkgData && babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory))) {
  44865. _context2.next = 45;
  44866. break;
  44867. }
  44868. return _context2.delegateYield(findRelativeConfig(pkgData, context.envName, context.caller), "t6", 34);
  44869. case 34:
  44870. _ref = _context2.t6;
  44871. ignoreFile = _ref.ignore;
  44872. babelrcFile = _ref.config;
  44873. if (!(ignoreFile && shouldIgnore(context, ignoreFile.ignore, null, ignoreFile.dirname))) {
  44874. _context2.next = 39;
  44875. break;
  44876. }
  44877. return _context2.abrupt("return", null);
  44878. case 39:
  44879. if (!babelrcFile) {
  44880. _context2.next = 45;
  44881. break;
  44882. }
  44883. return _context2.delegateYield(loadFileChain(validateBabelrcFile(babelrcFile), context), "t7", 41);
  44884. case 41:
  44885. _result = _context2.t7;
  44886. if (_result) {
  44887. _context2.next = 44;
  44888. break;
  44889. }
  44890. return _context2.abrupt("return", null);
  44891. case 44:
  44892. mergeChain(fileChain, _result);
  44893. case 45:
  44894. chain = mergeChain(mergeChain(mergeChain(emptyChain(), configFileChain), fileChain), programmaticChain);
  44895. return _context2.abrupt("return", {
  44896. plugins: dedupDescriptors(chain.plugins),
  44897. presets: dedupDescriptors(chain.presets),
  44898. options: chain.options.map(function (o) {
  44899. return normalizeOptions$1(o);
  44900. }),
  44901. ignore: ignoreFile || undefined,
  44902. babelrc: babelrcFile || undefined,
  44903. config: configFile || undefined
  44904. });
  44905. case 47:
  44906. case "end":
  44907. return _context2.stop();
  44908. }
  44909. }
  44910. }, _marked2$2);
  44911. }
  44912. function babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory) {
  44913. if (typeof babelrcRoots === "boolean") return babelrcRoots;
  44914. var absoluteRoot = context.root;
  44915. if (babelrcRoots === undefined) {
  44916. return pkgData.directories.indexOf(absoluteRoot) !== -1;
  44917. }
  44918. var babelrcPatterns = babelrcRoots;
  44919. if (!Array.isArray(babelrcPatterns)) babelrcPatterns = [babelrcPatterns];
  44920. babelrcPatterns = babelrcPatterns.map(function (pat) {
  44921. return typeof pat === "string" ? path$1.resolve(babelrcRootsDirectory, pat) : pat;
  44922. });
  44923. if (babelrcPatterns.length === 1 && babelrcPatterns[0] === absoluteRoot) {
  44924. return pkgData.directories.indexOf(absoluteRoot) !== -1;
  44925. }
  44926. return babelrcPatterns.some(function (pat) {
  44927. if (typeof pat === "string") {
  44928. pat = pathToPattern(pat, babelrcRootsDirectory);
  44929. }
  44930. return pkgData.directories.some(function (directory) {
  44931. return matchPattern(pat, babelrcRootsDirectory, directory, context);
  44932. });
  44933. });
  44934. }
  44935. var validateConfigFile = makeWeakCacheSync(function (file) {
  44936. return {
  44937. filepath: file.filepath,
  44938. dirname: file.dirname,
  44939. options: validate$3("configfile", file.options)
  44940. };
  44941. });
  44942. var validateBabelrcFile = makeWeakCacheSync(function (file) {
  44943. return {
  44944. filepath: file.filepath,
  44945. dirname: file.dirname,
  44946. options: validate$3("babelrcfile", file.options)
  44947. };
  44948. });
  44949. var validateExtendFile = makeWeakCacheSync(function (file) {
  44950. return {
  44951. filepath: file.filepath,
  44952. dirname: file.dirname,
  44953. options: validate$3("extendsfile", file.options)
  44954. };
  44955. });
  44956. var loadProgrammaticChain = makeChainWalker({
  44957. root: function root(input) {
  44958. return buildRootDescriptors(input, "base", createCachedDescriptors);
  44959. },
  44960. env: function env(input, envName) {
  44961. return buildEnvDescriptors(input, "base", createCachedDescriptors, envName);
  44962. },
  44963. overrides: function overrides(input, index) {
  44964. return buildOverrideDescriptors(input, "base", createCachedDescriptors, index);
  44965. },
  44966. overridesEnv: function overridesEnv(input, index, envName) {
  44967. return buildOverrideEnvDescriptors(input, "base", createCachedDescriptors, index, envName);
  44968. }
  44969. });
  44970. var loadFileChain = makeChainWalker({
  44971. root: function root(file) {
  44972. return loadFileDescriptors(file);
  44973. },
  44974. env: function env(file, envName) {
  44975. return loadFileEnvDescriptors(file)(envName);
  44976. },
  44977. overrides: function overrides(file, index) {
  44978. return loadFileOverridesDescriptors(file)(index);
  44979. },
  44980. overridesEnv: function overridesEnv(file, index, envName) {
  44981. return loadFileOverridesEnvDescriptors(file)(index)(envName);
  44982. }
  44983. });
  44984. var loadFileDescriptors = makeWeakCacheSync(function (file) {
  44985. return buildRootDescriptors(file, file.filepath, createUncachedDescriptors);
  44986. });
  44987. var loadFileEnvDescriptors = makeWeakCacheSync(function (file) {
  44988. return makeStrongCacheSync(function (envName) {
  44989. return buildEnvDescriptors(file, file.filepath, createUncachedDescriptors, envName);
  44990. });
  44991. });
  44992. var loadFileOverridesDescriptors = makeWeakCacheSync(function (file) {
  44993. return makeStrongCacheSync(function (index) {
  44994. return buildOverrideDescriptors(file, file.filepath, createUncachedDescriptors, index);
  44995. });
  44996. });
  44997. var loadFileOverridesEnvDescriptors = makeWeakCacheSync(function (file) {
  44998. return makeStrongCacheSync(function (index) {
  44999. return makeStrongCacheSync(function (envName) {
  45000. return buildOverrideEnvDescriptors(file, file.filepath, createUncachedDescriptors, index, envName);
  45001. });
  45002. });
  45003. });
  45004. function buildRootDescriptors(_ref2, alias, descriptors) {
  45005. var dirname = _ref2.dirname,
  45006. options = _ref2.options;
  45007. return descriptors(dirname, options, alias);
  45008. }
  45009. function buildEnvDescriptors(_ref3, alias, descriptors, envName) {
  45010. var dirname = _ref3.dirname,
  45011. options = _ref3.options;
  45012. var opts = options.env && options.env[envName];
  45013. return opts ? descriptors(dirname, opts, alias + ".env[\"" + envName + "\"]") : null;
  45014. }
  45015. function buildOverrideDescriptors(_ref4, alias, descriptors, index) {
  45016. var dirname = _ref4.dirname,
  45017. options = _ref4.options;
  45018. var opts = options.overrides && options.overrides[index];
  45019. if (!opts) throw new Error("Assertion failure - missing override");
  45020. return descriptors(dirname, opts, alias + ".overrides[" + index + "]");
  45021. }
  45022. function buildOverrideEnvDescriptors(_ref5, alias, descriptors, index, envName) {
  45023. var dirname = _ref5.dirname,
  45024. options = _ref5.options;
  45025. var override = options.overrides && options.overrides[index];
  45026. if (!override) throw new Error("Assertion failure - missing override");
  45027. var opts = override.env && override.env[envName];
  45028. return opts ? descriptors(dirname, opts, alias + ".overrides[" + index + "].env[\"" + envName + "\"]") : null;
  45029. }
  45030. function makeChainWalker(_ref6) {
  45031. var root = _ref6.root,
  45032. env = _ref6.env,
  45033. overrides = _ref6.overrides,
  45034. overridesEnv = _ref6.overridesEnv;
  45035. return regenerator.mark(function _callee(input, context, files) {
  45036. var dirname, flattenedConfigs, rootOpts, envOpts, chain, _i, _flattenedConfigs, op;
  45037. return regenerator.wrap(function _callee$(_context3) {
  45038. while (1) {
  45039. switch (_context3.prev = _context3.next) {
  45040. case 0:
  45041. if (files === void 0) {
  45042. files = new Set();
  45043. }
  45044. dirname = input.dirname;
  45045. flattenedConfigs = [];
  45046. rootOpts = root(input);
  45047. if (configIsApplicable(rootOpts, dirname, context)) {
  45048. flattenedConfigs.push(rootOpts);
  45049. envOpts = env(input, context.envName);
  45050. if (envOpts && configIsApplicable(envOpts, dirname, context)) {
  45051. flattenedConfigs.push(envOpts);
  45052. }
  45053. (rootOpts.options.overrides || []).forEach(function (_, index) {
  45054. var overrideOps = overrides(input, index);
  45055. if (configIsApplicable(overrideOps, dirname, context)) {
  45056. flattenedConfigs.push(overrideOps);
  45057. var overrideEnvOpts = overridesEnv(input, index, context.envName);
  45058. if (overrideEnvOpts && configIsApplicable(overrideEnvOpts, dirname, context)) {
  45059. flattenedConfigs.push(overrideEnvOpts);
  45060. }
  45061. }
  45062. });
  45063. }
  45064. if (!flattenedConfigs.some(function (_ref7) {
  45065. var _ref7$options = _ref7.options,
  45066. ignore = _ref7$options.ignore,
  45067. only = _ref7$options.only;
  45068. return shouldIgnore(context, ignore, only, dirname);
  45069. })) {
  45070. _context3.next = 7;
  45071. break;
  45072. }
  45073. return _context3.abrupt("return", null);
  45074. case 7:
  45075. chain = emptyChain();
  45076. _i = 0, _flattenedConfigs = flattenedConfigs;
  45077. case 9:
  45078. if (!(_i < _flattenedConfigs.length)) {
  45079. _context3.next = 18;
  45080. break;
  45081. }
  45082. op = _flattenedConfigs[_i];
  45083. return _context3.delegateYield(mergeExtendsChain(chain, op.options, dirname, context, files), "t0", 12);
  45084. case 12:
  45085. if (_context3.t0) {
  45086. _context3.next = 14;
  45087. break;
  45088. }
  45089. return _context3.abrupt("return", null);
  45090. case 14:
  45091. mergeChainOpts(chain, op);
  45092. case 15:
  45093. _i++;
  45094. _context3.next = 9;
  45095. break;
  45096. case 18:
  45097. return _context3.abrupt("return", chain);
  45098. case 19:
  45099. case "end":
  45100. return _context3.stop();
  45101. }
  45102. }
  45103. }, _callee);
  45104. });
  45105. }
  45106. function mergeExtendsChain(chain, opts, dirname, context, files) {
  45107. var file, fileChain;
  45108. return regenerator.wrap(function mergeExtendsChain$(_context4) {
  45109. while (1) {
  45110. switch (_context4.prev = _context4.next) {
  45111. case 0:
  45112. if (!(opts["extends"] === undefined)) {
  45113. _context4.next = 2;
  45114. break;
  45115. }
  45116. return _context4.abrupt("return", true);
  45117. case 2:
  45118. return _context4.delegateYield(loadConfig(opts["extends"], dirname, context.envName, context.caller), "t0", 3);
  45119. case 3:
  45120. file = _context4.t0;
  45121. if (!files.has(file)) {
  45122. _context4.next = 6;
  45123. break;
  45124. }
  45125. throw new Error("Configuration cycle detected loading " + file.filepath + ".\n" + "File already loaded following the config chain:\n" + Array.from(files, function (file) {
  45126. return " - " + file.filepath;
  45127. }).join("\n"));
  45128. case 6:
  45129. files.add(file);
  45130. return _context4.delegateYield(loadFileChain(validateExtendFile(file), context, files), "t1", 8);
  45131. case 8:
  45132. fileChain = _context4.t1;
  45133. files["delete"](file);
  45134. if (fileChain) {
  45135. _context4.next = 12;
  45136. break;
  45137. }
  45138. return _context4.abrupt("return", false);
  45139. case 12:
  45140. mergeChain(chain, fileChain);
  45141. return _context4.abrupt("return", true);
  45142. case 14:
  45143. case "end":
  45144. return _context4.stop();
  45145. }
  45146. }
  45147. }, _marked3$2);
  45148. }
  45149. function mergeChain(target, source) {
  45150. var _target$options, _target$plugins, _target$presets;
  45151. (_target$options = target.options).push.apply(_target$options, source.options);
  45152. (_target$plugins = target.plugins).push.apply(_target$plugins, source.plugins);
  45153. (_target$presets = target.presets).push.apply(_target$presets, source.presets);
  45154. return target;
  45155. }
  45156. function mergeChainOpts(target, _ref8) {
  45157. var _target$plugins2, _target$presets2;
  45158. var options = _ref8.options,
  45159. plugins = _ref8.plugins,
  45160. presets = _ref8.presets;
  45161. target.options.push(options);
  45162. (_target$plugins2 = target.plugins).push.apply(_target$plugins2, plugins());
  45163. (_target$presets2 = target.presets).push.apply(_target$presets2, presets());
  45164. return target;
  45165. }
  45166. function emptyChain() {
  45167. return {
  45168. options: [],
  45169. presets: [],
  45170. plugins: []
  45171. };
  45172. }
  45173. function normalizeOptions$1(opts) {
  45174. var options = Object.assign({}, opts);
  45175. delete options["extends"];
  45176. delete options.env;
  45177. delete options.overrides;
  45178. delete options.plugins;
  45179. delete options.presets;
  45180. delete options.passPerPreset;
  45181. delete options.ignore;
  45182. delete options.only;
  45183. delete options.test;
  45184. delete options.include;
  45185. delete options.exclude;
  45186. if (Object.prototype.hasOwnProperty.call(options, "sourceMap")) {
  45187. options.sourceMaps = options.sourceMap;
  45188. delete options.sourceMap;
  45189. }
  45190. return options;
  45191. }
  45192. function dedupDescriptors(items) {
  45193. var map = new Map();
  45194. var descriptors = [];
  45195. for (var _iterator = items, _isArray = Array.isArray(_iterator), _i2 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  45196. var _ref9;
  45197. if (_isArray) {
  45198. if (_i2 >= _iterator.length) break;
  45199. _ref9 = _iterator[_i2++];
  45200. } else {
  45201. _i2 = _iterator.next();
  45202. if (_i2.done) break;
  45203. _ref9 = _i2.value;
  45204. }
  45205. var item = _ref9;
  45206. if (typeof item.value === "function") {
  45207. var fnKey = item.value;
  45208. var nameMap = map.get(fnKey);
  45209. if (!nameMap) {
  45210. nameMap = new Map();
  45211. map.set(fnKey, nameMap);
  45212. }
  45213. var desc = nameMap.get(item.name);
  45214. if (!desc) {
  45215. desc = {
  45216. value: item
  45217. };
  45218. descriptors.push(desc);
  45219. if (!item.ownPass) nameMap.set(item.name, desc);
  45220. } else {
  45221. desc.value = item;
  45222. }
  45223. } else {
  45224. descriptors.push({
  45225. value: item
  45226. });
  45227. }
  45228. }
  45229. return descriptors.reduce(function (acc, desc) {
  45230. acc.push(desc.value);
  45231. return acc;
  45232. }, []);
  45233. }
  45234. function configIsApplicable(_ref10, dirname, context) {
  45235. var options = _ref10.options;
  45236. 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));
  45237. }
  45238. function configFieldIsApplicable(context, test, dirname) {
  45239. var patterns = Array.isArray(test) ? test : [test];
  45240. return matchesPatterns(context, patterns, dirname);
  45241. }
  45242. function shouldIgnore(context, ignore, only, dirname) {
  45243. if (ignore && matchesPatterns(context, ignore, dirname)) {
  45244. debug("Ignored %o because it matched one of %O from %o", context.filename, ignore, dirname);
  45245. return true;
  45246. }
  45247. if (only && !matchesPatterns(context, only, dirname)) {
  45248. debug("Ignored %o because it failed to match one of %O from %o", context.filename, only, dirname);
  45249. return true;
  45250. }
  45251. return false;
  45252. }
  45253. function matchesPatterns(context, patterns, dirname) {
  45254. return patterns.some(function (pattern) {
  45255. return matchPattern(pattern, dirname, context.filename, context);
  45256. });
  45257. }
  45258. function matchPattern(pattern, dirname, pathToTest, context) {
  45259. if (typeof pattern === "function") {
  45260. return !!pattern(pathToTest, {
  45261. dirname: dirname,
  45262. envName: context.envName,
  45263. caller: context.caller
  45264. });
  45265. }
  45266. if (typeof pathToTest !== "string") {
  45267. throw new Error("Configuration contains string/RegExp pattern, but no filename was passed to Babel");
  45268. }
  45269. if (typeof pattern === "string") {
  45270. pattern = pathToPattern(pattern, dirname);
  45271. }
  45272. return pattern.test(pathToTest);
  45273. }
  45274. var VALIDATORS = {
  45275. name: assertString,
  45276. manipulateOptions: assertFunction$1,
  45277. pre: assertFunction$1,
  45278. post: assertFunction$1,
  45279. inherits: assertFunction$1,
  45280. visitor: assertVisitorMap,
  45281. parserOverride: assertFunction$1,
  45282. generatorOverride: assertFunction$1
  45283. };
  45284. function assertVisitorMap(key, value) {
  45285. var obj = assertObject(key, value);
  45286. if (obj) {
  45287. Object.keys(obj).forEach(function (prop) {
  45288. return assertVisitorHandler(prop, obj[prop]);
  45289. });
  45290. if (obj.enter || obj.exit) {
  45291. throw new Error("." + key + " cannot contain catch-all \"enter\" or \"exit\" handlers. Please target individual nodes.");
  45292. }
  45293. }
  45294. return obj;
  45295. }
  45296. function assertVisitorHandler(key, value) {
  45297. if (value && typeof value === "object") {
  45298. Object.keys(value).forEach(function (handler) {
  45299. if (handler !== "enter" && handler !== "exit") {
  45300. throw new Error(".visitor[\"" + key + "\"] may only have .enter and/or .exit handlers.");
  45301. }
  45302. });
  45303. } else if (typeof value !== "function") {
  45304. throw new Error(".visitor[\"" + key + "\"] must be a function");
  45305. }
  45306. return value;
  45307. }
  45308. function validatePluginObject(obj) {
  45309. var rootPath = {
  45310. type: "root",
  45311. source: "plugin"
  45312. };
  45313. Object.keys(obj).forEach(function (key) {
  45314. var validator = VALIDATORS[key];
  45315. var optLoc = {
  45316. type: "option",
  45317. name: key,
  45318. parent: rootPath
  45319. };
  45320. if (validator) validator(optLoc, obj[key]);else throw new Error("." + key + " is not a valid Plugin property");
  45321. });
  45322. return obj;
  45323. }
  45324. function makeAPI(cache) {
  45325. var env = function env(value) {
  45326. return cache.using(function (data) {
  45327. if (typeof value === "undefined") return data.envName;
  45328. if (typeof value === "function") {
  45329. return assertSimpleType(value(data.envName));
  45330. }
  45331. if (!Array.isArray(value)) value = [value];
  45332. return value.some(function (entry) {
  45333. if (typeof entry !== "string") {
  45334. throw new Error("Unexpected non-string value");
  45335. }
  45336. return entry === data.envName;
  45337. });
  45338. });
  45339. };
  45340. var caller = function caller(cb) {
  45341. return cache.using(function (data) {
  45342. return assertSimpleType(cb(data.caller));
  45343. });
  45344. };
  45345. return {
  45346. version: version$1,
  45347. cache: cache.simple(),
  45348. env: env,
  45349. async: function async() {
  45350. return false;
  45351. },
  45352. caller: caller,
  45353. assertVersion: assertVersion,
  45354. tokTypes: undefined
  45355. };
  45356. }
  45357. function assertVersion(range) {
  45358. if (typeof range === "number") {
  45359. if (!Number.isInteger(range)) {
  45360. throw new Error("Expected string or integer value.");
  45361. }
  45362. range = "^" + range + ".0.0-0";
  45363. }
  45364. if (typeof range !== "string") {
  45365. throw new Error("Expected string or integer value.");
  45366. }
  45367. if (semver.satisfies(version$1, range)) return;
  45368. var limit = Error.stackTraceLimit;
  45369. if (typeof limit === "number" && limit < 25) {
  45370. Error.stackTraceLimit = 25;
  45371. }
  45372. var err = new Error("Requires Babel \"" + range + "\", but was loaded with \"" + version$1 + "\". " + "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.");
  45373. if (typeof limit === "number") {
  45374. Error.stackTraceLimit = limit;
  45375. }
  45376. throw Object.assign(err, {
  45377. code: "BABEL_VERSION_UNSUPPORTED",
  45378. version: version$1,
  45379. range: range
  45380. });
  45381. }
  45382. var _marked$3 = regenerator.mark(resolveRootMode),
  45383. _marked2$3 = regenerator.mark(loadPrivatePartialConfig);
  45384. function resolveRootMode(rootDir, rootMode) {
  45385. var upwardRootDir, _upwardRootDir;
  45386. return regenerator.wrap(function resolveRootMode$(_context) {
  45387. while (1) {
  45388. switch (_context.prev = _context.next) {
  45389. case 0:
  45390. _context.t0 = rootMode;
  45391. _context.next = _context.t0 === "root" ? 3 : _context.t0 === "upward-optional" ? 4 : _context.t0 === "upward" ? 7 : 12;
  45392. break;
  45393. case 3:
  45394. return _context.abrupt("return", rootDir);
  45395. case 4:
  45396. return _context.delegateYield(findConfigUpwards(), "t1", 5);
  45397. case 5:
  45398. upwardRootDir = _context.t1;
  45399. return _context.abrupt("return", upwardRootDir === null ? rootDir : upwardRootDir);
  45400. case 7:
  45401. return _context.delegateYield(findConfigUpwards(), "t2", 8);
  45402. case 8:
  45403. _upwardRootDir = _context.t2;
  45404. if (!(_upwardRootDir !== null)) {
  45405. _context.next = 11;
  45406. break;
  45407. }
  45408. return _context.abrupt("return", _upwardRootDir);
  45409. case 11:
  45410. 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(", ") + "\".")), {
  45411. code: "BABEL_ROOT_NOT_FOUND",
  45412. dirname: rootDir
  45413. });
  45414. case 12:
  45415. throw new Error("Assertion failure - unknown rootMode value.");
  45416. case 13:
  45417. case "end":
  45418. return _context.stop();
  45419. }
  45420. }
  45421. }, _marked$3);
  45422. }
  45423. function loadPrivatePartialConfig(inputOpts) {
  45424. var args, _args$envName, envName, _args$cwd, cwd, _args$root, rootDir, _args$rootMode, rootMode, caller, absoluteCwd, absoluteRootDir, context, configChain, options;
  45425. return regenerator.wrap(function loadPrivatePartialConfig$(_context2) {
  45426. while (1) {
  45427. switch (_context2.prev = _context2.next) {
  45428. case 0:
  45429. if (!(inputOpts != null && (typeof inputOpts !== "object" || Array.isArray(inputOpts)))) {
  45430. _context2.next = 2;
  45431. break;
  45432. }
  45433. throw new Error("Babel options must be an object, null, or undefined");
  45434. case 2:
  45435. args = inputOpts ? validate$3("arguments", inputOpts) : {};
  45436. _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;
  45437. absoluteCwd = path$1.resolve(cwd);
  45438. return _context2.delegateYield(resolveRootMode(path$1.resolve(absoluteCwd, rootDir), rootMode), "t0", 6);
  45439. case 6:
  45440. absoluteRootDir = _context2.t0;
  45441. context = {
  45442. filename: typeof args.filename === "string" ? path$1.resolve(cwd, args.filename) : undefined,
  45443. cwd: absoluteCwd,
  45444. root: absoluteRootDir,
  45445. envName: envName,
  45446. caller: caller
  45447. };
  45448. return _context2.delegateYield(buildRootChain(args, context), "t1", 9);
  45449. case 9:
  45450. configChain = _context2.t1;
  45451. if (configChain) {
  45452. _context2.next = 12;
  45453. break;
  45454. }
  45455. return _context2.abrupt("return", null);
  45456. case 12:
  45457. options = {};
  45458. configChain.options.forEach(function (opts) {
  45459. mergeOptions(options, opts);
  45460. });
  45461. options.babelrc = false;
  45462. options.configFile = false;
  45463. options.passPerPreset = false;
  45464. options.envName = context.envName;
  45465. options.cwd = context.cwd;
  45466. options.root = context.root;
  45467. options.filename = typeof context.filename === "string" ? context.filename : undefined;
  45468. options.plugins = configChain.plugins.map(function (descriptor) {
  45469. return createItemFromDescriptor(descriptor);
  45470. });
  45471. options.presets = configChain.presets.map(function (descriptor) {
  45472. return createItemFromDescriptor(descriptor);
  45473. });
  45474. return _context2.abrupt("return", {
  45475. options: options,
  45476. context: context,
  45477. ignore: configChain.ignore,
  45478. babelrc: configChain.babelrc,
  45479. config: configChain.config
  45480. });
  45481. case 24:
  45482. case "end":
  45483. return _context2.stop();
  45484. }
  45485. }
  45486. }, _marked2$3);
  45487. }
  45488. var loadPartialConfig = gensync(regenerator.mark(function _callee(inputOpts) {
  45489. var result, options, babelrc, ignore, config;
  45490. return regenerator.wrap(function _callee$(_context3) {
  45491. while (1) {
  45492. switch (_context3.prev = _context3.next) {
  45493. case 0:
  45494. return _context3.delegateYield(loadPrivatePartialConfig(inputOpts), "t0", 1);
  45495. case 1:
  45496. result = _context3.t0;
  45497. if (result) {
  45498. _context3.next = 4;
  45499. break;
  45500. }
  45501. return _context3.abrupt("return", null);
  45502. case 4:
  45503. options = result.options, babelrc = result.babelrc, ignore = result.ignore, config = result.config;
  45504. (options.plugins || []).forEach(function (item) {
  45505. if (item.value instanceof Plugin) {
  45506. throw new Error("Passing cached plugin instances is not supported in " + "babel.loadPartialConfig()");
  45507. }
  45508. });
  45509. return _context3.abrupt("return", new PartialConfig(options, babelrc ? babelrc.filepath : undefined, ignore ? ignore.filepath : undefined, config ? config.filepath : undefined));
  45510. case 7:
  45511. case "end":
  45512. return _context3.stop();
  45513. }
  45514. }
  45515. }, _callee);
  45516. }));
  45517. var PartialConfig = function () {
  45518. function PartialConfig(options, babelrc, ignore, config) {
  45519. this.options = options;
  45520. this.babelignore = ignore;
  45521. this.babelrc = babelrc;
  45522. this.config = config;
  45523. Object.freeze(this);
  45524. }
  45525. var _proto = PartialConfig.prototype;
  45526. _proto.hasFilesystemConfig = function hasFilesystemConfig() {
  45527. return this.babelrc !== undefined || this.config !== undefined;
  45528. };
  45529. return PartialConfig;
  45530. }();
  45531. Object.freeze(PartialConfig.prototype);
  45532. var _marked$4 = regenerator.mark(loadPluginDescriptor),
  45533. _marked2$4 = regenerator.mark(loadPresetDescriptor);
  45534. var loadConfig$1 = gensync(regenerator.mark(function loadFullConfig(inputOpts) {
  45535. var result, options, context, optionDefaults, passes, plugins, presets, ignored, opts;
  45536. return regenerator.wrap(function loadFullConfig$(_context2) {
  45537. while (1) {
  45538. switch (_context2.prev = _context2.next) {
  45539. case 0:
  45540. return _context2.delegateYield(loadPrivatePartialConfig(inputOpts), "t0", 1);
  45541. case 1:
  45542. result = _context2.t0;
  45543. if (result) {
  45544. _context2.next = 4;
  45545. break;
  45546. }
  45547. return _context2.abrupt("return", null);
  45548. case 4:
  45549. options = result.options, context = result.context;
  45550. optionDefaults = {};
  45551. passes = [[]];
  45552. _context2.prev = 7;
  45553. plugins = options.plugins, presets = options.presets;
  45554. if (!(!plugins || !presets)) {
  45555. _context2.next = 11;
  45556. break;
  45557. }
  45558. throw new Error("Assertion failure - plugins and presets exist");
  45559. case 11:
  45560. return _context2.delegateYield(regenerator.mark(function recurseDescriptors(config, pass) {
  45561. var plugins, _iterator, _isArray, _i, _ref, descriptor, presets, _iterator2, _isArray2, _i2, _ref2, _descriptor, _iterator3, _isArray3, _i3, _ref3, _ref4, preset, _pass, _ignored;
  45562. return regenerator.wrap(function recurseDescriptors$(_context) {
  45563. while (1) {
  45564. switch (_context.prev = _context.next) {
  45565. case 0:
  45566. plugins = [];
  45567. _iterator = config.plugins, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();
  45568. case 2:
  45569. if (!_isArray) {
  45570. _context.next = 8;
  45571. break;
  45572. }
  45573. if (!(_i >= _iterator.length)) {
  45574. _context.next = 5;
  45575. break;
  45576. }
  45577. return _context.abrupt("break", 20);
  45578. case 5:
  45579. _ref = _iterator[_i++];
  45580. _context.next = 12;
  45581. break;
  45582. case 8:
  45583. _i = _iterator.next();
  45584. if (!_i.done) {
  45585. _context.next = 11;
  45586. break;
  45587. }
  45588. return _context.abrupt("break", 20);
  45589. case 11:
  45590. _ref = _i.value;
  45591. case 12:
  45592. descriptor = _ref;
  45593. if (!(descriptor.options !== false)) {
  45594. _context.next = 18;
  45595. break;
  45596. }
  45597. _context.t0 = plugins;
  45598. return _context.delegateYield(loadPluginDescriptor(descriptor, context), "t1", 16);
  45599. case 16:
  45600. _context.t2 = _context.t1;
  45601. _context.t0.push.call(_context.t0, _context.t2);
  45602. case 18:
  45603. _context.next = 2;
  45604. break;
  45605. case 20:
  45606. presets = [];
  45607. _iterator2 = config.presets, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();
  45608. case 22:
  45609. if (!_isArray2) {
  45610. _context.next = 28;
  45611. break;
  45612. }
  45613. if (!(_i2 >= _iterator2.length)) {
  45614. _context.next = 25;
  45615. break;
  45616. }
  45617. return _context.abrupt("break", 42);
  45618. case 25:
  45619. _ref2 = _iterator2[_i2++];
  45620. _context.next = 32;
  45621. break;
  45622. case 28:
  45623. _i2 = _iterator2.next();
  45624. if (!_i2.done) {
  45625. _context.next = 31;
  45626. break;
  45627. }
  45628. return _context.abrupt("break", 42);
  45629. case 31:
  45630. _ref2 = _i2.value;
  45631. case 32:
  45632. _descriptor = _ref2;
  45633. if (!(_descriptor.options !== false)) {
  45634. _context.next = 40;
  45635. break;
  45636. }
  45637. _context.t3 = presets;
  45638. return _context.delegateYield(loadPresetDescriptor(_descriptor, context), "t4", 36);
  45639. case 36:
  45640. _context.t5 = _context.t4;
  45641. _context.t6 = _descriptor.ownPass ? [] : pass;
  45642. _context.t7 = {
  45643. preset: _context.t5,
  45644. pass: _context.t6
  45645. };
  45646. _context.t3.push.call(_context.t3, _context.t7);
  45647. case 40:
  45648. _context.next = 22;
  45649. break;
  45650. case 42:
  45651. if (!(presets.length > 0)) {
  45652. _context.next = 65;
  45653. break;
  45654. }
  45655. passes.splice.apply(passes, [1, 0].concat(presets.map(function (o) {
  45656. return o.pass;
  45657. }).filter(function (p) {
  45658. return p !== pass;
  45659. })));
  45660. _iterator3 = presets, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();
  45661. case 45:
  45662. if (!_isArray3) {
  45663. _context.next = 51;
  45664. break;
  45665. }
  45666. if (!(_i3 >= _iterator3.length)) {
  45667. _context.next = 48;
  45668. break;
  45669. }
  45670. return _context.abrupt("break", 65);
  45671. case 48:
  45672. _ref3 = _iterator3[_i3++];
  45673. _context.next = 55;
  45674. break;
  45675. case 51:
  45676. _i3 = _iterator3.next();
  45677. if (!_i3.done) {
  45678. _context.next = 54;
  45679. break;
  45680. }
  45681. return _context.abrupt("break", 65);
  45682. case 54:
  45683. _ref3 = _i3.value;
  45684. case 55:
  45685. _ref4 = _ref3, preset = _ref4.preset, _pass = _ref4.pass;
  45686. if (preset) {
  45687. _context.next = 58;
  45688. break;
  45689. }
  45690. return _context.abrupt("return", true);
  45691. case 58:
  45692. return _context.delegateYield(recurseDescriptors({
  45693. plugins: preset.plugins,
  45694. presets: preset.presets
  45695. }, _pass), "t8", 59);
  45696. case 59:
  45697. _ignored = _context.t8;
  45698. if (!_ignored) {
  45699. _context.next = 62;
  45700. break;
  45701. }
  45702. return _context.abrupt("return", true);
  45703. case 62:
  45704. preset.options.forEach(function (opts) {
  45705. mergeOptions(optionDefaults, opts);
  45706. });
  45707. case 63:
  45708. _context.next = 45;
  45709. break;
  45710. case 65:
  45711. if (plugins.length > 0) {
  45712. pass.unshift.apply(pass, plugins);
  45713. }
  45714. case 66:
  45715. case "end":
  45716. return _context.stop();
  45717. }
  45718. }
  45719. }, recurseDescriptors);
  45720. })({
  45721. plugins: plugins.map(function (item) {
  45722. var desc = getItemDescriptor(item);
  45723. if (!desc) {
  45724. throw new Error("Assertion failure - must be config item");
  45725. }
  45726. return desc;
  45727. }),
  45728. presets: presets.map(function (item) {
  45729. var desc = getItemDescriptor(item);
  45730. if (!desc) {
  45731. throw new Error("Assertion failure - must be config item");
  45732. }
  45733. return desc;
  45734. })
  45735. }, passes[0]), "t1", 12);
  45736. case 12:
  45737. ignored = _context2.t1;
  45738. if (!ignored) {
  45739. _context2.next = 15;
  45740. break;
  45741. }
  45742. return _context2.abrupt("return", null);
  45743. case 15:
  45744. _context2.next = 21;
  45745. break;
  45746. case 17:
  45747. _context2.prev = 17;
  45748. _context2.t2 = _context2["catch"](7);
  45749. if (!/^\[BABEL\]/.test(_context2.t2.message)) {
  45750. _context2.t2.message = "[BABEL] " + (context.filename || "unknown") + ": " + _context2.t2.message;
  45751. }
  45752. throw _context2.t2;
  45753. case 21:
  45754. opts = optionDefaults;
  45755. mergeOptions(opts, options);
  45756. opts.plugins = passes[0];
  45757. opts.presets = passes.slice(1).filter(function (plugins) {
  45758. return plugins.length > 0;
  45759. }).map(function (plugins) {
  45760. return {
  45761. plugins: plugins
  45762. };
  45763. });
  45764. opts.passPerPreset = opts.presets.length > 0;
  45765. return _context2.abrupt("return", {
  45766. options: opts,
  45767. passes: passes
  45768. });
  45769. case 27:
  45770. case "end":
  45771. return _context2.stop();
  45772. }
  45773. }
  45774. }, loadFullConfig, null, [[7, 17]]);
  45775. }));
  45776. var loadDescriptor = makeWeakCache(regenerator.mark(function _callee(_ref5, cache) {
  45777. var value, options, dirname, alias, item, api;
  45778. return regenerator.wrap(function _callee$(_context3) {
  45779. while (1) {
  45780. switch (_context3.prev = _context3.next) {
  45781. case 0:
  45782. value = _ref5.value, options = _ref5.options, dirname = _ref5.dirname, alias = _ref5.alias;
  45783. if (!(options === false)) {
  45784. _context3.next = 3;
  45785. break;
  45786. }
  45787. throw new Error("Assertion failure");
  45788. case 3:
  45789. options = options || {};
  45790. item = value;
  45791. if (!(typeof value === "function")) {
  45792. _context3.next = 15;
  45793. break;
  45794. }
  45795. api = Object.assign({}, context, {}, makeAPI(cache));
  45796. _context3.prev = 7;
  45797. item = value(api, options, dirname);
  45798. _context3.next = 15;
  45799. break;
  45800. case 11:
  45801. _context3.prev = 11;
  45802. _context3.t0 = _context3["catch"](7);
  45803. if (alias) {
  45804. _context3.t0.message += " (While processing: " + JSON.stringify(alias) + ")";
  45805. }
  45806. throw _context3.t0;
  45807. case 15:
  45808. if (!(!item || typeof item !== "object")) {
  45809. _context3.next = 17;
  45810. break;
  45811. }
  45812. throw new Error("Plugin/Preset did not return an object.");
  45813. case 17:
  45814. if (!(typeof item.then === "function")) {
  45815. _context3.next = 20;
  45816. break;
  45817. }
  45818. return _context3.delegateYield([], "t1", 19);
  45819. case 19:
  45820. throw new Error("You appear to be using an async 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.");
  45821. case 20:
  45822. return _context3.abrupt("return", {
  45823. value: item,
  45824. options: options,
  45825. dirname: dirname,
  45826. alias: alias
  45827. });
  45828. case 21:
  45829. case "end":
  45830. return _context3.stop();
  45831. }
  45832. }
  45833. }, _callee, null, [[7, 11]]);
  45834. }));
  45835. function loadPluginDescriptor(descriptor, context) {
  45836. return regenerator.wrap(function loadPluginDescriptor$(_context4) {
  45837. while (1) {
  45838. switch (_context4.prev = _context4.next) {
  45839. case 0:
  45840. if (!(descriptor.value instanceof Plugin)) {
  45841. _context4.next = 4;
  45842. break;
  45843. }
  45844. if (!descriptor.options) {
  45845. _context4.next = 3;
  45846. break;
  45847. }
  45848. throw new Error("Passed options to an existing Plugin instance will not work.");
  45849. case 3:
  45850. return _context4.abrupt("return", descriptor.value);
  45851. case 4:
  45852. _context4.t0 = instantiatePlugin;
  45853. return _context4.delegateYield(loadDescriptor(descriptor, context), "t1", 6);
  45854. case 6:
  45855. _context4.t2 = _context4.t1;
  45856. _context4.t3 = context;
  45857. return _context4.delegateYield((0, _context4.t0)(_context4.t2, _context4.t3), "t4", 9);
  45858. case 9:
  45859. return _context4.abrupt("return", _context4.t4);
  45860. case 10:
  45861. case "end":
  45862. return _context4.stop();
  45863. }
  45864. }
  45865. }, _marked$4);
  45866. }
  45867. var instantiatePlugin = makeWeakCache(regenerator.mark(function _callee2(_ref6, cache) {
  45868. var value, options, dirname, alias, pluginObj, plugin, inheritsDescriptor, inherits;
  45869. return regenerator.wrap(function _callee2$(_context5) {
  45870. while (1) {
  45871. switch (_context5.prev = _context5.next) {
  45872. case 0:
  45873. value = _ref6.value, options = _ref6.options, dirname = _ref6.dirname, alias = _ref6.alias;
  45874. pluginObj = validatePluginObject(value);
  45875. plugin = Object.assign({}, pluginObj);
  45876. if (plugin.visitor) {
  45877. plugin.visitor = traverse$1.explode(Object.assign({}, plugin.visitor));
  45878. }
  45879. if (!plugin.inherits) {
  45880. _context5.next = 12;
  45881. break;
  45882. }
  45883. inheritsDescriptor = {
  45884. name: undefined,
  45885. alias: alias + "$inherits",
  45886. value: plugin.inherits,
  45887. options: options,
  45888. dirname: dirname
  45889. };
  45890. return _context5.delegateYield(forwardAsync(loadPluginDescriptor, function (run) {
  45891. return cache.invalidate(function (data) {
  45892. return run(inheritsDescriptor, data);
  45893. });
  45894. }), "t0", 7);
  45895. case 7:
  45896. inherits = _context5.t0;
  45897. plugin.pre = chain$1(inherits.pre, plugin.pre);
  45898. plugin.post = chain$1(inherits.post, plugin.post);
  45899. plugin.manipulateOptions = chain$1(inherits.manipulateOptions, plugin.manipulateOptions);
  45900. plugin.visitor = traverse$1.visitors.merge([inherits.visitor || {}, plugin.visitor || {}]);
  45901. case 12:
  45902. return _context5.abrupt("return", new Plugin(plugin, options, alias));
  45903. case 13:
  45904. case "end":
  45905. return _context5.stop();
  45906. }
  45907. }
  45908. }, _callee2);
  45909. }));
  45910. var validateIfOptionNeedsFilename = function validateIfOptionNeedsFilename(options, descriptor) {
  45911. if (options.test || options.include || options.exclude) {
  45912. var formattedPresetName = descriptor.name ? "\"" + descriptor.name + "\"" : "/* your preset */";
  45913. 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"));
  45914. }
  45915. };
  45916. var validatePreset = function validatePreset(preset, context, descriptor) {
  45917. if (!context.filename) {
  45918. var options = preset.options;
  45919. validateIfOptionNeedsFilename(options, descriptor);
  45920. if (options.overrides) {
  45921. options.overrides.forEach(function (overrideOptions) {
  45922. return validateIfOptionNeedsFilename(overrideOptions, descriptor);
  45923. });
  45924. }
  45925. }
  45926. };
  45927. function loadPresetDescriptor(descriptor, context) {
  45928. var preset;
  45929. return regenerator.wrap(function loadPresetDescriptor$(_context6) {
  45930. while (1) {
  45931. switch (_context6.prev = _context6.next) {
  45932. case 0:
  45933. _context6.t0 = instantiatePreset;
  45934. return _context6.delegateYield(loadDescriptor(descriptor, context), "t1", 2);
  45935. case 2:
  45936. _context6.t2 = _context6.t1;
  45937. preset = (0, _context6.t0)(_context6.t2);
  45938. validatePreset(preset, context, descriptor);
  45939. return _context6.delegateYield(buildPresetChain(preset, context), "t3", 6);
  45940. case 6:
  45941. return _context6.abrupt("return", _context6.t3);
  45942. case 7:
  45943. case "end":
  45944. return _context6.stop();
  45945. }
  45946. }
  45947. }, _marked2$4);
  45948. }
  45949. var instantiatePreset = makeWeakCacheSync(function (_ref7) {
  45950. var value = _ref7.value,
  45951. dirname = _ref7.dirname,
  45952. alias = _ref7.alias;
  45953. return {
  45954. options: validate$3("preset", value),
  45955. alias: alias,
  45956. dirname: dirname
  45957. };
  45958. });
  45959. function chain$1(a, b) {
  45960. var fns = [a, b].filter(Boolean);
  45961. if (fns.length <= 1) return fns[0];
  45962. return function () {
  45963. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  45964. args[_key] = arguments[_key];
  45965. }
  45966. for (var _iterator4 = fns, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
  45967. var _ref8;
  45968. if (_isArray4) {
  45969. if (_i4 >= _iterator4.length) break;
  45970. _ref8 = _iterator4[_i4++];
  45971. } else {
  45972. _i4 = _iterator4.next();
  45973. if (_i4.done) break;
  45974. _ref8 = _i4.value;
  45975. }
  45976. var fn = _ref8;
  45977. fn.apply(this, args);
  45978. }
  45979. };
  45980. }
  45981. var loadOptionsRunner = gensync(regenerator.mark(function _callee(opts) {
  45982. var config;
  45983. return regenerator.wrap(function _callee$(_context) {
  45984. while (1) {
  45985. switch (_context.prev = _context.next) {
  45986. case 0:
  45987. return _context.delegateYield(loadConfig$1(opts), "t0", 1);
  45988. case 1:
  45989. config = _context.t0;
  45990. return _context.abrupt("return", config ? config.options : null);
  45991. case 3:
  45992. case "end":
  45993. return _context.stop();
  45994. }
  45995. }
  45996. }, _callee);
  45997. }));
  45998. var maybeErrback = function maybeErrback(runner) {
  45999. return function (opts, callback) {
  46000. if (callback === undefined && typeof opts === "function") {
  46001. callback = opts;
  46002. opts = undefined;
  46003. }
  46004. return callback ? runner.errback(opts, callback) : runner.sync(opts);
  46005. };
  46006. };
  46007. var loadPartialConfig$1 = maybeErrback(loadPartialConfig);
  46008. var loadPartialConfigSync = loadPartialConfig.sync;
  46009. var loadPartialConfigAsync = loadPartialConfig.async;
  46010. var loadOptions = maybeErrback(loadOptionsRunner);
  46011. var loadOptionsSync = loadOptionsRunner.sync;
  46012. var loadOptionsAsync = loadOptionsRunner.async;
  46013. var PluginPass = function () {
  46014. function PluginPass(file, key, options) {
  46015. this._map = new Map();
  46016. this.key = key;
  46017. this.file = file;
  46018. this.opts = options || {};
  46019. this.cwd = file.opts.cwd;
  46020. this.filename = file.opts.filename;
  46021. }
  46022. var _proto = PluginPass.prototype;
  46023. _proto.set = function set(key, val) {
  46024. this._map.set(key, val);
  46025. };
  46026. _proto.get = function get(key) {
  46027. return this._map.get(key);
  46028. };
  46029. _proto.availableHelper = function availableHelper(name, versionRange) {
  46030. return this.file.availableHelper(name, versionRange);
  46031. };
  46032. _proto.addHelper = function addHelper(name) {
  46033. return this.file.addHelper(name);
  46034. };
  46035. _proto.addImport = function addImport() {
  46036. return this.file.addImport();
  46037. };
  46038. _proto.getModuleName = function getModuleName() {
  46039. return this.file.getModuleName();
  46040. };
  46041. _proto.buildCodeFrameError = function buildCodeFrameError(node, msg, Error) {
  46042. return this.file.buildCodeFrameError(node, msg, Error);
  46043. };
  46044. return PluginPass;
  46045. }();
  46046. var spreadableSymbol = _Symbol ? _Symbol.isConcatSpreadable : undefined;
  46047. function isFlattenable(value) {
  46048. return isArray_1(value) || isArguments_1(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
  46049. }
  46050. var _isFlattenable = isFlattenable;
  46051. function baseFlatten(array, depth, predicate, isStrict, result) {
  46052. var index = -1,
  46053. length = array.length;
  46054. predicate || (predicate = _isFlattenable);
  46055. result || (result = []);
  46056. while (++index < length) {
  46057. var value = array[index];
  46058. if (depth > 0 && predicate(value)) {
  46059. if (depth > 1) {
  46060. baseFlatten(value, depth - 1, predicate, isStrict, result);
  46061. } else {
  46062. _arrayPush(result, value);
  46063. }
  46064. } else if (!isStrict) {
  46065. result[result.length] = value;
  46066. }
  46067. }
  46068. return result;
  46069. }
  46070. var _baseFlatten = baseFlatten;
  46071. function arraySome(array, predicate) {
  46072. var index = -1,
  46073. length = array == null ? 0 : array.length;
  46074. while (++index < length) {
  46075. if (predicate(array[index], index, array)) {
  46076. return true;
  46077. }
  46078. }
  46079. return false;
  46080. }
  46081. var _arraySome = arraySome;
  46082. var COMPARE_PARTIAL_FLAG = 1,
  46083. COMPARE_UNORDERED_FLAG = 2;
  46084. function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  46085. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  46086. arrLength = array.length,
  46087. othLength = other.length;
  46088. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  46089. return false;
  46090. }
  46091. var stacked = stack.get(array);
  46092. if (stacked && stack.get(other)) {
  46093. return stacked == other;
  46094. }
  46095. var index = -1,
  46096. result = true,
  46097. seen = bitmask & COMPARE_UNORDERED_FLAG ? new _SetCache() : undefined;
  46098. stack.set(array, other);
  46099. stack.set(other, array);
  46100. while (++index < arrLength) {
  46101. var arrValue = array[index],
  46102. othValue = other[index];
  46103. if (customizer) {
  46104. var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
  46105. }
  46106. if (compared !== undefined) {
  46107. if (compared) {
  46108. continue;
  46109. }
  46110. result = false;
  46111. break;
  46112. }
  46113. if (seen) {
  46114. if (!_arraySome(other, function (othValue, othIndex) {
  46115. if (!_cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  46116. return seen.push(othIndex);
  46117. }
  46118. })) {
  46119. result = false;
  46120. break;
  46121. }
  46122. } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  46123. result = false;
  46124. break;
  46125. }
  46126. }
  46127. stack['delete'](array);
  46128. stack['delete'](other);
  46129. return result;
  46130. }
  46131. var _equalArrays = equalArrays;
  46132. function mapToArray(map) {
  46133. var index = -1,
  46134. result = Array(map.size);
  46135. map.forEach(function (value, key) {
  46136. result[++index] = [key, value];
  46137. });
  46138. return result;
  46139. }
  46140. var _mapToArray = mapToArray;
  46141. var COMPARE_PARTIAL_FLAG$1 = 1,
  46142. COMPARE_UNORDERED_FLAG$1 = 2;
  46143. var boolTag$3 = '[object Boolean]',
  46144. dateTag$3 = '[object Date]',
  46145. errorTag$2 = '[object Error]',
  46146. mapTag$5 = '[object Map]',
  46147. numberTag$3 = '[object Number]',
  46148. regexpTag$4 = '[object RegExp]',
  46149. setTag$5 = '[object Set]',
  46150. stringTag$4 = '[object String]',
  46151. symbolTag$3 = '[object Symbol]';
  46152. var arrayBufferTag$3 = '[object ArrayBuffer]',
  46153. dataViewTag$4 = '[object DataView]';
  46154. var symbolProto$2 = _Symbol ? _Symbol.prototype : undefined,
  46155. symbolValueOf$1 = symbolProto$2 ? symbolProto$2.valueOf : undefined;
  46156. function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  46157. switch (tag) {
  46158. case dataViewTag$4:
  46159. if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
  46160. return false;
  46161. }
  46162. object = object.buffer;
  46163. other = other.buffer;
  46164. case arrayBufferTag$3:
  46165. if (object.byteLength != other.byteLength || !equalFunc(new _Uint8Array(object), new _Uint8Array(other))) {
  46166. return false;
  46167. }
  46168. return true;
  46169. case boolTag$3:
  46170. case dateTag$3:
  46171. case numberTag$3:
  46172. return eq_1(+object, +other);
  46173. case errorTag$2:
  46174. return object.name == other.name && object.message == other.message;
  46175. case regexpTag$4:
  46176. case stringTag$4:
  46177. return object == other + '';
  46178. case mapTag$5:
  46179. var convert = _mapToArray;
  46180. case setTag$5:
  46181. var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1;
  46182. convert || (convert = _setToArray);
  46183. if (object.size != other.size && !isPartial) {
  46184. return false;
  46185. }
  46186. var stacked = stack.get(object);
  46187. if (stacked) {
  46188. return stacked == other;
  46189. }
  46190. bitmask |= COMPARE_UNORDERED_FLAG$1;
  46191. stack.set(object, other);
  46192. var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
  46193. stack['delete'](object);
  46194. return result;
  46195. case symbolTag$3:
  46196. if (symbolValueOf$1) {
  46197. return symbolValueOf$1.call(object) == symbolValueOf$1.call(other);
  46198. }
  46199. }
  46200. return false;
  46201. }
  46202. var _equalByTag = equalByTag;
  46203. var COMPARE_PARTIAL_FLAG$2 = 1;
  46204. var objectProto$f = Object.prototype;
  46205. var hasOwnProperty$d = objectProto$f.hasOwnProperty;
  46206. function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  46207. var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2,
  46208. objProps = _getAllKeys(object),
  46209. objLength = objProps.length,
  46210. othProps = _getAllKeys(other),
  46211. othLength = othProps.length;
  46212. if (objLength != othLength && !isPartial) {
  46213. return false;
  46214. }
  46215. var index = objLength;
  46216. while (index--) {
  46217. var key = objProps[index];
  46218. if (!(isPartial ? key in other : hasOwnProperty$d.call(other, key))) {
  46219. return false;
  46220. }
  46221. }
  46222. var stacked = stack.get(object);
  46223. if (stacked && stack.get(other)) {
  46224. return stacked == other;
  46225. }
  46226. var result = true;
  46227. stack.set(object, other);
  46228. stack.set(other, object);
  46229. var skipCtor = isPartial;
  46230. while (++index < objLength) {
  46231. key = objProps[index];
  46232. var objValue = object[key],
  46233. othValue = other[key];
  46234. if (customizer) {
  46235. var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
  46236. }
  46237. if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
  46238. result = false;
  46239. break;
  46240. }
  46241. skipCtor || (skipCtor = key == 'constructor');
  46242. }
  46243. if (result && !skipCtor) {
  46244. var objCtor = object.constructor,
  46245. othCtor = other.constructor;
  46246. if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) {
  46247. result = false;
  46248. }
  46249. }
  46250. stack['delete'](object);
  46251. stack['delete'](other);
  46252. return result;
  46253. }
  46254. var _equalObjects = equalObjects;
  46255. var COMPARE_PARTIAL_FLAG$3 = 1;
  46256. var argsTag$3 = '[object Arguments]',
  46257. arrayTag$2 = '[object Array]',
  46258. objectTag$4 = '[object Object]';
  46259. var objectProto$g = Object.prototype;
  46260. var hasOwnProperty$e = objectProto$g.hasOwnProperty;
  46261. function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  46262. var objIsArr = isArray_1(object),
  46263. othIsArr = isArray_1(other),
  46264. objTag = objIsArr ? arrayTag$2 : _getTag(object),
  46265. othTag = othIsArr ? arrayTag$2 : _getTag(other);
  46266. objTag = objTag == argsTag$3 ? objectTag$4 : objTag;
  46267. othTag = othTag == argsTag$3 ? objectTag$4 : othTag;
  46268. var objIsObj = objTag == objectTag$4,
  46269. othIsObj = othTag == objectTag$4,
  46270. isSameTag = objTag == othTag;
  46271. if (isSameTag && isBuffer_1(object)) {
  46272. if (!isBuffer_1(other)) {
  46273. return false;
  46274. }
  46275. objIsArr = true;
  46276. objIsObj = false;
  46277. }
  46278. if (isSameTag && !objIsObj) {
  46279. stack || (stack = new _Stack());
  46280. return objIsArr || isTypedArray_1(object) ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack) : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  46281. }
  46282. if (!(bitmask & COMPARE_PARTIAL_FLAG$3)) {
  46283. var objIsWrapped = objIsObj && hasOwnProperty$e.call(object, '__wrapped__'),
  46284. othIsWrapped = othIsObj && hasOwnProperty$e.call(other, '__wrapped__');
  46285. if (objIsWrapped || othIsWrapped) {
  46286. var objUnwrapped = objIsWrapped ? object.value() : object,
  46287. othUnwrapped = othIsWrapped ? other.value() : other;
  46288. stack || (stack = new _Stack());
  46289. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  46290. }
  46291. }
  46292. if (!isSameTag) {
  46293. return false;
  46294. }
  46295. stack || (stack = new _Stack());
  46296. return _equalObjects(object, other, bitmask, customizer, equalFunc, stack);
  46297. }
  46298. var _baseIsEqualDeep = baseIsEqualDeep;
  46299. function baseIsEqual(value, other, bitmask, customizer, stack) {
  46300. if (value === other) {
  46301. return true;
  46302. }
  46303. if (value == null || other == null || !isObjectLike_1(value) && !isObjectLike_1(other)) {
  46304. return value !== value && other !== other;
  46305. }
  46306. return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  46307. }
  46308. var _baseIsEqual = baseIsEqual;
  46309. var COMPARE_PARTIAL_FLAG$4 = 1,
  46310. COMPARE_UNORDERED_FLAG$2 = 2;
  46311. function baseIsMatch(object, source, matchData, customizer) {
  46312. var index = matchData.length,
  46313. length = index,
  46314. noCustomizer = !customizer;
  46315. if (object == null) {
  46316. return !length;
  46317. }
  46318. object = Object(object);
  46319. while (index--) {
  46320. var data = matchData[index];
  46321. if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
  46322. return false;
  46323. }
  46324. }
  46325. while (++index < length) {
  46326. data = matchData[index];
  46327. var key = data[0],
  46328. objValue = object[key],
  46329. srcValue = data[1];
  46330. if (noCustomizer && data[2]) {
  46331. if (objValue === undefined && !(key in object)) {
  46332. return false;
  46333. }
  46334. } else {
  46335. var stack = new _Stack();
  46336. if (customizer) {
  46337. var result = customizer(objValue, srcValue, key, object, source, stack);
  46338. }
  46339. if (!(result === undefined ? _baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$4 | COMPARE_UNORDERED_FLAG$2, customizer, stack) : result)) {
  46340. return false;
  46341. }
  46342. }
  46343. }
  46344. return true;
  46345. }
  46346. var _baseIsMatch = baseIsMatch;
  46347. function isStrictComparable(value) {
  46348. return value === value && !isObject_1(value);
  46349. }
  46350. var _isStrictComparable = isStrictComparable;
  46351. function getMatchData(object) {
  46352. var result = keys_1(object),
  46353. length = result.length;
  46354. while (length--) {
  46355. var key = result[length],
  46356. value = object[key];
  46357. result[length] = [key, value, _isStrictComparable(value)];
  46358. }
  46359. return result;
  46360. }
  46361. var _getMatchData = getMatchData;
  46362. function matchesStrictComparable(key, srcValue) {
  46363. return function (object) {
  46364. if (object == null) {
  46365. return false;
  46366. }
  46367. return object[key] === srcValue && (srcValue !== undefined || key in Object(object));
  46368. };
  46369. }
  46370. var _matchesStrictComparable = matchesStrictComparable;
  46371. function baseMatches(source) {
  46372. var matchData = _getMatchData(source);
  46373. if (matchData.length == 1 && matchData[0][2]) {
  46374. return _matchesStrictComparable(matchData[0][0], matchData[0][1]);
  46375. }
  46376. return function (object) {
  46377. return object === source || _baseIsMatch(object, source, matchData);
  46378. };
  46379. }
  46380. var _baseMatches = baseMatches;
  46381. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  46382. reIsPlainProp = /^\w*$/;
  46383. function isKey(value, object) {
  46384. if (isArray_1(value)) {
  46385. return false;
  46386. }
  46387. var type = typeof value;
  46388. if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol_1(value)) {
  46389. return true;
  46390. }
  46391. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
  46392. }
  46393. var _isKey = isKey;
  46394. var FUNC_ERROR_TEXT = 'Expected a function';
  46395. function memoize(func, resolver) {
  46396. if (typeof func != 'function' || resolver != null && typeof resolver != 'function') {
  46397. throw new TypeError(FUNC_ERROR_TEXT);
  46398. }
  46399. var memoized = function memoized() {
  46400. var args = arguments,
  46401. key = resolver ? resolver.apply(this, args) : args[0],
  46402. cache = memoized.cache;
  46403. if (cache.has(key)) {
  46404. return cache.get(key);
  46405. }
  46406. var result = func.apply(this, args);
  46407. memoized.cache = cache.set(key, result) || cache;
  46408. return result;
  46409. };
  46410. memoized.cache = new (memoize.Cache || _MapCache)();
  46411. return memoized;
  46412. }
  46413. memoize.Cache = _MapCache;
  46414. var memoize_1 = memoize;
  46415. var MAX_MEMOIZE_SIZE = 500;
  46416. function memoizeCapped(func) {
  46417. var result = memoize_1(func, function (key) {
  46418. if (cache.size === MAX_MEMOIZE_SIZE) {
  46419. cache.clear();
  46420. }
  46421. return key;
  46422. });
  46423. var cache = result.cache;
  46424. return result;
  46425. }
  46426. var _memoizeCapped = memoizeCapped;
  46427. var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  46428. var reEscapeChar = /\\(\\)?/g;
  46429. var stringToPath = _memoizeCapped(function (string) {
  46430. var result = [];
  46431. if (string.charCodeAt(0) === 46) {
  46432. result.push('');
  46433. }
  46434. string.replace(rePropName, function (match, number, quote, subString) {
  46435. result.push(quote ? subString.replace(reEscapeChar, '$1') : number || match);
  46436. });
  46437. return result;
  46438. });
  46439. var _stringToPath = stringToPath;
  46440. function castPath(value, object) {
  46441. if (isArray_1(value)) {
  46442. return value;
  46443. }
  46444. return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
  46445. }
  46446. var _castPath = castPath;
  46447. var INFINITY$3 = 1 / 0;
  46448. function toKey(value) {
  46449. if (typeof value == 'string' || isSymbol_1(value)) {
  46450. return value;
  46451. }
  46452. var result = value + '';
  46453. return result == '0' && 1 / value == -INFINITY$3 ? '-0' : result;
  46454. }
  46455. var _toKey = toKey;
  46456. function baseGet(object, path) {
  46457. path = _castPath(path, object);
  46458. var index = 0,
  46459. length = path.length;
  46460. while (object != null && index < length) {
  46461. object = object[_toKey(path[index++])];
  46462. }
  46463. return index && index == length ? object : undefined;
  46464. }
  46465. var _baseGet = baseGet;
  46466. function get$2(object, path, defaultValue) {
  46467. var result = object == null ? undefined : _baseGet(object, path);
  46468. return result === undefined ? defaultValue : result;
  46469. }
  46470. var get_1 = get$2;
  46471. function baseHasIn(object, key) {
  46472. return object != null && key in Object(object);
  46473. }
  46474. var _baseHasIn = baseHasIn;
  46475. function hasPath(object, path, hasFunc) {
  46476. path = _castPath(path, object);
  46477. var index = -1,
  46478. length = path.length,
  46479. result = false;
  46480. while (++index < length) {
  46481. var key = _toKey(path[index]);
  46482. if (!(result = object != null && hasFunc(object, key))) {
  46483. break;
  46484. }
  46485. object = object[key];
  46486. }
  46487. if (result || ++index != length) {
  46488. return result;
  46489. }
  46490. length = object == null ? 0 : object.length;
  46491. return !!length && isLength_1(length) && _isIndex(key, length) && (isArray_1(object) || isArguments_1(object));
  46492. }
  46493. var _hasPath = hasPath;
  46494. function hasIn(object, path) {
  46495. return object != null && _hasPath(object, path, _baseHasIn);
  46496. }
  46497. var hasIn_1 = hasIn;
  46498. var COMPARE_PARTIAL_FLAG$5 = 1,
  46499. COMPARE_UNORDERED_FLAG$3 = 2;
  46500. function baseMatchesProperty(path, srcValue) {
  46501. if (_isKey(path) && _isStrictComparable(srcValue)) {
  46502. return _matchesStrictComparable(_toKey(path), srcValue);
  46503. }
  46504. return function (object) {
  46505. var objValue = get_1(object, path);
  46506. return objValue === undefined && objValue === srcValue ? hasIn_1(object, path) : _baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$5 | COMPARE_UNORDERED_FLAG$3);
  46507. };
  46508. }
  46509. var _baseMatchesProperty = baseMatchesProperty;
  46510. function baseProperty(key) {
  46511. return function (object) {
  46512. return object == null ? undefined : object[key];
  46513. };
  46514. }
  46515. var _baseProperty = baseProperty;
  46516. function basePropertyDeep(path) {
  46517. return function (object) {
  46518. return _baseGet(object, path);
  46519. };
  46520. }
  46521. var _basePropertyDeep = basePropertyDeep;
  46522. function property(path) {
  46523. return _isKey(path) ? _baseProperty(_toKey(path)) : _basePropertyDeep(path);
  46524. }
  46525. var property_1 = property;
  46526. function baseIteratee(value) {
  46527. if (typeof value == 'function') {
  46528. return value;
  46529. }
  46530. if (value == null) {
  46531. return identity_1;
  46532. }
  46533. if (typeof value == 'object') {
  46534. return isArray_1(value) ? _baseMatchesProperty(value[0], value[1]) : _baseMatches(value);
  46535. }
  46536. return property_1(value);
  46537. }
  46538. var _baseIteratee = baseIteratee;
  46539. function createBaseFor(fromRight) {
  46540. return function (object, iteratee, keysFunc) {
  46541. var index = -1,
  46542. iterable = Object(object),
  46543. props = keysFunc(object),
  46544. length = props.length;
  46545. while (length--) {
  46546. var key = props[fromRight ? length : ++index];
  46547. if (iteratee(iterable[key], key, iterable) === false) {
  46548. break;
  46549. }
  46550. }
  46551. return object;
  46552. };
  46553. }
  46554. var _createBaseFor = createBaseFor;
  46555. var baseFor = _createBaseFor();
  46556. var _baseFor = baseFor;
  46557. function baseForOwn(object, iteratee) {
  46558. return object && _baseFor(object, iteratee, keys_1);
  46559. }
  46560. var _baseForOwn = baseForOwn;
  46561. function createBaseEach(eachFunc, fromRight) {
  46562. return function (collection, iteratee) {
  46563. if (collection == null) {
  46564. return collection;
  46565. }
  46566. if (!isArrayLike_1(collection)) {
  46567. return eachFunc(collection, iteratee);
  46568. }
  46569. var length = collection.length,
  46570. index = fromRight ? length : -1,
  46571. iterable = Object(collection);
  46572. while (fromRight ? index-- : ++index < length) {
  46573. if (iteratee(iterable[index], index, iterable) === false) {
  46574. break;
  46575. }
  46576. }
  46577. return collection;
  46578. };
  46579. }
  46580. var _createBaseEach = createBaseEach;
  46581. var baseEach = _createBaseEach(_baseForOwn);
  46582. var _baseEach = baseEach;
  46583. function baseMap(collection, iteratee) {
  46584. var index = -1,
  46585. result = isArrayLike_1(collection) ? Array(collection.length) : [];
  46586. _baseEach(collection, function (value, key, collection) {
  46587. result[++index] = iteratee(value, key, collection);
  46588. });
  46589. return result;
  46590. }
  46591. var _baseMap = baseMap;
  46592. function baseSortBy(array, comparer) {
  46593. var length = array.length;
  46594. array.sort(comparer);
  46595. while (length--) {
  46596. array[length] = array[length].value;
  46597. }
  46598. return array;
  46599. }
  46600. var _baseSortBy = baseSortBy;
  46601. function compareAscending(value, other) {
  46602. if (value !== other) {
  46603. var valIsDefined = value !== undefined,
  46604. valIsNull = value === null,
  46605. valIsReflexive = value === value,
  46606. valIsSymbol = isSymbol_1(value);
  46607. var othIsDefined = other !== undefined,
  46608. othIsNull = other === null,
  46609. othIsReflexive = other === other,
  46610. othIsSymbol = isSymbol_1(other);
  46611. if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {
  46612. return 1;
  46613. }
  46614. if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) {
  46615. return -1;
  46616. }
  46617. }
  46618. return 0;
  46619. }
  46620. var _compareAscending = compareAscending;
  46621. function compareMultiple(object, other, orders) {
  46622. var index = -1,
  46623. objCriteria = object.criteria,
  46624. othCriteria = other.criteria,
  46625. length = objCriteria.length,
  46626. ordersLength = orders.length;
  46627. while (++index < length) {
  46628. var result = _compareAscending(objCriteria[index], othCriteria[index]);
  46629. if (result) {
  46630. if (index >= ordersLength) {
  46631. return result;
  46632. }
  46633. var order = orders[index];
  46634. return result * (order == 'desc' ? -1 : 1);
  46635. }
  46636. }
  46637. return object.index - other.index;
  46638. }
  46639. var _compareMultiple = compareMultiple;
  46640. function baseOrderBy(collection, iteratees, orders) {
  46641. var index = -1;
  46642. iteratees = _arrayMap(iteratees.length ? iteratees : [identity_1], _baseUnary(_baseIteratee));
  46643. var result = _baseMap(collection, function (value, key, collection) {
  46644. var criteria = _arrayMap(iteratees, function (iteratee) {
  46645. return iteratee(value);
  46646. });
  46647. return {
  46648. 'criteria': criteria,
  46649. 'index': ++index,
  46650. 'value': value
  46651. };
  46652. });
  46653. return _baseSortBy(result, function (object, other) {
  46654. return _compareMultiple(object, other, orders);
  46655. });
  46656. }
  46657. var _baseOrderBy = baseOrderBy;
  46658. var sortBy = _baseRest(function (collection, iteratees) {
  46659. if (collection == null) {
  46660. return [];
  46661. }
  46662. var length = iteratees.length;
  46663. if (length > 1 && _isIterateeCall(collection, iteratees[0], iteratees[1])) {
  46664. iteratees = [];
  46665. } else if (length > 2 && _isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
  46666. iteratees = [iteratees[0]];
  46667. }
  46668. return _baseOrderBy(collection, _baseFlatten(iteratees, 1), []);
  46669. });
  46670. var sortBy_1 = sortBy;
  46671. var LOADED_PLUGIN;
  46672. function loadBlockHoistPlugin() {
  46673. if (!LOADED_PLUGIN) {
  46674. var config = loadConfig$1.sync({
  46675. babelrc: false,
  46676. configFile: false,
  46677. plugins: [blockHoistPlugin]
  46678. });
  46679. LOADED_PLUGIN = config ? config.passes[0][0] : undefined;
  46680. if (!LOADED_PLUGIN) throw new Error("Assertion failure");
  46681. }
  46682. return LOADED_PLUGIN;
  46683. }
  46684. var blockHoistPlugin = {
  46685. name: "internal.blockHoist",
  46686. visitor: {
  46687. Block: {
  46688. exit: function exit(_ref) {
  46689. var node = _ref.node;
  46690. var hasChange = false;
  46691. for (var i = 0; i < node.body.length; i++) {
  46692. var bodyNode = node.body[i];
  46693. if (bodyNode && bodyNode._blockHoist != null) {
  46694. hasChange = true;
  46695. break;
  46696. }
  46697. }
  46698. if (!hasChange) return;
  46699. node.body = sortBy_1(node.body, function (bodyNode) {
  46700. var priority = bodyNode && bodyNode._blockHoist;
  46701. if (priority == null) priority = 1;
  46702. if (priority === true) priority = 2;
  46703. return -1 * priority;
  46704. });
  46705. }
  46706. }
  46707. }
  46708. };
  46709. function normalizeOptions$2(config) {
  46710. var _config$options = config.options,
  46711. filename = _config$options.filename,
  46712. cwd = _config$options.cwd,
  46713. _config$options$filen = _config$options.filenameRelative,
  46714. filenameRelative = _config$options$filen === void 0 ? typeof filename === "string" ? path$1.relative(cwd, filename) : "unknown" : _config$options$filen,
  46715. _config$options$sourc = _config$options.sourceType,
  46716. sourceType = _config$options$sourc === void 0 ? "module" : _config$options$sourc,
  46717. inputSourceMap = _config$options.inputSourceMap,
  46718. _config$options$sourc2 = _config$options.sourceMaps,
  46719. sourceMaps = _config$options$sourc2 === void 0 ? !!inputSourceMap : _config$options$sourc2,
  46720. moduleRoot = _config$options.moduleRoot,
  46721. _config$options$sourc3 = _config$options.sourceRoot,
  46722. sourceRoot = _config$options$sourc3 === void 0 ? moduleRoot : _config$options$sourc3,
  46723. _config$options$sourc4 = _config$options.sourceFileName,
  46724. sourceFileName = _config$options$sourc4 === void 0 ? path$1.basename(filenameRelative) : _config$options$sourc4,
  46725. _config$options$comme = _config$options.comments,
  46726. comments = _config$options$comme === void 0 ? true : _config$options$comme,
  46727. _config$options$compa = _config$options.compact,
  46728. compact = _config$options$compa === void 0 ? "auto" : _config$options$compa;
  46729. var opts = config.options;
  46730. var options = Object.assign({}, opts, {
  46731. parserOpts: Object.assign({
  46732. sourceType: path$1.extname(filenameRelative) === ".mjs" ? "module" : sourceType,
  46733. sourceFileName: filename,
  46734. plugins: []
  46735. }, opts.parserOpts),
  46736. generatorOpts: Object.assign({
  46737. filename: filename,
  46738. auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
  46739. auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
  46740. retainLines: opts.retainLines,
  46741. comments: comments,
  46742. shouldPrintComment: opts.shouldPrintComment,
  46743. compact: compact,
  46744. minified: opts.minified,
  46745. sourceMaps: sourceMaps,
  46746. sourceRoot: sourceRoot,
  46747. sourceFileName: sourceFileName
  46748. }, opts.generatorOpts)
  46749. });
  46750. for (var _iterator = config.passes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  46751. var _ref;
  46752. if (_isArray) {
  46753. if (_i >= _iterator.length) break;
  46754. _ref = _iterator[_i++];
  46755. } else {
  46756. _i = _iterator.next();
  46757. if (_i.done) break;
  46758. _ref = _i.value;
  46759. }
  46760. var plugins = _ref;
  46761. for (var _iterator2 = plugins, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  46762. var _ref2;
  46763. if (_isArray2) {
  46764. if (_i2 >= _iterator2.length) break;
  46765. _ref2 = _iterator2[_i2++];
  46766. } else {
  46767. _i2 = _iterator2.next();
  46768. if (_i2.done) break;
  46769. _ref2 = _i2.value;
  46770. }
  46771. var plugin = _ref2;
  46772. if (plugin.manipulateOptions) {
  46773. plugin.manipulateOptions(options, options.parserOpts);
  46774. }
  46775. }
  46776. }
  46777. return options;
  46778. }
  46779. var fs = {};
  46780. var CLONE_DEEP_FLAG$1 = 1,
  46781. CLONE_SYMBOLS_FLAG$2 = 4;
  46782. function cloneDeep$1(value) {
  46783. return _baseClone(value, CLONE_DEEP_FLAG$1 | CLONE_SYMBOLS_FLAG$2);
  46784. }
  46785. var cloneDeep_1 = cloneDeep$1;
  46786. var _nodeResolve_empty = {};
  46787. var _nodeResolve_empty$1 = /*#__PURE__*/Object.freeze({
  46788. __proto__: null,
  46789. 'default': _nodeResolve_empty
  46790. });
  46791. var safeBuffer = createCommonjsModule(function (module, exports) {
  46792. var Buffer = bufferEs6.Buffer;
  46793. function copyProps(src, dst) {
  46794. for (var key in src) {
  46795. dst[key] = src[key];
  46796. }
  46797. }
  46798. if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
  46799. module.exports = bufferEs6;
  46800. } else {
  46801. copyProps(bufferEs6, exports);
  46802. exports.Buffer = SafeBuffer;
  46803. }
  46804. function SafeBuffer(arg, encodingOrOffset, length) {
  46805. return Buffer(arg, encodingOrOffset, length);
  46806. }
  46807. copyProps(Buffer, SafeBuffer);
  46808. SafeBuffer.from = function (arg, encodingOrOffset, length) {
  46809. if (typeof arg === 'number') {
  46810. throw new TypeError('Argument must not be a number');
  46811. }
  46812. return Buffer(arg, encodingOrOffset, length);
  46813. };
  46814. SafeBuffer.alloc = function (size, fill, encoding) {
  46815. if (typeof size !== 'number') {
  46816. throw new TypeError('Argument must be a number');
  46817. }
  46818. var buf = Buffer(size);
  46819. if (fill !== undefined) {
  46820. if (typeof encoding === 'string') {
  46821. buf.fill(fill, encoding);
  46822. } else {
  46823. buf.fill(fill);
  46824. }
  46825. } else {
  46826. buf.fill(0);
  46827. }
  46828. return buf;
  46829. };
  46830. SafeBuffer.allocUnsafe = function (size) {
  46831. if (typeof size !== 'number') {
  46832. throw new TypeError('Argument must be a number');
  46833. }
  46834. return Buffer(size);
  46835. };
  46836. SafeBuffer.allocUnsafeSlow = function (size) {
  46837. if (typeof size !== 'number') {
  46838. throw new TypeError('Argument must be a number');
  46839. }
  46840. return bufferEs6.SlowBuffer(size);
  46841. };
  46842. });
  46843. var safeBuffer_1 = safeBuffer.Buffer;
  46844. var path$2 = getCjsExportFromNamespace(_nodeResolve_empty$1);
  46845. var convertSourceMap = createCommonjsModule(function (module, exports) {
  46846. Object.defineProperty(exports, 'commentRegex', {
  46847. get: function getCommentRegex() {
  46848. return /^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/mg;
  46849. }
  46850. });
  46851. Object.defineProperty(exports, 'mapFileCommentRegex', {
  46852. get: function getMapFileCommentRegex() {
  46853. return /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"`]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/mg;
  46854. }
  46855. });
  46856. function decodeBase64(base64) {
  46857. return safeBuffer.Buffer.from(base64, 'base64').toString();
  46858. }
  46859. function stripComment(sm) {
  46860. return sm.split(',').pop();
  46861. }
  46862. function readFromFileMap(sm, dir) {
  46863. var r = exports.mapFileCommentRegex.exec(sm);
  46864. var filename = r[1] || r[2];
  46865. var filepath = path$1.resolve(dir, filename);
  46866. try {
  46867. return path$2.readFileSync(filepath, 'utf8');
  46868. } catch (e) {
  46869. throw new Error('An error occurred while trying to read the map file at ' + filepath + '\n' + e);
  46870. }
  46871. }
  46872. function Converter(sm, opts) {
  46873. opts = opts || {};
  46874. if (opts.isFileComment) sm = readFromFileMap(sm, opts.commentFileDir);
  46875. if (opts.hasComment) sm = stripComment(sm);
  46876. if (opts.isEncoded) sm = decodeBase64(sm);
  46877. if (opts.isJSON || opts.isEncoded) sm = JSON.parse(sm);
  46878. this.sourcemap = sm;
  46879. }
  46880. Converter.prototype.toJSON = function (space) {
  46881. return JSON.stringify(this.sourcemap, null, space);
  46882. };
  46883. Converter.prototype.toBase64 = function () {
  46884. var json = this.toJSON();
  46885. return safeBuffer.Buffer.from(json, 'utf8').toString('base64');
  46886. };
  46887. Converter.prototype.toComment = function (options) {
  46888. var base64 = this.toBase64();
  46889. var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
  46890. return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;
  46891. };
  46892. Converter.prototype.toObject = function () {
  46893. return JSON.parse(this.toJSON());
  46894. };
  46895. Converter.prototype.addProperty = function (key, value) {
  46896. if (this.sourcemap.hasOwnProperty(key)) throw new Error('property "' + key + '" already exists on the sourcemap, use set property instead');
  46897. return this.setProperty(key, value);
  46898. };
  46899. Converter.prototype.setProperty = function (key, value) {
  46900. this.sourcemap[key] = value;
  46901. return this;
  46902. };
  46903. Converter.prototype.getProperty = function (key) {
  46904. return this.sourcemap[key];
  46905. };
  46906. exports.fromObject = function (obj) {
  46907. return new Converter(obj);
  46908. };
  46909. exports.fromJSON = function (json) {
  46910. return new Converter(json, {
  46911. isJSON: true
  46912. });
  46913. };
  46914. exports.fromBase64 = function (base64) {
  46915. return new Converter(base64, {
  46916. isEncoded: true
  46917. });
  46918. };
  46919. exports.fromComment = function (comment) {
  46920. comment = comment.replace(/^\/\*/g, '//').replace(/\*\/$/g, '');
  46921. return new Converter(comment, {
  46922. isEncoded: true,
  46923. hasComment: true
  46924. });
  46925. };
  46926. exports.fromMapFileComment = function (comment, dir) {
  46927. return new Converter(comment, {
  46928. commentFileDir: dir,
  46929. isFileComment: true,
  46930. isJSON: true
  46931. });
  46932. };
  46933. exports.fromSource = function (content) {
  46934. var m = content.match(exports.commentRegex);
  46935. return m ? exports.fromComment(m.pop()) : null;
  46936. };
  46937. exports.fromMapFileSource = function (content, dir) {
  46938. var m = content.match(exports.mapFileCommentRegex);
  46939. return m ? exports.fromMapFileComment(m.pop(), dir) : null;
  46940. };
  46941. exports.removeComments = function (src) {
  46942. return src.replace(exports.commentRegex, '');
  46943. };
  46944. exports.removeMapFileComments = function (src) {
  46945. return src.replace(exports.mapFileCommentRegex, '');
  46946. };
  46947. exports.generateMapFileComment = function (file, options) {
  46948. var data = 'sourceMappingURL=' + file;
  46949. return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;
  46950. };
  46951. });
  46952. var convertSourceMap_1 = convertSourceMap.fromObject;
  46953. var convertSourceMap_2 = convertSourceMap.fromJSON;
  46954. var convertSourceMap_3 = convertSourceMap.fromBase64;
  46955. var convertSourceMap_4 = convertSourceMap.fromComment;
  46956. var convertSourceMap_5 = convertSourceMap.fromMapFileComment;
  46957. var convertSourceMap_6 = convertSourceMap.fromSource;
  46958. var convertSourceMap_7 = convertSourceMap.fromMapFileSource;
  46959. var convertSourceMap_8 = convertSourceMap.removeComments;
  46960. var convertSourceMap_9 = convertSourceMap.removeMapFileComments;
  46961. var convertSourceMap_10 = convertSourceMap.generateMapFileComment;
  46962. var pluginNameMap = {
  46963. classProperties: {
  46964. syntax: {
  46965. name: "@babel/plugin-syntax-class-properties",
  46966. url: "https://git.io/vb4yQ"
  46967. },
  46968. transform: {
  46969. name: "@babel/plugin-proposal-class-properties",
  46970. url: "https://git.io/vb4SL"
  46971. }
  46972. },
  46973. decorators: {
  46974. syntax: {
  46975. name: "@babel/plugin-syntax-decorators",
  46976. url: "https://git.io/vb4y9"
  46977. },
  46978. transform: {
  46979. name: "@babel/plugin-proposal-decorators",
  46980. url: "https://git.io/vb4ST"
  46981. }
  46982. },
  46983. doExpressions: {
  46984. syntax: {
  46985. name: "@babel/plugin-syntax-do-expressions",
  46986. url: "https://git.io/vb4yh"
  46987. },
  46988. transform: {
  46989. name: "@babel/plugin-proposal-do-expressions",
  46990. url: "https://git.io/vb4S3"
  46991. }
  46992. },
  46993. dynamicImport: {
  46994. syntax: {
  46995. name: "@babel/plugin-syntax-dynamic-import",
  46996. url: "https://git.io/vb4Sv"
  46997. }
  46998. },
  46999. exportDefaultFrom: {
  47000. syntax: {
  47001. name: "@babel/plugin-syntax-export-default-from",
  47002. url: "https://git.io/vb4SO"
  47003. },
  47004. transform: {
  47005. name: "@babel/plugin-proposal-export-default-from",
  47006. url: "https://git.io/vb4yH"
  47007. }
  47008. },
  47009. exportNamespaceFrom: {
  47010. syntax: {
  47011. name: "@babel/plugin-syntax-export-namespace-from",
  47012. url: "https://git.io/vb4Sf"
  47013. },
  47014. transform: {
  47015. name: "@babel/plugin-proposal-export-namespace-from",
  47016. url: "https://git.io/vb4SG"
  47017. }
  47018. },
  47019. flow: {
  47020. syntax: {
  47021. name: "@babel/plugin-syntax-flow",
  47022. url: "https://git.io/vb4yb"
  47023. },
  47024. transform: {
  47025. name: "@babel/plugin-transform-flow-strip-types",
  47026. url: "https://git.io/vb49g"
  47027. }
  47028. },
  47029. functionBind: {
  47030. syntax: {
  47031. name: "@babel/plugin-syntax-function-bind",
  47032. url: "https://git.io/vb4y7"
  47033. },
  47034. transform: {
  47035. name: "@babel/plugin-proposal-function-bind",
  47036. url: "https://git.io/vb4St"
  47037. }
  47038. },
  47039. functionSent: {
  47040. syntax: {
  47041. name: "@babel/plugin-syntax-function-sent",
  47042. url: "https://git.io/vb4yN"
  47043. },
  47044. transform: {
  47045. name: "@babel/plugin-proposal-function-sent",
  47046. url: "https://git.io/vb4SZ"
  47047. }
  47048. },
  47049. importMeta: {
  47050. syntax: {
  47051. name: "@babel/plugin-syntax-import-meta",
  47052. url: "https://git.io/vbKK6"
  47053. }
  47054. },
  47055. jsx: {
  47056. syntax: {
  47057. name: "@babel/plugin-syntax-jsx",
  47058. url: "https://git.io/vb4yA"
  47059. },
  47060. transform: {
  47061. name: "@babel/plugin-transform-react-jsx",
  47062. url: "https://git.io/vb4yd"
  47063. }
  47064. },
  47065. logicalAssignment: {
  47066. syntax: {
  47067. name: "@babel/plugin-syntax-logical-assignment-operators",
  47068. url: "https://git.io/vAlBp"
  47069. },
  47070. transform: {
  47071. name: "@babel/plugin-proposal-logical-assignment-operators",
  47072. url: "https://git.io/vAlRe"
  47073. }
  47074. },
  47075. numericSeparator: {
  47076. syntax: {
  47077. name: "@babel/plugin-syntax-numeric-separator",
  47078. url: "https://git.io/vb4Sq"
  47079. },
  47080. transform: {
  47081. name: "@babel/plugin-proposal-numeric-separator",
  47082. url: "https://git.io/vb4yS"
  47083. }
  47084. },
  47085. optionalChaining: {
  47086. syntax: {
  47087. name: "@babel/plugin-syntax-optional-chaining",
  47088. url: "https://git.io/vb4Sc"
  47089. },
  47090. transform: {
  47091. name: "@babel/plugin-proposal-optional-chaining",
  47092. url: "https://git.io/vb4Sk"
  47093. }
  47094. },
  47095. pipelineOperator: {
  47096. syntax: {
  47097. name: "@babel/plugin-syntax-pipeline-operator",
  47098. url: "https://git.io/vb4yj"
  47099. },
  47100. transform: {
  47101. name: "@babel/plugin-proposal-pipeline-operator",
  47102. url: "https://git.io/vb4SU"
  47103. }
  47104. },
  47105. throwExpressions: {
  47106. syntax: {
  47107. name: "@babel/plugin-syntax-throw-expressions",
  47108. url: "https://git.io/vb4SJ"
  47109. },
  47110. transform: {
  47111. name: "@babel/plugin-proposal-throw-expressions",
  47112. url: "https://git.io/vb4yF"
  47113. }
  47114. },
  47115. typescript: {
  47116. syntax: {
  47117. name: "@babel/plugin-syntax-typescript",
  47118. url: "https://git.io/vb4SC"
  47119. },
  47120. transform: {
  47121. name: "@babel/plugin-transform-typescript",
  47122. url: "https://git.io/vb4Sm"
  47123. }
  47124. },
  47125. asyncGenerators: {
  47126. syntax: {
  47127. name: "@babel/plugin-syntax-async-generators",
  47128. url: "https://git.io/vb4SY"
  47129. },
  47130. transform: {
  47131. name: "@babel/plugin-proposal-async-generator-functions",
  47132. url: "https://git.io/vb4yp"
  47133. }
  47134. },
  47135. nullishCoalescingOperator: {
  47136. syntax: {
  47137. name: "@babel/plugin-syntax-nullish-coalescing-operator",
  47138. url: "https://git.io/vb4yx"
  47139. },
  47140. transform: {
  47141. name: "@babel/plugin-proposal-nullish-coalescing-operator",
  47142. url: "https://git.io/vb4Se"
  47143. }
  47144. },
  47145. objectRestSpread: {
  47146. syntax: {
  47147. name: "@babel/plugin-syntax-object-rest-spread",
  47148. url: "https://git.io/vb4y5"
  47149. },
  47150. transform: {
  47151. name: "@babel/plugin-proposal-object-rest-spread",
  47152. url: "https://git.io/vb4Ss"
  47153. }
  47154. },
  47155. optionalCatchBinding: {
  47156. syntax: {
  47157. name: "@babel/plugin-syntax-optional-catch-binding",
  47158. url: "https://git.io/vb4Sn"
  47159. },
  47160. transform: {
  47161. name: "@babel/plugin-proposal-optional-catch-binding",
  47162. url: "https://git.io/vb4SI"
  47163. }
  47164. }
  47165. };
  47166. var getNameURLCombination = function getNameURLCombination(_ref) {
  47167. var name = _ref.name,
  47168. url = _ref.url;
  47169. return name + " (" + url + ")";
  47170. };
  47171. function generateMissingPluginMessage(missingPluginName, loc, codeFrame) {
  47172. var helpMessage = "Support for the experimental syntax '" + missingPluginName + "' isn't currently enabled " + ("(" + loc.line + ":" + (loc.column + 1) + "):\n\n") + codeFrame;
  47173. var pluginInfo = pluginNameMap[missingPluginName];
  47174. if (pluginInfo) {
  47175. var syntaxPlugin = pluginInfo.syntax,
  47176. transformPlugin = pluginInfo.transform;
  47177. if (syntaxPlugin) {
  47178. if (transformPlugin) {
  47179. var transformPluginInfo = getNameURLCombination(transformPlugin);
  47180. helpMessage += "\n\nAdd " + transformPluginInfo + " to the 'plugins' section of your Babel config " + "to enable transformation.";
  47181. } else {
  47182. var syntaxPluginInfo = getNameURLCombination(syntaxPlugin);
  47183. helpMessage += "\n\nAdd " + syntaxPluginInfo + " to the 'plugins' section of your Babel config " + "to enable parsing.";
  47184. }
  47185. }
  47186. }
  47187. return helpMessage;
  47188. }
  47189. var _marked$5 = regenerator.mark(parser);
  47190. function parser(pluginPasses, _ref, code) {
  47191. var parserOpts, _ref$highlightCode, highlightCode, _ref$filename, filename, results, _iterator, _isArray, _i, _ref2, plugins, _iterator2, _isArray2, _i2, _ref3, plugin, parserOverride, ast, loc, missingPlugin, codeFrame;
  47192. return regenerator.wrap(function parser$(_context) {
  47193. while (1) {
  47194. switch (_context.prev = _context.next) {
  47195. case 0:
  47196. 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;
  47197. _context.prev = 1;
  47198. results = [];
  47199. _iterator = pluginPasses, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();
  47200. case 4:
  47201. if (!_isArray) {
  47202. _context.next = 10;
  47203. break;
  47204. }
  47205. if (!(_i >= _iterator.length)) {
  47206. _context.next = 7;
  47207. break;
  47208. }
  47209. return _context.abrupt("break", 33);
  47210. case 7:
  47211. _ref2 = _iterator[_i++];
  47212. _context.next = 14;
  47213. break;
  47214. case 10:
  47215. _i = _iterator.next();
  47216. if (!_i.done) {
  47217. _context.next = 13;
  47218. break;
  47219. }
  47220. return _context.abrupt("break", 33);
  47221. case 13:
  47222. _ref2 = _i.value;
  47223. case 14:
  47224. plugins = _ref2;
  47225. _iterator2 = plugins, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();
  47226. case 16:
  47227. if (!_isArray2) {
  47228. _context.next = 22;
  47229. break;
  47230. }
  47231. if (!(_i2 >= _iterator2.length)) {
  47232. _context.next = 19;
  47233. break;
  47234. }
  47235. return _context.abrupt("break", 31);
  47236. case 19:
  47237. _ref3 = _iterator2[_i2++];
  47238. _context.next = 26;
  47239. break;
  47240. case 22:
  47241. _i2 = _iterator2.next();
  47242. if (!_i2.done) {
  47243. _context.next = 25;
  47244. break;
  47245. }
  47246. return _context.abrupt("break", 31);
  47247. case 25:
  47248. _ref3 = _i2.value;
  47249. case 26:
  47250. plugin = _ref3;
  47251. parserOverride = plugin.parserOverride;
  47252. if (parserOverride) {
  47253. ast = parserOverride(code, parserOpts, parse$1);
  47254. if (ast !== undefined) results.push(ast);
  47255. }
  47256. case 29:
  47257. _context.next = 16;
  47258. break;
  47259. case 31:
  47260. _context.next = 4;
  47261. break;
  47262. case 33:
  47263. if (!(results.length === 0)) {
  47264. _context.next = 37;
  47265. break;
  47266. }
  47267. return _context.abrupt("return", parse$1(code, parserOpts));
  47268. case 37:
  47269. if (!(results.length === 1)) {
  47270. _context.next = 42;
  47271. break;
  47272. }
  47273. return _context.delegateYield([], "t0", 39);
  47274. case 39:
  47275. if (!(typeof results[0].then === "function")) {
  47276. _context.next = 41;
  47277. break;
  47278. }
  47279. 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.");
  47280. case 41:
  47281. return _context.abrupt("return", results[0]);
  47282. case 42:
  47283. throw new Error("More than one plugin attempted to override parsing.");
  47284. case 45:
  47285. _context.prev = 45;
  47286. _context.t1 = _context["catch"](1);
  47287. if (_context.t1.code === "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED") {
  47288. _context.t1.message += "\nConsider renaming the file to '.mjs', or setting sourceType:module " + "or sourceType:unambiguous in your Babel config for this file.";
  47289. }
  47290. loc = _context.t1.loc, missingPlugin = _context.t1.missingPlugin;
  47291. if (loc) {
  47292. codeFrame = codeFrameColumns(code, {
  47293. start: {
  47294. line: loc.line,
  47295. column: loc.column + 1
  47296. }
  47297. }, {
  47298. highlightCode: highlightCode
  47299. });
  47300. if (missingPlugin) {
  47301. _context.t1.message = filename + ": " + generateMissingPluginMessage(missingPlugin[0], loc, codeFrame);
  47302. } else {
  47303. _context.t1.message = filename + ": " + _context.t1.message + "\n\n" + codeFrame;
  47304. }
  47305. _context.t1.code = "BABEL_PARSE_ERROR";
  47306. }
  47307. throw _context.t1;
  47308. case 51:
  47309. case "end":
  47310. return _context.stop();
  47311. }
  47312. }
  47313. }, _marked$5, null, [[1, 45]]);
  47314. }
  47315. var _marked$6 = regenerator.mark(normalizeFile);
  47316. var debug$1 = browser$4("babel:transform:file");
  47317. var LARGE_INPUT_SOURCEMAP_THRESHOLD = 1000000;
  47318. function normalizeFile(pluginPasses, options, code, ast) {
  47319. var inputMap, lastComment, _lastComment, match, inputMapContent;
  47320. return regenerator.wrap(function normalizeFile$(_context) {
  47321. while (1) {
  47322. switch (_context.prev = _context.next) {
  47323. case 0:
  47324. code = "" + (code || "");
  47325. if (!ast) {
  47326. _context.next = 11;
  47327. break;
  47328. }
  47329. if (!(ast.type === "Program")) {
  47330. _context.next = 6;
  47331. break;
  47332. }
  47333. ast = File(ast, [], []);
  47334. _context.next = 8;
  47335. break;
  47336. case 6:
  47337. if (!(ast.type !== "File")) {
  47338. _context.next = 8;
  47339. break;
  47340. }
  47341. throw new Error("AST root must be a Program or File node");
  47342. case 8:
  47343. ast = cloneDeep_1(ast);
  47344. _context.next = 13;
  47345. break;
  47346. case 11:
  47347. return _context.delegateYield(parser(pluginPasses, options, code), "t0", 12);
  47348. case 12:
  47349. ast = _context.t0;
  47350. case 13:
  47351. inputMap = null;
  47352. if (options.inputSourceMap !== false) {
  47353. if (typeof options.inputSourceMap === "object") {
  47354. inputMap = convertSourceMap.fromObject(options.inputSourceMap);
  47355. }
  47356. if (!inputMap) {
  47357. lastComment = extractComments(INLINE_SOURCEMAP_REGEX, ast);
  47358. if (lastComment) {
  47359. try {
  47360. inputMap = convertSourceMap.fromComment(lastComment);
  47361. } catch (err) {
  47362. debug$1("discarding unknown inline input sourcemap", err);
  47363. }
  47364. }
  47365. }
  47366. if (!inputMap) {
  47367. _lastComment = extractComments(EXTERNAL_SOURCEMAP_REGEX, ast);
  47368. if (typeof options.filename === "string" && _lastComment) {
  47369. try {
  47370. match = EXTERNAL_SOURCEMAP_REGEX.exec(_lastComment);
  47371. inputMapContent = fs.readFileSync(path$1.resolve(path$1.dirname(options.filename), match[1]));
  47372. if (inputMapContent.length > LARGE_INPUT_SOURCEMAP_THRESHOLD) {
  47373. debug$1("skip merging input map > 1 MB");
  47374. } else {
  47375. inputMap = convertSourceMap.fromJSON(inputMapContent);
  47376. }
  47377. } catch (err) {
  47378. debug$1("discarding unknown file input sourcemap", err);
  47379. }
  47380. } else if (_lastComment) {
  47381. debug$1("discarding un-loadable file input sourcemap");
  47382. }
  47383. }
  47384. }
  47385. return _context.abrupt("return", new File$2(options, {
  47386. code: code,
  47387. ast: ast,
  47388. inputMap: inputMap
  47389. }));
  47390. case 16:
  47391. case "end":
  47392. return _context.stop();
  47393. }
  47394. }
  47395. }, _marked$6);
  47396. }
  47397. var INLINE_SOURCEMAP_REGEX = /^[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/;
  47398. var EXTERNAL_SOURCEMAP_REGEX = /^[@#][ \t]+sourceMappingURL=([^\s'"`]+)[ \t]*$/;
  47399. function extractCommentsFromList(regex, comments, lastComment) {
  47400. if (comments) {
  47401. comments = comments.filter(function (_ref) {
  47402. var value = _ref.value;
  47403. if (regex.test(value)) {
  47404. lastComment = value;
  47405. return false;
  47406. }
  47407. return true;
  47408. });
  47409. }
  47410. return [comments, lastComment];
  47411. }
  47412. function extractComments(regex, ast) {
  47413. var lastComment = null;
  47414. traverseFast(ast, function (node) {
  47415. var _extractCommentsFromL = extractCommentsFromList(regex, node.leadingComments, lastComment);
  47416. node.leadingComments = _extractCommentsFromL[0];
  47417. lastComment = _extractCommentsFromL[1];
  47418. var _extractCommentsFromL2 = extractCommentsFromList(regex, node.innerComments, lastComment);
  47419. node.innerComments = _extractCommentsFromL2[0];
  47420. lastComment = _extractCommentsFromL2[1];
  47421. var _extractCommentsFromL3 = extractCommentsFromList(regex, node.trailingComments, lastComment);
  47422. node.trailingComments = _extractCommentsFromL3[0];
  47423. lastComment = _extractCommentsFromL3[1];
  47424. });
  47425. return lastComment;
  47426. }
  47427. function mergeSourceMap(inputMap, map) {
  47428. var input = buildMappingData(inputMap);
  47429. var output = buildMappingData(map);
  47430. var mergedGenerator = new sourceMap.SourceMapGenerator();
  47431. for (var _iterator = input.sources, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  47432. var _ref;
  47433. if (_isArray) {
  47434. if (_i >= _iterator.length) break;
  47435. _ref = _iterator[_i++];
  47436. } else {
  47437. _i = _iterator.next();
  47438. if (_i.done) break;
  47439. _ref = _i.value;
  47440. }
  47441. var _ref3 = _ref,
  47442. source = _ref3.source;
  47443. if (typeof source.content === "string") {
  47444. mergedGenerator.setSourceContent(source.path, source.content);
  47445. }
  47446. }
  47447. if (output.sources.length === 1) {
  47448. var defaultSource = output.sources[0];
  47449. var insertedMappings = new Map();
  47450. eachInputGeneratedRange(input, function (generated, original, source) {
  47451. eachOverlappingGeneratedOutputRange(defaultSource, generated, function (item) {
  47452. var key = makeMappingKey(item);
  47453. if (insertedMappings.has(key)) return;
  47454. insertedMappings.set(key, item);
  47455. mergedGenerator.addMapping({
  47456. source: source.path,
  47457. original: {
  47458. line: original.line,
  47459. column: original.columnStart
  47460. },
  47461. generated: {
  47462. line: item.line,
  47463. column: item.columnStart
  47464. },
  47465. name: original.name
  47466. });
  47467. });
  47468. });
  47469. for (var _iterator2 = insertedMappings.values(), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  47470. var _ref2;
  47471. if (_isArray2) {
  47472. if (_i2 >= _iterator2.length) break;
  47473. _ref2 = _iterator2[_i2++];
  47474. } else {
  47475. _i2 = _iterator2.next();
  47476. if (_i2.done) break;
  47477. _ref2 = _i2.value;
  47478. }
  47479. var item = _ref2;
  47480. if (item.columnEnd === Infinity) {
  47481. continue;
  47482. }
  47483. var clearItem = {
  47484. line: item.line,
  47485. columnStart: item.columnEnd
  47486. };
  47487. var key = makeMappingKey(clearItem);
  47488. if (insertedMappings.has(key)) {
  47489. continue;
  47490. }
  47491. mergedGenerator.addMapping({
  47492. generated: {
  47493. line: clearItem.line,
  47494. column: clearItem.columnStart
  47495. }
  47496. });
  47497. }
  47498. }
  47499. var result = mergedGenerator.toJSON();
  47500. if (typeof input.sourceRoot === "string") {
  47501. result.sourceRoot = input.sourceRoot;
  47502. }
  47503. return result;
  47504. }
  47505. function makeMappingKey(item) {
  47506. return item.line + "/" + item.columnStart;
  47507. }
  47508. function eachOverlappingGeneratedOutputRange(outputFile, inputGeneratedRange, callback) {
  47509. var overlappingOriginal = filterApplicableOriginalRanges(outputFile, inputGeneratedRange);
  47510. for (var _iterator3 = overlappingOriginal, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
  47511. var _ref4;
  47512. if (_isArray3) {
  47513. if (_i3 >= _iterator3.length) break;
  47514. _ref4 = _iterator3[_i3++];
  47515. } else {
  47516. _i3 = _iterator3.next();
  47517. if (_i3.done) break;
  47518. _ref4 = _i3.value;
  47519. }
  47520. var _ref5 = _ref4,
  47521. generated = _ref5.generated;
  47522. for (var _iterator4 = generated, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
  47523. var _ref6;
  47524. if (_isArray4) {
  47525. if (_i4 >= _iterator4.length) break;
  47526. _ref6 = _iterator4[_i4++];
  47527. } else {
  47528. _i4 = _iterator4.next();
  47529. if (_i4.done) break;
  47530. _ref6 = _i4.value;
  47531. }
  47532. var item = _ref6;
  47533. callback(item);
  47534. }
  47535. }
  47536. }
  47537. function filterApplicableOriginalRanges(_ref7, _ref8) {
  47538. var mappings = _ref7.mappings;
  47539. var line = _ref8.line,
  47540. columnStart = _ref8.columnStart,
  47541. columnEnd = _ref8.columnEnd;
  47542. return filterSortedArray(mappings, function (_ref9) {
  47543. var outOriginal = _ref9.original;
  47544. if (line > outOriginal.line) return -1;
  47545. if (line < outOriginal.line) return 1;
  47546. if (columnStart >= outOriginal.columnEnd) return -1;
  47547. if (columnEnd <= outOriginal.columnStart) return 1;
  47548. return 0;
  47549. });
  47550. }
  47551. function eachInputGeneratedRange(map, callback) {
  47552. for (var _iterator5 = map.sources, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) {
  47553. var _ref10;
  47554. if (_isArray5) {
  47555. if (_i5 >= _iterator5.length) break;
  47556. _ref10 = _iterator5[_i5++];
  47557. } else {
  47558. _i5 = _iterator5.next();
  47559. if (_i5.done) break;
  47560. _ref10 = _i5.value;
  47561. }
  47562. var _ref11 = _ref10,
  47563. source = _ref11.source,
  47564. mappings = _ref11.mappings;
  47565. for (var _iterator6 = mappings, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) {
  47566. var _ref12;
  47567. if (_isArray6) {
  47568. if (_i6 >= _iterator6.length) break;
  47569. _ref12 = _iterator6[_i6++];
  47570. } else {
  47571. _i6 = _iterator6.next();
  47572. if (_i6.done) break;
  47573. _ref12 = _i6.value;
  47574. }
  47575. var _ref13 = _ref12,
  47576. original = _ref13.original,
  47577. generated = _ref13.generated;
  47578. for (var _iterator7 = generated, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) {
  47579. var _ref14;
  47580. if (_isArray7) {
  47581. if (_i7 >= _iterator7.length) break;
  47582. _ref14 = _iterator7[_i7++];
  47583. } else {
  47584. _i7 = _iterator7.next();
  47585. if (_i7.done) break;
  47586. _ref14 = _i7.value;
  47587. }
  47588. var item = _ref14;
  47589. callback(item, original, source);
  47590. }
  47591. }
  47592. }
  47593. }
  47594. function buildMappingData(map) {
  47595. var consumer = new sourceMap.SourceMapConsumer(Object.assign({}, map, {
  47596. sourceRoot: null
  47597. }));
  47598. var sources = new Map();
  47599. var mappings = new Map();
  47600. var last = null;
  47601. consumer.computeColumnSpans();
  47602. consumer.eachMapping(function (m) {
  47603. if (m.originalLine === null) return;
  47604. var source = sources.get(m.source);
  47605. if (!source) {
  47606. source = {
  47607. path: m.source,
  47608. content: consumer.sourceContentFor(m.source, true)
  47609. };
  47610. sources.set(m.source, source);
  47611. }
  47612. var sourceData = mappings.get(source);
  47613. if (!sourceData) {
  47614. sourceData = {
  47615. source: source,
  47616. mappings: []
  47617. };
  47618. mappings.set(source, sourceData);
  47619. }
  47620. var obj = {
  47621. line: m.originalLine,
  47622. columnStart: m.originalColumn,
  47623. columnEnd: Infinity,
  47624. name: m.name
  47625. };
  47626. if (last && last.source === source && last.mapping.line === m.originalLine) {
  47627. last.mapping.columnEnd = m.originalColumn;
  47628. }
  47629. last = {
  47630. source: source,
  47631. mapping: obj
  47632. };
  47633. sourceData.mappings.push({
  47634. original: obj,
  47635. generated: consumer.allGeneratedPositionsFor({
  47636. source: m.source,
  47637. line: m.originalLine,
  47638. column: m.originalColumn
  47639. }).map(function (item) {
  47640. return {
  47641. line: item.line,
  47642. columnStart: item.column,
  47643. columnEnd: item.lastColumn + 1
  47644. };
  47645. })
  47646. });
  47647. }, null, sourceMap.SourceMapConsumer.ORIGINAL_ORDER);
  47648. return {
  47649. file: map.file,
  47650. sourceRoot: map.sourceRoot,
  47651. sources: Array.from(mappings.values())
  47652. };
  47653. }
  47654. function findInsertionLocation(array, callback) {
  47655. var left = 0;
  47656. var right = array.length;
  47657. while (left < right) {
  47658. var mid = Math.floor((left + right) / 2);
  47659. var item = array[mid];
  47660. var result = callback(item);
  47661. if (result === 0) {
  47662. left = mid;
  47663. break;
  47664. }
  47665. if (result >= 0) {
  47666. right = mid;
  47667. } else {
  47668. left = mid + 1;
  47669. }
  47670. }
  47671. var i = left;
  47672. if (i < array.length) {
  47673. while (i >= 0 && callback(array[i]) >= 0) {
  47674. i--;
  47675. }
  47676. return i + 1;
  47677. }
  47678. return i;
  47679. }
  47680. function filterSortedArray(array, callback) {
  47681. var start = findInsertionLocation(array, callback);
  47682. var results = [];
  47683. for (var i = start; i < array.length && callback(array[i]) === 0; i++) {
  47684. results.push(array[i]);
  47685. }
  47686. return results;
  47687. }
  47688. function generateCode$1(pluginPasses, file) {
  47689. var opts = file.opts,
  47690. ast = file.ast,
  47691. code = file.code,
  47692. inputMap = file.inputMap;
  47693. var results = [];
  47694. for (var _iterator = pluginPasses, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  47695. var _ref;
  47696. if (_isArray) {
  47697. if (_i >= _iterator.length) break;
  47698. _ref = _iterator[_i++];
  47699. } else {
  47700. _i = _iterator.next();
  47701. if (_i.done) break;
  47702. _ref = _i.value;
  47703. }
  47704. var plugins = _ref;
  47705. for (var _iterator2 = plugins, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  47706. var _ref2;
  47707. if (_isArray2) {
  47708. if (_i2 >= _iterator2.length) break;
  47709. _ref2 = _iterator2[_i2++];
  47710. } else {
  47711. _i2 = _iterator2.next();
  47712. if (_i2.done) break;
  47713. _ref2 = _i2.value;
  47714. }
  47715. var plugin = _ref2;
  47716. var generatorOverride = plugin.generatorOverride;
  47717. if (generatorOverride) {
  47718. var _result2 = generatorOverride(ast, opts.generatorOpts, code, generateCode);
  47719. if (_result2 !== undefined) results.push(_result2);
  47720. }
  47721. }
  47722. }
  47723. var result;
  47724. if (results.length === 0) {
  47725. result = generateCode(ast, opts.generatorOpts, code);
  47726. } else if (results.length === 1) {
  47727. result = results[0];
  47728. if (typeof result.then === "function") {
  47729. 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.");
  47730. }
  47731. } else {
  47732. throw new Error("More than one plugin attempted to override codegen.");
  47733. }
  47734. var _result = result,
  47735. outputCode = _result.code,
  47736. outputMap = _result.map;
  47737. if (outputMap && inputMap) {
  47738. outputMap = mergeSourceMap(inputMap.toObject(), outputMap);
  47739. }
  47740. if (opts.sourceMaps === "inline" || opts.sourceMaps === "both") {
  47741. outputCode += "\n" + convertSourceMap.fromObject(outputMap).toComment();
  47742. }
  47743. if (opts.sourceMaps === "inline") {
  47744. outputMap = null;
  47745. }
  47746. return {
  47747. outputCode: outputCode,
  47748. outputMap: outputMap
  47749. };
  47750. }
  47751. var _marked$7 = regenerator.mark(run),
  47752. _marked2$5 = regenerator.mark(transformFile);
  47753. function run(config, code, ast) {
  47754. var file, opts, _opts$filename, outputCode, outputMap, _generateCode, _opts$filename2;
  47755. return regenerator.wrap(function run$(_context) {
  47756. while (1) {
  47757. switch (_context.prev = _context.next) {
  47758. case 0:
  47759. return _context.delegateYield(normalizeFile(config.passes, normalizeOptions$2(config), code, ast), "t0", 1);
  47760. case 1:
  47761. file = _context.t0;
  47762. opts = file.opts;
  47763. _context.prev = 3;
  47764. return _context.delegateYield(transformFile(file, config.passes), "t1", 5);
  47765. case 5:
  47766. _context.next = 12;
  47767. break;
  47768. case 7:
  47769. _context.prev = 7;
  47770. _context.t2 = _context["catch"](3);
  47771. _context.t2.message = ((_opts$filename = opts.filename) != null ? _opts$filename : "unknown") + ": " + _context.t2.message;
  47772. if (!_context.t2.code) {
  47773. _context.t2.code = "BABEL_TRANSFORM_ERROR";
  47774. }
  47775. throw _context.t2;
  47776. case 12:
  47777. _context.prev = 12;
  47778. if (opts.code !== false) {
  47779. _generateCode = generateCode$1(config.passes, file);
  47780. outputCode = _generateCode.outputCode;
  47781. outputMap = _generateCode.outputMap;
  47782. }
  47783. _context.next = 21;
  47784. break;
  47785. case 16:
  47786. _context.prev = 16;
  47787. _context.t3 = _context["catch"](12);
  47788. _context.t3.message = ((_opts$filename2 = opts.filename) != null ? _opts$filename2 : "unknown") + ": " + _context.t3.message;
  47789. if (!_context.t3.code) {
  47790. _context.t3.code = "BABEL_GENERATE_ERROR";
  47791. }
  47792. throw _context.t3;
  47793. case 21:
  47794. return _context.abrupt("return", {
  47795. metadata: file.metadata,
  47796. options: opts,
  47797. ast: opts.ast === true ? file.ast : null,
  47798. code: outputCode === undefined ? null : outputCode,
  47799. map: outputMap === undefined ? null : outputMap,
  47800. sourceType: file.ast.program.sourceType
  47801. });
  47802. case 22:
  47803. case "end":
  47804. return _context.stop();
  47805. }
  47806. }
  47807. }, _marked$7, null, [[3, 7], [12, 16]]);
  47808. }
  47809. function transformFile(file, pluginPasses) {
  47810. var _iterator, _isArray, _i, _ref, pluginPairs, passPairs, passes, visitors, _iterator2, _isArray2, _i2, _ref2, plugin, pass, _i3, _passPairs, _passPairs$_i, _plugin, _pass, fn, result, visitor, _i4, _passPairs2, _passPairs2$_i, _plugin2, _pass2, _fn, _result;
  47811. return regenerator.wrap(function transformFile$(_context2) {
  47812. while (1) {
  47813. switch (_context2.prev = _context2.next) {
  47814. case 0:
  47815. _iterator = pluginPasses, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();
  47816. case 1:
  47817. if (!_isArray) {
  47818. _context2.next = 7;
  47819. break;
  47820. }
  47821. if (!(_i >= _iterator.length)) {
  47822. _context2.next = 4;
  47823. break;
  47824. }
  47825. return _context2.abrupt("break", 61);
  47826. case 4:
  47827. _ref = _iterator[_i++];
  47828. _context2.next = 11;
  47829. break;
  47830. case 7:
  47831. _i = _iterator.next();
  47832. if (!_i.done) {
  47833. _context2.next = 10;
  47834. break;
  47835. }
  47836. return _context2.abrupt("break", 61);
  47837. case 10:
  47838. _ref = _i.value;
  47839. case 11:
  47840. pluginPairs = _ref;
  47841. passPairs = [];
  47842. passes = [];
  47843. visitors = [];
  47844. _iterator2 = pluginPairs.concat([loadBlockHoistPlugin()]), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();
  47845. case 16:
  47846. if (!_isArray2) {
  47847. _context2.next = 22;
  47848. break;
  47849. }
  47850. if (!(_i2 >= _iterator2.length)) {
  47851. _context2.next = 19;
  47852. break;
  47853. }
  47854. return _context2.abrupt("break", 33);
  47855. case 19:
  47856. _ref2 = _iterator2[_i2++];
  47857. _context2.next = 26;
  47858. break;
  47859. case 22:
  47860. _i2 = _iterator2.next();
  47861. if (!_i2.done) {
  47862. _context2.next = 25;
  47863. break;
  47864. }
  47865. return _context2.abrupt("break", 33);
  47866. case 25:
  47867. _ref2 = _i2.value;
  47868. case 26:
  47869. plugin = _ref2;
  47870. pass = new PluginPass(file, plugin.key, plugin.options);
  47871. passPairs.push([plugin, pass]);
  47872. passes.push(pass);
  47873. visitors.push(plugin.visitor);
  47874. case 31:
  47875. _context2.next = 16;
  47876. break;
  47877. case 33:
  47878. _i3 = 0, _passPairs = passPairs;
  47879. case 34:
  47880. if (!(_i3 < _passPairs.length)) {
  47881. _context2.next = 45;
  47882. break;
  47883. }
  47884. _passPairs$_i = _passPairs[_i3], _plugin = _passPairs$_i[0], _pass = _passPairs$_i[1];
  47885. fn = _plugin.pre;
  47886. if (!fn) {
  47887. _context2.next = 42;
  47888. break;
  47889. }
  47890. result = fn.call(_pass, file);
  47891. return _context2.delegateYield([], "t0", 40);
  47892. case 40:
  47893. if (!isThenable$1(result)) {
  47894. _context2.next = 42;
  47895. break;
  47896. }
  47897. 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.");
  47898. case 42:
  47899. _i3++;
  47900. _context2.next = 34;
  47901. break;
  47902. case 45:
  47903. visitor = traverse$1.visitors.merge(visitors, passes, file.opts.wrapPluginVisitorMethod);
  47904. traverse$1(file.ast, visitor, file.scope);
  47905. _i4 = 0, _passPairs2 = passPairs;
  47906. case 48:
  47907. if (!(_i4 < _passPairs2.length)) {
  47908. _context2.next = 59;
  47909. break;
  47910. }
  47911. _passPairs2$_i = _passPairs2[_i4], _plugin2 = _passPairs2$_i[0], _pass2 = _passPairs2$_i[1];
  47912. _fn = _plugin2.post;
  47913. if (!_fn) {
  47914. _context2.next = 56;
  47915. break;
  47916. }
  47917. _result = _fn.call(_pass2, file);
  47918. return _context2.delegateYield([], "t1", 54);
  47919. case 54:
  47920. if (!isThenable$1(_result)) {
  47921. _context2.next = 56;
  47922. break;
  47923. }
  47924. 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.");
  47925. case 56:
  47926. _i4++;
  47927. _context2.next = 48;
  47928. break;
  47929. case 59:
  47930. _context2.next = 1;
  47931. break;
  47932. case 61:
  47933. case "end":
  47934. return _context2.stop();
  47935. }
  47936. }
  47937. }, _marked2$5);
  47938. }
  47939. function isThenable$1(val) {
  47940. return !!val && (typeof val === "object" || typeof val === "function") && !!val.then && typeof val.then === "function";
  47941. }
  47942. var transformRunner = gensync(regenerator.mark(function transform(code, opts) {
  47943. var config;
  47944. return regenerator.wrap(function transform$(_context) {
  47945. while (1) {
  47946. switch (_context.prev = _context.next) {
  47947. case 0:
  47948. return _context.delegateYield(loadConfig$1(opts), "t0", 1);
  47949. case 1:
  47950. config = _context.t0;
  47951. if (!(config === null)) {
  47952. _context.next = 4;
  47953. break;
  47954. }
  47955. return _context.abrupt("return", null);
  47956. case 4:
  47957. return _context.delegateYield(run(config, code), "t1", 5);
  47958. case 5:
  47959. return _context.abrupt("return", _context.t1);
  47960. case 6:
  47961. case "end":
  47962. return _context.stop();
  47963. }
  47964. }
  47965. }, transform);
  47966. }));
  47967. var transform = function transform(code, opts, callback) {
  47968. if (typeof opts === "function") {
  47969. callback = opts;
  47970. opts = undefined;
  47971. }
  47972. if (callback === undefined) return transformRunner.sync(code, opts);
  47973. transformRunner.errback(code, opts, callback);
  47974. };
  47975. var transformSync = transformRunner.sync;
  47976. var transformAsync = transformRunner.async;
  47977. var transformFile$1 = function transformFile(filename, opts, callback) {
  47978. if (typeof opts === "function") {
  47979. callback = opts;
  47980. }
  47981. callback(new Error("Transforming files is not supported in browsers"), null);
  47982. };
  47983. function transformFileSync() {
  47984. throw new Error("Transforming files is not supported in browsers");
  47985. }
  47986. function transformFileAsync() {
  47987. return Promise.reject(new Error("Transforming files is not supported in browsers"));
  47988. }
  47989. var transformFromAstRunner = gensync(regenerator.mark(function _callee(ast, code, opts) {
  47990. var config;
  47991. return regenerator.wrap(function _callee$(_context) {
  47992. while (1) {
  47993. switch (_context.prev = _context.next) {
  47994. case 0:
  47995. return _context.delegateYield(loadConfig$1(opts), "t0", 1);
  47996. case 1:
  47997. config = _context.t0;
  47998. if (!(config === null)) {
  47999. _context.next = 4;
  48000. break;
  48001. }
  48002. return _context.abrupt("return", null);
  48003. case 4:
  48004. if (ast) {
  48005. _context.next = 6;
  48006. break;
  48007. }
  48008. throw new Error("No AST given");
  48009. case 6:
  48010. return _context.delegateYield(run(config, code, ast), "t1", 7);
  48011. case 7:
  48012. return _context.abrupt("return", _context.t1);
  48013. case 8:
  48014. case "end":
  48015. return _context.stop();
  48016. }
  48017. }
  48018. }, _callee);
  48019. }));
  48020. var transformFromAst = function transformFromAst(ast, code, opts, callback) {
  48021. if (typeof opts === "function") {
  48022. callback = opts;
  48023. opts = undefined;
  48024. }
  48025. if (callback === undefined) {
  48026. return transformFromAstRunner.sync(ast, code, opts);
  48027. }
  48028. transformFromAstRunner.errback(ast, code, opts, callback);
  48029. };
  48030. var transformFromAstSync = transformFromAstRunner.sync;
  48031. var transformFromAstAsync = transformFromAstRunner.async;
  48032. var parseRunner = gensync(regenerator.mark(function parse(code, opts) {
  48033. var config;
  48034. return regenerator.wrap(function parse$(_context) {
  48035. while (1) {
  48036. switch (_context.prev = _context.next) {
  48037. case 0:
  48038. return _context.delegateYield(loadConfig$1(opts), "t0", 1);
  48039. case 1:
  48040. config = _context.t0;
  48041. if (!(config === null)) {
  48042. _context.next = 4;
  48043. break;
  48044. }
  48045. return _context.abrupt("return", null);
  48046. case 4:
  48047. return _context.delegateYield(parser(config.passes, normalizeOptions$2(config), code), "t1", 5);
  48048. case 5:
  48049. return _context.abrupt("return", _context.t1);
  48050. case 6:
  48051. case "end":
  48052. return _context.stop();
  48053. }
  48054. }
  48055. }, parse);
  48056. }));
  48057. var parse$3 = function parse(code, opts, callback) {
  48058. if (typeof opts === "function") {
  48059. callback = opts;
  48060. opts = undefined;
  48061. }
  48062. if (callback === undefined) return parseRunner.sync(code, opts);
  48063. parseRunner.errback(code, opts, callback);
  48064. };
  48065. var parseSync = parseRunner.sync;
  48066. var parseAsync = parseRunner.async;
  48067. var DEFAULT_EXTENSIONS = Object.freeze([".js", ".jsx", ".es6", ".es", ".mjs"]);
  48068. var OptionManager = function () {
  48069. function OptionManager() {}
  48070. var _proto = OptionManager.prototype;
  48071. _proto.init = function init(opts) {
  48072. return loadOptions(opts);
  48073. };
  48074. return OptionManager;
  48075. }();
  48076. function Plugin$1(alias) {
  48077. throw new Error("The (" + alias + ") Babel 5 plugin is being run with an unsupported Babel version.");
  48078. }
  48079. function declare(builder) {
  48080. return function (api, options, dirname) {
  48081. if (!api.assertVersion) {
  48082. api = Object.assign(copyApiObject(api), {
  48083. assertVersion: function assertVersion(range) {
  48084. throwVersionError(range, api.version);
  48085. }
  48086. });
  48087. }
  48088. return builder(api, options || {}, dirname);
  48089. };
  48090. }
  48091. function copyApiObject(api) {
  48092. var proto = null;
  48093. if (typeof api.version === "string" && /^7\./.test(api.version)) {
  48094. proto = Object.getPrototypeOf(api);
  48095. if (proto && (!has$4(proto, "version") || !has$4(proto, "transform") || !has$4(proto, "template") || !has$4(proto, "types"))) {
  48096. proto = null;
  48097. }
  48098. }
  48099. return Object.assign({}, proto, {}, api);
  48100. }
  48101. function has$4(obj, key) {
  48102. return Object.prototype.hasOwnProperty.call(obj, key);
  48103. }
  48104. function throwVersionError(range, version) {
  48105. if (typeof range === "number") {
  48106. if (!Number.isInteger(range)) {
  48107. throw new Error("Expected string or integer value.");
  48108. }
  48109. range = "^" + range + ".0.0-0";
  48110. }
  48111. if (typeof range !== "string") {
  48112. throw new Error("Expected string or integer value.");
  48113. }
  48114. var limit = Error.stackTraceLimit;
  48115. if (typeof limit === "number" && limit < 25) {
  48116. Error.stackTraceLimit = 25;
  48117. }
  48118. var err;
  48119. if (version.slice(0, 2) === "7.") {
  48120. err = new Error("Requires Babel \"^7.0.0-beta.41\", but was loaded with \"" + version + "\". " + "You'll need to update your @babel/core version.");
  48121. } else {
  48122. 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.");
  48123. }
  48124. if (typeof limit === "number") {
  48125. Error.stackTraceLimit = limit;
  48126. }
  48127. throw Object.assign(err, {
  48128. code: "BABEL_VERSION_UNSUPPORTED",
  48129. version: version,
  48130. range: range
  48131. });
  48132. }
  48133. var src = /*#__PURE__*/Object.freeze({
  48134. __proto__: null,
  48135. declare: declare
  48136. });
  48137. var externalHelpers = declare(function (api, options) {
  48138. api.assertVersion(7);
  48139. var _options$helperVersio = options.helperVersion,
  48140. helperVersion = _options$helperVersio === void 0 ? "7.0.0-beta.0" : _options$helperVersio,
  48141. _options$whitelist = options.whitelist,
  48142. whitelist = _options$whitelist === void 0 ? false : _options$whitelist;
  48143. if (whitelist !== false && (!Array.isArray(whitelist) || whitelist.some(function (w) {
  48144. return typeof w !== "string";
  48145. }))) {
  48146. throw new Error(".whitelist must be undefined, false, or an array of strings");
  48147. }
  48148. var helperWhitelist = whitelist ? new Set(whitelist) : null;
  48149. return {
  48150. name: "external-helpers",
  48151. pre: function pre(file) {
  48152. file.set("helperGenerator", function (name) {
  48153. if (file.availableHelper && !file.availableHelper(name, helperVersion)) {
  48154. return;
  48155. }
  48156. if (helperWhitelist && !helperWhitelist.has(name)) return;
  48157. return MemberExpression(Identifier("babelHelpers"), Identifier(name));
  48158. });
  48159. }
  48160. };
  48161. });
  48162. var _helperPluginUtils = getCjsExportFromNamespace(src);
  48163. var lib = createCommonjsModule(function (module, exports) {
  48164. Object.defineProperty(exports, "__esModule", {
  48165. value: true
  48166. });
  48167. exports["default"] = void 0;
  48168. var _default = (0, _helperPluginUtils.declare)(function (api) {
  48169. api.assertVersion(7);
  48170. return {
  48171. name: "syntax-async-generators",
  48172. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  48173. parserOpts.plugins.push("asyncGenerators");
  48174. }
  48175. };
  48176. });
  48177. exports["default"] = _default;
  48178. });
  48179. var syntaxAsyncGenerators = unwrapExports(lib);
  48180. var syntaxClassProperties = declare(function (api) {
  48181. api.assertVersion(7);
  48182. return {
  48183. name: "syntax-class-properties",
  48184. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  48185. parserOpts.plugins.push("classProperties", "classPrivateProperties", "classPrivateMethods");
  48186. }
  48187. };
  48188. });
  48189. var syntaxDecorators = declare(function (api, options) {
  48190. api.assertVersion(7);
  48191. var _options$legacy = options.legacy,
  48192. legacy = _options$legacy === void 0 ? false : _options$legacy;
  48193. if (typeof legacy !== "boolean") {
  48194. throw new Error("'legacy' must be a boolean.");
  48195. }
  48196. var decoratorsBeforeExport = options.decoratorsBeforeExport;
  48197. if (decoratorsBeforeExport === undefined) {
  48198. if (!legacy) {
  48199. 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.");
  48200. }
  48201. } else {
  48202. if (legacy) {
  48203. throw new Error("'decoratorsBeforeExport' can't be used with legacy decorators.");
  48204. }
  48205. if (typeof decoratorsBeforeExport !== "boolean") {
  48206. throw new Error("'decoratorsBeforeExport' must be a boolean.");
  48207. }
  48208. }
  48209. return {
  48210. name: "syntax-decorators",
  48211. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  48212. parserOpts.plugins.push(legacy ? "decorators-legacy" : ["decorators", {
  48213. decoratorsBeforeExport: decoratorsBeforeExport
  48214. }]);
  48215. }
  48216. };
  48217. });
  48218. var syntaxDoExpressions = declare(function (api) {
  48219. api.assertVersion(7);
  48220. return {
  48221. name: "syntax-do-expressions",
  48222. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  48223. parserOpts.plugins.push("doExpressions");
  48224. }
  48225. };
  48226. });
  48227. var lib$1 = createCommonjsModule(function (module, exports) {
  48228. Object.defineProperty(exports, "__esModule", {
  48229. value: true
  48230. });
  48231. exports["default"] = void 0;
  48232. var _default = (0, _helperPluginUtils.declare)(function (api) {
  48233. api.assertVersion(7);
  48234. return {
  48235. name: "syntax-dynamic-import",
  48236. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  48237. parserOpts.plugins.push("dynamicImport");
  48238. }
  48239. };
  48240. });
  48241. exports["default"] = _default;
  48242. });
  48243. var syntaxDynamicImport = unwrapExports(lib$1);
  48244. var syntaxExportDefaultFrom = declare(function (api) {
  48245. api.assertVersion(7);
  48246. return {
  48247. name: "syntax-export-default-from",
  48248. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  48249. parserOpts.plugins.push("exportDefaultFrom");
  48250. }
  48251. };
  48252. });
  48253. var syntaxExportNamespaceFrom = declare(function (api) {
  48254. api.assertVersion(7);
  48255. return {
  48256. name: "syntax-export-namespace-from",
  48257. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  48258. parserOpts.plugins.push("exportNamespaceFrom");
  48259. }
  48260. };
  48261. });
  48262. var syntaxFlow = declare(function (api, options) {
  48263. api.assertVersion(7);
  48264. var all = options.all,
  48265. enums = options.enums;
  48266. if (typeof all !== "boolean" && typeof all !== "undefined") {
  48267. throw new Error(".all must be a boolean, or undefined");
  48268. }
  48269. if (typeof enums !== "boolean" && typeof enums !== "undefined") {
  48270. throw new Error(".enums must be a boolean, or undefined");
  48271. }
  48272. return {
  48273. name: "syntax-flow",
  48274. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  48275. if (parserOpts.plugins.some(function (p) {
  48276. return (Array.isArray(p) ? p[0] : p) === "typescript";
  48277. })) {
  48278. return;
  48279. }
  48280. parserOpts.plugins.push(["flow", {
  48281. all: all,
  48282. enums: enums
  48283. }]);
  48284. }
  48285. };
  48286. });
  48287. var syntaxFunctionBind = declare(function (api) {
  48288. api.assertVersion(7);
  48289. return {
  48290. name: "syntax-function-bind",
  48291. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  48292. parserOpts.plugins.push("functionBind");
  48293. }
  48294. };
  48295. });
  48296. var syntaxFunctionSent = declare(function (api) {
  48297. api.assertVersion(7);
  48298. return {
  48299. name: "syntax-function-sent",
  48300. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  48301. parserOpts.plugins.push("functionSent");
  48302. }
  48303. };
  48304. });
  48305. var syntaxImportMeta = declare(function (api) {
  48306. api.assertVersion(7);
  48307. return {
  48308. name: "syntax-import-meta",
  48309. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  48310. parserOpts.plugins.push("importMeta");
  48311. }
  48312. };
  48313. });
  48314. var syntaxJsx = declare(function (api) {
  48315. api.assertVersion(7);
  48316. return {
  48317. name: "syntax-jsx",
  48318. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  48319. if (parserOpts.plugins.some(function (p) {
  48320. return (Array.isArray(p) ? p[0] : p) === "typescript";
  48321. })) {
  48322. return;
  48323. }
  48324. parserOpts.plugins.push("jsx");
  48325. }
  48326. };
  48327. });
  48328. var lib$2 = createCommonjsModule(function (module, exports) {
  48329. Object.defineProperty(exports, "__esModule", {
  48330. value: true
  48331. });
  48332. exports["default"] = void 0;
  48333. var _default = (0, _helperPluginUtils.declare)(function (api) {
  48334. api.assertVersion(7);
  48335. return {
  48336. name: "syntax-object-rest-spread",
  48337. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  48338. parserOpts.plugins.push("objectRestSpread");
  48339. }
  48340. };
  48341. });
  48342. exports["default"] = _default;
  48343. });
  48344. var syntaxObjectRestSpread = unwrapExports(lib$2);
  48345. var lib$3 = createCommonjsModule(function (module, exports) {
  48346. Object.defineProperty(exports, "__esModule", {
  48347. value: true
  48348. });
  48349. exports["default"] = void 0;
  48350. var _default = (0, _helperPluginUtils.declare)(function (api) {
  48351. api.assertVersion(7);
  48352. return {
  48353. name: "syntax-optional-catch-binding",
  48354. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  48355. parserOpts.plugins.push("optionalCatchBinding");
  48356. }
  48357. };
  48358. });
  48359. exports["default"] = _default;
  48360. });
  48361. var syntaxOptionalCatchBinding = unwrapExports(lib$3);
  48362. var proposals = ["minimal", "smart", "fsharp"];
  48363. var syntaxPipelineOperator = declare(function (api, _ref) {
  48364. var proposal = _ref.proposal;
  48365. api.assertVersion(7);
  48366. if (typeof proposal !== "string" || !proposals.includes(proposal)) {
  48367. 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");
  48368. }
  48369. return {
  48370. name: "syntax-pipeline-operator",
  48371. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  48372. parserOpts.plugins.push(["pipelineOperator", {
  48373. proposal: proposal
  48374. }]);
  48375. }
  48376. };
  48377. });
  48378. var syntaxTopLevelAwait = declare(function (api) {
  48379. api.assertVersion(7);
  48380. return {
  48381. name: "syntax-top-level-await",
  48382. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  48383. parserOpts.plugins.push("topLevelAwait");
  48384. }
  48385. };
  48386. });
  48387. function removePlugin(plugins, name) {
  48388. var indices = [];
  48389. plugins.forEach(function (plugin, i) {
  48390. var n = Array.isArray(plugin) ? plugin[0] : plugin;
  48391. if (n === name) {
  48392. indices.unshift(i);
  48393. }
  48394. });
  48395. for (var _i = 0, _indices = indices; _i < _indices.length; _i++) {
  48396. var i = _indices[_i];
  48397. plugins.splice(i, 1);
  48398. }
  48399. }
  48400. var syntaxTypescript = declare(function (api, _ref) {
  48401. var isTSX = _ref.isTSX;
  48402. api.assertVersion(7);
  48403. return {
  48404. name: "syntax-typescript",
  48405. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  48406. var plugins = parserOpts.plugins;
  48407. removePlugin(plugins, "flow");
  48408. removePlugin(plugins, "jsx");
  48409. parserOpts.plugins.push("typescript", "classProperties", "objectRestSpread");
  48410. if (isTSX) {
  48411. parserOpts.plugins.push("jsx");
  48412. }
  48413. }
  48414. };
  48415. });
  48416. var buildAnonymousExpressionWrapper = template.expression("\n (function () {\n var REF = FUNCTION;\n return function NAME(PARAMS) {\n return REF.apply(this, arguments);\n };\n })()\n");
  48417. var buildNamedExpressionWrapper = template.expression("\n (function () {\n var REF = FUNCTION;\n function NAME(PARAMS) {\n return REF.apply(this, arguments);\n }\n return NAME;\n })()\n");
  48418. var buildDeclarationWrapper = template("\n function NAME(PARAMS) { return REF.apply(this, arguments); }\n function REF() {\n REF = FUNCTION;\n return REF.apply(this, arguments);\n }\n");
  48419. function classOrObjectMethod(path, callId) {
  48420. var node = path.node;
  48421. var body = node.body;
  48422. var container = FunctionExpression(null, [], BlockStatement(body.body), true);
  48423. body.body = [ReturnStatement(CallExpression(CallExpression(callId, [container]), []))];
  48424. node.async = false;
  48425. node.generator = false;
  48426. path.get("body.body.0.argument.callee.arguments.0").unwrapFunctionEnvironment();
  48427. }
  48428. function plainFunction(path, callId) {
  48429. var node = path.node;
  48430. var isDeclaration = path.isFunctionDeclaration();
  48431. var functionId = node.id;
  48432. var wrapper = isDeclaration ? buildDeclarationWrapper : functionId ? buildNamedExpressionWrapper : buildAnonymousExpressionWrapper;
  48433. if (path.isArrowFunctionExpression()) {
  48434. path.arrowFunctionToExpression();
  48435. }
  48436. node.id = null;
  48437. if (isDeclaration) {
  48438. node.type = "FunctionExpression";
  48439. }
  48440. var built = CallExpression(callId, [node]);
  48441. var container = wrapper({
  48442. NAME: functionId || null,
  48443. REF: path.scope.generateUidIdentifier(functionId ? functionId.name : "ref"),
  48444. FUNCTION: built,
  48445. PARAMS: node.params.reduce(function (acc, param) {
  48446. acc.done = acc.done || isAssignmentPattern(param) || isRestElement(param);
  48447. if (!acc.done) {
  48448. acc.params.push(path.scope.generateUidIdentifier("x"));
  48449. }
  48450. return acc;
  48451. }, {
  48452. params: [],
  48453. done: false
  48454. }).params
  48455. });
  48456. if (isDeclaration) {
  48457. path.replaceWith(container[0]);
  48458. path.insertAfter(container[1]);
  48459. } else {
  48460. var retFunction = container.callee.body.body[1].argument;
  48461. if (!functionId) {
  48462. nameFunction({
  48463. node: retFunction,
  48464. parent: path.parent,
  48465. scope: path.scope
  48466. });
  48467. }
  48468. if (!retFunction || retFunction.id || node.params.length) {
  48469. path.replaceWith(container);
  48470. } else {
  48471. path.replaceWith(built);
  48472. }
  48473. }
  48474. }
  48475. function wrapFunction(path, callId) {
  48476. if (path.isClassMethod() || path.isObjectMethod()) {
  48477. classOrObjectMethod(path, callId);
  48478. } else {
  48479. plainFunction(path, callId);
  48480. }
  48481. }
  48482. var PURE_ANNOTATION = "#__PURE__";
  48483. var isPureAnnotated = function isPureAnnotated(_ref) {
  48484. var leadingComments = _ref.leadingComments;
  48485. return !!leadingComments && leadingComments.some(function (comment) {
  48486. return /[@#]__PURE__/.test(comment.value);
  48487. });
  48488. };
  48489. function annotateAsPure(pathOrNode) {
  48490. var node = pathOrNode.node || pathOrNode;
  48491. if (isPureAnnotated(node)) {
  48492. return;
  48493. }
  48494. addComment(node, "leading", PURE_ANNOTATION);
  48495. }
  48496. var awaitVisitor = {
  48497. Function: function Function(path) {
  48498. path.skip();
  48499. },
  48500. AwaitExpression: function AwaitExpression(path, _ref) {
  48501. var wrapAwait = _ref.wrapAwait;
  48502. var argument = path.get("argument");
  48503. if (path.parentPath.isYieldExpression()) {
  48504. path.replaceWith(argument.node);
  48505. return;
  48506. }
  48507. path.replaceWith(YieldExpression(wrapAwait ? CallExpression(cloneNode(wrapAwait), [argument.node]) : argument.node));
  48508. }
  48509. };
  48510. function remapAsyncToGenerator (path, helpers) {
  48511. path.traverse(awaitVisitor, {
  48512. wrapAwait: helpers.wrapAwait
  48513. });
  48514. var isIIFE = checkIsIIFE(path);
  48515. path.node.async = false;
  48516. path.node.generator = true;
  48517. wrapFunction(path, cloneNode(helpers.wrapAsync));
  48518. var isProperty = path.isObjectMethod() || path.isClassMethod() || path.parentPath.isObjectProperty() || path.parentPath.isClassProperty();
  48519. if (!isProperty && !isIIFE && path.isExpression()) {
  48520. annotateAsPure(path);
  48521. }
  48522. function checkIsIIFE(path) {
  48523. if (path.parentPath.isCallExpression({
  48524. callee: path.node
  48525. })) {
  48526. return true;
  48527. }
  48528. var parentPath = path.parentPath;
  48529. if (parentPath.isMemberExpression() && isIdentifier(parentPath.node.property, {
  48530. name: "bind"
  48531. })) {
  48532. var bindCall = parentPath.parentPath;
  48533. return bindCall.isCallExpression() && bindCall.node.arguments.length === 1 && isThisExpression(bindCall.node.arguments[0]) && bindCall.parentPath.isCallExpression({
  48534. callee: bindCall.node
  48535. });
  48536. }
  48537. return false;
  48538. }
  48539. }
  48540. var lib$4 = createCommonjsModule(function (module, exports) {
  48541. Object.defineProperty(exports, "__esModule", {
  48542. value: true
  48543. });
  48544. exports["default"] = void 0;
  48545. var _default = (0, _helperPluginUtils.declare)(function (api) {
  48546. api.assertVersion(7);
  48547. return {
  48548. name: "syntax-async-generators",
  48549. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  48550. parserOpts.plugins.push("asyncGenerators");
  48551. }
  48552. };
  48553. });
  48554. exports["default"] = _default;
  48555. });
  48556. var syntaxAsyncGenerators$1 = unwrapExports(lib$4);
  48557. var buildForAwait = template("\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");
  48558. function rewriteForAwait (path, _ref) {
  48559. var getAsyncIterator = _ref.getAsyncIterator;
  48560. var node = path.node,
  48561. scope = path.scope,
  48562. parent = path.parent;
  48563. var stepKey = scope.generateUidIdentifier("step");
  48564. var stepValue = scope.generateUidIdentifier("value");
  48565. var left = node.left;
  48566. var declar;
  48567. if (isIdentifier(left) || isPattern(left) || isMemberExpression(left)) {
  48568. declar = ExpressionStatement(AssignmentExpression("=", left, stepValue));
  48569. } else if (isVariableDeclaration(left)) {
  48570. declar = VariableDeclaration(left.kind, [VariableDeclarator(left.declarations[0].id, stepValue)]);
  48571. }
  48572. var template = buildForAwait({
  48573. ITERATOR_HAD_ERROR_KEY: scope.generateUidIdentifier("didIteratorError"),
  48574. ITERATOR_COMPLETION: scope.generateUidIdentifier("iteratorNormalCompletion"),
  48575. ITERATOR_ERROR_KEY: scope.generateUidIdentifier("iteratorError"),
  48576. ITERATOR_KEY: scope.generateUidIdentifier("iterator"),
  48577. GET_ITERATOR: getAsyncIterator,
  48578. OBJECT: node.right,
  48579. STEP_VALUE: stepValue,
  48580. STEP_KEY: stepKey
  48581. });
  48582. template = template.body.body;
  48583. var isLabeledParent = isLabeledStatement(parent);
  48584. var tryBody = template[3].block.body;
  48585. var loop = tryBody[0];
  48586. if (isLabeledParent) {
  48587. tryBody[0] = LabeledStatement(parent.label, loop);
  48588. }
  48589. return {
  48590. replaceParent: isLabeledParent,
  48591. node: template,
  48592. declar: declar,
  48593. loop: loop
  48594. };
  48595. }
  48596. var proposalAsyncGeneratorFunctions = declare(function (api) {
  48597. api.assertVersion(7);
  48598. var yieldStarVisitor = {
  48599. Function: function Function(path) {
  48600. path.skip();
  48601. },
  48602. YieldExpression: function YieldExpression(_ref, state) {
  48603. var node = _ref.node;
  48604. if (!node.delegate) return;
  48605. var callee = state.addHelper("asyncGeneratorDelegate");
  48606. node.argument = CallExpression(callee, [CallExpression(state.addHelper("asyncIterator"), [node.argument]), state.addHelper("awaitAsyncGenerator")]);
  48607. }
  48608. };
  48609. var forAwaitVisitor = {
  48610. Function: function Function(path) {
  48611. path.skip();
  48612. },
  48613. ForOfStatement: function ForOfStatement(path, _ref2) {
  48614. var file = _ref2.file;
  48615. var node = path.node;
  48616. if (!node["await"]) return;
  48617. var build = rewriteForAwait(path, {
  48618. getAsyncIterator: file.addHelper("asyncIterator")
  48619. });
  48620. var declar = build.declar,
  48621. loop = build.loop;
  48622. var block = loop.body;
  48623. path.ensureBlock();
  48624. if (declar) {
  48625. block.body.push(declar);
  48626. }
  48627. block.body = block.body.concat(node.body.body);
  48628. inherits(loop, node);
  48629. inherits(loop.body, node.body);
  48630. if (build.replaceParent) {
  48631. path.parentPath.replaceWithMultiple(build.node);
  48632. } else {
  48633. path.replaceWithMultiple(build.node);
  48634. }
  48635. }
  48636. };
  48637. var visitor = {
  48638. Function: function Function(path, state) {
  48639. if (!path.node.async) return;
  48640. path.traverse(forAwaitVisitor, state);
  48641. if (!path.node.generator) return;
  48642. path.traverse(yieldStarVisitor, state);
  48643. remapAsyncToGenerator(path, {
  48644. wrapAsync: state.addHelper("wrapAsyncGenerator"),
  48645. wrapAwait: state.addHelper("awaitAsyncGenerator")
  48646. });
  48647. }
  48648. };
  48649. return {
  48650. name: "proposal-async-generator-functions",
  48651. inherits: syntaxAsyncGenerators$1,
  48652. visitor: {
  48653. Program: function Program(path, state) {
  48654. path.traverse(visitor, state);
  48655. }
  48656. }
  48657. };
  48658. });
  48659. var AssignmentMemoiser = function () {
  48660. function AssignmentMemoiser() {
  48661. this._map = new WeakMap();
  48662. }
  48663. var _proto = AssignmentMemoiser.prototype;
  48664. _proto.has = function has(key) {
  48665. return this._map.has(key);
  48666. };
  48667. _proto.get = function get(key) {
  48668. if (!this.has(key)) return;
  48669. var record = this._map.get(key);
  48670. var value = record.value;
  48671. record.count--;
  48672. if (record.count === 0) {
  48673. return AssignmentExpression("=", value, key);
  48674. }
  48675. return value;
  48676. };
  48677. _proto.set = function set(key, value, count) {
  48678. return this._map.set(key, {
  48679. count: count,
  48680. value: value
  48681. });
  48682. };
  48683. return AssignmentMemoiser;
  48684. }();
  48685. var handle = {
  48686. memoise: function memoise() {},
  48687. handle: function handle(member) {
  48688. var node = member.node,
  48689. parent = member.parent,
  48690. parentPath = member.parentPath;
  48691. if (parentPath.isUpdateExpression({
  48692. argument: node
  48693. })) {
  48694. var operator = parent.operator,
  48695. prefix = parent.prefix;
  48696. this.memoise(member, 2);
  48697. var value = BinaryExpression(operator[0], UnaryExpression("+", this.get(member)), NumericLiteral(1));
  48698. if (prefix) {
  48699. parentPath.replaceWith(this.set(member, value));
  48700. } else {
  48701. var scope = member.scope;
  48702. var ref = scope.generateUidIdentifierBasedOnNode(node);
  48703. scope.push({
  48704. id: ref
  48705. });
  48706. value.left = AssignmentExpression("=", cloneNode(ref), value.left);
  48707. parentPath.replaceWith(SequenceExpression([this.set(member, value), cloneNode(ref)]));
  48708. }
  48709. return;
  48710. }
  48711. if (parentPath.isAssignmentExpression({
  48712. left: node
  48713. })) {
  48714. var _operator = parent.operator,
  48715. right = parent.right;
  48716. var _value = right;
  48717. if (_operator !== "=") {
  48718. this.memoise(member, 2);
  48719. _value = BinaryExpression(_operator.slice(0, -1), this.get(member), _value);
  48720. }
  48721. parentPath.replaceWith(this.set(member, _value));
  48722. return;
  48723. }
  48724. if (parentPath.isCallExpression({
  48725. callee: node
  48726. })) {
  48727. var args = parent.arguments;
  48728. parentPath.replaceWith(this.call(member, args));
  48729. return;
  48730. }
  48731. if (parentPath.isObjectProperty({
  48732. value: node
  48733. }) && parentPath.parentPath.isObjectPattern() || parentPath.isAssignmentPattern({
  48734. left: node
  48735. }) && parentPath.parentPath.isObjectProperty({
  48736. value: parent
  48737. }) && parentPath.parentPath.parentPath.isObjectPattern() || parentPath.isArrayPattern() || parentPath.isAssignmentPattern({
  48738. left: node
  48739. }) && parentPath.parentPath.isArrayPattern() || parentPath.isRestElement()) {
  48740. member.replaceWith(this.destructureSet(member));
  48741. return;
  48742. }
  48743. member.replaceWith(this.get(member));
  48744. }
  48745. };
  48746. function memberExpressionToFunctions(path, visitor, state) {
  48747. path.traverse(visitor, Object.assign({}, handle, {}, state, {
  48748. memoiser: new AssignmentMemoiser()
  48749. }));
  48750. }
  48751. function optimiseCall (callee, thisNode, args) {
  48752. if (args.length === 1 && isSpreadElement(args[0]) && isIdentifier(args[0].argument, {
  48753. name: "arguments"
  48754. })) {
  48755. return CallExpression(MemberExpression(callee, Identifier("apply")), [thisNode, args[0].argument]);
  48756. } else {
  48757. return CallExpression(MemberExpression(callee, Identifier("call")), [thisNode].concat(args));
  48758. }
  48759. }
  48760. function getPrototypeOfExpression(objectRef, isStatic, file, isPrivateMethod) {
  48761. objectRef = cloneNode(objectRef);
  48762. var targetRef = isStatic || isPrivateMethod ? objectRef : MemberExpression(objectRef, Identifier("prototype"));
  48763. return CallExpression(file.addHelper("getPrototypeOf"), [targetRef]);
  48764. }
  48765. function skipAllButComputedKey(path) {
  48766. if (!path.node.computed) {
  48767. path.skip();
  48768. return;
  48769. }
  48770. var keys = VISITOR_KEYS[path.type];
  48771. for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  48772. var _ref;
  48773. if (_isArray) {
  48774. if (_i >= _iterator.length) break;
  48775. _ref = _iterator[_i++];
  48776. } else {
  48777. _i = _iterator.next();
  48778. if (_i.done) break;
  48779. _ref = _i.value;
  48780. }
  48781. var key = _ref;
  48782. if (key !== "key") path.skipKey(key);
  48783. }
  48784. }
  48785. var environmentVisitor = {
  48786. TypeAnnotation: function TypeAnnotation(path) {
  48787. path.skip();
  48788. },
  48789. Function: function Function(path) {
  48790. if (path.isMethod()) return;
  48791. if (path.isArrowFunctionExpression()) return;
  48792. path.skip();
  48793. },
  48794. "Method|ClassProperty|ClassPrivateProperty": function MethodClassPropertyClassPrivateProperty(path) {
  48795. skipAllButComputedKey(path);
  48796. }
  48797. };
  48798. var visitor$1 = traverse$1.visitors.merge([environmentVisitor, {
  48799. Super: function Super(path, state) {
  48800. var node = path.node,
  48801. parentPath = path.parentPath;
  48802. if (!parentPath.isMemberExpression({
  48803. object: node
  48804. })) return;
  48805. state.handle(parentPath);
  48806. }
  48807. }]);
  48808. var specHandlers = {
  48809. memoise: function memoise(superMember, count) {
  48810. var scope = superMember.scope,
  48811. node = superMember.node;
  48812. var computed = node.computed,
  48813. property = node.property;
  48814. if (!computed) {
  48815. return;
  48816. }
  48817. var memo = scope.maybeGenerateMemoised(property);
  48818. if (!memo) {
  48819. return;
  48820. }
  48821. this.memoiser.set(property, memo, count);
  48822. },
  48823. prop: function prop(superMember) {
  48824. var _superMember$node = superMember.node,
  48825. computed = _superMember$node.computed,
  48826. property = _superMember$node.property;
  48827. if (this.memoiser.has(property)) {
  48828. return cloneNode(this.memoiser.get(property));
  48829. }
  48830. if (computed) {
  48831. return cloneNode(property);
  48832. }
  48833. return StringLiteral(property.name);
  48834. },
  48835. get: function get(superMember) {
  48836. return CallExpression(this.file.addHelper("get"), [getPrototypeOfExpression(this.getObjectRef(), this.isStatic, this.file, this.isPrivateMethod), this.prop(superMember), ThisExpression()]);
  48837. },
  48838. set: function set(superMember, value) {
  48839. return CallExpression(this.file.addHelper("set"), [getPrototypeOfExpression(this.getObjectRef(), this.isStatic, this.file, this.isPrivateMethod), this.prop(superMember), value, ThisExpression(), BooleanLiteral(superMember.isInStrictMode())]);
  48840. },
  48841. destructureSet: function destructureSet(superMember) {
  48842. throw superMember.buildCodeFrameError("Destructuring to a super field is not supported yet.");
  48843. },
  48844. call: function call(superMember, args) {
  48845. return optimiseCall(this.get(superMember), ThisExpression(), args);
  48846. }
  48847. };
  48848. var looseHandlers = Object.assign({}, specHandlers, {
  48849. prop: function prop(superMember) {
  48850. var property = superMember.node.property;
  48851. if (this.memoiser.has(property)) {
  48852. return cloneNode(this.memoiser.get(property));
  48853. }
  48854. return cloneNode(property);
  48855. },
  48856. get: function get(superMember) {
  48857. var isStatic = this.isStatic,
  48858. superRef = this.superRef;
  48859. var computed = superMember.node.computed;
  48860. var prop = this.prop(superMember);
  48861. var object;
  48862. if (isStatic) {
  48863. object = superRef ? cloneNode(superRef) : MemberExpression(Identifier("Function"), Identifier("prototype"));
  48864. } else {
  48865. object = superRef ? MemberExpression(cloneNode(superRef), Identifier("prototype")) : MemberExpression(Identifier("Object"), Identifier("prototype"));
  48866. }
  48867. return MemberExpression(object, prop, computed);
  48868. },
  48869. set: function set(superMember, value) {
  48870. var computed = superMember.node.computed;
  48871. var prop = this.prop(superMember);
  48872. return AssignmentExpression("=", MemberExpression(ThisExpression(), prop, computed), value);
  48873. },
  48874. destructureSet: function destructureSet(superMember) {
  48875. var computed = superMember.node.computed;
  48876. var prop = this.prop(superMember);
  48877. return MemberExpression(ThisExpression(), prop, computed);
  48878. }
  48879. });
  48880. var ReplaceSupers = function () {
  48881. function ReplaceSupers(opts) {
  48882. var path = opts.methodPath;
  48883. this.methodPath = path;
  48884. this.isStatic = path.isObjectMethod() || path.node["static"];
  48885. this.isPrivateMethod = path.isPrivate() && path.isMethod();
  48886. this.file = opts.file;
  48887. this.superRef = opts.superRef;
  48888. this.isLoose = opts.isLoose;
  48889. this.opts = opts;
  48890. }
  48891. var _proto = ReplaceSupers.prototype;
  48892. _proto.getObjectRef = function getObjectRef() {
  48893. return cloneNode(this.opts.objectRef || this.opts.getObjectRef());
  48894. };
  48895. _proto.replace = function replace() {
  48896. var handler = this.isLoose ? looseHandlers : specHandlers;
  48897. memberExpressionToFunctions(this.methodPath, visitor$1, Object.assign({
  48898. file: this.file,
  48899. isStatic: this.isStatic,
  48900. isPrivateMethod: this.isPrivateMethod,
  48901. getObjectRef: this.getObjectRef.bind(this),
  48902. superRef: this.superRef
  48903. }, handler));
  48904. };
  48905. return ReplaceSupers;
  48906. }();
  48907. function assertFieldTransformed(path) {
  48908. if (path.node.declare) {
  48909. 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");
  48910. }
  48911. }
  48912. function _templateObject15$1() {
  48913. var data = _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 "]);
  48914. _templateObject15$1 = function _templateObject15() {
  48915. return data;
  48916. };
  48917. return data;
  48918. }
  48919. function _templateObject14$1() {
  48920. var data = _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 "]);
  48921. _templateObject14$1 = function _templateObject14() {
  48922. return data;
  48923. };
  48924. return data;
  48925. }
  48926. function _templateObject13$1() {
  48927. var data = _taggedTemplateLiteralLoose(["", ".add(", ")"]);
  48928. _templateObject13$1 = function _templateObject13() {
  48929. return data;
  48930. };
  48931. return data;
  48932. }
  48933. function _templateObject12$1() {
  48934. var data = _taggedTemplateLiteralLoose(["\n ", ".set(", ", {\n get: ", ",\n set: ", "\n });\n "]);
  48935. _templateObject12$1 = function _templateObject12() {
  48936. return data;
  48937. };
  48938. return data;
  48939. }
  48940. function _templateObject11$1() {
  48941. var data = _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 "]);
  48942. _templateObject11$1 = function _templateObject11() {
  48943. return data;
  48944. };
  48945. return data;
  48946. }
  48947. function _templateObject10$1() {
  48948. var data = _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 "]);
  48949. _templateObject10$1 = function _templateObject10() {
  48950. return data;
  48951. };
  48952. return data;
  48953. }
  48954. function _templateObject9$1() {
  48955. var data = _taggedTemplateLiteralLoose(["\n var ", " = {\n // configurable is false by default\n // enumerable is false by default\n writable: true,\n value: ", "\n };\n "]);
  48956. _templateObject9$1 = function _templateObject9() {
  48957. return data;
  48958. };
  48959. return data;
  48960. }
  48961. function _templateObject8$1() {
  48962. var data = _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 "]);
  48963. _templateObject8$1 = function _templateObject8() {
  48964. return data;
  48965. };
  48966. return data;
  48967. }
  48968. function _templateObject7$1() {
  48969. var data = _taggedTemplateLiteralLoose(["", ".set(", ", {\n // configurable is always false for private elements\n // enumerable is always false for private elements\n writable: true,\n value: ", ",\n })"]);
  48970. _templateObject7$1 = function _templateObject7() {
  48971. return data;
  48972. };
  48973. return data;
  48974. }
  48975. function _templateObject6$1() {
  48976. var data = _taggedTemplateLiteralLoose(["\n Object.defineProperty(", ", ", ", {\n // configurable is false by default\n // enumerable is false by default\n writable: true,\n value: ", "\n });\n "]);
  48977. _templateObject6$1 = function _templateObject6() {
  48978. return data;
  48979. };
  48980. return data;
  48981. }
  48982. function _templateObject5$1() {
  48983. var data = _taggedTemplateLiteralLoose(["BASE(REF, PROP)[PROP]"]);
  48984. _templateObject5$1 = function _templateObject5() {
  48985. return data;
  48986. };
  48987. return data;
  48988. }
  48989. function _templateObject4$1() {
  48990. var data = _taggedTemplateLiteralLoose(["var ", " = new WeakMap();"]);
  48991. _templateObject4$1 = function _templateObject4() {
  48992. return data;
  48993. };
  48994. return data;
  48995. }
  48996. function _templateObject3$1() {
  48997. var data = _taggedTemplateLiteralLoose(["var ", " = new WeakSet();"]);
  48998. _templateObject3$1 = function _templateObject3() {
  48999. return data;
  49000. };
  49001. return data;
  49002. }
  49003. function _templateObject2$1() {
  49004. var data = _taggedTemplateLiteralLoose(["var ", " = new WeakMap();"]);
  49005. _templateObject2$1 = function _templateObject2() {
  49006. return data;
  49007. };
  49008. return data;
  49009. }
  49010. function _templateObject$2() {
  49011. var data = _taggedTemplateLiteralLoose(["\n var ", " = ", "(\"", "\")\n "]);
  49012. _templateObject$2 = function _templateObject() {
  49013. return data;
  49014. };
  49015. return data;
  49016. }
  49017. function buildPrivateNamesMap(props) {
  49018. var privateNamesMap = new Map();
  49019. for (var _iterator = props, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  49020. var _ref;
  49021. if (_isArray) {
  49022. if (_i >= _iterator.length) break;
  49023. _ref = _iterator[_i++];
  49024. } else {
  49025. _i = _iterator.next();
  49026. if (_i.done) break;
  49027. _ref = _i.value;
  49028. }
  49029. var prop = _ref;
  49030. var isPrivate = prop.isPrivate();
  49031. var isMethod = !prop.isProperty();
  49032. var isInstance = !prop.node["static"];
  49033. if (isPrivate) {
  49034. var name = prop.node.key.id.name;
  49035. var update = privateNamesMap.has(name) ? privateNamesMap.get(name) : {
  49036. id: prop.scope.generateUidIdentifier(name),
  49037. "static": !isInstance,
  49038. method: isMethod
  49039. };
  49040. if (prop.node.kind === "get") {
  49041. update.getId = prop.scope.generateUidIdentifier("get_" + name);
  49042. } else if (prop.node.kind === "set") {
  49043. update.setId = prop.scope.generateUidIdentifier("set_" + name);
  49044. } else if (prop.node.kind === "method") {
  49045. update.methodId = prop.scope.generateUidIdentifier(name);
  49046. }
  49047. privateNamesMap.set(name, update);
  49048. }
  49049. }
  49050. return privateNamesMap;
  49051. }
  49052. function buildPrivateNamesNodes(privateNamesMap, loose, state) {
  49053. var initNodes = [];
  49054. for (var _iterator2 = privateNamesMap, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  49055. var _ref2;
  49056. if (_isArray2) {
  49057. if (_i2 >= _iterator2.length) break;
  49058. _ref2 = _iterator2[_i2++];
  49059. } else {
  49060. _i2 = _iterator2.next();
  49061. if (_i2.done) break;
  49062. _ref2 = _i2.value;
  49063. }
  49064. var _ref3 = _ref2,
  49065. name = _ref3[0],
  49066. value = _ref3[1];
  49067. var id = value.id,
  49068. isStatic = value["static"],
  49069. isMethod = value.method,
  49070. getId = value.getId,
  49071. setId = value.setId;
  49072. var isAccessor = getId || setId;
  49073. if (loose) {
  49074. initNodes.push(template.statement.ast(_templateObject$2(), id, state.addHelper("classPrivateFieldLooseKey"), name));
  49075. } else if (isMethod && !isStatic) {
  49076. if (isAccessor) {
  49077. initNodes.push(template.statement.ast(_templateObject2$1(), id));
  49078. } else {
  49079. initNodes.push(template.statement.ast(_templateObject3$1(), id));
  49080. }
  49081. } else if (!isStatic) {
  49082. initNodes.push(template.statement.ast(_templateObject4$1(), id));
  49083. }
  49084. }
  49085. return initNodes;
  49086. }
  49087. var privateNameVisitor = {
  49088. PrivateName: function PrivateName(path) {
  49089. var privateNamesMap = this.privateNamesMap;
  49090. var node = path.node,
  49091. parentPath = path.parentPath;
  49092. if (!parentPath.isMemberExpression({
  49093. property: node
  49094. })) return;
  49095. if (!privateNamesMap.has(node.id.name)) return;
  49096. this.handle(parentPath);
  49097. },
  49098. Class: function Class(path) {
  49099. var privateNamesMap = this.privateNamesMap;
  49100. var body = path.get("body.body");
  49101. for (var _iterator3 = body, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
  49102. var _ref4;
  49103. if (_isArray3) {
  49104. if (_i3 >= _iterator3.length) break;
  49105. _ref4 = _iterator3[_i3++];
  49106. } else {
  49107. _i3 = _iterator3.next();
  49108. if (_i3.done) break;
  49109. _ref4 = _i3.value;
  49110. }
  49111. var prop = _ref4;
  49112. if (!prop.isPrivate()) {
  49113. continue;
  49114. }
  49115. if (!privateNamesMap.has(prop.node.key.id.name)) continue;
  49116. path.traverse(privateNameInnerVisitor, this);
  49117. path.skip();
  49118. break;
  49119. }
  49120. }
  49121. };
  49122. var privateNameInnerVisitor = traverse$1.visitors.merge([{
  49123. PrivateName: privateNameVisitor.PrivateName
  49124. }, environmentVisitor]);
  49125. var privateNameHandlerSpec = {
  49126. memoise: function memoise(member, count) {
  49127. var scope = member.scope;
  49128. var object = member.node.object;
  49129. var memo = scope.maybeGenerateMemoised(object);
  49130. if (!memo) {
  49131. return;
  49132. }
  49133. this.memoiser.set(object, memo, count);
  49134. },
  49135. receiver: function receiver(member) {
  49136. var object = member.node.object;
  49137. if (this.memoiser.has(object)) {
  49138. return cloneNode(this.memoiser.get(object));
  49139. }
  49140. return cloneNode(object);
  49141. },
  49142. get: function get(member) {
  49143. var classRef = this.classRef,
  49144. privateNamesMap = this.privateNamesMap,
  49145. file = this.file;
  49146. var name = member.node.property.id.name;
  49147. var _privateNamesMap$get = privateNamesMap.get(name),
  49148. id = _privateNamesMap$get.id,
  49149. isStatic = _privateNamesMap$get["static"],
  49150. isMethod = _privateNamesMap$get.method,
  49151. methodId = _privateNamesMap$get.methodId,
  49152. getId = _privateNamesMap$get.getId,
  49153. setId = _privateNamesMap$get.setId;
  49154. var isAccessor = getId || setId;
  49155. if (isStatic) {
  49156. var helperName = isMethod && !isAccessor ? "classStaticPrivateMethodGet" : "classStaticPrivateFieldSpecGet";
  49157. return CallExpression(file.addHelper(helperName), [this.receiver(member), cloneNode(classRef), cloneNode(id)]);
  49158. }
  49159. if (isMethod) {
  49160. if (isAccessor) {
  49161. return CallExpression(file.addHelper("classPrivateFieldGet"), [this.receiver(member), cloneNode(id)]);
  49162. }
  49163. return CallExpression(file.addHelper("classPrivateMethodGet"), [this.receiver(member), cloneNode(id), cloneNode(methodId)]);
  49164. }
  49165. return CallExpression(file.addHelper("classPrivateFieldGet"), [this.receiver(member), cloneNode(id)]);
  49166. },
  49167. set: function set(member, value) {
  49168. var classRef = this.classRef,
  49169. privateNamesMap = this.privateNamesMap,
  49170. file = this.file;
  49171. var name = member.node.property.id.name;
  49172. var _privateNamesMap$get2 = privateNamesMap.get(name),
  49173. id = _privateNamesMap$get2.id,
  49174. isStatic = _privateNamesMap$get2["static"],
  49175. isMethod = _privateNamesMap$get2.method,
  49176. setId = _privateNamesMap$get2.setId,
  49177. getId = _privateNamesMap$get2.getId;
  49178. var isAccessor = getId || setId;
  49179. if (isStatic) {
  49180. var helperName = isMethod && !isAccessor ? "classStaticPrivateMethodSet" : "classStaticPrivateFieldSpecSet";
  49181. return CallExpression(file.addHelper(helperName), [this.receiver(member), cloneNode(classRef), cloneNode(id), value]);
  49182. }
  49183. if (isMethod) {
  49184. if (setId) {
  49185. return CallExpression(file.addHelper("classPrivateFieldSet"), [this.receiver(member), cloneNode(id), value]);
  49186. }
  49187. return CallExpression(file.addHelper("classPrivateMethodSet"), []);
  49188. }
  49189. return CallExpression(file.addHelper("classPrivateFieldSet"), [this.receiver(member), cloneNode(id), value]);
  49190. },
  49191. destructureSet: function destructureSet(member) {
  49192. var privateNamesMap = this.privateNamesMap,
  49193. file = this.file;
  49194. var name = member.node.property.id.name;
  49195. var _privateNamesMap$get3 = privateNamesMap.get(name),
  49196. id = _privateNamesMap$get3.id;
  49197. return MemberExpression(CallExpression(file.addHelper("classPrivateFieldDestructureSet"), [this.receiver(member), cloneNode(id)]), Identifier("value"));
  49198. },
  49199. call: function call(member, args) {
  49200. this.memoise(member, 1);
  49201. return optimiseCall(this.get(member), this.receiver(member), args);
  49202. }
  49203. };
  49204. var privateNameHandlerLoose = {
  49205. handle: function handle(member) {
  49206. var privateNamesMap = this.privateNamesMap,
  49207. file = this.file;
  49208. var object = member.node.object;
  49209. var name = member.node.property.id.name;
  49210. member.replaceWith(template.expression(_templateObject5$1())({
  49211. BASE: file.addHelper("classPrivateFieldLooseBase"),
  49212. REF: object,
  49213. PROP: privateNamesMap.get(name).id
  49214. }));
  49215. }
  49216. };
  49217. function transformPrivateNamesUsage(ref, path, privateNamesMap, loose, state) {
  49218. var body = path.get("body");
  49219. if (loose) {
  49220. body.traverse(privateNameVisitor, Object.assign({
  49221. privateNamesMap: privateNamesMap,
  49222. file: state
  49223. }, privateNameHandlerLoose));
  49224. } else {
  49225. memberExpressionToFunctions(body, privateNameVisitor, Object.assign({
  49226. privateNamesMap: privateNamesMap,
  49227. classRef: ref,
  49228. file: state
  49229. }, privateNameHandlerSpec));
  49230. }
  49231. }
  49232. function buildPrivateFieldInitLoose(ref, prop, privateNamesMap) {
  49233. var _privateNamesMap$get4 = privateNamesMap.get(prop.node.key.id.name),
  49234. id = _privateNamesMap$get4.id;
  49235. var value = prop.node.value || prop.scope.buildUndefinedNode();
  49236. return template.statement.ast(_templateObject6$1(), ref, id, value);
  49237. }
  49238. function buildPrivateInstanceFieldInitSpec(ref, prop, privateNamesMap) {
  49239. var _privateNamesMap$get5 = privateNamesMap.get(prop.node.key.id.name),
  49240. id = _privateNamesMap$get5.id;
  49241. var value = prop.node.value || prop.scope.buildUndefinedNode();
  49242. return template.statement.ast(_templateObject7$1(), id, ref, value);
  49243. }
  49244. function buildPrivateStaticFieldInitSpec(prop, privateNamesMap) {
  49245. var privateName = privateNamesMap.get(prop.node.key.id.name);
  49246. var id = privateName.id,
  49247. getId = privateName.getId,
  49248. setId = privateName.setId,
  49249. initAdded = privateName.initAdded;
  49250. var isAccessor = getId || setId;
  49251. if (!prop.isProperty() && (initAdded || !isAccessor)) return;
  49252. if (isAccessor) {
  49253. privateNamesMap.set(prop.node.key.id.name, Object.assign({}, privateName, {
  49254. initAdded: true
  49255. }));
  49256. return template.statement.ast(_templateObject8$1(), id.name, getId ? getId.name : prop.scope.buildUndefinedNode(), setId ? setId.name : prop.scope.buildUndefinedNode());
  49257. }
  49258. var value = prop.node.value || prop.scope.buildUndefinedNode();
  49259. return template.statement.ast(_templateObject9$1(), id, value);
  49260. }
  49261. function buildPrivateMethodInitLoose(ref, prop, privateNamesMap) {
  49262. var privateName = privateNamesMap.get(prop.node.key.id.name);
  49263. var methodId = privateName.methodId,
  49264. id = privateName.id,
  49265. getId = privateName.getId,
  49266. setId = privateName.setId,
  49267. initAdded = privateName.initAdded;
  49268. if (initAdded) return;
  49269. if (methodId) {
  49270. return template.statement.ast(_templateObject10$1(), ref, id, methodId.name);
  49271. }
  49272. var isAccessor = getId || setId;
  49273. if (isAccessor) {
  49274. privateNamesMap.set(prop.node.key.id.name, Object.assign({}, privateName, {
  49275. initAdded: true
  49276. }));
  49277. return template.statement.ast(_templateObject11$1(), ref, id, getId ? getId.name : prop.scope.buildUndefinedNode(), setId ? setId.name : prop.scope.buildUndefinedNode());
  49278. }
  49279. }
  49280. function buildPrivateInstanceMethodInitSpec(ref, prop, privateNamesMap) {
  49281. var privateName = privateNamesMap.get(prop.node.key.id.name);
  49282. var id = privateName.id,
  49283. getId = privateName.getId,
  49284. setId = privateName.setId,
  49285. initAdded = privateName.initAdded;
  49286. if (initAdded) return;
  49287. var isAccessor = getId || setId;
  49288. if (isAccessor) {
  49289. privateNamesMap.set(prop.node.key.id.name, Object.assign({}, privateName, {
  49290. initAdded: true
  49291. }));
  49292. return template.statement.ast(_templateObject12$1(), id, ref, getId ? getId.name : prop.scope.buildUndefinedNode(), setId ? setId.name : prop.scope.buildUndefinedNode());
  49293. }
  49294. return template.statement.ast(_templateObject13$1(), id, ref);
  49295. }
  49296. function buildPublicFieldInitLoose(ref, prop) {
  49297. var _prop$node = prop.node,
  49298. key = _prop$node.key,
  49299. computed = _prop$node.computed;
  49300. var value = prop.node.value || prop.scope.buildUndefinedNode();
  49301. return ExpressionStatement(AssignmentExpression("=", MemberExpression(ref, key, computed || isLiteral(key)), value));
  49302. }
  49303. function buildPublicFieldInitSpec(ref, prop, state) {
  49304. var _prop$node2 = prop.node,
  49305. key = _prop$node2.key,
  49306. computed = _prop$node2.computed;
  49307. var value = prop.node.value || prop.scope.buildUndefinedNode();
  49308. return ExpressionStatement(CallExpression(state.addHelper("defineProperty"), [ref, computed || isLiteral(key) ? key : StringLiteral(key.name), value]));
  49309. }
  49310. function buildPrivateStaticMethodInitLoose(ref, prop, state, privateNamesMap) {
  49311. var privateName = privateNamesMap.get(prop.node.key.id.name);
  49312. var id = privateName.id,
  49313. methodId = privateName.methodId,
  49314. getId = privateName.getId,
  49315. setId = privateName.setId,
  49316. initAdded = privateName.initAdded;
  49317. if (initAdded) return;
  49318. var isAccessor = getId || setId;
  49319. if (isAccessor) {
  49320. privateNamesMap.set(prop.node.key.id.name, Object.assign({}, privateName, {
  49321. initAdded: true
  49322. }));
  49323. return template.statement.ast(_templateObject14$1(), ref, id, getId ? getId.name : prop.scope.buildUndefinedNode(), setId ? setId.name : prop.scope.buildUndefinedNode());
  49324. }
  49325. return template.statement.ast(_templateObject15$1(), ref, id, methodId.name);
  49326. }
  49327. function buildPrivateMethodDeclaration(prop, privateNamesMap, loose) {
  49328. if (loose === void 0) {
  49329. loose = false;
  49330. }
  49331. var privateName = privateNamesMap.get(prop.node.key.id.name);
  49332. var id = privateName.id,
  49333. methodId = privateName.methodId,
  49334. getId = privateName.getId,
  49335. setId = privateName.setId,
  49336. getterDeclared = privateName.getterDeclared,
  49337. setterDeclared = privateName.setterDeclared,
  49338. isStatic = privateName["static"];
  49339. var _prop$node3 = prop.node,
  49340. params = _prop$node3.params,
  49341. body = _prop$node3.body,
  49342. generator = _prop$node3.generator,
  49343. async = _prop$node3.async;
  49344. var methodValue = FunctionExpression(methodId, params, body, generator, async);
  49345. var isGetter = getId && !getterDeclared && params.length === 0;
  49346. var isSetter = setId && !setterDeclared && params.length > 0;
  49347. if (isGetter) {
  49348. privateNamesMap.set(prop.node.key.id.name, Object.assign({}, privateName, {
  49349. getterDeclared: true
  49350. }));
  49351. return VariableDeclaration("var", [VariableDeclarator(getId, methodValue)]);
  49352. }
  49353. if (isSetter) {
  49354. privateNamesMap.set(prop.node.key.id.name, Object.assign({}, privateName, {
  49355. setterDeclared: true
  49356. }));
  49357. return VariableDeclaration("var", [VariableDeclarator(setId, methodValue)]);
  49358. }
  49359. if (isStatic && !loose) {
  49360. return VariableDeclaration("var", [VariableDeclarator(id, FunctionExpression(id, params, body, generator, async))]);
  49361. }
  49362. return VariableDeclaration("var", [VariableDeclarator(methodId, methodValue)]);
  49363. }
  49364. var thisContextVisitor = traverse$1.visitors.merge([{
  49365. ThisExpression: function ThisExpression(path, state) {
  49366. state.needsClassRef = true;
  49367. path.replaceWith(cloneNode(state.classRef));
  49368. }
  49369. }, environmentVisitor]);
  49370. function replaceThisContext(path, ref, superRef, file, loose) {
  49371. var state = {
  49372. classRef: ref,
  49373. needsClassRef: false
  49374. };
  49375. var replacer = new ReplaceSupers({
  49376. methodPath: path,
  49377. isLoose: loose,
  49378. superRef: superRef,
  49379. file: file,
  49380. getObjectRef: function getObjectRef() {
  49381. state.needsClassRef = true;
  49382. return path.node["static"] ? ref : MemberExpression(ref, Identifier("prototype"));
  49383. }
  49384. });
  49385. replacer.replace();
  49386. if (path.isProperty()) {
  49387. path.traverse(thisContextVisitor, state);
  49388. }
  49389. return state.needsClassRef;
  49390. }
  49391. function buildFieldsInitNodes(ref, superRef, props, privateNamesMap, state, loose) {
  49392. var staticNodes = [];
  49393. var instanceNodes = [];
  49394. var needsClassRef = false;
  49395. for (var _iterator4 = props, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
  49396. var _ref5;
  49397. if (_isArray4) {
  49398. if (_i4 >= _iterator4.length) break;
  49399. _ref5 = _iterator4[_i4++];
  49400. } else {
  49401. _i4 = _iterator4.next();
  49402. if (_i4.done) break;
  49403. _ref5 = _i4.value;
  49404. }
  49405. var prop = _ref5;
  49406. assertFieldTransformed(prop);
  49407. var isStatic = prop.node["static"];
  49408. var isInstance = !isStatic;
  49409. var isPrivate = prop.isPrivate();
  49410. var isPublic = !isPrivate;
  49411. var isField = prop.isProperty();
  49412. var isMethod = !isField;
  49413. if (isStatic || isMethod && isPrivate) {
  49414. var replaced = replaceThisContext(prop, ref, superRef, state, loose);
  49415. needsClassRef = needsClassRef || replaced;
  49416. }
  49417. switch (true) {
  49418. case isStatic && isPrivate && isField && loose:
  49419. needsClassRef = true;
  49420. staticNodes.push(buildPrivateFieldInitLoose(cloneNode(ref), prop, privateNamesMap));
  49421. break;
  49422. case isStatic && isPrivate && isField && !loose:
  49423. needsClassRef = true;
  49424. staticNodes.push(buildPrivateStaticFieldInitSpec(prop, privateNamesMap));
  49425. break;
  49426. case isStatic && isPublic && isField && loose:
  49427. needsClassRef = true;
  49428. staticNodes.push(buildPublicFieldInitLoose(cloneNode(ref), prop));
  49429. break;
  49430. case isStatic && isPublic && isField && !loose:
  49431. needsClassRef = true;
  49432. staticNodes.push(buildPublicFieldInitSpec(cloneNode(ref), prop, state));
  49433. break;
  49434. case isInstance && isPrivate && isField && loose:
  49435. instanceNodes.push(buildPrivateFieldInitLoose(ThisExpression(), prop, privateNamesMap));
  49436. break;
  49437. case isInstance && isPrivate && isField && !loose:
  49438. instanceNodes.push(buildPrivateInstanceFieldInitSpec(ThisExpression(), prop, privateNamesMap));
  49439. break;
  49440. case isInstance && isPrivate && isMethod && loose:
  49441. instanceNodes.unshift(buildPrivateMethodInitLoose(ThisExpression(), prop, privateNamesMap));
  49442. staticNodes.push(buildPrivateMethodDeclaration(prop, privateNamesMap, loose));
  49443. break;
  49444. case isInstance && isPrivate && isMethod && !loose:
  49445. instanceNodes.unshift(buildPrivateInstanceMethodInitSpec(ThisExpression(), prop, privateNamesMap));
  49446. staticNodes.push(buildPrivateMethodDeclaration(prop, privateNamesMap, loose));
  49447. break;
  49448. case isStatic && isPrivate && isMethod && !loose:
  49449. needsClassRef = true;
  49450. staticNodes.push(buildPrivateStaticFieldInitSpec(prop, privateNamesMap));
  49451. staticNodes.unshift(buildPrivateMethodDeclaration(prop, privateNamesMap, loose));
  49452. break;
  49453. case isStatic && isPrivate && isMethod && loose:
  49454. needsClassRef = true;
  49455. staticNodes.push(buildPrivateStaticMethodInitLoose(cloneNode(ref), prop, state, privateNamesMap));
  49456. staticNodes.unshift(buildPrivateMethodDeclaration(prop, privateNamesMap, loose));
  49457. break;
  49458. case isInstance && isPublic && isField && loose:
  49459. instanceNodes.push(buildPublicFieldInitLoose(ThisExpression(), prop));
  49460. break;
  49461. case isInstance && isPublic && isField && !loose:
  49462. instanceNodes.push(buildPublicFieldInitSpec(ThisExpression(), prop, state));
  49463. break;
  49464. default:
  49465. throw new Error("Unreachable.");
  49466. }
  49467. }
  49468. return {
  49469. staticNodes: staticNodes.filter(Boolean),
  49470. instanceNodes: instanceNodes.filter(Boolean),
  49471. wrapClass: function wrapClass(path) {
  49472. for (var _iterator5 = props, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) {
  49473. var _ref6;
  49474. if (_isArray5) {
  49475. if (_i5 >= _iterator5.length) break;
  49476. _ref6 = _iterator5[_i5++];
  49477. } else {
  49478. _i5 = _iterator5.next();
  49479. if (_i5.done) break;
  49480. _ref6 = _i5.value;
  49481. }
  49482. var prop = _ref6;
  49483. prop.remove();
  49484. }
  49485. if (!needsClassRef) return path;
  49486. if (path.isClassExpression()) {
  49487. path.scope.push({
  49488. id: ref
  49489. });
  49490. path.replaceWith(AssignmentExpression("=", cloneNode(ref), path.node));
  49491. } else if (!path.node.id) {
  49492. path.node.id = ref;
  49493. }
  49494. return path;
  49495. }
  49496. };
  49497. }
  49498. function _templateObject4$2() {
  49499. var data = _taggedTemplateLiteralLoose(["", "(this)"]);
  49500. _templateObject4$2 = function _templateObject4() {
  49501. return data;
  49502. };
  49503. return data;
  49504. }
  49505. function _templateObject3$2() {
  49506. var data = _taggedTemplateLiteralLoose(["let ", " = ", ""]);
  49507. _templateObject3$2 = function _templateObject3() {
  49508. return data;
  49509. };
  49510. return data;
  49511. }
  49512. function _templateObject2$2() {
  49513. var data = _taggedTemplateLiteralLoose(["\n ", "(\n ", ",\n function (", ", ", ") {\n ", "\n return { F: ", ", d: ", " };\n },\n ", "\n )\n "]);
  49514. _templateObject2$2 = function _templateObject2() {
  49515. return data;
  49516. };
  49517. return data;
  49518. }
  49519. function _templateObject$3() {
  49520. var data = _taggedTemplateLiteralLoose(["return ", ""]);
  49521. _templateObject$3 = function _templateObject() {
  49522. return data;
  49523. };
  49524. return data;
  49525. }
  49526. function hasOwnDecorators(node) {
  49527. return !!(node.decorators && node.decorators.length);
  49528. }
  49529. function hasDecorators(node) {
  49530. return hasOwnDecorators(node) || node.body.body.some(hasOwnDecorators);
  49531. }
  49532. function prop(key, value) {
  49533. if (!value) return null;
  49534. return ObjectProperty(Identifier(key), value);
  49535. }
  49536. function method(key, body) {
  49537. return ObjectMethod("method", Identifier(key), [], BlockStatement(body));
  49538. }
  49539. function takeDecorators(node) {
  49540. var result;
  49541. if (node.decorators && node.decorators.length > 0) {
  49542. result = ArrayExpression(node.decorators.map(function (decorator) {
  49543. return decorator.expression;
  49544. }));
  49545. }
  49546. node.decorators = undefined;
  49547. return result;
  49548. }
  49549. function getKey(node) {
  49550. if (node.computed) {
  49551. return node.key;
  49552. } else if (isIdentifier(node.key)) {
  49553. return StringLiteral(node.key.name);
  49554. } else {
  49555. return StringLiteral(String(node.key.value));
  49556. }
  49557. }
  49558. function extractElementDescriptor(classRef, superRef, path) {
  49559. var node = path.node,
  49560. scope = path.scope;
  49561. var isMethod = path.isClassMethod();
  49562. if (path.isPrivate()) {
  49563. throw path.buildCodeFrameError("Private " + (isMethod ? "methods" : "fields") + " in decorated classes are not supported yet.");
  49564. }
  49565. new ReplaceSupers({
  49566. methodPath: path,
  49567. methodNode: node,
  49568. objectRef: classRef,
  49569. isStatic: node["static"],
  49570. superRef: superRef,
  49571. scope: scope,
  49572. file: this
  49573. }, true).replace();
  49574. 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);
  49575. if (isMethod) {
  49576. var id = node.computed ? null : node.key;
  49577. toExpression(node);
  49578. properties.push(prop("value", nameFunction({
  49579. node: node,
  49580. id: id,
  49581. scope: scope
  49582. }) || node));
  49583. } else if (node.value) {
  49584. properties.push(method("value", template.statements.ast(_templateObject$3(), node.value)));
  49585. } else {
  49586. properties.push(prop("value", scope.buildUndefinedNode()));
  49587. }
  49588. path.remove();
  49589. return ObjectExpression(properties);
  49590. }
  49591. function addDecorateHelper(file) {
  49592. try {
  49593. return file.addHelper("decorate");
  49594. } catch (err) {
  49595. if (err.code === "BABEL_HELPER_UNKNOWN") {
  49596. 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.";
  49597. }
  49598. throw err;
  49599. }
  49600. }
  49601. function buildDecoratedClass(ref, path, elements, file) {
  49602. var node = path.node,
  49603. scope = path.scope;
  49604. var initializeId = scope.generateUidIdentifier("initialize");
  49605. var isDeclaration = node.id && path.isDeclaration();
  49606. var isStrict = path.isInStrictMode();
  49607. var superClass = node.superClass;
  49608. node.type = "ClassDeclaration";
  49609. if (!node.id) node.id = cloneNode(ref);
  49610. var superId;
  49611. if (superClass) {
  49612. superId = scope.generateUidIdentifierBasedOnNode(node.superClass, "super");
  49613. node.superClass = superId;
  49614. }
  49615. var classDecorators = takeDecorators(node);
  49616. var definitions = ArrayExpression(elements.map(extractElementDescriptor.bind(file, node.id, superId)));
  49617. var replacement = template.expression.ast(_templateObject2$2(), addDecorateHelper(file), classDecorators || NullLiteral(), initializeId, superClass ? superId : null, node, cloneNode(node.id), definitions, superClass);
  49618. var classPathDesc = "arguments.1.body.body.0";
  49619. if (!isStrict) {
  49620. replacement.arguments[1].body.directives.push(Directive(DirectiveLiteral("use strict")));
  49621. }
  49622. if (isDeclaration) {
  49623. replacement = template.ast(_templateObject3$2(), ref, replacement);
  49624. classPathDesc = "declarations.0.init." + classPathDesc;
  49625. }
  49626. return {
  49627. instanceNodes: [template.statement.ast(_templateObject4$2(), initializeId)],
  49628. wrapClass: function wrapClass(path) {
  49629. path.replaceWith(replacement);
  49630. return path.get(classPathDesc);
  49631. }
  49632. };
  49633. }
  49634. function _templateObject$4() {
  49635. var data = _taggedTemplateLiteralLoose(["super(...args)"]);
  49636. _templateObject$4 = function _templateObject() {
  49637. return data;
  49638. };
  49639. return data;
  49640. }
  49641. var findBareSupers = traverse$1.visitors.merge([{
  49642. Super: function Super(path) {
  49643. var node = path.node,
  49644. parentPath = path.parentPath;
  49645. if (parentPath.isCallExpression({
  49646. callee: node
  49647. })) {
  49648. this.push(parentPath);
  49649. }
  49650. }
  49651. }, environmentVisitor]);
  49652. var referenceVisitor$1 = {
  49653. "TSTypeAnnotation|TypeAnnotation": function TSTypeAnnotationTypeAnnotation(path) {
  49654. path.skip();
  49655. },
  49656. ReferencedIdentifier: function ReferencedIdentifier(path) {
  49657. if (this.scope.hasOwnBinding(path.node.name)) {
  49658. this.scope.rename(path.node.name);
  49659. path.skip();
  49660. }
  49661. }
  49662. };
  49663. var classFieldDefinitionEvaluationTDZVisitor = traverse$1.visitors.merge([{
  49664. ReferencedIdentifier: function ReferencedIdentifier(path) {
  49665. if (this.classBinding && this.classBinding === path.scope.getBinding(path.node.name)) {
  49666. var classNameTDZError = this.file.addHelper("classNameTDZError");
  49667. var throwNode = CallExpression(classNameTDZError, [StringLiteral(path.node.name)]);
  49668. path.replaceWith(SequenceExpression([throwNode, path.node]));
  49669. path.skip();
  49670. }
  49671. }
  49672. }, environmentVisitor]);
  49673. function injectInitialization(path, constructor, nodes, renamer) {
  49674. if (!nodes.length) return;
  49675. var isDerived = !!path.node.superClass;
  49676. if (!constructor) {
  49677. var newConstructor = ClassMethod("constructor", Identifier("constructor"), [], BlockStatement([]));
  49678. if (isDerived) {
  49679. newConstructor.params = [RestElement(Identifier("args"))];
  49680. newConstructor.body.body.push(template.statement.ast(_templateObject$4()));
  49681. }
  49682. var _path$get$unshiftCont = path.get("body").unshiftContainer("body", newConstructor);
  49683. constructor = _path$get$unshiftCont[0];
  49684. }
  49685. if (renamer) {
  49686. renamer(referenceVisitor$1, {
  49687. scope: constructor.scope
  49688. });
  49689. }
  49690. if (isDerived) {
  49691. var bareSupers = [];
  49692. constructor.traverse(findBareSupers, bareSupers);
  49693. for (var _i = 0, _bareSupers = bareSupers; _i < _bareSupers.length; _i++) {
  49694. var bareSuper = _bareSupers[_i];
  49695. bareSuper.insertAfter(nodes);
  49696. }
  49697. } else {
  49698. constructor.get("body").unshiftContainer("body", nodes);
  49699. }
  49700. }
  49701. function extractComputedKeys(ref, path, computedPaths, file) {
  49702. var declarations = [];
  49703. for (var _iterator = computedPaths, _isArray = Array.isArray(_iterator), _i2 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  49704. var _ref;
  49705. if (_isArray) {
  49706. if (_i2 >= _iterator.length) break;
  49707. _ref = _iterator[_i2++];
  49708. } else {
  49709. _i2 = _iterator.next();
  49710. if (_i2.done) break;
  49711. _ref = _i2.value;
  49712. }
  49713. var computedPath = _ref;
  49714. computedPath.traverse(classFieldDefinitionEvaluationTDZVisitor, {
  49715. classBinding: path.node.id && path.scope.getBinding(path.node.id.name),
  49716. file: file
  49717. });
  49718. var computedNode = computedPath.node;
  49719. if (!computedPath.get("key").isConstantExpression()) {
  49720. var ident = path.scope.generateUidIdentifierBasedOnNode(computedNode.key);
  49721. path.scope.push({
  49722. id: ident,
  49723. kind: "let"
  49724. });
  49725. declarations.push(ExpressionStatement(AssignmentExpression("=", cloneNode(ident), computedNode.key)));
  49726. computedNode.key = cloneNode(ident);
  49727. }
  49728. }
  49729. return declarations;
  49730. }
  49731. var FEATURES = Object.freeze({
  49732. fields: 1 << 1,
  49733. privateMethods: 1 << 2,
  49734. decorators: 1 << 3
  49735. });
  49736. var featuresKey = "@babel/plugin-class-features/featuresKey";
  49737. var looseKey = "@babel/plugin-class-features/looseKey";
  49738. function enableFeature(file, feature, loose) {
  49739. if (!hasFeature(file, feature)) {
  49740. file.set(featuresKey, file.get(featuresKey) | feature);
  49741. if (loose) file.set(looseKey, file.get(looseKey) | feature);
  49742. }
  49743. }
  49744. function hasFeature(file, feature) {
  49745. return !!(file.get(featuresKey) & feature);
  49746. }
  49747. function isLoose(file, feature) {
  49748. return !!(file.get(looseKey) & feature);
  49749. }
  49750. function verifyUsedFeatures(path, file) {
  49751. if (hasOwnDecorators(path.node)) {
  49752. if (!hasFeature(file, FEATURES.decorators)) {
  49753. 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 }]');
  49754. }
  49755. if (path.isPrivate()) {
  49756. throw path.buildCodeFrameError("Private " + (path.isClassMethod() ? "methods" : "fields") + " in decorated classes are not supported yet.");
  49757. }
  49758. }
  49759. if (path.isPrivate() && path.isMethod()) {
  49760. if (!hasFeature(file, FEATURES.privateMethods)) {
  49761. throw path.buildCodeFrameError("Class private methods are not enabled.");
  49762. }
  49763. }
  49764. if (hasFeature(file, FEATURES.privateMethods) && hasFeature(file, FEATURES.fields) && isLoose(file, FEATURES.privateMethods) !== isLoose(file, FEATURES.fields)) {
  49765. throw path.buildCodeFrameError("'loose' mode configuration must be the same for both @babel/plugin-proposal-class-properties " + "and @babel/plugin-proposal-private-methods");
  49766. }
  49767. if (path.isProperty()) {
  49768. if (!hasFeature(file, FEATURES.fields)) {
  49769. throw path.buildCodeFrameError("Class fields are not enabled.");
  49770. }
  49771. }
  49772. }
  49773. var name = "@babel/helper-create-class-features-plugin";
  49774. var version$2 = "7.8.3";
  49775. var author = "The Babel Team (https://babeljs.io/team)";
  49776. var license = "MIT";
  49777. var description = "Compile class public and private fields, private methods and decorators to ES6";
  49778. var repository = "https://github.com/babel/babel/tree/master/packages/babel-helper-create-class-features-plugin";
  49779. var main = "lib/index.js";
  49780. var publishConfig = {
  49781. access: "public"
  49782. };
  49783. var keywords$1 = [
  49784. "babel",
  49785. "babel-plugin"
  49786. ];
  49787. var dependencies = {
  49788. "@babel/helper-function-name": "^7.8.3",
  49789. "@babel/helper-member-expression-to-functions": "^7.8.3",
  49790. "@babel/helper-optimise-call-expression": "^7.8.3",
  49791. "@babel/helper-plugin-utils": "^7.8.3",
  49792. "@babel/helper-replace-supers": "^7.8.3",
  49793. "@babel/helper-split-export-declaration": "^7.8.3"
  49794. };
  49795. var peerDependencies = {
  49796. "@babel/core": "^7.0.0"
  49797. };
  49798. var devDependencies = {
  49799. "@babel/core": "^7.8.3",
  49800. "@babel/helper-plugin-test-runner": "^7.8.3"
  49801. };
  49802. var gitHead = "a7620bd266ae1345975767bbc7abf09034437017";
  49803. var pkg = {
  49804. name: name,
  49805. version: version$2,
  49806. author: author,
  49807. license: license,
  49808. description: description,
  49809. repository: repository,
  49810. main: main,
  49811. publishConfig: publishConfig,
  49812. keywords: keywords$1,
  49813. dependencies: dependencies,
  49814. peerDependencies: peerDependencies,
  49815. devDependencies: devDependencies,
  49816. gitHead: gitHead
  49817. };
  49818. var version$3 = pkg.version.split(".").reduce(function (v, x) {
  49819. return v * 1e5 + +x;
  49820. }, 0);
  49821. var versionKey = "@babel/plugin-class-features/version";
  49822. function createClassFeaturePlugin(_ref) {
  49823. var name = _ref.name,
  49824. feature = _ref.feature,
  49825. loose = _ref.loose,
  49826. manipulateOptions = _ref.manipulateOptions;
  49827. return {
  49828. name: name,
  49829. manipulateOptions: manipulateOptions,
  49830. pre: function pre() {
  49831. enableFeature(this.file, feature, loose);
  49832. if (!this.file.get(versionKey) || this.file.get(versionKey) < version$3) {
  49833. this.file.set(versionKey, version$3);
  49834. }
  49835. },
  49836. visitor: {
  49837. Class: function Class(path, state) {
  49838. if (this.file.get(versionKey) !== version$3) return;
  49839. verifyUsedFeatures(path, this.file);
  49840. var loose = isLoose(this.file, feature);
  49841. var constructor;
  49842. var isDecorated = hasOwnDecorators(path.node);
  49843. var props = [];
  49844. var elements = [];
  49845. var computedPaths = [];
  49846. var privateNames = new Set();
  49847. var body = path.get("body");
  49848. for (var _iterator = body.get("body"), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  49849. var _ref2;
  49850. if (_isArray) {
  49851. if (_i >= _iterator.length) break;
  49852. _ref2 = _iterator[_i++];
  49853. } else {
  49854. _i = _iterator.next();
  49855. if (_i.done) break;
  49856. _ref2 = _i.value;
  49857. }
  49858. var _path = _ref2;
  49859. verifyUsedFeatures(_path, this.file);
  49860. if (_path.node.computed) {
  49861. computedPaths.push(_path);
  49862. }
  49863. if (_path.isPrivate()) {
  49864. var _name = _path.node.key.id.name;
  49865. var getName = "get " + _name;
  49866. var setName = "set " + _name;
  49867. if (_path.node.kind === "get") {
  49868. if (privateNames.has(getName) || privateNames.has(_name) && !privateNames.has(setName)) {
  49869. throw _path.buildCodeFrameError("Duplicate private field");
  49870. }
  49871. privateNames.add(getName).add(_name);
  49872. } else if (_path.node.kind === "set") {
  49873. if (privateNames.has(setName) || privateNames.has(_name) && !privateNames.has(getName)) {
  49874. throw _path.buildCodeFrameError("Duplicate private field");
  49875. }
  49876. privateNames.add(setName).add(_name);
  49877. } else {
  49878. if (privateNames.has(_name) && !privateNames.has(getName) && !privateNames.has(setName) || privateNames.has(_name) && (privateNames.has(getName) || privateNames.has(setName))) {
  49879. throw _path.buildCodeFrameError("Duplicate private field");
  49880. }
  49881. privateNames.add(_name);
  49882. }
  49883. }
  49884. if (_path.isClassMethod({
  49885. kind: "constructor"
  49886. })) {
  49887. constructor = _path;
  49888. } else {
  49889. elements.push(_path);
  49890. if (_path.isProperty() || _path.isPrivate()) {
  49891. props.push(_path);
  49892. }
  49893. }
  49894. if (!isDecorated) isDecorated = hasOwnDecorators(_path.node);
  49895. }
  49896. if (!props.length && !isDecorated) return;
  49897. var ref;
  49898. if (path.isClassExpression() || !path.node.id) {
  49899. nameFunction(path);
  49900. ref = path.scope.generateUidIdentifier("class");
  49901. } else {
  49902. ref = path.node.id;
  49903. }
  49904. var privateNamesMap = buildPrivateNamesMap(props);
  49905. var privateNamesNodes = buildPrivateNamesNodes(privateNamesMap, loose, state);
  49906. transformPrivateNamesUsage(ref, path, privateNamesMap, loose, state);
  49907. var keysNodes, staticNodes, instanceNodes, wrapClass;
  49908. if (isDecorated) {
  49909. staticNodes = keysNodes = [];
  49910. var _buildDecoratedClass = buildDecoratedClass(ref, path, elements, this.file);
  49911. instanceNodes = _buildDecoratedClass.instanceNodes;
  49912. wrapClass = _buildDecoratedClass.wrapClass;
  49913. } else {
  49914. keysNodes = extractComputedKeys(ref, path, computedPaths, this.file);
  49915. var _buildFieldsInitNodes = buildFieldsInitNodes(ref, path.node.superClass, props, privateNamesMap, state, loose);
  49916. staticNodes = _buildFieldsInitNodes.staticNodes;
  49917. instanceNodes = _buildFieldsInitNodes.instanceNodes;
  49918. wrapClass = _buildFieldsInitNodes.wrapClass;
  49919. }
  49920. if (instanceNodes.length > 0) {
  49921. injectInitialization(path, constructor, instanceNodes, function (referenceVisitor, state) {
  49922. if (isDecorated) return;
  49923. for (var _iterator2 = props, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  49924. var _ref3;
  49925. if (_isArray2) {
  49926. if (_i2 >= _iterator2.length) break;
  49927. _ref3 = _iterator2[_i2++];
  49928. } else {
  49929. _i2 = _iterator2.next();
  49930. if (_i2.done) break;
  49931. _ref3 = _i2.value;
  49932. }
  49933. var prop = _ref3;
  49934. if (prop.node["static"]) continue;
  49935. prop.traverse(referenceVisitor, state);
  49936. }
  49937. });
  49938. }
  49939. path = wrapClass(path);
  49940. path.insertBefore(keysNodes);
  49941. path.insertAfter([].concat(privateNamesNodes, staticNodes));
  49942. },
  49943. PrivateName: function PrivateName(path) {
  49944. if (this.file.get(versionKey) !== version$3) return;
  49945. throw path.buildCodeFrameError("Unknown PrivateName \"" + path + "\"");
  49946. },
  49947. ExportDefaultDeclaration: function ExportDefaultDeclaration(path) {
  49948. if (this.file.get(versionKey) !== version$3) return;
  49949. var decl = path.get("declaration");
  49950. if (decl.isClassDeclaration() && hasDecorators(decl.node)) {
  49951. if (decl.node.id) {
  49952. splitExportDeclaration(path);
  49953. } else {
  49954. decl.node.type = "ClassExpression";
  49955. }
  49956. }
  49957. }
  49958. }
  49959. };
  49960. }
  49961. var proposalClassProperties = declare(function (api, options) {
  49962. api.assertVersion(7);
  49963. return createClassFeaturePlugin({
  49964. name: "proposal-class-properties",
  49965. feature: FEATURES.fields,
  49966. loose: options.loose,
  49967. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  49968. parserOpts.plugins.push("classProperties", "classPrivateProperties");
  49969. }
  49970. });
  49971. });
  49972. var buildClassDecorator = template("\n DECORATOR(CLASS_REF = INNER) || CLASS_REF;\n");
  49973. var buildClassPrototype = template("\n CLASS_REF.prototype;\n");
  49974. var buildGetDescriptor = template("\n Object.getOwnPropertyDescriptor(TARGET, PROPERTY);\n");
  49975. var buildGetObjectInitializer = template("\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");
  49976. var WARNING_CALLS = new WeakSet();
  49977. function applyEnsureOrdering(path) {
  49978. var decorators = (path.isClass() ? [path].concat(path.get("body.body")) : path.get("properties")).reduce(function (acc, prop) {
  49979. return acc.concat(prop.node.decorators || []);
  49980. }, []);
  49981. var identDecorators = decorators.filter(function (decorator) {
  49982. return !isIdentifier(decorator.expression);
  49983. });
  49984. if (identDecorators.length === 0) return;
  49985. return SequenceExpression(identDecorators.map(function (decorator) {
  49986. var expression = decorator.expression;
  49987. var id = decorator.expression = path.scope.generateDeclaredUidIdentifier("dec");
  49988. return AssignmentExpression("=", id, expression);
  49989. }).concat([path.node]));
  49990. }
  49991. function applyClassDecorators(classPath) {
  49992. if (!hasClassDecorators(classPath.node)) return;
  49993. var decorators = classPath.node.decorators || [];
  49994. classPath.node.decorators = null;
  49995. var name = classPath.scope.generateDeclaredUidIdentifier("class");
  49996. return decorators.map(function (dec) {
  49997. return dec.expression;
  49998. }).reverse().reduce(function (acc, decorator) {
  49999. return buildClassDecorator({
  50000. CLASS_REF: cloneNode(name),
  50001. DECORATOR: cloneNode(decorator),
  50002. INNER: acc
  50003. }).expression;
  50004. }, classPath.node);
  50005. }
  50006. function hasClassDecorators(classNode) {
  50007. return !!(classNode.decorators && classNode.decorators.length);
  50008. }
  50009. function applyMethodDecorators(path, state) {
  50010. if (!hasMethodDecorators(path.node.body.body)) return;
  50011. return applyTargetDecorators(path, state, path.node.body.body);
  50012. }
  50013. function hasMethodDecorators(body) {
  50014. return body.some(function (node) {
  50015. return node.decorators && node.decorators.length;
  50016. });
  50017. }
  50018. function applyObjectDecorators(path, state) {
  50019. if (!hasMethodDecorators(path.node.properties)) return;
  50020. return applyTargetDecorators(path, state, path.node.properties);
  50021. }
  50022. function applyTargetDecorators(path, state, decoratedProps) {
  50023. var name = path.scope.generateDeclaredUidIdentifier(path.isClass() ? "class" : "obj");
  50024. var exprs = decoratedProps.reduce(function (acc, node) {
  50025. var decorators = node.decorators || [];
  50026. node.decorators = null;
  50027. if (decorators.length === 0) return acc;
  50028. if (node.computed) {
  50029. throw path.buildCodeFrameError("Computed method/property decorators are not yet supported.");
  50030. }
  50031. var property = isLiteral(node.key) ? node.key : StringLiteral(node.key.name);
  50032. var target = path.isClass() && !node["static"] ? buildClassPrototype({
  50033. CLASS_REF: name
  50034. }).expression : name;
  50035. if (isClassProperty(node, {
  50036. "static": false
  50037. })) {
  50038. var descriptor = path.scope.generateDeclaredUidIdentifier("descriptor");
  50039. var initializer = node.value ? FunctionExpression(null, [], BlockStatement([ReturnStatement(node.value)])) : NullLiteral();
  50040. node.value = CallExpression(state.addHelper("initializerWarningHelper"), [descriptor, ThisExpression()]);
  50041. WARNING_CALLS.add(node.value);
  50042. acc = acc.concat([AssignmentExpression("=", descriptor, CallExpression(state.addHelper("applyDecoratedDescriptor"), [cloneNode(target), cloneNode(property), ArrayExpression(decorators.map(function (dec) {
  50043. return cloneNode(dec.expression);
  50044. })), ObjectExpression([ObjectProperty(Identifier("configurable"), BooleanLiteral(true)), ObjectProperty(Identifier("enumerable"), BooleanLiteral(true)), ObjectProperty(Identifier("writable"), BooleanLiteral(true)), ObjectProperty(Identifier("initializer"), initializer)])]))]);
  50045. } else {
  50046. acc = acc.concat(CallExpression(state.addHelper("applyDecoratedDescriptor"), [cloneNode(target), cloneNode(property), ArrayExpression(decorators.map(function (dec) {
  50047. return cloneNode(dec.expression);
  50048. })), isObjectProperty(node) || isClassProperty(node, {
  50049. "static": true
  50050. }) ? buildGetObjectInitializer({
  50051. TEMP: path.scope.generateDeclaredUidIdentifier("init"),
  50052. TARGET: cloneNode(target),
  50053. PROPERTY: cloneNode(property)
  50054. }).expression : buildGetDescriptor({
  50055. TARGET: cloneNode(target),
  50056. PROPERTY: cloneNode(property)
  50057. }).expression, cloneNode(target)]));
  50058. }
  50059. return acc;
  50060. }, []);
  50061. return SequenceExpression([AssignmentExpression("=", cloneNode(name), path.node), SequenceExpression(exprs), cloneNode(name)]);
  50062. }
  50063. function decoratedClassToExpression(_ref) {
  50064. var node = _ref.node,
  50065. scope = _ref.scope;
  50066. if (!hasClassDecorators(node) && !hasMethodDecorators(node.body.body)) {
  50067. return;
  50068. }
  50069. var ref = node.id ? cloneNode(node.id) : scope.generateUidIdentifier("class");
  50070. return VariableDeclaration("let", [VariableDeclarator(ref, toExpression(node))]);
  50071. }
  50072. var legacyVisitor = {
  50073. ExportDefaultDeclaration: function ExportDefaultDeclaration(path) {
  50074. var decl = path.get("declaration");
  50075. if (!decl.isClassDeclaration()) return;
  50076. var replacement = decoratedClassToExpression(decl);
  50077. if (replacement) {
  50078. var _path$replaceWithMult = path.replaceWithMultiple([replacement, ExportNamedDeclaration(null, [ExportSpecifier(cloneNode(replacement.declarations[0].id), Identifier("default"))])]),
  50079. varDeclPath = _path$replaceWithMult[0];
  50080. if (!decl.node.id) {
  50081. path.scope.registerDeclaration(varDeclPath);
  50082. }
  50083. }
  50084. },
  50085. ClassDeclaration: function ClassDeclaration(path) {
  50086. var replacement = decoratedClassToExpression(path);
  50087. if (replacement) {
  50088. path.replaceWith(replacement);
  50089. }
  50090. },
  50091. ClassExpression: function ClassExpression(path, state) {
  50092. var decoratedClass = applyEnsureOrdering(path) || applyClassDecorators(path) || applyMethodDecorators(path, state);
  50093. if (decoratedClass) path.replaceWith(decoratedClass);
  50094. },
  50095. ObjectExpression: function ObjectExpression(path, state) {
  50096. var decoratedObject = applyEnsureOrdering(path) || applyObjectDecorators(path, state);
  50097. if (decoratedObject) path.replaceWith(decoratedObject);
  50098. },
  50099. AssignmentExpression: function AssignmentExpression(path, state) {
  50100. if (!WARNING_CALLS.has(path.node.right)) return;
  50101. 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)]));
  50102. },
  50103. CallExpression: function CallExpression$1(path, state) {
  50104. if (path.node.arguments.length !== 3) return;
  50105. if (!WARNING_CALLS.has(path.node.arguments[2])) return;
  50106. if (path.node.callee.name !== state.addHelper("defineProperty").name) {
  50107. return;
  50108. }
  50109. 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)]));
  50110. }
  50111. };
  50112. var proposalDecorators = declare(function (api, options) {
  50113. api.assertVersion(7);
  50114. var _options$legacy = options.legacy,
  50115. legacy = _options$legacy === void 0 ? false : _options$legacy;
  50116. if (typeof legacy !== "boolean") {
  50117. throw new Error("'legacy' must be a boolean.");
  50118. }
  50119. var decoratorsBeforeExport = options.decoratorsBeforeExport;
  50120. if (decoratorsBeforeExport === undefined) {
  50121. if (!legacy) {
  50122. 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.");
  50123. }
  50124. } else {
  50125. if (legacy) {
  50126. throw new Error("'decoratorsBeforeExport' can't be used with legacy decorators.");
  50127. }
  50128. if (typeof decoratorsBeforeExport !== "boolean") {
  50129. throw new Error("'decoratorsBeforeExport' must be a boolean.");
  50130. }
  50131. }
  50132. if (legacy) {
  50133. return {
  50134. name: "proposal-decorators",
  50135. inherits: syntaxDecorators,
  50136. manipulateOptions: function manipulateOptions(_ref) {
  50137. var generatorOpts = _ref.generatorOpts;
  50138. generatorOpts.decoratorsBeforeExport = decoratorsBeforeExport;
  50139. },
  50140. visitor: legacyVisitor
  50141. };
  50142. }
  50143. return createClassFeaturePlugin({
  50144. name: "proposal-decorators",
  50145. feature: FEATURES.decorators,
  50146. manipulateOptions: function manipulateOptions(_ref2) {
  50147. var generatorOpts = _ref2.generatorOpts,
  50148. parserOpts = _ref2.parserOpts;
  50149. parserOpts.plugins.push(["decorators", {
  50150. decoratorsBeforeExport: decoratorsBeforeExport
  50151. }]);
  50152. generatorOpts.decoratorsBeforeExport = decoratorsBeforeExport;
  50153. }
  50154. });
  50155. });
  50156. var proposalDoExpressions = declare(function (api) {
  50157. api.assertVersion(7);
  50158. return {
  50159. name: "proposal-do-expressions",
  50160. inherits: syntaxDoExpressions,
  50161. visitor: {
  50162. DoExpression: {
  50163. exit: function exit(path) {
  50164. var body = path.node.body.body;
  50165. if (body.length) {
  50166. path.replaceExpressionWithStatements(body);
  50167. } else {
  50168. path.replaceWith(path.scope.buildUndefinedNode());
  50169. }
  50170. }
  50171. }
  50172. }
  50173. };
  50174. });
  50175. var lib$5 = createCommonjsModule(function (module, exports) {
  50176. Object.defineProperty(exports, "__esModule", {
  50177. value: true
  50178. });
  50179. exports["default"] = void 0;
  50180. var _default = (0, _helperPluginUtils.declare)(function (api) {
  50181. api.assertVersion(7);
  50182. return {
  50183. name: "syntax-dynamic-import",
  50184. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  50185. parserOpts.plugins.push("dynamicImport");
  50186. }
  50187. };
  50188. });
  50189. exports["default"] = _default;
  50190. });
  50191. var syntaxDynamicImport$1 = unwrapExports(lib$5);
  50192. var version$4 = "7.8.3";
  50193. var SUPPORTED_MODULES = ["commonjs", "amd", "systemjs"];
  50194. 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";
  50195. var proposalDynamicImport = declare(function (api) {
  50196. api.assertVersion(7);
  50197. return {
  50198. name: "proposal-dynamic-import",
  50199. inherits: syntaxDynamicImport$1,
  50200. pre: function pre() {
  50201. this.file.set("@babel/plugin-proposal-dynamic-import", version$4);
  50202. },
  50203. visitor: {
  50204. Program: function Program() {
  50205. var modules = this.file.get("@babel/plugin-transform-modules-*");
  50206. if (!SUPPORTED_MODULES.includes(modules)) {
  50207. throw new Error(MODULES_NOT_FOUND);
  50208. }
  50209. }
  50210. }
  50211. };
  50212. });
  50213. var proposalExportDefaultFrom = declare(function (api) {
  50214. api.assertVersion(7);
  50215. return {
  50216. name: "proposal-export-default-from",
  50217. inherits: syntaxExportDefaultFrom,
  50218. visitor: {
  50219. ExportNamedDeclaration: function ExportNamedDeclaration$1(path) {
  50220. var node = path.node,
  50221. scope = path.scope;
  50222. var specifiers = node.specifiers;
  50223. if (!isExportDefaultSpecifier(specifiers[0])) return;
  50224. var specifier = specifiers.shift();
  50225. var exported = specifier.exported;
  50226. var uid = scope.generateUidIdentifier(exported.name);
  50227. var nodes = [ImportDeclaration([ImportDefaultSpecifier(uid)], cloneNode(node.source)), ExportNamedDeclaration(null, [ExportSpecifier(cloneNode(uid), exported)])];
  50228. if (specifiers.length >= 1) {
  50229. nodes.push(node);
  50230. }
  50231. var _path$replaceWithMult = path.replaceWithMultiple(nodes),
  50232. importDeclaration = _path$replaceWithMult[0];
  50233. path.scope.registerDeclaration(importDeclaration);
  50234. }
  50235. }
  50236. };
  50237. });
  50238. var proposalExportNamespaceFrom = declare(function (api) {
  50239. api.assertVersion(7);
  50240. return {
  50241. name: "proposal-export-namespace-from",
  50242. inherits: syntaxExportNamespaceFrom,
  50243. visitor: {
  50244. ExportNamedDeclaration: function ExportNamedDeclaration$1(path) {
  50245. var node = path.node,
  50246. scope = path.scope;
  50247. var specifiers = node.specifiers;
  50248. var index = isExportDefaultSpecifier(specifiers[0]) ? 1 : 0;
  50249. if (!isExportNamespaceSpecifier(specifiers[index])) return;
  50250. var nodes = [];
  50251. if (index === 1) {
  50252. nodes.push(ExportNamedDeclaration(null, [specifiers.shift()], node.source));
  50253. }
  50254. var specifier = specifiers.shift();
  50255. var exported = specifier.exported;
  50256. var uid = scope.generateUidIdentifier(exported.name);
  50257. nodes.push(ImportDeclaration([ImportNamespaceSpecifier(uid)], cloneNode(node.source)), ExportNamedDeclaration(null, [ExportSpecifier(cloneNode(uid), exported)]));
  50258. if (node.specifiers.length >= 1) {
  50259. nodes.push(node);
  50260. }
  50261. var _path$replaceWithMult = path.replaceWithMultiple(nodes),
  50262. importDeclaration = _path$replaceWithMult[0];
  50263. path.scope.registerDeclaration(importDeclaration);
  50264. }
  50265. }
  50266. };
  50267. });
  50268. var proposalFunctionBind = declare(function (api) {
  50269. api.assertVersion(7);
  50270. function getTempId(scope) {
  50271. var id = scope.path.getData("functionBind");
  50272. if (id) return id;
  50273. id = scope.generateDeclaredUidIdentifier("context");
  50274. return scope.path.setData("functionBind", id);
  50275. }
  50276. function getStaticContext(bind, scope) {
  50277. var object = bind.object || bind.callee.object;
  50278. return scope.isStatic(object) && object;
  50279. }
  50280. function inferBindContext(bind, scope) {
  50281. var staticContext = getStaticContext(bind, scope);
  50282. if (staticContext) return cloneNode(staticContext);
  50283. var tempId = getTempId(scope);
  50284. if (bind.object) {
  50285. bind.callee = SequenceExpression([AssignmentExpression("=", tempId, bind.object), bind.callee]);
  50286. } else {
  50287. bind.callee.object = AssignmentExpression("=", tempId, bind.callee.object);
  50288. }
  50289. return tempId;
  50290. }
  50291. return {
  50292. name: "proposal-function-bind",
  50293. inherits: syntaxFunctionBind,
  50294. visitor: {
  50295. CallExpression: function CallExpression(_ref) {
  50296. var node = _ref.node,
  50297. scope = _ref.scope;
  50298. var bind = node.callee;
  50299. if (!isBindExpression(bind)) return;
  50300. var context = inferBindContext(bind, scope);
  50301. node.callee = MemberExpression(bind.callee, Identifier("call"));
  50302. node.arguments.unshift(context);
  50303. },
  50304. BindExpression: function BindExpression(path) {
  50305. var node = path.node,
  50306. scope = path.scope;
  50307. var context = inferBindContext(node, scope);
  50308. path.replaceWith(CallExpression(MemberExpression(node.callee, Identifier("bind")), [context]));
  50309. }
  50310. }
  50311. };
  50312. });
  50313. var proposalFunctionSent = declare(function (api) {
  50314. api.assertVersion(7);
  50315. var isFunctionSent = function isFunctionSent(node) {
  50316. return isIdentifier(node.meta, {
  50317. name: "function"
  50318. }) && isIdentifier(node.property, {
  50319. name: "sent"
  50320. });
  50321. };
  50322. var hasBeenReplaced = function hasBeenReplaced(node, sentId) {
  50323. return isAssignmentExpression(node) && isIdentifier(node.left, {
  50324. name: sentId
  50325. });
  50326. };
  50327. var yieldVisitor = {
  50328. Function: function Function(path) {
  50329. path.skip();
  50330. },
  50331. YieldExpression: function YieldExpression(path) {
  50332. if (!hasBeenReplaced(path.parent, this.sentId)) {
  50333. path.replaceWith(AssignmentExpression("=", Identifier(this.sentId), path.node));
  50334. }
  50335. },
  50336. MetaProperty: function MetaProperty(path) {
  50337. if (isFunctionSent(path.node)) {
  50338. path.replaceWith(Identifier(this.sentId));
  50339. }
  50340. }
  50341. };
  50342. return {
  50343. name: "proposal-function-sent",
  50344. inherits: syntaxFunctionSent,
  50345. visitor: {
  50346. MetaProperty: function MetaProperty(path, state) {
  50347. if (!isFunctionSent(path.node)) return;
  50348. var fnPath = path.getFunctionParent();
  50349. if (!fnPath.node.generator) {
  50350. throw new Error("Parent generator function not found");
  50351. }
  50352. var sentId = path.scope.generateUid("function.sent");
  50353. fnPath.traverse(yieldVisitor, {
  50354. sentId: sentId
  50355. });
  50356. fnPath.node.body.body.unshift(VariableDeclaration("let", [VariableDeclarator(Identifier(sentId), YieldExpression())]));
  50357. wrapFunction(fnPath, state.addHelper("skipFirstGeneratorNext"));
  50358. }
  50359. }
  50360. };
  50361. });
  50362. var lib$6 = createCommonjsModule(function (module, exports) {
  50363. Object.defineProperty(exports, "__esModule", {
  50364. value: true
  50365. });
  50366. exports["default"] = void 0;
  50367. var _default = (0, _helperPluginUtils.declare)(function (api) {
  50368. api.assertVersion(7);
  50369. return {
  50370. name: "syntax-json-strings",
  50371. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  50372. parserOpts.plugins.push("jsonStrings");
  50373. }
  50374. };
  50375. });
  50376. exports["default"] = _default;
  50377. });
  50378. var syntaxJsonStrings = unwrapExports(lib$6);
  50379. var proposalJsonStrings = declare(function (api) {
  50380. api.assertVersion(7);
  50381. var regex = /(\\*)([\u2028\u2029])/g;
  50382. function replace(match, escapes, separator) {
  50383. var isEscaped = escapes.length % 2 === 1;
  50384. if (isEscaped) return match;
  50385. return escapes + "\\u" + separator.charCodeAt(0).toString(16);
  50386. }
  50387. return {
  50388. name: "proposal-json-strings",
  50389. inherits: syntaxJsonStrings,
  50390. visitor: {
  50391. "DirectiveLiteral|StringLiteral": function DirectiveLiteralStringLiteral(_ref) {
  50392. var node = _ref.node;
  50393. var extra = node.extra;
  50394. if (!extra || !extra.raw) return;
  50395. extra.raw = extra.raw.replace(regex, replace);
  50396. }
  50397. }
  50398. };
  50399. });
  50400. var syntaxLogicalAssignmentOperators = declare(function (api) {
  50401. api.assertVersion(7);
  50402. return {
  50403. name: "syntax-logical-assignment-operators",
  50404. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  50405. parserOpts.plugins.push("logicalAssignment");
  50406. }
  50407. };
  50408. });
  50409. var proposalLogicalAssignmentOperators = declare(function (api) {
  50410. api.assertVersion(7);
  50411. return {
  50412. name: "proposal-logical-assignment-operators",
  50413. inherits: syntaxLogicalAssignmentOperators,
  50414. visitor: {
  50415. AssignmentExpression: function AssignmentExpression$1(path) {
  50416. var node = path.node,
  50417. scope = path.scope;
  50418. var operator = node.operator,
  50419. left = node.left,
  50420. right = node.right;
  50421. if (operator !== "||=" && operator !== "&&=" && operator !== "??=") {
  50422. return;
  50423. }
  50424. var lhs = cloneNode(left);
  50425. if (isMemberExpression(left)) {
  50426. var object = left.object,
  50427. property = left.property,
  50428. computed = left.computed;
  50429. var memo = scope.maybeGenerateMemoised(object);
  50430. if (memo) {
  50431. left.object = memo;
  50432. lhs.object = AssignmentExpression("=", cloneNode(memo), object);
  50433. }
  50434. if (computed) {
  50435. var _memo = scope.maybeGenerateMemoised(property);
  50436. if (_memo) {
  50437. left.property = _memo;
  50438. lhs.property = AssignmentExpression("=", cloneNode(_memo), property);
  50439. }
  50440. }
  50441. }
  50442. path.replaceWith(LogicalExpression(operator.slice(0, -1), lhs, AssignmentExpression("=", left, right)));
  50443. }
  50444. }
  50445. };
  50446. });
  50447. var lib$7 = createCommonjsModule(function (module, exports) {
  50448. Object.defineProperty(exports, "__esModule", {
  50449. value: true
  50450. });
  50451. exports["default"] = void 0;
  50452. var _default = (0, _helperPluginUtils.declare)(function (api) {
  50453. api.assertVersion(7);
  50454. return {
  50455. name: "syntax-nullish-coalescing-operator",
  50456. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  50457. parserOpts.plugins.push("nullishCoalescingOperator");
  50458. }
  50459. };
  50460. });
  50461. exports["default"] = _default;
  50462. });
  50463. var syntaxNullishCoalescingOperator = unwrapExports(lib$7);
  50464. var proposalNullishCoalescingOperator = declare(function (api, _ref) {
  50465. var _ref$loose = _ref.loose,
  50466. loose = _ref$loose === void 0 ? false : _ref$loose;
  50467. api.assertVersion(7);
  50468. return {
  50469. name: "proposal-nullish-coalescing-operator",
  50470. inherits: syntaxNullishCoalescingOperator,
  50471. visitor: {
  50472. LogicalExpression: function LogicalExpression$1(path) {
  50473. var node = path.node,
  50474. scope = path.scope;
  50475. if (node.operator !== "??") {
  50476. return;
  50477. }
  50478. var ref = scope.maybeGenerateMemoised(node.left);
  50479. var assignment;
  50480. if (ref === null) {
  50481. ref = node.left;
  50482. assignment = cloneNode(node.left);
  50483. } else {
  50484. assignment = AssignmentExpression("=", ref, node.left);
  50485. }
  50486. path.replaceWith(ConditionalExpression(loose ? BinaryExpression("!=", assignment, NullLiteral()) : LogicalExpression("&&", BinaryExpression("!==", assignment, NullLiteral()), BinaryExpression("!==", cloneNode(ref), scope.buildUndefinedNode())), cloneNode(ref), node.right));
  50487. }
  50488. }
  50489. };
  50490. });
  50491. var syntaxNumericSeparator = declare(function (api) {
  50492. api.assertVersion(7);
  50493. return {
  50494. name: "syntax-numeric-separator",
  50495. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  50496. parserOpts.plugins.push("numericSeparator");
  50497. }
  50498. };
  50499. });
  50500. var proposalNumericSeparator = declare(function (api) {
  50501. api.assertVersion(7);
  50502. return {
  50503. name: "proposal-numeric-separator",
  50504. inherits: syntaxNumericSeparator,
  50505. visitor: {
  50506. NumericLiteral: function NumericLiteral(_ref) {
  50507. var node = _ref.node;
  50508. var extra = node.extra;
  50509. if (extra && /_/.test(extra.raw)) {
  50510. extra.raw = extra.raw.replace(/_/g, "");
  50511. }
  50512. }
  50513. }
  50514. };
  50515. });
  50516. var lib$8 = createCommonjsModule(function (module, exports) {
  50517. Object.defineProperty(exports, "__esModule", {
  50518. value: true
  50519. });
  50520. exports["default"] = void 0;
  50521. var _default = (0, _helperPluginUtils.declare)(function (api) {
  50522. api.assertVersion(7);
  50523. return {
  50524. name: "syntax-object-rest-spread",
  50525. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  50526. parserOpts.plugins.push("objectRestSpread");
  50527. }
  50528. };
  50529. });
  50530. exports["default"] = _default;
  50531. });
  50532. var syntaxObjectRestSpread$1 = unwrapExports(lib$8);
  50533. var ZERO_REFS = function () {
  50534. var node = Identifier("a");
  50535. var property = ObjectProperty(Identifier("key"), node);
  50536. var pattern = ObjectPattern([property]);
  50537. return isReferenced(node, property, pattern) ? 1 : 0;
  50538. }();
  50539. var proposalObjectRestSpread = declare(function (api, opts) {
  50540. api.assertVersion(7);
  50541. var _opts$useBuiltIns = opts.useBuiltIns,
  50542. useBuiltIns = _opts$useBuiltIns === void 0 ? false : _opts$useBuiltIns,
  50543. _opts$loose = opts.loose,
  50544. loose = _opts$loose === void 0 ? false : _opts$loose;
  50545. if (typeof loose !== "boolean") {
  50546. throw new Error(".loose must be a boolean, or undefined");
  50547. }
  50548. function getExtendsHelper(file) {
  50549. return useBuiltIns ? MemberExpression(Identifier("Object"), Identifier("assign")) : file.addHelper("extends");
  50550. }
  50551. function hasRestElement(path) {
  50552. var foundRestElement = false;
  50553. visitRestElements(path, function (restElement) {
  50554. foundRestElement = true;
  50555. restElement.stop();
  50556. });
  50557. return foundRestElement;
  50558. }
  50559. function hasObjectPatternRestElement(path) {
  50560. var foundRestElement = false;
  50561. visitRestElements(path, function (restElement) {
  50562. if (restElement.parentPath.isObjectPattern()) {
  50563. foundRestElement = true;
  50564. restElement.stop();
  50565. }
  50566. });
  50567. return foundRestElement;
  50568. }
  50569. function visitRestElements(path, visitor) {
  50570. path.traverse({
  50571. Expression: function Expression(path) {
  50572. var parentType = path.parent.type;
  50573. if (parentType === "AssignmentPattern" && path.key === "right" || parentType === "ObjectProperty" && path.parent.computed && path.key === "key") {
  50574. path.skip();
  50575. }
  50576. },
  50577. RestElement: visitor
  50578. });
  50579. }
  50580. function hasSpread(node) {
  50581. for (var _iterator = node.properties, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  50582. var _ref;
  50583. if (_isArray) {
  50584. if (_i >= _iterator.length) break;
  50585. _ref = _iterator[_i++];
  50586. } else {
  50587. _i = _iterator.next();
  50588. if (_i.done) break;
  50589. _ref = _i.value;
  50590. }
  50591. var prop = _ref;
  50592. if (isSpreadElement(prop)) {
  50593. return true;
  50594. }
  50595. }
  50596. return false;
  50597. }
  50598. function extractNormalizedKeys(path) {
  50599. var props = path.node.properties;
  50600. var keys = [];
  50601. var allLiteral = true;
  50602. for (var _iterator2 = props, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  50603. var _ref2;
  50604. if (_isArray2) {
  50605. if (_i2 >= _iterator2.length) break;
  50606. _ref2 = _iterator2[_i2++];
  50607. } else {
  50608. _i2 = _iterator2.next();
  50609. if (_i2.done) break;
  50610. _ref2 = _i2.value;
  50611. }
  50612. var prop = _ref2;
  50613. if (isIdentifier(prop.key) && !prop.computed) {
  50614. keys.push(StringLiteral(prop.key.name));
  50615. } else if (isTemplateLiteral(prop.key)) {
  50616. keys.push(cloneNode(prop.key));
  50617. } else if (isLiteral(prop.key)) {
  50618. keys.push(StringLiteral(String(prop.key.value)));
  50619. } else {
  50620. keys.push(cloneNode(prop.key));
  50621. allLiteral = false;
  50622. }
  50623. }
  50624. return {
  50625. keys: keys,
  50626. allLiteral: allLiteral
  50627. };
  50628. }
  50629. function replaceImpureComputedKeys(properties, scope) {
  50630. var impureComputedPropertyDeclarators = [];
  50631. for (var _iterator3 = properties, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
  50632. var _ref3;
  50633. if (_isArray3) {
  50634. if (_i3 >= _iterator3.length) break;
  50635. _ref3 = _iterator3[_i3++];
  50636. } else {
  50637. _i3 = _iterator3.next();
  50638. if (_i3.done) break;
  50639. _ref3 = _i3.value;
  50640. }
  50641. var propPath = _ref3;
  50642. var key = propPath.get("key");
  50643. if (propPath.node.computed && !key.isPure()) {
  50644. var name = scope.generateUidBasedOnNode(key.node);
  50645. var declarator = VariableDeclarator(Identifier(name), key.node);
  50646. impureComputedPropertyDeclarators.push(declarator);
  50647. key.replaceWith(Identifier(name));
  50648. }
  50649. }
  50650. return impureComputedPropertyDeclarators;
  50651. }
  50652. function removeUnusedExcludedKeys(path) {
  50653. var bindings = path.getOuterBindingIdentifierPaths();
  50654. Object.keys(bindings).forEach(function (bindingName) {
  50655. var bindingParentPath = bindings[bindingName].parentPath;
  50656. if (path.scope.getBinding(bindingName).references > ZERO_REFS || !bindingParentPath.isObjectProperty()) {
  50657. return;
  50658. }
  50659. bindingParentPath.remove();
  50660. });
  50661. }
  50662. function createObjectSpread(path, file, objRef) {
  50663. var props = path.get("properties");
  50664. var last = props[props.length - 1];
  50665. assertRestElement(last.node);
  50666. var restElement = cloneNode(last.node);
  50667. last.remove();
  50668. var impureComputedPropertyDeclarators = replaceImpureComputedKeys(path.get("properties"), path.scope);
  50669. var _extractNormalizedKey = extractNormalizedKeys(path),
  50670. keys = _extractNormalizedKey.keys,
  50671. allLiteral = _extractNormalizedKey.allLiteral;
  50672. if (keys.length === 0) {
  50673. return [impureComputedPropertyDeclarators, restElement.argument, CallExpression(getExtendsHelper(file), [ObjectExpression([]), cloneNode(objRef)])];
  50674. }
  50675. var keyExpression;
  50676. if (!allLiteral) {
  50677. keyExpression = CallExpression(MemberExpression(ArrayExpression(keys), Identifier("map")), [file.addHelper("toPropertyKey")]);
  50678. } else {
  50679. keyExpression = ArrayExpression(keys);
  50680. }
  50681. return [impureComputedPropertyDeclarators, restElement.argument, CallExpression(file.addHelper("objectWithoutProperties" + (loose ? "Loose" : "")), [cloneNode(objRef), keyExpression])];
  50682. }
  50683. function replaceRestElement(parentPath, paramPath) {
  50684. if (paramPath.isAssignmentPattern()) {
  50685. replaceRestElement(parentPath, paramPath.get("left"));
  50686. return;
  50687. }
  50688. if (paramPath.isArrayPattern() && hasRestElement(paramPath)) {
  50689. var elements = paramPath.get("elements");
  50690. for (var i = 0; i < elements.length; i++) {
  50691. replaceRestElement(parentPath, elements[i]);
  50692. }
  50693. }
  50694. if (paramPath.isObjectPattern() && hasRestElement(paramPath)) {
  50695. var uid = parentPath.scope.generateUidIdentifier("ref");
  50696. var declar = VariableDeclaration("let", [VariableDeclarator(paramPath.node, uid)]);
  50697. parentPath.ensureBlock();
  50698. parentPath.get("body").unshiftContainer("body", declar);
  50699. paramPath.replaceWith(cloneNode(uid));
  50700. }
  50701. }
  50702. return {
  50703. name: "proposal-object-rest-spread",
  50704. inherits: syntaxObjectRestSpread$1,
  50705. visitor: {
  50706. Function: function Function(path) {
  50707. var params = path.get("params");
  50708. for (var i = params.length - 1; i >= 0; i--) {
  50709. replaceRestElement(params[i].parentPath, params[i]);
  50710. }
  50711. },
  50712. VariableDeclarator: function VariableDeclarator$1(path, file) {
  50713. if (!path.get("id").isObjectPattern()) {
  50714. return;
  50715. }
  50716. var insertionPath = path;
  50717. var originalPath = path;
  50718. visitRestElements(path.get("id"), function (path) {
  50719. if (!path.parentPath.isObjectPattern()) {
  50720. return;
  50721. }
  50722. if (originalPath.node.id.properties.length > 1 && !isIdentifier(originalPath.node.init)) {
  50723. var initRef = path.scope.generateUidIdentifierBasedOnNode(originalPath.node.init, "ref");
  50724. originalPath.insertBefore(VariableDeclarator(initRef, originalPath.node.init));
  50725. originalPath.replaceWith(VariableDeclarator(originalPath.node.id, cloneNode(initRef)));
  50726. return;
  50727. }
  50728. var ref = originalPath.node.init;
  50729. var refPropertyPath = [];
  50730. var kind;
  50731. path.findParent(function (path) {
  50732. if (path.isObjectProperty()) {
  50733. refPropertyPath.unshift(path);
  50734. } else if (path.isVariableDeclarator()) {
  50735. kind = path.parentPath.node.kind;
  50736. return true;
  50737. }
  50738. });
  50739. var impureObjRefComputedDeclarators = replaceImpureComputedKeys(refPropertyPath, path.scope);
  50740. refPropertyPath.forEach(function (prop) {
  50741. var node = prop.node;
  50742. ref = MemberExpression(ref, cloneNode(node.key), node.computed);
  50743. });
  50744. var objectPatternPath = path.findParent(function (path) {
  50745. return path.isObjectPattern();
  50746. });
  50747. var _createObjectSpread = createObjectSpread(objectPatternPath, file, ref),
  50748. impureComputedPropertyDeclarators = _createObjectSpread[0],
  50749. argument = _createObjectSpread[1],
  50750. callExpression = _createObjectSpread[2];
  50751. if (loose) {
  50752. removeUnusedExcludedKeys(objectPatternPath);
  50753. }
  50754. assertIdentifier(argument);
  50755. insertionPath.insertBefore(impureComputedPropertyDeclarators);
  50756. insertionPath.insertBefore(impureObjRefComputedDeclarators);
  50757. insertionPath.insertAfter(VariableDeclarator(argument, callExpression));
  50758. insertionPath = insertionPath.getSibling(insertionPath.key + 1);
  50759. path.scope.registerBinding(kind, insertionPath);
  50760. if (objectPatternPath.node.properties.length === 0) {
  50761. objectPatternPath.findParent(function (path) {
  50762. return path.isObjectProperty() || path.isVariableDeclarator();
  50763. }).remove();
  50764. }
  50765. });
  50766. },
  50767. ExportNamedDeclaration: function ExportNamedDeclaration$1(path) {
  50768. var declaration = path.get("declaration");
  50769. if (!declaration.isVariableDeclaration()) return;
  50770. var hasRest = declaration.get("declarations").some(function (path) {
  50771. return hasRestElement(path.get("id"));
  50772. });
  50773. if (!hasRest) return;
  50774. var specifiers = [];
  50775. for (var _i4 = 0, _Object$keys = Object.keys(path.getOuterBindingIdentifiers(path)); _i4 < _Object$keys.length; _i4++) {
  50776. var name = _Object$keys[_i4];
  50777. specifiers.push(ExportSpecifier(Identifier(name), Identifier(name)));
  50778. }
  50779. path.replaceWith(declaration.node);
  50780. path.insertAfter(ExportNamedDeclaration(null, specifiers));
  50781. },
  50782. CatchClause: function CatchClause(path) {
  50783. var paramPath = path.get("param");
  50784. replaceRestElement(paramPath.parentPath, paramPath);
  50785. },
  50786. AssignmentExpression: function AssignmentExpression$1(path, file) {
  50787. var leftPath = path.get("left");
  50788. if (leftPath.isObjectPattern() && hasRestElement(leftPath)) {
  50789. var nodes = [];
  50790. var refName = path.scope.generateUidBasedOnNode(path.node.right, "ref");
  50791. nodes.push(VariableDeclaration("var", [VariableDeclarator(Identifier(refName), path.node.right)]));
  50792. var _createObjectSpread2 = createObjectSpread(leftPath, file, Identifier(refName)),
  50793. impureComputedPropertyDeclarators = _createObjectSpread2[0],
  50794. argument = _createObjectSpread2[1],
  50795. callExpression = _createObjectSpread2[2];
  50796. if (impureComputedPropertyDeclarators.length > 0) {
  50797. nodes.push(VariableDeclaration("var", impureComputedPropertyDeclarators));
  50798. }
  50799. var nodeWithoutSpread = cloneNode(path.node);
  50800. nodeWithoutSpread.right = Identifier(refName);
  50801. nodes.push(ExpressionStatement(nodeWithoutSpread));
  50802. nodes.push(toStatement(AssignmentExpression("=", argument, callExpression)));
  50803. nodes.push(ExpressionStatement(Identifier(refName)));
  50804. path.replaceWithMultiple(nodes);
  50805. }
  50806. },
  50807. ForXStatement: function ForXStatement(path) {
  50808. var node = path.node,
  50809. scope = path.scope;
  50810. var leftPath = path.get("left");
  50811. var left = node.left;
  50812. if (!hasObjectPatternRestElement(leftPath)) {
  50813. return;
  50814. }
  50815. if (!isVariableDeclaration(left)) {
  50816. var temp = scope.generateUidIdentifier("ref");
  50817. node.left = VariableDeclaration("var", [VariableDeclarator(temp)]);
  50818. path.ensureBlock();
  50819. if (node.body.body.length === 0 && path.isCompletionRecord()) {
  50820. node.body.body.unshift(ExpressionStatement(scope.buildUndefinedNode()));
  50821. }
  50822. node.body.body.unshift(ExpressionStatement(AssignmentExpression("=", left, cloneNode(temp))));
  50823. } else {
  50824. var pattern = left.declarations[0].id;
  50825. var key = scope.generateUidIdentifier("ref");
  50826. node.left = VariableDeclaration(left.kind, [VariableDeclarator(key, null)]);
  50827. path.ensureBlock();
  50828. node.body.body.unshift(VariableDeclaration(node.left.kind, [VariableDeclarator(pattern, cloneNode(key))]));
  50829. }
  50830. },
  50831. ArrayPattern: function ArrayPattern(path) {
  50832. var objectPatterns = [];
  50833. visitRestElements(path, function (path) {
  50834. if (!path.parentPath.isObjectPattern()) {
  50835. return;
  50836. }
  50837. var objectPattern = path.parentPath;
  50838. var uid = path.scope.generateUidIdentifier("ref");
  50839. objectPatterns.push(VariableDeclarator(objectPattern.node, uid));
  50840. objectPattern.replaceWith(cloneNode(uid));
  50841. path.skip();
  50842. });
  50843. if (objectPatterns.length > 0) {
  50844. var statementPath = path.getStatementParent();
  50845. statementPath.insertAfter(VariableDeclaration(statementPath.node.kind || "var", objectPatterns));
  50846. }
  50847. },
  50848. ObjectExpression: function ObjectExpression$1(path, file) {
  50849. if (!hasSpread(path.node)) return;
  50850. var args = [];
  50851. var props = [];
  50852. function push() {
  50853. args.push(ObjectExpression(props));
  50854. props = [];
  50855. }
  50856. for (var _i5 = 0, _arr = path.node.properties; _i5 < _arr.length; _i5++) {
  50857. var prop = _arr[_i5];
  50858. if (isSpreadElement(prop)) {
  50859. push();
  50860. args.push(prop.argument);
  50861. } else {
  50862. props.push(prop);
  50863. }
  50864. }
  50865. if (props.length) {
  50866. push();
  50867. }
  50868. var helper;
  50869. if (loose) {
  50870. helper = getExtendsHelper(file);
  50871. } else {
  50872. try {
  50873. helper = file.addHelper("objectSpread2");
  50874. } catch (_unused) {
  50875. this.file.declarations["objectSpread2"] = null;
  50876. helper = file.addHelper("objectSpread");
  50877. }
  50878. }
  50879. path.replaceWith(CallExpression(helper, args));
  50880. }
  50881. }
  50882. };
  50883. });
  50884. var lib$9 = createCommonjsModule(function (module, exports) {
  50885. Object.defineProperty(exports, "__esModule", {
  50886. value: true
  50887. });
  50888. exports["default"] = void 0;
  50889. var _default = (0, _helperPluginUtils.declare)(function (api) {
  50890. api.assertVersion(7);
  50891. return {
  50892. name: "syntax-optional-catch-binding",
  50893. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  50894. parserOpts.plugins.push("optionalCatchBinding");
  50895. }
  50896. };
  50897. });
  50898. exports["default"] = _default;
  50899. });
  50900. var syntaxOptionalCatchBinding$1 = unwrapExports(lib$9);
  50901. var proposalOptionalCatchBinding = declare(function (api) {
  50902. api.assertVersion(7);
  50903. return {
  50904. name: "proposal-optional-catch-binding",
  50905. inherits: syntaxOptionalCatchBinding$1,
  50906. visitor: {
  50907. CatchClause: function CatchClause(path) {
  50908. if (!path.node.param) {
  50909. var uid = path.scope.generateUidIdentifier("unused");
  50910. var paramPath = path.get("param");
  50911. paramPath.replaceWith(uid);
  50912. }
  50913. }
  50914. }
  50915. };
  50916. });
  50917. var lib$a = createCommonjsModule(function (module, exports) {
  50918. Object.defineProperty(exports, "__esModule", {
  50919. value: true
  50920. });
  50921. exports["default"] = void 0;
  50922. var _default = (0, _helperPluginUtils.declare)(function (api) {
  50923. api.assertVersion(7);
  50924. return {
  50925. name: "syntax-optional-chaining",
  50926. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  50927. parserOpts.plugins.push("optionalChaining");
  50928. }
  50929. };
  50930. });
  50931. exports["default"] = _default;
  50932. });
  50933. var syntaxOptionalChaining = unwrapExports(lib$a);
  50934. var proposalOptionalChaining = declare(function (api, options) {
  50935. api.assertVersion(7);
  50936. var _options$loose = options.loose,
  50937. loose = _options$loose === void 0 ? false : _options$loose;
  50938. return {
  50939. name: "proposal-optional-chaining",
  50940. inherits: syntaxOptionalChaining,
  50941. visitor: {
  50942. "OptionalCallExpression|OptionalMemberExpression": function OptionalCallExpressionOptionalMemberExpression(path) {
  50943. var parentPath = path.parentPath,
  50944. scope = path.scope;
  50945. var isDeleteOperation = false;
  50946. var optionals = [];
  50947. var optionalPath = path;
  50948. while (optionalPath.isOptionalMemberExpression() || optionalPath.isOptionalCallExpression()) {
  50949. var _optionalPath = optionalPath,
  50950. node = _optionalPath.node;
  50951. if (node.optional) {
  50952. optionals.push(node);
  50953. }
  50954. if (optionalPath.isOptionalMemberExpression()) {
  50955. optionalPath.node.type = "MemberExpression";
  50956. optionalPath = optionalPath.get("object");
  50957. } else if (optionalPath.isOptionalCallExpression()) {
  50958. optionalPath.node.type = "CallExpression";
  50959. optionalPath = optionalPath.get("callee");
  50960. }
  50961. }
  50962. var replacementPath = path;
  50963. if (parentPath.isUnaryExpression({
  50964. operator: "delete"
  50965. })) {
  50966. replacementPath = parentPath;
  50967. isDeleteOperation = true;
  50968. }
  50969. for (var i = optionals.length - 1; i >= 0; i--) {
  50970. var _node = optionals[i];
  50971. var isCall = isCallExpression(_node);
  50972. var replaceKey = isCall ? "callee" : "object";
  50973. var chain = _node[replaceKey];
  50974. var ref = void 0;
  50975. var check = void 0;
  50976. if (loose && isCall) {
  50977. check = ref = chain;
  50978. } else {
  50979. ref = scope.maybeGenerateMemoised(chain);
  50980. if (ref) {
  50981. check = AssignmentExpression("=", cloneNode(ref), chain);
  50982. _node[replaceKey] = ref;
  50983. } else {
  50984. check = ref = chain;
  50985. }
  50986. }
  50987. if (isCall && isMemberExpression(chain)) {
  50988. if (loose) {
  50989. _node.callee = chain;
  50990. } else {
  50991. var object = chain.object;
  50992. var context = scope.maybeGenerateMemoised(object);
  50993. if (context) {
  50994. chain.object = AssignmentExpression("=", context, object);
  50995. } else if (isSuper(object)) {
  50996. context = ThisExpression();
  50997. } else {
  50998. context = object;
  50999. }
  51000. _node.arguments.unshift(cloneNode(context));
  51001. _node.callee = MemberExpression(_node.callee, Identifier("call"));
  51002. }
  51003. }
  51004. replacementPath.replaceWith(ConditionalExpression(loose ? BinaryExpression("==", cloneNode(check), NullLiteral()) : LogicalExpression("||", BinaryExpression("===", cloneNode(check), NullLiteral()), BinaryExpression("===", cloneNode(ref), scope.buildUndefinedNode())), isDeleteOperation ? BooleanLiteral(true) : scope.buildUndefinedNode(), replacementPath.node));
  51005. replacementPath = replacementPath.get("alternate");
  51006. }
  51007. }
  51008. }
  51009. };
  51010. });
  51011. var buildOptimizedSequenceExpression = function buildOptimizedSequenceExpression(_ref) {
  51012. var assign = _ref.assign,
  51013. call = _ref.call,
  51014. path = _ref.path;
  51015. var placeholderNode = assign.left,
  51016. pipelineLeft = assign.right;
  51017. var calledExpression = call.callee;
  51018. var optimizeArrow = isArrowFunctionExpression(calledExpression) && isExpression(calledExpression.body) && !calledExpression.async && !calledExpression.generator;
  51019. var param;
  51020. if (optimizeArrow) {
  51021. var params = calledExpression.params;
  51022. if (params.length === 1 && isIdentifier(params[0])) {
  51023. param = params[0];
  51024. } else if (params.length > 0) {
  51025. optimizeArrow = false;
  51026. }
  51027. } else if (isIdentifier(calledExpression, {
  51028. name: "eval"
  51029. })) {
  51030. var evalSequence = SequenceExpression([NumericLiteral(0), calledExpression]);
  51031. call.callee = evalSequence;
  51032. path.scope.push({
  51033. id: placeholderNode
  51034. });
  51035. return SequenceExpression([assign, call]);
  51036. }
  51037. if (optimizeArrow && !param) {
  51038. return SequenceExpression([pipelineLeft, calledExpression.body]);
  51039. }
  51040. path.scope.push({
  51041. id: placeholderNode
  51042. });
  51043. if (param) {
  51044. path.get("right").scope.rename(param.name, placeholderNode.name);
  51045. return SequenceExpression([assign, calledExpression.body]);
  51046. }
  51047. return SequenceExpression([assign, call]);
  51048. };
  51049. var minimalVisitor = {
  51050. BinaryExpression: function BinaryExpression(path) {
  51051. var scope = path.scope,
  51052. node = path.node;
  51053. var operator = node.operator,
  51054. left = node.left,
  51055. right = node.right;
  51056. if (operator !== "|>") return;
  51057. var placeholder = scope.generateUidIdentifierBasedOnNode(left);
  51058. var call = CallExpression(right, [cloneNode(placeholder)]);
  51059. path.replaceWith(buildOptimizedSequenceExpression({
  51060. assign: AssignmentExpression("=", cloneNode(placeholder), left),
  51061. call: call,
  51062. path: path
  51063. }));
  51064. }
  51065. };
  51066. var updateTopicReferenceVisitor = {
  51067. PipelinePrimaryTopicReference: function PipelinePrimaryTopicReference(path) {
  51068. path.replaceWith(this.topicId);
  51069. },
  51070. PipelineTopicExpression: function PipelineTopicExpression(path) {
  51071. path.skip();
  51072. }
  51073. };
  51074. var smartVisitor = {
  51075. BinaryExpression: function BinaryExpression(path) {
  51076. var scope = path.scope;
  51077. var node = path.node;
  51078. var operator = node.operator,
  51079. left = node.left,
  51080. right = node.right;
  51081. if (operator !== "|>") return;
  51082. var placeholder = scope.generateUidIdentifierBasedOnNode(left);
  51083. scope.push({
  51084. id: placeholder
  51085. });
  51086. var call;
  51087. if (isPipelineTopicExpression(right)) {
  51088. path.get("right").traverse(updateTopicReferenceVisitor, {
  51089. topicId: placeholder
  51090. });
  51091. call = right.expression;
  51092. } else {
  51093. var callee = right.callee;
  51094. if (isIdentifier(callee, {
  51095. name: "eval"
  51096. })) {
  51097. callee = SequenceExpression([NumericLiteral(0), callee]);
  51098. }
  51099. call = CallExpression(callee, [cloneNode(placeholder)]);
  51100. }
  51101. path.replaceWith(SequenceExpression([AssignmentExpression("=", cloneNode(placeholder), left), call]));
  51102. }
  51103. };
  51104. var fsharpVisitor = {
  51105. BinaryExpression: function BinaryExpression(path) {
  51106. var scope = path.scope,
  51107. node = path.node;
  51108. var operator = node.operator,
  51109. left = node.left,
  51110. right = node.right;
  51111. if (operator !== "|>") return;
  51112. var placeholder = scope.generateUidIdentifierBasedOnNode(left);
  51113. var call = right.type === "AwaitExpression" ? AwaitExpression(cloneNode(placeholder)) : CallExpression(right, [cloneNode(placeholder)]);
  51114. var sequence = buildOptimizedSequenceExpression({
  51115. assign: AssignmentExpression("=", cloneNode(placeholder), left),
  51116. call: call,
  51117. path: path
  51118. });
  51119. path.replaceWith(sequence);
  51120. }
  51121. };
  51122. var visitorsPerProposal = {
  51123. minimal: minimalVisitor,
  51124. smart: smartVisitor,
  51125. fsharp: fsharpVisitor
  51126. };
  51127. var proposalPipelineOperator = declare(function (api, options) {
  51128. api.assertVersion(7);
  51129. return {
  51130. name: "proposal-pipeline-operator",
  51131. inherits: syntaxPipelineOperator,
  51132. visitor: visitorsPerProposal[options.proposal]
  51133. };
  51134. });
  51135. var proposalPrivateMethods = declare(function (api, options) {
  51136. api.assertVersion(7);
  51137. return createClassFeaturePlugin({
  51138. name: "proposal-private-methods",
  51139. feature: FEATURES.privateMethods,
  51140. loose: options.loose,
  51141. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  51142. parserOpts.plugins.push("classPrivateMethods");
  51143. }
  51144. });
  51145. });
  51146. var syntaxThrowExpressions = declare(function (api) {
  51147. api.assertVersion(7);
  51148. return {
  51149. name: "syntax-throw-expressions",
  51150. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  51151. parserOpts.plugins.push("throwExpressions");
  51152. }
  51153. };
  51154. });
  51155. var proposalThrowExpressions = declare(function (api) {
  51156. api.assertVersion(7);
  51157. return {
  51158. name: "proposal-throw-expressions",
  51159. inherits: syntaxThrowExpressions,
  51160. visitor: {
  51161. UnaryExpression: function UnaryExpression(path) {
  51162. var _path$node = path.node,
  51163. operator = _path$node.operator,
  51164. argument = _path$node.argument;
  51165. if (operator !== "throw") return;
  51166. var arrow = FunctionExpression(null, [Identifier("e")], BlockStatement([ThrowStatement(Identifier("e"))]));
  51167. path.replaceWith(CallExpression(arrow, [argument]));
  51168. }
  51169. }
  51170. };
  51171. });
  51172. var regjsgen = createCommonjsModule(function (module, exports) {
  51173. (function () {
  51174. var objectTypes = {
  51175. 'function': true,
  51176. 'object': true
  51177. };
  51178. var root = objectTypes[typeof window] && window || this;
  51179. var freeExports = objectTypes['object'] && exports && !exports.nodeType && exports;
  51180. var hasFreeModule = objectTypes['object'] && module && !module.nodeType;
  51181. var freeGlobal = freeExports && hasFreeModule && typeof commonjsGlobal == 'object' && commonjsGlobal;
  51182. if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {
  51183. root = freeGlobal;
  51184. }
  51185. var hasOwnProperty = Object.prototype.hasOwnProperty;
  51186. function fromCodePoint() {
  51187. var codePoint = Number(arguments[0]);
  51188. if (!isFinite(codePoint) || codePoint < 0 || codePoint > 0x10FFFF || Math.floor(codePoint) != codePoint) {
  51189. throw RangeError('Invalid code point: ' + codePoint);
  51190. }
  51191. if (codePoint <= 0xFFFF) {
  51192. return String.fromCharCode(codePoint);
  51193. } else {
  51194. codePoint -= 0x10000;
  51195. var highSurrogate = (codePoint >> 10) + 0xD800;
  51196. var lowSurrogate = codePoint % 0x400 + 0xDC00;
  51197. return String.fromCharCode(highSurrogate, lowSurrogate);
  51198. }
  51199. }
  51200. var assertTypeRegexMap = {};
  51201. function assertType(type, expected) {
  51202. if (expected.indexOf('|') == -1) {
  51203. if (type == expected) {
  51204. return;
  51205. }
  51206. throw Error('Invalid node type: ' + type + '; expected type: ' + expected);
  51207. }
  51208. expected = hasOwnProperty.call(assertTypeRegexMap, expected) ? assertTypeRegexMap[expected] : assertTypeRegexMap[expected] = RegExp('^(?:' + expected + ')$');
  51209. if (expected.test(type)) {
  51210. return;
  51211. }
  51212. throw Error('Invalid node type: ' + type + '; expected types: ' + expected);
  51213. }
  51214. function generate(node) {
  51215. var type = node.type;
  51216. if (hasOwnProperty.call(generators, type)) {
  51217. return generators[type](node);
  51218. }
  51219. throw Error('Invalid node type: ' + type);
  51220. }
  51221. function generateAlternative(node) {
  51222. assertType(node.type, 'alternative');
  51223. var terms = node.body,
  51224. i = -1,
  51225. length = terms.length,
  51226. result = '';
  51227. while (++i < length) {
  51228. result += generateTerm(terms[i]);
  51229. }
  51230. return result;
  51231. }
  51232. function generateAnchor(node) {
  51233. assertType(node.type, 'anchor');
  51234. switch (node.kind) {
  51235. case 'start':
  51236. return '^';
  51237. case 'end':
  51238. return '$';
  51239. case 'boundary':
  51240. return '\\b';
  51241. case 'not-boundary':
  51242. return '\\B';
  51243. default:
  51244. throw Error('Invalid assertion');
  51245. }
  51246. }
  51247. function generateAtom(node) {
  51248. assertType(node.type, 'anchor|characterClass|characterClassEscape|dot|group|reference|value');
  51249. return generate(node);
  51250. }
  51251. function generateCharacterClass(node) {
  51252. assertType(node.type, 'characterClass');
  51253. var classRanges = node.body,
  51254. i = -1,
  51255. length = classRanges.length,
  51256. result = '';
  51257. if (node.negative) {
  51258. result += '^';
  51259. }
  51260. while (++i < length) {
  51261. result += generateClassAtom(classRanges[i]);
  51262. }
  51263. return '[' + result + ']';
  51264. }
  51265. function generateCharacterClassEscape(node) {
  51266. assertType(node.type, 'characterClassEscape');
  51267. return '\\' + node.value;
  51268. }
  51269. function generateUnicodePropertyEscape(node) {
  51270. assertType(node.type, 'unicodePropertyEscape');
  51271. return '\\' + (node.negative ? 'P' : 'p') + '{' + node.value + '}';
  51272. }
  51273. function generateCharacterClassRange(node) {
  51274. assertType(node.type, 'characterClassRange');
  51275. var min = node.min,
  51276. max = node.max;
  51277. if (min.type == 'characterClassRange' || max.type == 'characterClassRange') {
  51278. throw Error('Invalid character class range');
  51279. }
  51280. return generateClassAtom(min) + '-' + generateClassAtom(max);
  51281. }
  51282. function generateClassAtom(node) {
  51283. assertType(node.type, 'anchor|characterClassEscape|characterClassRange|dot|value');
  51284. return generate(node);
  51285. }
  51286. function generateDisjunction(node) {
  51287. assertType(node.type, 'disjunction');
  51288. var body = node.body,
  51289. i = -1,
  51290. length = body.length,
  51291. result = '';
  51292. while (++i < length) {
  51293. if (i != 0) {
  51294. result += '|';
  51295. }
  51296. result += generate(body[i]);
  51297. }
  51298. return result;
  51299. }
  51300. function generateDot(node) {
  51301. assertType(node.type, 'dot');
  51302. return '.';
  51303. }
  51304. function generateGroup(node) {
  51305. assertType(node.type, 'group');
  51306. var result = '';
  51307. switch (node.behavior) {
  51308. case 'normal':
  51309. if (node.name) {
  51310. result += '?<' + generateIdentifier(node.name) + '>';
  51311. }
  51312. break;
  51313. case 'ignore':
  51314. result += '?:';
  51315. break;
  51316. case 'lookahead':
  51317. result += '?=';
  51318. break;
  51319. case 'negativeLookahead':
  51320. result += '?!';
  51321. break;
  51322. case 'lookbehind':
  51323. result += '?<=';
  51324. break;
  51325. case 'negativeLookbehind':
  51326. result += '?<!';
  51327. break;
  51328. default:
  51329. throw Error('Invalid behaviour: ' + node.behaviour);
  51330. }
  51331. var body = node.body,
  51332. i = -1,
  51333. length = body.length;
  51334. while (++i < length) {
  51335. result += generate(body[i]);
  51336. }
  51337. return '(' + result + ')';
  51338. }
  51339. function generateIdentifier(node) {
  51340. assertType(node.type, 'identifier');
  51341. return node.value;
  51342. }
  51343. function generateQuantifier(node) {
  51344. assertType(node.type, 'quantifier');
  51345. var quantifier = '',
  51346. min = node.min,
  51347. max = node.max;
  51348. if (max == null) {
  51349. if (min == 0) {
  51350. quantifier = '*';
  51351. } else if (min == 1) {
  51352. quantifier = '+';
  51353. } else {
  51354. quantifier = '{' + min + ',}';
  51355. }
  51356. } else if (min == max) {
  51357. quantifier = '{' + min + '}';
  51358. } else if (min == 0 && max == 1) {
  51359. quantifier = '?';
  51360. } else {
  51361. quantifier = '{' + min + ',' + max + '}';
  51362. }
  51363. if (!node.greedy) {
  51364. quantifier += '?';
  51365. }
  51366. return generateAtom(node.body[0]) + quantifier;
  51367. }
  51368. function generateReference(node) {
  51369. assertType(node.type, 'reference');
  51370. if (node.matchIndex) {
  51371. return '\\' + node.matchIndex;
  51372. }
  51373. if (node.name) {
  51374. return '\\k<' + generateIdentifier(node.name) + '>';
  51375. }
  51376. throw new Error('Unknown reference type');
  51377. }
  51378. function generateTerm(node) {
  51379. assertType(node.type, 'anchor|characterClass|characterClassEscape|empty|group|quantifier|reference|unicodePropertyEscape|value|dot');
  51380. return generate(node);
  51381. }
  51382. function generateValue(node) {
  51383. assertType(node.type, 'value');
  51384. var kind = node.kind,
  51385. codePoint = node.codePoint;
  51386. if (typeof codePoint != 'number') {
  51387. throw new Error('Invalid code point: ' + codePoint);
  51388. }
  51389. switch (kind) {
  51390. case 'controlLetter':
  51391. return '\\c' + fromCodePoint(codePoint + 64);
  51392. case 'hexadecimalEscape':
  51393. return '\\x' + ('00' + codePoint.toString(16).toUpperCase()).slice(-2);
  51394. case 'identifier':
  51395. return '\\' + fromCodePoint(codePoint);
  51396. case 'null':
  51397. return '\\' + codePoint;
  51398. case 'octal':
  51399. return '\\' + codePoint.toString(8);
  51400. case 'singleEscape':
  51401. switch (codePoint) {
  51402. case 0x0008:
  51403. return '\\b';
  51404. case 0x0009:
  51405. return '\\t';
  51406. case 0x000A:
  51407. return '\\n';
  51408. case 0x000B:
  51409. return '\\v';
  51410. case 0x000C:
  51411. return '\\f';
  51412. case 0x000D:
  51413. return '\\r';
  51414. default:
  51415. throw Error('Invalid code point: ' + codePoint);
  51416. }
  51417. case 'symbol':
  51418. return fromCodePoint(codePoint);
  51419. case 'unicodeEscape':
  51420. return "\\u" + ('0000' + codePoint.toString(16).toUpperCase()).slice(-4);
  51421. case 'unicodeCodePointEscape':
  51422. return "\\u{" + codePoint.toString(16).toUpperCase() + '}';
  51423. default:
  51424. throw Error('Unsupported node kind: ' + kind);
  51425. }
  51426. }
  51427. var generators = {
  51428. 'alternative': generateAlternative,
  51429. 'anchor': generateAnchor,
  51430. 'characterClass': generateCharacterClass,
  51431. 'characterClassEscape': generateCharacterClassEscape,
  51432. 'characterClassRange': generateCharacterClassRange,
  51433. 'unicodePropertyEscape': generateUnicodePropertyEscape,
  51434. 'disjunction': generateDisjunction,
  51435. 'dot': generateDot,
  51436. 'group': generateGroup,
  51437. 'quantifier': generateQuantifier,
  51438. 'reference': generateReference,
  51439. 'value': generateValue
  51440. };
  51441. var regjsgen = {
  51442. 'generate': generate
  51443. };
  51444. if (freeExports && hasFreeModule) {
  51445. freeExports.generate = generate;
  51446. } else {
  51447. root.regjsgen = regjsgen;
  51448. }
  51449. }).call(commonjsGlobal);
  51450. });
  51451. var parser$1 = createCommonjsModule(function (module) {
  51452. (function () {
  51453. var fromCodePoint = String.fromCodePoint || function () {
  51454. var stringFromCharCode = String.fromCharCode;
  51455. var floor = Math.floor;
  51456. return function fromCodePoint() {
  51457. var MAX_SIZE = 0x4000;
  51458. var codeUnits = [];
  51459. var highSurrogate;
  51460. var lowSurrogate;
  51461. var index = -1;
  51462. var length = arguments.length;
  51463. if (!length) {
  51464. return '';
  51465. }
  51466. var result = '';
  51467. while (++index < length) {
  51468. var codePoint = Number(arguments[index]);
  51469. if (!isFinite(codePoint) || codePoint < 0 || codePoint > 0x10FFFF || floor(codePoint) != codePoint) {
  51470. throw RangeError('Invalid code point: ' + codePoint);
  51471. }
  51472. if (codePoint <= 0xFFFF) {
  51473. codeUnits.push(codePoint);
  51474. } else {
  51475. codePoint -= 0x10000;
  51476. highSurrogate = (codePoint >> 10) + 0xD800;
  51477. lowSurrogate = codePoint % 0x400 + 0xDC00;
  51478. codeUnits.push(highSurrogate, lowSurrogate);
  51479. }
  51480. if (index + 1 == length || codeUnits.length > MAX_SIZE) {
  51481. result += stringFromCharCode.apply(null, codeUnits);
  51482. codeUnits.length = 0;
  51483. }
  51484. }
  51485. return result;
  51486. };
  51487. }();
  51488. function parse(str, flags, features) {
  51489. if (!features) {
  51490. features = {};
  51491. }
  51492. function addRaw(node) {
  51493. node.raw = str.substring(node.range[0], node.range[1]);
  51494. return node;
  51495. }
  51496. function updateRawStart(node, start) {
  51497. node.range[0] = start;
  51498. return addRaw(node);
  51499. }
  51500. function createAnchor(kind, rawLength) {
  51501. return addRaw({
  51502. type: 'anchor',
  51503. kind: kind,
  51504. range: [pos - rawLength, pos]
  51505. });
  51506. }
  51507. function createValue(kind, codePoint, from, to) {
  51508. return addRaw({
  51509. type: 'value',
  51510. kind: kind,
  51511. codePoint: codePoint,
  51512. range: [from, to]
  51513. });
  51514. }
  51515. function createEscaped(kind, codePoint, value, fromOffset) {
  51516. fromOffset = fromOffset || 0;
  51517. return createValue(kind, codePoint, pos - (value.length + fromOffset), pos);
  51518. }
  51519. function createCharacter(matches) {
  51520. var _char = matches[0];
  51521. var first = _char.charCodeAt(0);
  51522. if (hasUnicodeFlag) {
  51523. var second;
  51524. if (_char.length === 1 && first >= 0xD800 && first <= 0xDBFF) {
  51525. second = lookahead().charCodeAt(0);
  51526. if (second >= 0xDC00 && second <= 0xDFFF) {
  51527. pos++;
  51528. return createValue('symbol', (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000, pos - 2, pos);
  51529. }
  51530. }
  51531. }
  51532. return createValue('symbol', first, pos - 1, pos);
  51533. }
  51534. function createDisjunction(alternatives, from, to) {
  51535. return addRaw({
  51536. type: 'disjunction',
  51537. body: alternatives,
  51538. range: [from, to]
  51539. });
  51540. }
  51541. function createDot() {
  51542. return addRaw({
  51543. type: 'dot',
  51544. range: [pos - 1, pos]
  51545. });
  51546. }
  51547. function createCharacterClassEscape(value) {
  51548. return addRaw({
  51549. type: 'characterClassEscape',
  51550. value: value,
  51551. range: [pos - 2, pos]
  51552. });
  51553. }
  51554. function createReference(matchIndex) {
  51555. return addRaw({
  51556. type: 'reference',
  51557. matchIndex: parseInt(matchIndex, 10),
  51558. range: [pos - 1 - matchIndex.length, pos]
  51559. });
  51560. }
  51561. function createNamedReference(name) {
  51562. return addRaw({
  51563. type: 'reference',
  51564. name: name,
  51565. range: [name.range[0] - 3, pos]
  51566. });
  51567. }
  51568. function createGroup(behavior, disjunction, from, to) {
  51569. return addRaw({
  51570. type: 'group',
  51571. behavior: behavior,
  51572. body: disjunction,
  51573. range: [from, to]
  51574. });
  51575. }
  51576. function createQuantifier(min, max, from, to) {
  51577. if (to == null) {
  51578. from = pos - 1;
  51579. to = pos;
  51580. }
  51581. return addRaw({
  51582. type: 'quantifier',
  51583. min: min,
  51584. max: max,
  51585. greedy: true,
  51586. body: null,
  51587. range: [from, to]
  51588. });
  51589. }
  51590. function createAlternative(terms, from, to) {
  51591. return addRaw({
  51592. type: 'alternative',
  51593. body: terms,
  51594. range: [from, to]
  51595. });
  51596. }
  51597. function createCharacterClass(classRanges, negative, from, to) {
  51598. return addRaw({
  51599. type: 'characterClass',
  51600. body: classRanges,
  51601. negative: negative,
  51602. range: [from, to]
  51603. });
  51604. }
  51605. function createClassRange(min, max, from, to) {
  51606. if (min.codePoint > max.codePoint) {
  51607. bail('invalid range in character class', min.raw + '-' + max.raw, from, to);
  51608. }
  51609. return addRaw({
  51610. type: 'characterClassRange',
  51611. min: min,
  51612. max: max,
  51613. range: [from, to]
  51614. });
  51615. }
  51616. function flattenBody(body) {
  51617. if (body.type === 'alternative') {
  51618. return body.body;
  51619. } else {
  51620. return [body];
  51621. }
  51622. }
  51623. function incr(amount) {
  51624. amount = amount || 1;
  51625. var res = str.substring(pos, pos + amount);
  51626. pos += amount || 1;
  51627. return res;
  51628. }
  51629. function skip(value) {
  51630. if (!match(value)) {
  51631. bail('character', value);
  51632. }
  51633. }
  51634. function match(value) {
  51635. if (str.indexOf(value, pos) === pos) {
  51636. return incr(value.length);
  51637. }
  51638. }
  51639. function lookahead() {
  51640. return str[pos];
  51641. }
  51642. function current(value) {
  51643. return str.indexOf(value, pos) === pos;
  51644. }
  51645. function next(value) {
  51646. return str[pos + 1] === value;
  51647. }
  51648. function matchReg(regExp) {
  51649. var subStr = str.substring(pos);
  51650. var res = subStr.match(regExp);
  51651. if (res) {
  51652. res.range = [];
  51653. res.range[0] = pos;
  51654. incr(res[0].length);
  51655. res.range[1] = pos;
  51656. }
  51657. return res;
  51658. }
  51659. function parseDisjunction() {
  51660. var res = [],
  51661. from = pos;
  51662. res.push(parseAlternative());
  51663. while (match('|')) {
  51664. res.push(parseAlternative());
  51665. }
  51666. if (res.length === 1) {
  51667. return res[0];
  51668. }
  51669. return createDisjunction(res, from, pos);
  51670. }
  51671. function parseAlternative() {
  51672. var res = [],
  51673. from = pos;
  51674. var term;
  51675. while (term = parseTerm()) {
  51676. res.push(term);
  51677. }
  51678. if (res.length === 1) {
  51679. return res[0];
  51680. }
  51681. return createAlternative(res, from, pos);
  51682. }
  51683. function parseTerm() {
  51684. if (pos >= str.length || current('|') || current(')')) {
  51685. return null;
  51686. }
  51687. var anchor = parseAnchor();
  51688. if (anchor) {
  51689. return anchor;
  51690. }
  51691. var atom = parseAtom();
  51692. if (!atom) {
  51693. bail('Expected atom');
  51694. }
  51695. var quantifier = parseQuantifier() || false;
  51696. if (quantifier) {
  51697. quantifier.body = flattenBody(atom);
  51698. updateRawStart(quantifier, atom.range[0]);
  51699. return quantifier;
  51700. }
  51701. return atom;
  51702. }
  51703. function parseGroup(matchA, typeA, matchB, typeB) {
  51704. var type = null,
  51705. from = pos;
  51706. if (match(matchA)) {
  51707. type = typeA;
  51708. } else if (match(matchB)) {
  51709. type = typeB;
  51710. } else {
  51711. return false;
  51712. }
  51713. return finishGroup(type, from);
  51714. }
  51715. function finishGroup(type, from) {
  51716. var body = parseDisjunction();
  51717. if (!body) {
  51718. bail('Expected disjunction');
  51719. }
  51720. skip(')');
  51721. var group = createGroup(type, flattenBody(body), from, pos);
  51722. if (type == 'normal') {
  51723. if (firstIteration) {
  51724. closedCaptureCounter++;
  51725. }
  51726. }
  51727. return group;
  51728. }
  51729. function parseAnchor() {
  51730. if (match('^')) {
  51731. return createAnchor('start', 1);
  51732. } else if (match('$')) {
  51733. return createAnchor('end', 1);
  51734. } else if (match('\\b')) {
  51735. return createAnchor('boundary', 2);
  51736. } else if (match('\\B')) {
  51737. return createAnchor('not-boundary', 2);
  51738. } else {
  51739. return parseGroup('(?=', 'lookahead', '(?!', 'negativeLookahead');
  51740. }
  51741. }
  51742. function parseQuantifier() {
  51743. var res,
  51744. from = pos;
  51745. var quantifier;
  51746. var min, max;
  51747. if (match('*')) {
  51748. quantifier = createQuantifier(0);
  51749. } else if (match('+')) {
  51750. quantifier = createQuantifier(1);
  51751. } else if (match('?')) {
  51752. quantifier = createQuantifier(0, 1);
  51753. } else if (res = matchReg(/^\{([0-9]+)\}/)) {
  51754. min = parseInt(res[1], 10);
  51755. quantifier = createQuantifier(min, min, res.range[0], res.range[1]);
  51756. } else if (res = matchReg(/^\{([0-9]+),\}/)) {
  51757. min = parseInt(res[1], 10);
  51758. quantifier = createQuantifier(min, undefined, res.range[0], res.range[1]);
  51759. } else if (res = matchReg(/^\{([0-9]+),([0-9]+)\}/)) {
  51760. min = parseInt(res[1], 10);
  51761. max = parseInt(res[2], 10);
  51762. if (min > max) {
  51763. bail('numbers out of order in {} quantifier', '', from, pos);
  51764. }
  51765. quantifier = createQuantifier(min, max, res.range[0], res.range[1]);
  51766. }
  51767. if (quantifier) {
  51768. if (match('?')) {
  51769. quantifier.greedy = false;
  51770. quantifier.range[1] += 1;
  51771. }
  51772. }
  51773. return quantifier;
  51774. }
  51775. function parseAtom() {
  51776. var res;
  51777. if (res = matchReg(/^[^^$\\.*+?(){[|]/)) {
  51778. return createCharacter(res);
  51779. } else if (match('.')) {
  51780. return createDot();
  51781. } else if (match('\\')) {
  51782. res = parseAtomEscape();
  51783. if (!res) {
  51784. if (!hasUnicodeFlag && lookahead() == 'c') {
  51785. return createValue('symbol', 92, pos - 1, pos);
  51786. }
  51787. bail('atomEscape');
  51788. }
  51789. return res;
  51790. } else if (res = parseCharacterClass()) {
  51791. return res;
  51792. } else if (features.lookbehind && (res = parseGroup('(?<=', 'lookbehind', '(?<!', 'negativeLookbehind'))) {
  51793. return res;
  51794. } else if (features.namedGroups && match("(?<")) {
  51795. var name = parseIdentifier();
  51796. skip(">");
  51797. var group = finishGroup("normal", name.range[0] - 3);
  51798. group.name = name;
  51799. return group;
  51800. } else {
  51801. return parseGroup('(?:', 'ignore', '(', 'normal');
  51802. }
  51803. }
  51804. function parseUnicodeSurrogatePairEscape(firstEscape) {
  51805. if (hasUnicodeFlag) {
  51806. var first, second;
  51807. if (firstEscape.kind == 'unicodeEscape' && (first = firstEscape.codePoint) >= 0xD800 && first <= 0xDBFF && current('\\') && next('u')) {
  51808. var prevPos = pos;
  51809. pos++;
  51810. var secondEscape = parseClassEscape();
  51811. if (secondEscape.kind == 'unicodeEscape' && (second = secondEscape.codePoint) >= 0xDC00 && second <= 0xDFFF) {
  51812. firstEscape.range[1] = secondEscape.range[1];
  51813. firstEscape.codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
  51814. firstEscape.type = 'value';
  51815. firstEscape.kind = 'unicodeCodePointEscape';
  51816. addRaw(firstEscape);
  51817. } else {
  51818. pos = prevPos;
  51819. }
  51820. }
  51821. }
  51822. return firstEscape;
  51823. }
  51824. function parseClassEscape() {
  51825. return parseAtomEscape(true);
  51826. }
  51827. function parseAtomEscape(insideCharacterClass) {
  51828. var res,
  51829. from = pos;
  51830. res = parseDecimalEscape() || parseNamedReference();
  51831. if (res) {
  51832. return res;
  51833. }
  51834. if (insideCharacterClass) {
  51835. if (match('b')) {
  51836. return createEscaped('singleEscape', 0x0008, '\\b');
  51837. } else if (match('B')) {
  51838. bail('\\B not possible inside of CharacterClass', '', from);
  51839. } else if (!hasUnicodeFlag && (res = matchReg(/^c([0-9])/))) {
  51840. return createEscaped('controlLetter', res[1] + 16, res[1], 2);
  51841. }
  51842. if (match('-') && hasUnicodeFlag) {
  51843. return createEscaped('singleEscape', 0x002d, '\\-');
  51844. }
  51845. }
  51846. res = parseCharacterEscape();
  51847. return res;
  51848. }
  51849. function parseDecimalEscape() {
  51850. var res, match;
  51851. if (res = matchReg(/^(?!0)\d+/)) {
  51852. match = res[0];
  51853. var refIdx = parseInt(res[0], 10);
  51854. if (refIdx <= closedCaptureCounter) {
  51855. return createReference(res[0]);
  51856. } else {
  51857. backrefDenied.push(refIdx);
  51858. incr(-res[0].length);
  51859. if (res = matchReg(/^[0-7]{1,3}/)) {
  51860. return createEscaped('octal', parseInt(res[0], 8), res[0], 1);
  51861. } else {
  51862. res = createCharacter(matchReg(/^[89]/));
  51863. return updateRawStart(res, res.range[0] - 1);
  51864. }
  51865. }
  51866. } else if (res = matchReg(/^[0-7]{1,3}/)) {
  51867. match = res[0];
  51868. if (/^0{1,3}$/.test(match)) {
  51869. return createEscaped('null', 0x0000, '0', match.length + 1);
  51870. } else {
  51871. return createEscaped('octal', parseInt(match, 8), match, 1);
  51872. }
  51873. } else if (res = matchReg(/^[dDsSwW]/)) {
  51874. return createCharacterClassEscape(res[0]);
  51875. }
  51876. return false;
  51877. }
  51878. function parseNamedReference() {
  51879. if (features.namedGroups && matchReg(/^k<(?=.*?>)/)) {
  51880. var name = parseIdentifier();
  51881. skip('>');
  51882. return createNamedReference(name);
  51883. }
  51884. }
  51885. function parseRegExpUnicodeEscapeSequence() {
  51886. var res;
  51887. if (res = matchReg(/^u([0-9a-fA-F]{4})/)) {
  51888. return parseUnicodeSurrogatePairEscape(createEscaped('unicodeEscape', parseInt(res[1], 16), res[1], 2));
  51889. } else if (hasUnicodeFlag && (res = matchReg(/^u\{([0-9a-fA-F]+)\}/))) {
  51890. return createEscaped('unicodeCodePointEscape', parseInt(res[1], 16), res[1], 4);
  51891. }
  51892. }
  51893. function parseCharacterEscape() {
  51894. var res;
  51895. var from = pos;
  51896. if (res = matchReg(/^[fnrtv]/)) {
  51897. var codePoint = 0;
  51898. switch (res[0]) {
  51899. case 't':
  51900. codePoint = 0x009;
  51901. break;
  51902. case 'n':
  51903. codePoint = 0x00A;
  51904. break;
  51905. case 'v':
  51906. codePoint = 0x00B;
  51907. break;
  51908. case 'f':
  51909. codePoint = 0x00C;
  51910. break;
  51911. case 'r':
  51912. codePoint = 0x00D;
  51913. break;
  51914. }
  51915. return createEscaped('singleEscape', codePoint, '\\' + res[0]);
  51916. } else if (res = matchReg(/^c([a-zA-Z])/)) {
  51917. return createEscaped('controlLetter', res[1].charCodeAt(0) % 32, res[1], 2);
  51918. } else if (res = matchReg(/^x([0-9a-fA-F]{2})/)) {
  51919. return createEscaped('hexadecimalEscape', parseInt(res[1], 16), res[1], 2);
  51920. } else if (res = parseRegExpUnicodeEscapeSequence()) {
  51921. if (!res || res.codePoint > 0x10FFFF) {
  51922. bail('Invalid escape sequence', null, from, pos);
  51923. }
  51924. return res;
  51925. } else if (features.unicodePropertyEscape && hasUnicodeFlag && (res = matchReg(/^([pP])\{([^\}]+)\}/))) {
  51926. return addRaw({
  51927. type: 'unicodePropertyEscape',
  51928. negative: res[1] === 'P',
  51929. value: res[2],
  51930. range: [res.range[0] - 1, res.range[1]],
  51931. raw: res[0]
  51932. });
  51933. } else {
  51934. return parseIdentityEscape();
  51935. }
  51936. }
  51937. function parseIdentifierAtom(check) {
  51938. var ch = lookahead();
  51939. var from = pos;
  51940. if (ch === '\\') {
  51941. incr();
  51942. var esc = parseRegExpUnicodeEscapeSequence();
  51943. if (!esc || !check(esc.codePoint)) {
  51944. bail('Invalid escape sequence', null, from, pos);
  51945. }
  51946. return fromCodePoint(esc.codePoint);
  51947. }
  51948. var code = ch.charCodeAt(0);
  51949. if (code >= 0xD800 && code <= 0xDBFF) {
  51950. ch += str[pos + 1];
  51951. var second = ch.charCodeAt(1);
  51952. if (second >= 0xDC00 && second <= 0xDFFF) {
  51953. code = (code - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
  51954. }
  51955. }
  51956. if (!check(code)) return;
  51957. incr();
  51958. if (code > 0xFFFF) incr();
  51959. return ch;
  51960. }
  51961. function parseIdentifier() {
  51962. var start = pos;
  51963. var res = parseIdentifierAtom(isIdentifierStart);
  51964. if (!res) {
  51965. bail('Invalid identifier');
  51966. }
  51967. var ch;
  51968. while (ch = parseIdentifierAtom(isIdentifierPart)) {
  51969. res += ch;
  51970. }
  51971. return addRaw({
  51972. type: 'identifier',
  51973. value: res,
  51974. range: [start, pos]
  51975. });
  51976. }
  51977. function isIdentifierStart(ch) {
  51978. 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]/;
  51979. return ch === 36 || ch === 95 || ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 || ch >= 0x80 && NonAsciiIdentifierStart.test(fromCodePoint(ch));
  51980. }
  51981. function isIdentifierPart(ch) {
  51982. 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]/;
  51983. return isIdentifierStart(ch) || ch >= 48 && ch <= 57 || ch >= 0x80 && NonAsciiIdentifierPartOnly.test(fromCodePoint(ch));
  51984. }
  51985. function parseIdentityEscape() {
  51986. var tmp;
  51987. var l = lookahead();
  51988. if (hasUnicodeFlag && /[\^\$\.\*\+\?\(\)\\\[\]\{\}\|\/]/.test(l) || !hasUnicodeFlag && l !== "c") {
  51989. if (l === "k" && features.lookbehind) {
  51990. return null;
  51991. }
  51992. tmp = incr();
  51993. return createEscaped('identifier', tmp.charCodeAt(0), tmp, 1);
  51994. }
  51995. return null;
  51996. }
  51997. function parseCharacterClass() {
  51998. var res,
  51999. from = pos;
  52000. if (res = matchReg(/^\[\^/)) {
  52001. res = parseClassRanges();
  52002. skip(']');
  52003. return createCharacterClass(res, true, from, pos);
  52004. } else if (match('[')) {
  52005. res = parseClassRanges();
  52006. skip(']');
  52007. return createCharacterClass(res, false, from, pos);
  52008. }
  52009. return null;
  52010. }
  52011. function parseClassRanges() {
  52012. var res;
  52013. if (current(']')) {
  52014. return [];
  52015. } else {
  52016. res = parseNonemptyClassRanges();
  52017. if (!res) {
  52018. bail('nonEmptyClassRanges');
  52019. }
  52020. return res;
  52021. }
  52022. }
  52023. function parseHelperClassRanges(atom) {
  52024. var from, to, res;
  52025. if (current('-') && !next(']')) {
  52026. skip('-');
  52027. res = parseClassAtom();
  52028. if (!res) {
  52029. bail('classAtom');
  52030. }
  52031. to = pos;
  52032. var classRanges = parseClassRanges();
  52033. if (!classRanges) {
  52034. bail('classRanges');
  52035. }
  52036. from = atom.range[0];
  52037. if (classRanges.type === 'empty') {
  52038. return [createClassRange(atom, res, from, to)];
  52039. }
  52040. return [createClassRange(atom, res, from, to)].concat(classRanges);
  52041. }
  52042. res = parseNonemptyClassRangesNoDash();
  52043. if (!res) {
  52044. bail('nonEmptyClassRangesNoDash');
  52045. }
  52046. return [atom].concat(res);
  52047. }
  52048. function parseNonemptyClassRanges() {
  52049. var atom = parseClassAtom();
  52050. if (!atom) {
  52051. bail('classAtom');
  52052. }
  52053. if (current(']')) {
  52054. return [atom];
  52055. }
  52056. return parseHelperClassRanges(atom);
  52057. }
  52058. function parseNonemptyClassRangesNoDash() {
  52059. var res = parseClassAtom();
  52060. if (!res) {
  52061. bail('classAtom');
  52062. }
  52063. if (current(']')) {
  52064. return res;
  52065. }
  52066. return parseHelperClassRanges(res);
  52067. }
  52068. function parseClassAtom() {
  52069. if (match('-')) {
  52070. return createCharacter('-');
  52071. } else {
  52072. return parseClassAtomNoDash();
  52073. }
  52074. }
  52075. function parseClassAtomNoDash() {
  52076. var res;
  52077. if (res = matchReg(/^[^\\\]-]/)) {
  52078. return createCharacter(res[0]);
  52079. } else if (match('\\')) {
  52080. res = parseClassEscape();
  52081. if (!res) {
  52082. bail('classEscape');
  52083. }
  52084. return parseUnicodeSurrogatePairEscape(res);
  52085. }
  52086. }
  52087. function bail(message, details, from, to) {
  52088. from = from == null ? pos : from;
  52089. to = to == null ? from : to;
  52090. var contextStart = Math.max(0, from - 10);
  52091. var contextEnd = Math.min(to + 10, str.length);
  52092. var context = ' ' + str.substring(contextStart, contextEnd);
  52093. var pointer = ' ' + new Array(from - contextStart + 1).join(' ') + '^';
  52094. throw SyntaxError(message + ' at position ' + from + (details ? ': ' + details : '') + '\n' + context + '\n' + pointer);
  52095. }
  52096. var backrefDenied = [];
  52097. var closedCaptureCounter = 0;
  52098. var firstIteration = true;
  52099. var hasUnicodeFlag = (flags || "").indexOf("u") !== -1;
  52100. var pos = 0;
  52101. str = String(str);
  52102. if (str === '') {
  52103. str = '(?:)';
  52104. }
  52105. var result = parseDisjunction();
  52106. if (result.range[1] !== str.length) {
  52107. bail('Could not parse entire input - got stuck', '', result.range[1]);
  52108. }
  52109. for (var i = 0; i < backrefDenied.length; i++) {
  52110. if (backrefDenied[i] <= closedCaptureCounter) {
  52111. pos = 0;
  52112. firstIteration = false;
  52113. return parseDisjunction();
  52114. }
  52115. }
  52116. return result;
  52117. }
  52118. var regjsparser = {
  52119. parse: parse
  52120. };
  52121. if ( module.exports) {
  52122. module.exports = regjsparser;
  52123. } else {
  52124. window.regjsparser = regjsparser;
  52125. }
  52126. })();
  52127. });
  52128. var regenerate = createCommonjsModule(function (module, exports) {
  52129. (function (root) {
  52130. var freeExports = exports;
  52131. var freeModule = module && module.exports == freeExports && module;
  52132. var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal;
  52133. if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
  52134. root = freeGlobal;
  52135. }
  52136. var ERRORS = {
  52137. 'rangeOrder': "A range\u2019s `stop` value must be greater than or equal " + 'to the `start` value.',
  52138. 'codePointRange': 'Invalid code point value. Code points range from ' + 'U+000000 to U+10FFFF.'
  52139. };
  52140. var HIGH_SURROGATE_MIN = 0xD800;
  52141. var HIGH_SURROGATE_MAX = 0xDBFF;
  52142. var LOW_SURROGATE_MIN = 0xDC00;
  52143. var LOW_SURROGATE_MAX = 0xDFFF;
  52144. var regexNull = /\\x00([^0123456789]|$)/g;
  52145. var object = {};
  52146. var hasOwnProperty = object.hasOwnProperty;
  52147. var extend = function extend(destination, source) {
  52148. var key;
  52149. for (key in source) {
  52150. if (hasOwnProperty.call(source, key)) {
  52151. destination[key] = source[key];
  52152. }
  52153. }
  52154. return destination;
  52155. };
  52156. var forEach = function forEach(array, callback) {
  52157. var index = -1;
  52158. var length = array.length;
  52159. while (++index < length) {
  52160. callback(array[index], index);
  52161. }
  52162. };
  52163. var toString = object.toString;
  52164. var isArray = function isArray(value) {
  52165. return toString.call(value) == '[object Array]';
  52166. };
  52167. var isNumber = function isNumber(value) {
  52168. return typeof value == 'number' || toString.call(value) == '[object Number]';
  52169. };
  52170. var zeroes = '0000';
  52171. var pad = function pad(number, totalCharacters) {
  52172. var string = String(number);
  52173. return string.length < totalCharacters ? (zeroes + string).slice(-totalCharacters) : string;
  52174. };
  52175. var hex = function hex(number) {
  52176. return Number(number).toString(16).toUpperCase();
  52177. };
  52178. var slice = [].slice;
  52179. var dataFromCodePoints = function dataFromCodePoints(codePoints) {
  52180. var index = -1;
  52181. var length = codePoints.length;
  52182. var max = length - 1;
  52183. var result = [];
  52184. var isStart = true;
  52185. var tmp;
  52186. var previous = 0;
  52187. while (++index < length) {
  52188. tmp = codePoints[index];
  52189. if (isStart) {
  52190. result.push(tmp);
  52191. previous = tmp;
  52192. isStart = false;
  52193. } else {
  52194. if (tmp == previous + 1) {
  52195. if (index != max) {
  52196. previous = tmp;
  52197. continue;
  52198. } else {
  52199. isStart = true;
  52200. result.push(tmp + 1);
  52201. }
  52202. } else {
  52203. result.push(previous + 1, tmp);
  52204. previous = tmp;
  52205. }
  52206. }
  52207. }
  52208. if (!isStart) {
  52209. result.push(tmp + 1);
  52210. }
  52211. return result;
  52212. };
  52213. var dataRemove = function dataRemove(data, codePoint) {
  52214. var index = 0;
  52215. var start;
  52216. var end;
  52217. var length = data.length;
  52218. while (index < length) {
  52219. start = data[index];
  52220. end = data[index + 1];
  52221. if (codePoint >= start && codePoint < end) {
  52222. if (codePoint == start) {
  52223. if (end == start + 1) {
  52224. data.splice(index, 2);
  52225. return data;
  52226. } else {
  52227. data[index] = codePoint + 1;
  52228. return data;
  52229. }
  52230. } else if (codePoint == end - 1) {
  52231. data[index + 1] = codePoint;
  52232. return data;
  52233. } else {
  52234. data.splice(index, 2, start, codePoint, codePoint + 1, end);
  52235. return data;
  52236. }
  52237. }
  52238. index += 2;
  52239. }
  52240. return data;
  52241. };
  52242. var dataRemoveRange = function dataRemoveRange(data, rangeStart, rangeEnd) {
  52243. if (rangeEnd < rangeStart) {
  52244. throw Error(ERRORS.rangeOrder);
  52245. }
  52246. var index = 0;
  52247. var start;
  52248. var end;
  52249. while (index < data.length) {
  52250. start = data[index];
  52251. end = data[index + 1] - 1;
  52252. if (start > rangeEnd) {
  52253. return data;
  52254. }
  52255. if (rangeStart <= start && rangeEnd >= end) {
  52256. data.splice(index, 2);
  52257. continue;
  52258. }
  52259. if (rangeStart >= start && rangeEnd < end) {
  52260. if (rangeStart == start) {
  52261. data[index] = rangeEnd + 1;
  52262. data[index + 1] = end + 1;
  52263. return data;
  52264. }
  52265. data.splice(index, 2, start, rangeStart, rangeEnd + 1, end + 1);
  52266. return data;
  52267. }
  52268. if (rangeStart >= start && rangeStart <= end) {
  52269. data[index + 1] = rangeStart;
  52270. } else if (rangeEnd >= start && rangeEnd <= end) {
  52271. data[index] = rangeEnd + 1;
  52272. return data;
  52273. }
  52274. index += 2;
  52275. }
  52276. return data;
  52277. };
  52278. var dataAdd = function dataAdd(data, codePoint) {
  52279. var index = 0;
  52280. var start;
  52281. var end;
  52282. var lastIndex = null;
  52283. var length = data.length;
  52284. if (codePoint < 0x0 || codePoint > 0x10FFFF) {
  52285. throw RangeError(ERRORS.codePointRange);
  52286. }
  52287. while (index < length) {
  52288. start = data[index];
  52289. end = data[index + 1];
  52290. if (codePoint >= start && codePoint < end) {
  52291. return data;
  52292. }
  52293. if (codePoint == start - 1) {
  52294. data[index] = codePoint;
  52295. return data;
  52296. }
  52297. if (start > codePoint) {
  52298. data.splice(lastIndex != null ? lastIndex + 2 : 0, 0, codePoint, codePoint + 1);
  52299. return data;
  52300. }
  52301. if (codePoint == end) {
  52302. if (codePoint + 1 == data[index + 2]) {
  52303. data.splice(index, 4, start, data[index + 3]);
  52304. return data;
  52305. }
  52306. data[index + 1] = codePoint + 1;
  52307. return data;
  52308. }
  52309. lastIndex = index;
  52310. index += 2;
  52311. }
  52312. data.push(codePoint, codePoint + 1);
  52313. return data;
  52314. };
  52315. var dataAddData = function dataAddData(dataA, dataB) {
  52316. var index = 0;
  52317. var start;
  52318. var end;
  52319. var data = dataA.slice();
  52320. var length = dataB.length;
  52321. while (index < length) {
  52322. start = dataB[index];
  52323. end = dataB[index + 1] - 1;
  52324. if (start == end) {
  52325. data = dataAdd(data, start);
  52326. } else {
  52327. data = dataAddRange(data, start, end);
  52328. }
  52329. index += 2;
  52330. }
  52331. return data;
  52332. };
  52333. var dataRemoveData = function dataRemoveData(dataA, dataB) {
  52334. var index = 0;
  52335. var start;
  52336. var end;
  52337. var data = dataA.slice();
  52338. var length = dataB.length;
  52339. while (index < length) {
  52340. start = dataB[index];
  52341. end = dataB[index + 1] - 1;
  52342. if (start == end) {
  52343. data = dataRemove(data, start);
  52344. } else {
  52345. data = dataRemoveRange(data, start, end);
  52346. }
  52347. index += 2;
  52348. }
  52349. return data;
  52350. };
  52351. var dataAddRange = function dataAddRange(data, rangeStart, rangeEnd) {
  52352. if (rangeEnd < rangeStart) {
  52353. throw Error(ERRORS.rangeOrder);
  52354. }
  52355. if (rangeStart < 0x0 || rangeStart > 0x10FFFF || rangeEnd < 0x0 || rangeEnd > 0x10FFFF) {
  52356. throw RangeError(ERRORS.codePointRange);
  52357. }
  52358. var index = 0;
  52359. var start;
  52360. var end;
  52361. var added = false;
  52362. var length = data.length;
  52363. while (index < length) {
  52364. start = data[index];
  52365. end = data[index + 1];
  52366. if (added) {
  52367. if (start == rangeEnd + 1) {
  52368. data.splice(index - 1, 2);
  52369. return data;
  52370. }
  52371. if (start > rangeEnd) {
  52372. return data;
  52373. }
  52374. if (start >= rangeStart && start <= rangeEnd) {
  52375. if (end > rangeStart && end - 1 <= rangeEnd) {
  52376. data.splice(index, 2);
  52377. index -= 2;
  52378. } else {
  52379. data.splice(index - 1, 2);
  52380. index -= 2;
  52381. }
  52382. }
  52383. } else if (start == rangeEnd + 1) {
  52384. data[index] = rangeStart;
  52385. return data;
  52386. } else if (start > rangeEnd) {
  52387. data.splice(index, 0, rangeStart, rangeEnd + 1);
  52388. return data;
  52389. } else if (rangeStart >= start && rangeStart < end && rangeEnd + 1 <= end) {
  52390. return data;
  52391. } else if (rangeStart >= start && rangeStart < end || end == rangeStart) {
  52392. data[index + 1] = rangeEnd + 1;
  52393. added = true;
  52394. } else if (rangeStart <= start && rangeEnd + 1 >= end) {
  52395. data[index] = rangeStart;
  52396. data[index + 1] = rangeEnd + 1;
  52397. added = true;
  52398. }
  52399. index += 2;
  52400. }
  52401. if (!added) {
  52402. data.push(rangeStart, rangeEnd + 1);
  52403. }
  52404. return data;
  52405. };
  52406. var dataContains = function dataContains(data, codePoint) {
  52407. var index = 0;
  52408. var length = data.length;
  52409. var start = data[index];
  52410. var end = data[length - 1];
  52411. if (length >= 2) {
  52412. if (codePoint < start || codePoint > end) {
  52413. return false;
  52414. }
  52415. }
  52416. while (index < length) {
  52417. start = data[index];
  52418. end = data[index + 1];
  52419. if (codePoint >= start && codePoint < end) {
  52420. return true;
  52421. }
  52422. index += 2;
  52423. }
  52424. return false;
  52425. };
  52426. var dataIntersection = function dataIntersection(data, codePoints) {
  52427. var index = 0;
  52428. var length = codePoints.length;
  52429. var codePoint;
  52430. var result = [];
  52431. while (index < length) {
  52432. codePoint = codePoints[index];
  52433. if (dataContains(data, codePoint)) {
  52434. result.push(codePoint);
  52435. }
  52436. ++index;
  52437. }
  52438. return dataFromCodePoints(result);
  52439. };
  52440. var dataIsEmpty = function dataIsEmpty(data) {
  52441. return !data.length;
  52442. };
  52443. var dataIsSingleton = function dataIsSingleton(data) {
  52444. return data.length == 2 && data[0] + 1 == data[1];
  52445. };
  52446. var dataToArray = function dataToArray(data) {
  52447. var index = 0;
  52448. var start;
  52449. var end;
  52450. var result = [];
  52451. var length = data.length;
  52452. while (index < length) {
  52453. start = data[index];
  52454. end = data[index + 1];
  52455. while (start < end) {
  52456. result.push(start);
  52457. ++start;
  52458. }
  52459. index += 2;
  52460. }
  52461. return result;
  52462. };
  52463. var floor = Math.floor;
  52464. var highSurrogate = function highSurrogate(codePoint) {
  52465. return parseInt(floor((codePoint - 0x10000) / 0x400) + HIGH_SURROGATE_MIN, 10);
  52466. };
  52467. var lowSurrogate = function lowSurrogate(codePoint) {
  52468. return parseInt((codePoint - 0x10000) % 0x400 + LOW_SURROGATE_MIN, 10);
  52469. };
  52470. var stringFromCharCode = String.fromCharCode;
  52471. var codePointToString = function codePointToString(codePoint) {
  52472. var string;
  52473. if (codePoint == 0x09) {
  52474. string = '\\t';
  52475. } else if (codePoint == 0x0A) {
  52476. string = '\\n';
  52477. } else if (codePoint == 0x0C) {
  52478. string = '\\f';
  52479. } else if (codePoint == 0x0D) {
  52480. string = '\\r';
  52481. } else if (codePoint == 0x2D) {
  52482. string = '\\x2D';
  52483. } else if (codePoint == 0x5C) {
  52484. string = '\\\\';
  52485. } else if (codePoint == 0x24 || codePoint >= 0x28 && codePoint <= 0x2B || codePoint == 0x2E || codePoint == 0x2F || codePoint == 0x3F || codePoint >= 0x5B && codePoint <= 0x5E || codePoint >= 0x7B && codePoint <= 0x7D) {
  52486. string = '\\' + stringFromCharCode(codePoint);
  52487. } else if (codePoint >= 0x20 && codePoint <= 0x7E) {
  52488. string = stringFromCharCode(codePoint);
  52489. } else if (codePoint <= 0xFF) {
  52490. string = '\\x' + pad(hex(codePoint), 2);
  52491. } else {
  52492. string = "\\u" + pad(hex(codePoint), 4);
  52493. }
  52494. return string;
  52495. };
  52496. var codePointToStringUnicode = function codePointToStringUnicode(codePoint) {
  52497. if (codePoint <= 0xFFFF) {
  52498. return codePointToString(codePoint);
  52499. }
  52500. return "\\u{" + codePoint.toString(16).toUpperCase() + '}';
  52501. };
  52502. var symbolToCodePoint = function symbolToCodePoint(symbol) {
  52503. var length = symbol.length;
  52504. var first = symbol.charCodeAt(0);
  52505. var second;
  52506. if (first >= HIGH_SURROGATE_MIN && first <= HIGH_SURROGATE_MAX && length > 1) {
  52507. second = symbol.charCodeAt(1);
  52508. return (first - HIGH_SURROGATE_MIN) * 0x400 + second - LOW_SURROGATE_MIN + 0x10000;
  52509. }
  52510. return first;
  52511. };
  52512. var createBMPCharacterClasses = function createBMPCharacterClasses(data) {
  52513. var result = '';
  52514. var index = 0;
  52515. var start;
  52516. var end;
  52517. var length = data.length;
  52518. if (dataIsSingleton(data)) {
  52519. return codePointToString(data[0]);
  52520. }
  52521. while (index < length) {
  52522. start = data[index];
  52523. end = data[index + 1] - 1;
  52524. if (start == end) {
  52525. result += codePointToString(start);
  52526. } else if (start + 1 == end) {
  52527. result += codePointToString(start) + codePointToString(end);
  52528. } else {
  52529. result += codePointToString(start) + '-' + codePointToString(end);
  52530. }
  52531. index += 2;
  52532. }
  52533. return '[' + result + ']';
  52534. };
  52535. var createUnicodeCharacterClasses = function createUnicodeCharacterClasses(data) {
  52536. var result = '';
  52537. var index = 0;
  52538. var start;
  52539. var end;
  52540. var length = data.length;
  52541. if (dataIsSingleton(data)) {
  52542. return codePointToStringUnicode(data[0]);
  52543. }
  52544. while (index < length) {
  52545. start = data[index];
  52546. end = data[index + 1] - 1;
  52547. if (start == end) {
  52548. result += codePointToStringUnicode(start);
  52549. } else if (start + 1 == end) {
  52550. result += codePointToStringUnicode(start) + codePointToStringUnicode(end);
  52551. } else {
  52552. result += codePointToStringUnicode(start) + '-' + codePointToStringUnicode(end);
  52553. }
  52554. index += 2;
  52555. }
  52556. return '[' + result + ']';
  52557. };
  52558. var splitAtBMP = function splitAtBMP(data) {
  52559. var loneHighSurrogates = [];
  52560. var loneLowSurrogates = [];
  52561. var bmp = [];
  52562. var astral = [];
  52563. var index = 0;
  52564. var start;
  52565. var end;
  52566. var length = data.length;
  52567. while (index < length) {
  52568. start = data[index];
  52569. end = data[index + 1] - 1;
  52570. if (start < HIGH_SURROGATE_MIN) {
  52571. if (end < HIGH_SURROGATE_MIN) {
  52572. bmp.push(start, end + 1);
  52573. }
  52574. if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) {
  52575. bmp.push(start, HIGH_SURROGATE_MIN);
  52576. loneHighSurrogates.push(HIGH_SURROGATE_MIN, end + 1);
  52577. }
  52578. if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {
  52579. bmp.push(start, HIGH_SURROGATE_MIN);
  52580. loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1);
  52581. loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1);
  52582. }
  52583. if (end > LOW_SURROGATE_MAX) {
  52584. bmp.push(start, HIGH_SURROGATE_MIN);
  52585. loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1);
  52586. loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1);
  52587. if (end <= 0xFFFF) {
  52588. bmp.push(LOW_SURROGATE_MAX + 1, end + 1);
  52589. } else {
  52590. bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);
  52591. astral.push(0xFFFF + 1, end + 1);
  52592. }
  52593. }
  52594. } else if (start >= HIGH_SURROGATE_MIN && start <= HIGH_SURROGATE_MAX) {
  52595. if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) {
  52596. loneHighSurrogates.push(start, end + 1);
  52597. }
  52598. if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {
  52599. loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1);
  52600. loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1);
  52601. }
  52602. if (end > LOW_SURROGATE_MAX) {
  52603. loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1);
  52604. loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1);
  52605. if (end <= 0xFFFF) {
  52606. bmp.push(LOW_SURROGATE_MAX + 1, end + 1);
  52607. } else {
  52608. bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);
  52609. astral.push(0xFFFF + 1, end + 1);
  52610. }
  52611. }
  52612. } else if (start >= LOW_SURROGATE_MIN && start <= LOW_SURROGATE_MAX) {
  52613. if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {
  52614. loneLowSurrogates.push(start, end + 1);
  52615. }
  52616. if (end > LOW_SURROGATE_MAX) {
  52617. loneLowSurrogates.push(start, LOW_SURROGATE_MAX + 1);
  52618. if (end <= 0xFFFF) {
  52619. bmp.push(LOW_SURROGATE_MAX + 1, end + 1);
  52620. } else {
  52621. bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);
  52622. astral.push(0xFFFF + 1, end + 1);
  52623. }
  52624. }
  52625. } else if (start > LOW_SURROGATE_MAX && start <= 0xFFFF) {
  52626. if (end <= 0xFFFF) {
  52627. bmp.push(start, end + 1);
  52628. } else {
  52629. bmp.push(start, 0xFFFF + 1);
  52630. astral.push(0xFFFF + 1, end + 1);
  52631. }
  52632. } else {
  52633. astral.push(start, end + 1);
  52634. }
  52635. index += 2;
  52636. }
  52637. return {
  52638. 'loneHighSurrogates': loneHighSurrogates,
  52639. 'loneLowSurrogates': loneLowSurrogates,
  52640. 'bmp': bmp,
  52641. 'astral': astral
  52642. };
  52643. };
  52644. var optimizeSurrogateMappings = function optimizeSurrogateMappings(surrogateMappings) {
  52645. var result = [];
  52646. var tmpLow = [];
  52647. var addLow = false;
  52648. var mapping;
  52649. var nextMapping;
  52650. var highSurrogates;
  52651. var lowSurrogates;
  52652. var nextHighSurrogates;
  52653. var nextLowSurrogates;
  52654. var index = -1;
  52655. var length = surrogateMappings.length;
  52656. while (++index < length) {
  52657. mapping = surrogateMappings[index];
  52658. nextMapping = surrogateMappings[index + 1];
  52659. if (!nextMapping) {
  52660. result.push(mapping);
  52661. continue;
  52662. }
  52663. highSurrogates = mapping[0];
  52664. lowSurrogates = mapping[1];
  52665. nextHighSurrogates = nextMapping[0];
  52666. nextLowSurrogates = nextMapping[1];
  52667. tmpLow = lowSurrogates;
  52668. while (nextHighSurrogates && highSurrogates[0] == nextHighSurrogates[0] && highSurrogates[1] == nextHighSurrogates[1]) {
  52669. if (dataIsSingleton(nextLowSurrogates)) {
  52670. tmpLow = dataAdd(tmpLow, nextLowSurrogates[0]);
  52671. } else {
  52672. tmpLow = dataAddRange(tmpLow, nextLowSurrogates[0], nextLowSurrogates[1] - 1);
  52673. }
  52674. ++index;
  52675. mapping = surrogateMappings[index];
  52676. highSurrogates = mapping[0];
  52677. lowSurrogates = mapping[1];
  52678. nextMapping = surrogateMappings[index + 1];
  52679. nextHighSurrogates = nextMapping && nextMapping[0];
  52680. nextLowSurrogates = nextMapping && nextMapping[1];
  52681. addLow = true;
  52682. }
  52683. result.push([highSurrogates, addLow ? tmpLow : lowSurrogates]);
  52684. addLow = false;
  52685. }
  52686. return optimizeByLowSurrogates(result);
  52687. };
  52688. var optimizeByLowSurrogates = function optimizeByLowSurrogates(surrogateMappings) {
  52689. if (surrogateMappings.length == 1) {
  52690. return surrogateMappings;
  52691. }
  52692. var index = -1;
  52693. var innerIndex = -1;
  52694. while (++index < surrogateMappings.length) {
  52695. var mapping = surrogateMappings[index];
  52696. var lowSurrogates = mapping[1];
  52697. var lowSurrogateStart = lowSurrogates[0];
  52698. var lowSurrogateEnd = lowSurrogates[1];
  52699. innerIndex = index;
  52700. while (++innerIndex < surrogateMappings.length) {
  52701. var otherMapping = surrogateMappings[innerIndex];
  52702. var otherLowSurrogates = otherMapping[1];
  52703. var otherLowSurrogateStart = otherLowSurrogates[0];
  52704. var otherLowSurrogateEnd = otherLowSurrogates[1];
  52705. if (lowSurrogateStart == otherLowSurrogateStart && lowSurrogateEnd == otherLowSurrogateEnd) {
  52706. if (dataIsSingleton(otherMapping[0])) {
  52707. mapping[0] = dataAdd(mapping[0], otherMapping[0][0]);
  52708. } else {
  52709. mapping[0] = dataAddRange(mapping[0], otherMapping[0][0], otherMapping[0][1] - 1);
  52710. }
  52711. surrogateMappings.splice(innerIndex, 1);
  52712. --innerIndex;
  52713. }
  52714. }
  52715. }
  52716. return surrogateMappings;
  52717. };
  52718. var surrogateSet = function surrogateSet(data) {
  52719. if (!data.length) {
  52720. return [];
  52721. }
  52722. var index = 0;
  52723. var start;
  52724. var end;
  52725. var startHigh;
  52726. var startLow;
  52727. var endHigh;
  52728. var endLow;
  52729. var surrogateMappings = [];
  52730. var length = data.length;
  52731. while (index < length) {
  52732. start = data[index];
  52733. end = data[index + 1] - 1;
  52734. startHigh = highSurrogate(start);
  52735. startLow = lowSurrogate(start);
  52736. endHigh = highSurrogate(end);
  52737. endLow = lowSurrogate(end);
  52738. var startsWithLowestLowSurrogate = startLow == LOW_SURROGATE_MIN;
  52739. var endsWithHighestLowSurrogate = endLow == LOW_SURROGATE_MAX;
  52740. var complete = false;
  52741. if (startHigh == endHigh || startsWithLowestLowSurrogate && endsWithHighestLowSurrogate) {
  52742. surrogateMappings.push([[startHigh, endHigh + 1], [startLow, endLow + 1]]);
  52743. complete = true;
  52744. } else {
  52745. surrogateMappings.push([[startHigh, startHigh + 1], [startLow, LOW_SURROGATE_MAX + 1]]);
  52746. }
  52747. if (!complete && startHigh + 1 < endHigh) {
  52748. if (endsWithHighestLowSurrogate) {
  52749. surrogateMappings.push([[startHigh + 1, endHigh + 1], [LOW_SURROGATE_MIN, endLow + 1]]);
  52750. complete = true;
  52751. } else {
  52752. surrogateMappings.push([[startHigh + 1, endHigh], [LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1]]);
  52753. }
  52754. }
  52755. if (!complete) {
  52756. surrogateMappings.push([[endHigh, endHigh + 1], [LOW_SURROGATE_MIN, endLow + 1]]);
  52757. }
  52758. index += 2;
  52759. }
  52760. return optimizeSurrogateMappings(surrogateMappings);
  52761. };
  52762. var createSurrogateCharacterClasses = function createSurrogateCharacterClasses(surrogateMappings) {
  52763. var result = [];
  52764. forEach(surrogateMappings, function (surrogateMapping) {
  52765. var highSurrogates = surrogateMapping[0];
  52766. var lowSurrogates = surrogateMapping[1];
  52767. result.push(createBMPCharacterClasses(highSurrogates) + createBMPCharacterClasses(lowSurrogates));
  52768. });
  52769. return result.join('|');
  52770. };
  52771. var createCharacterClassesFromData = function createCharacterClassesFromData(data, bmpOnly, hasUnicodeFlag) {
  52772. if (hasUnicodeFlag) {
  52773. return createUnicodeCharacterClasses(data);
  52774. }
  52775. var result = [];
  52776. var parts = splitAtBMP(data);
  52777. var loneHighSurrogates = parts.loneHighSurrogates;
  52778. var loneLowSurrogates = parts.loneLowSurrogates;
  52779. var bmp = parts.bmp;
  52780. var astral = parts.astral;
  52781. var hasLoneHighSurrogates = !dataIsEmpty(loneHighSurrogates);
  52782. var hasLoneLowSurrogates = !dataIsEmpty(loneLowSurrogates);
  52783. var surrogateMappings = surrogateSet(astral);
  52784. if (bmpOnly) {
  52785. bmp = dataAddData(bmp, loneHighSurrogates);
  52786. hasLoneHighSurrogates = false;
  52787. bmp = dataAddData(bmp, loneLowSurrogates);
  52788. hasLoneLowSurrogates = false;
  52789. }
  52790. if (!dataIsEmpty(bmp)) {
  52791. result.push(createBMPCharacterClasses(bmp));
  52792. }
  52793. if (surrogateMappings.length) {
  52794. result.push(createSurrogateCharacterClasses(surrogateMappings));
  52795. }
  52796. if (hasLoneHighSurrogates) {
  52797. result.push(createBMPCharacterClasses(loneHighSurrogates) + "(?![\\uDC00-\\uDFFF])");
  52798. }
  52799. if (hasLoneLowSurrogates) {
  52800. result.push("(?:[^\\uD800-\\uDBFF]|^)" + createBMPCharacterClasses(loneLowSurrogates));
  52801. }
  52802. return result.join('|');
  52803. };
  52804. var regenerate = function regenerate(value) {
  52805. if (arguments.length > 1) {
  52806. value = slice.call(arguments);
  52807. }
  52808. if (this instanceof regenerate) {
  52809. this.data = [];
  52810. return value ? this.add(value) : this;
  52811. }
  52812. return new regenerate().add(value);
  52813. };
  52814. regenerate.version = '1.3.3';
  52815. var proto = regenerate.prototype;
  52816. extend(proto, {
  52817. 'add': function add(value) {
  52818. var $this = this;
  52819. if (value == null) {
  52820. return $this;
  52821. }
  52822. if (value instanceof regenerate) {
  52823. $this.data = dataAddData($this.data, value.data);
  52824. return $this;
  52825. }
  52826. if (arguments.length > 1) {
  52827. value = slice.call(arguments);
  52828. }
  52829. if (isArray(value)) {
  52830. forEach(value, function (item) {
  52831. $this.add(item);
  52832. });
  52833. return $this;
  52834. }
  52835. $this.data = dataAdd($this.data, isNumber(value) ? value : symbolToCodePoint(value));
  52836. return $this;
  52837. },
  52838. 'remove': function remove(value) {
  52839. var $this = this;
  52840. if (value == null) {
  52841. return $this;
  52842. }
  52843. if (value instanceof regenerate) {
  52844. $this.data = dataRemoveData($this.data, value.data);
  52845. return $this;
  52846. }
  52847. if (arguments.length > 1) {
  52848. value = slice.call(arguments);
  52849. }
  52850. if (isArray(value)) {
  52851. forEach(value, function (item) {
  52852. $this.remove(item);
  52853. });
  52854. return $this;
  52855. }
  52856. $this.data = dataRemove($this.data, isNumber(value) ? value : symbolToCodePoint(value));
  52857. return $this;
  52858. },
  52859. 'addRange': function addRange(start, end) {
  52860. var $this = this;
  52861. $this.data = dataAddRange($this.data, isNumber(start) ? start : symbolToCodePoint(start), isNumber(end) ? end : symbolToCodePoint(end));
  52862. return $this;
  52863. },
  52864. 'removeRange': function removeRange(start, end) {
  52865. var $this = this;
  52866. var startCodePoint = isNumber(start) ? start : symbolToCodePoint(start);
  52867. var endCodePoint = isNumber(end) ? end : symbolToCodePoint(end);
  52868. $this.data = dataRemoveRange($this.data, startCodePoint, endCodePoint);
  52869. return $this;
  52870. },
  52871. 'intersection': function intersection(argument) {
  52872. var $this = this;
  52873. var array = argument instanceof regenerate ? dataToArray(argument.data) : argument;
  52874. $this.data = dataIntersection($this.data, array);
  52875. return $this;
  52876. },
  52877. 'contains': function contains(codePoint) {
  52878. return dataContains(this.data, isNumber(codePoint) ? codePoint : symbolToCodePoint(codePoint));
  52879. },
  52880. 'clone': function clone() {
  52881. var set = new regenerate();
  52882. set.data = this.data.slice(0);
  52883. return set;
  52884. },
  52885. 'toString': function toString(options) {
  52886. var result = createCharacterClassesFromData(this.data, options ? options.bmpOnly : false, options ? options.hasUnicodeFlag : false);
  52887. if (!result) {
  52888. return '[]';
  52889. }
  52890. return result.replace(regexNull, '\\0$1');
  52891. },
  52892. 'toRegExp': function toRegExp(flags) {
  52893. var pattern = this.toString(flags && flags.indexOf('u') != -1 ? {
  52894. 'hasUnicodeFlag': true
  52895. } : null);
  52896. return RegExp(pattern, flags || '');
  52897. },
  52898. 'valueOf': function valueOf() {
  52899. return dataToArray(this.data);
  52900. }
  52901. });
  52902. proto.toArray = proto.valueOf;
  52903. if (freeExports && !freeExports.nodeType) {
  52904. if (freeModule) {
  52905. freeModule.exports = regenerate;
  52906. } else {
  52907. freeExports.regenerate = regenerate;
  52908. }
  52909. } else {
  52910. root.regenerate = regenerate;
  52911. }
  52912. })(commonjsGlobal);
  52913. });
  52914. 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']);
  52915. 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']]);
  52916. var matchProperty = function matchProperty(property) {
  52917. if (unicodeCanonicalPropertyNamesEcmascript.has(property)) {
  52918. return property;
  52919. }
  52920. if (unicodePropertyAliasesEcmascript.has(property)) {
  52921. return unicodePropertyAliasesEcmascript.get(property);
  52922. }
  52923. throw new Error("Unknown property: " + property);
  52924. };
  52925. var unicodeMatchPropertyEcmascript = matchProperty;
  52926. 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'], ['Copt', 'Coptic'], ['Qaac', 'Coptic'], ['Cprt', 'Cypriot'], ['Cyrl', 'Cyrillic'], ['Deva', 'Devanagari'], ['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'], ['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'], ['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'], ['Coptic', 'Coptic'], ['Cypriot', 'Cypriot'], ['Cyrillic', 'Cyrillic'], ['Devanagari', 'Devanagari'], ['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'], ['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'], ['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'], ['Copt', 'Coptic'], ['Qaac', 'Coptic'], ['Cprt', 'Cypriot'], ['Cyrl', 'Cyrillic'], ['Deva', 'Devanagari'], ['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'], ['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'], ['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'], ['Coptic', 'Coptic'], ['Cypriot', 'Cypriot'], ['Cyrillic', 'Cyrillic'], ['Devanagari', 'Devanagari'], ['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'], ['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'], ['Yi', 'Yi'], ['Zanabazar_Square', 'Zanabazar_Square'], ['Inherited', 'Inherited'], ['Common', 'Common'], ['Unknown', 'Unknown']])]]);
  52927. var matchPropertyValue = function matchPropertyValue(property, value) {
  52928. var aliasToValue = mappings.get(property);
  52929. if (!aliasToValue) {
  52930. throw new Error("Unknown property `" + property + "`.");
  52931. }
  52932. var canonicalValue = aliasToValue.get(value);
  52933. if (canonicalValue) {
  52934. return canonicalValue;
  52935. }
  52936. throw new Error("Unknown value `" + value + "` for property `" + property + "`.");
  52937. };
  52938. var unicodeMatchPropertyValueEcmascript = matchPropertyValue;
  52939. 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], [0x26A, 0xA7AE], [0x282, 0xA7C5], [0x29D, 0xA7B2], [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], [0x432, 0x1C80], [0x434, 0x1C81], [0x43E, 0x1C82], [0x441, 0x1C83], [0x442, [0x1C84, 0x1C85]], [0x44A, 0x1C86], [0x462, 0x1C87], [0x463, 0x1C87], [0x10D0, 0x1C90], [0x10D1, 0x1C91], [0x10D2, 0x1C92], [0x10D3, 0x1C93], [0x10D4, 0x1C94], [0x10D5, 0x1C95], [0x10D6, 0x1C96], [0x10D7, 0x1C97], [0x10D8, 0x1C98], [0x10D9, 0x1C99], [0x10DA, 0x1C9A], [0x10DB, 0x1C9B], [0x10DC, 0x1C9C], [0x10DD, 0x1C9D], [0x10DE, 0x1C9E], [0x10DF, 0x1C9F], [0x10E0, 0x1CA0], [0x10E1, 0x1CA1], [0x10E2, 0x1CA2], [0x10E3, 0x1CA3], [0x10E4, 0x1CA4], [0x10E5, 0x1CA5], [0x10E6, 0x1CA6], [0x10E7, 0x1CA7], [0x10E8, 0x1CA8], [0x10E9, 0x1CA9], [0x10EA, 0x1CAA], [0x10EB, 0x1CAB], [0x10EC, 0x1CAC], [0x10ED, 0x1CAD], [0x10EE, 0x1CAE], [0x10EF, 0x1CAF], [0x10F0, 0x1CB0], [0x10F1, 0x1CB1], [0x10F2, 0x1CB2], [0x10F3, 0x1CB3], [0x10F4, 0x1CB4], [0x10F5, 0x1CB5], [0x10F6, 0x1CB6], [0x10F7, 0x1CB7], [0x10F8, 0x1CB8], [0x10F9, 0x1CB9], [0x10FA, 0x1CBA], [0x10FD, 0x1CBD], [0x10FE, 0x1CBE], [0x10FF, 0x1CBF], [0x13A0, 0xAB70], [0x13A1, 0xAB71], [0x13A2, 0xAB72], [0x13A3, 0xAB73], [0x13A4, 0xAB74], [0x13A5, 0xAB75], [0x13A6, 0xAB76], [0x13A7, 0xAB77], [0x13A8, 0xAB78], [0x13A9, 0xAB79], [0x13AA, 0xAB7A], [0x13AB, 0xAB7B], [0x13AC, 0xAB7C], [0x13AD, 0xAB7D], [0x13AE, 0xAB7E], [0x13AF, 0xAB7F], [0x13B0, 0xAB80], [0x13B1, 0xAB81], [0x13B2, 0xAB82], [0x13B3, 0xAB83], [0x13B4, 0xAB84], [0x13B5, 0xAB85], [0x13B6, 0xAB86], [0x13B7, 0xAB87], [0x13B8, 0xAB88], [0x13B9, 0xAB89], [0x13BA, 0xAB8A], [0x13BB, 0xAB8B], [0x13BC, 0xAB8C], [0x13BD, 0xAB8D], [0x13BE, 0xAB8E], [0x13BF, 0xAB8F], [0x13C0, 0xAB90], [0x13C1, 0xAB91], [0x13C2, 0xAB92], [0x13C3, 0xAB93], [0x13C4, 0xAB94], [0x13C5, 0xAB95], [0x13C6, 0xAB96], [0x13C7, 0xAB97], [0x13C8, 0xAB98], [0x13C9, 0xAB99], [0x13CA, 0xAB9A], [0x13CB, 0xAB9B], [0x13CC, 0xAB9C], [0x13CD, 0xAB9D], [0x13CE, 0xAB9E], [0x13CF, 0xAB9F], [0x13D0, 0xABA0], [0x13D1, 0xABA1], [0x13D2, 0xABA2], [0x13D3, 0xABA3], [0x13D4, 0xABA4], [0x13D5, 0xABA5], [0x13D6, 0xABA6], [0x13D7, 0xABA7], [0x13D8, 0xABA8], [0x13D9, 0xABA9], [0x13DA, 0xABAA], [0x13DB, 0xABAB], [0x13DC, 0xABAC], [0x13DD, 0xABAD], [0x13DE, 0xABAE], [0x13DF, 0xABAF], [0x13E0, 0xABB0], [0x13E1, 0xABB1], [0x13E2, 0xABB2], [0x13E3, 0xABB3], [0x13E4, 0xABB4], [0x13E5, 0xABB5], [0x13E6, 0xABB6], [0x13E7, 0xABB7], [0x13E8, 0xABB8], [0x13E9, 0xABB9], [0x13EA, 0xABBA], [0x13EB, 0xABBB], [0x13EC, 0xABBC], [0x13ED, 0xABBD], [0x13EE, 0xABBE], [0x13EF, 0xABBF], [0x13F0, 0x13F8], [0x13F1, 0x13F9], [0x13F2, 0x13FA], [0x13F3, 0x13FB], [0x13F4, 0x13FC], [0x13F5, 0x13FD], [0x13F8, 0x13F0], [0x13F9, 0x13F1], [0x13FA, 0x13F2], [0x13FB, 0x13F3], [0x13FC, 0x13F4], [0x13FD, 0x13F5], [0x1C80, [0x412, 0x432]], [0x1C81, [0x414, 0x434]], [0x1C82, [0x41E, 0x43E]], [0x1C83, [0x421, 0x441]], [0x1C84, [0x1C85, 0x442]], [0x1C85, [0x422, 0x1C84, 0x442]], [0x1C86, [0x42A, 0x44A]], [0x1C87, [0x462, 0x463]], [0x1C88, [0xA64A, 0xA64B]], [0x1C90, 0x10D0], [0x1C91, 0x10D1], [0x1C92, 0x10D2], [0x1C93, 0x10D3], [0x1C94, 0x10D4], [0x1C95, 0x10D5], [0x1C96, 0x10D6], [0x1C97, 0x10D7], [0x1C98, 0x10D8], [0x1C99, 0x10D9], [0x1C9A, 0x10DA], [0x1C9B, 0x10DB], [0x1C9C, 0x10DC], [0x1C9D, 0x10DD], [0x1C9E, 0x10DE], [0x1C9F, 0x10DF], [0x1CA0, 0x10E0], [0x1CA1, 0x10E1], [0x1CA2, 0x10E2], [0x1CA3, 0x10E3], [0x1CA4, 0x10E4], [0x1CA5, 0x10E5], [0x1CA6, 0x10E6], [0x1CA7, 0x10E7], [0x1CA8, 0x10E8], [0x1CA9, 0x10E9], [0x1CAA, 0x10EA], [0x1CAB, 0x10EB], [0x1CAC, 0x10EC], [0x1CAD, 0x10ED], [0x1CAE, 0x10EE], [0x1CAF, 0x10EF], [0x1CB0, 0x10F0], [0x1CB1, 0x10F1], [0x1CB2, 0x10F2], [0x1CB3, 0x10F3], [0x1CB4, 0x10F4], [0x1CB5, 0x10F5], [0x1CB6, 0x10F6], [0x1CB7, 0x10F7], [0x1CB8, 0x10F8], [0x1CB9, 0x10F9], [0x1CBA, 0x10FA], [0x1CBD, 0x10FD], [0x1CBE, 0x10FE], [0x1CBF, 0x10FF], [0x1D8E, 0xA7C6], [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], [0xA64B, 0x1C88], [0xA794, 0xA7C4], [0xA7AE, 0x26A], [0xA7B2, 0x29D], [0xA7B3, 0xAB53], [0xA7B4, 0xA7B5], [0xA7B5, 0xA7B4], [0xA7B6, 0xA7B7], [0xA7B7, 0xA7B6], [0xA7B8, 0xA7B9], [0xA7B9, 0xA7B8], [0xA7BA, 0xA7BB], [0xA7BB, 0xA7BA], [0xA7BC, 0xA7BD], [0xA7BD, 0xA7BC], [0xA7BE, 0xA7BF], [0xA7BF, 0xA7BE], [0xA7C2, 0xA7C3], [0xA7C3, 0xA7C2], [0xA7C4, 0xA794], [0xA7C5, 0x282], [0xA7C6, 0x1D8E], [0xAB53, 0xA7B3], [0xAB70, 0x13A0], [0xAB71, 0x13A1], [0xAB72, 0x13A2], [0xAB73, 0x13A3], [0xAB74, 0x13A4], [0xAB75, 0x13A5], [0xAB76, 0x13A6], [0xAB77, 0x13A7], [0xAB78, 0x13A8], [0xAB79, 0x13A9], [0xAB7A, 0x13AA], [0xAB7B, 0x13AB], [0xAB7C, 0x13AC], [0xAB7D, 0x13AD], [0xAB7E, 0x13AE], [0xAB7F, 0x13AF], [0xAB80, 0x13B0], [0xAB81, 0x13B1], [0xAB82, 0x13B2], [0xAB83, 0x13B3], [0xAB84, 0x13B4], [0xAB85, 0x13B5], [0xAB86, 0x13B6], [0xAB87, 0x13B7], [0xAB88, 0x13B8], [0xAB89, 0x13B9], [0xAB8A, 0x13BA], [0xAB8B, 0x13BB], [0xAB8C, 0x13BC], [0xAB8D, 0x13BD], [0xAB8E, 0x13BE], [0xAB8F, 0x13BF], [0xAB90, 0x13C0], [0xAB91, 0x13C1], [0xAB92, 0x13C2], [0xAB93, 0x13C3], [0xAB94, 0x13C4], [0xAB95, 0x13C5], [0xAB96, 0x13C6], [0xAB97, 0x13C7], [0xAB98, 0x13C8], [0xAB99, 0x13C9], [0xAB9A, 0x13CA], [0xAB9B, 0x13CB], [0xAB9C, 0x13CC], [0xAB9D, 0x13CD], [0xAB9E, 0x13CE], [0xAB9F, 0x13CF], [0xABA0, 0x13D0], [0xABA1, 0x13D1], [0xABA2, 0x13D2], [0xABA3, 0x13D3], [0xABA4, 0x13D4], [0xABA5, 0x13D5], [0xABA6, 0x13D6], [0xABA7, 0x13D7], [0xABA8, 0x13D8], [0xABA9, 0x13D9], [0xABAA, 0x13DA], [0xABAB, 0x13DB], [0xABAC, 0x13DC], [0xABAD, 0x13DD], [0xABAE, 0x13DE], [0xABAF, 0x13DF], [0xABB0, 0x13E0], [0xABB1, 0x13E1], [0xABB2, 0x13E2], [0xABB3, 0x13E3], [0xABB4, 0x13E4], [0xABB5, 0x13E5], [0xABB6, 0x13E6], [0xABB7, 0x13E7], [0xABB8, 0x13E8], [0xABB9, 0x13E9], [0xABBA, 0x13EA], [0xABBB, 0x13EB], [0xABBC, 0x13EC], [0xABBD, 0x13ED], [0xABBE, 0x13EE], [0xABBF, 0x13EF], [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]]);
  52940. 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)]]);
  52941. 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)]]);
  52942. 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)]]);
  52943. var characterClassEscapeSets = {
  52944. REGULAR: REGULAR,
  52945. UNICODE: UNICODE,
  52946. UNICODE_IGNORE_CASE: UNICODE_IGNORE_CASE
  52947. };
  52948. var generate = regjsgen.generate;
  52949. var parse$4 = parser$1.parse;
  52950. var UNICODE_SET = regenerate().addRange(0x0, 0x10FFFF);
  52951. var BMP_SET = regenerate().addRange(0x0, 0xFFFF);
  52952. var DOT_SET_UNICODE = UNICODE_SET.clone().remove(0x000A, 0x000D, 0x2028, 0x2029);
  52953. var getCharacterClassEscapeSet = function getCharacterClassEscapeSet(character, unicode, ignoreCase) {
  52954. if (unicode) {
  52955. if (ignoreCase) {
  52956. return characterClassEscapeSets.UNICODE_IGNORE_CASE.get(character);
  52957. }
  52958. return characterClassEscapeSets.UNICODE.get(character);
  52959. }
  52960. return characterClassEscapeSets.REGULAR.get(character);
  52961. };
  52962. var getUnicodeDotSet = function getUnicodeDotSet(dotAll) {
  52963. return dotAll ? UNICODE_SET : DOT_SET_UNICODE;
  52964. };
  52965. var getUnicodePropertyValueSet = function getUnicodePropertyValueSet(property, value) {
  52966. var path = value ? property + "/" + value : "Binary_Property/" + property;
  52967. try {
  52968. return commonjsRequire("regenerate-unicode-properties/" + path + ".js");
  52969. } catch (exception) {
  52970. throw new Error("Failed to recognize value `" + value + "` for property " + ("`" + property + "`."));
  52971. }
  52972. };
  52973. var handleLoneUnicodePropertyNameOrValue = function handleLoneUnicodePropertyNameOrValue(value) {
  52974. try {
  52975. var _property = 'General_Category';
  52976. var category = unicodeMatchPropertyValueEcmascript(_property, value);
  52977. return getUnicodePropertyValueSet(_property, category);
  52978. } catch (exception) {}
  52979. var property = unicodeMatchPropertyEcmascript(value);
  52980. return getUnicodePropertyValueSet(property);
  52981. };
  52982. var getUnicodePropertyEscapeSet = function getUnicodePropertyEscapeSet(value, isNegative) {
  52983. var parts = value.split('=');
  52984. var firstPart = parts[0];
  52985. var set;
  52986. if (parts.length == 1) {
  52987. set = handleLoneUnicodePropertyNameOrValue(firstPart);
  52988. } else {
  52989. var property = unicodeMatchPropertyEcmascript(firstPart);
  52990. var _value = unicodeMatchPropertyValueEcmascript(property, parts[1]);
  52991. set = getUnicodePropertyValueSet(property, _value);
  52992. }
  52993. if (isNegative) {
  52994. return UNICODE_SET.clone().remove(set);
  52995. }
  52996. return set.clone();
  52997. };
  52998. regenerate.prototype.iuAddRange = function (min, max) {
  52999. var $this = this;
  53000. do {
  53001. var folded = caseFold(min);
  53002. if (folded) {
  53003. $this.add(folded);
  53004. }
  53005. } while (++min <= max);
  53006. return $this;
  53007. };
  53008. var update = function update(item, pattern) {
  53009. var tree = parse$4(pattern, config$1.useUnicodeFlag ? 'u' : '');
  53010. switch (tree.type) {
  53011. case 'characterClass':
  53012. case 'group':
  53013. case 'value':
  53014. break;
  53015. default:
  53016. tree = wrap$1(tree, pattern);
  53017. }
  53018. Object.assign(item, tree);
  53019. };
  53020. var wrap$1 = function wrap(tree, pattern) {
  53021. return {
  53022. 'type': 'group',
  53023. 'behavior': 'ignore',
  53024. 'body': [tree],
  53025. 'raw': "(?:" + pattern + ")"
  53026. };
  53027. };
  53028. var caseFold = function caseFold(codePoint) {
  53029. return iuMappings.get(codePoint) || false;
  53030. };
  53031. var processCharacterClass = function processCharacterClass(characterClassItem, regenerateOptions) {
  53032. var set = regenerate();
  53033. for (var _iterator = characterClassItem.body, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  53034. var _ref;
  53035. if (_isArray) {
  53036. if (_i >= _iterator.length) break;
  53037. _ref = _iterator[_i++];
  53038. } else {
  53039. _i = _iterator.next();
  53040. if (_i.done) break;
  53041. _ref = _i.value;
  53042. }
  53043. var item = _ref;
  53044. switch (item.type) {
  53045. case 'value':
  53046. set.add(item.codePoint);
  53047. if (config$1.ignoreCase && config$1.unicode && !config$1.useUnicodeFlag) {
  53048. var folded = caseFold(item.codePoint);
  53049. if (folded) {
  53050. set.add(folded);
  53051. }
  53052. }
  53053. break;
  53054. case 'characterClassRange':
  53055. var min = item.min.codePoint;
  53056. var max = item.max.codePoint;
  53057. set.addRange(min, max);
  53058. if (config$1.ignoreCase && config$1.unicode && !config$1.useUnicodeFlag) {
  53059. set.iuAddRange(min, max);
  53060. }
  53061. break;
  53062. case 'characterClassEscape':
  53063. set.add(getCharacterClassEscapeSet(item.value, config$1.unicode, config$1.ignoreCase));
  53064. break;
  53065. case 'unicodePropertyEscape':
  53066. set.add(getUnicodePropertyEscapeSet(item.value, item.negative));
  53067. break;
  53068. default:
  53069. throw new Error("Unknown term type: " + item.type);
  53070. }
  53071. }
  53072. if (characterClassItem.negative) {
  53073. set = (config$1.unicode ? UNICODE_SET : BMP_SET).clone().remove(set);
  53074. }
  53075. update(characterClassItem, set.toString(regenerateOptions));
  53076. return characterClassItem;
  53077. };
  53078. var updateNamedReference = function updateNamedReference(item, index) {
  53079. delete item.name;
  53080. item.matchIndex = index;
  53081. };
  53082. var assertNoUnmatchedReferences = function assertNoUnmatchedReferences(groups) {
  53083. var unmatchedReferencesNames = Object.keys(groups.unmatchedReferences);
  53084. if (unmatchedReferencesNames.length > 0) {
  53085. throw new Error("Unknown group names: " + unmatchedReferencesNames);
  53086. }
  53087. };
  53088. var processTerm = function processTerm(item, regenerateOptions, groups) {
  53089. switch (item.type) {
  53090. case 'dot':
  53091. if (config$1.unicode) {
  53092. update(item, getUnicodeDotSet(config$1.dotAll).toString(regenerateOptions));
  53093. } else if (config$1.dotAll) {
  53094. update(item, '[\\s\\S]');
  53095. }
  53096. break;
  53097. case 'characterClass':
  53098. item = processCharacterClass(item, regenerateOptions);
  53099. break;
  53100. case 'unicodePropertyEscape':
  53101. update(item, getUnicodePropertyEscapeSet(item.value, item.negative).toString(regenerateOptions));
  53102. break;
  53103. case 'characterClassEscape':
  53104. update(item, getCharacterClassEscapeSet(item.value, config$1.unicode, config$1.ignoreCase).toString(regenerateOptions));
  53105. break;
  53106. case 'group':
  53107. if (item.behavior == 'normal') {
  53108. groups.lastIndex++;
  53109. }
  53110. if (item.name) {
  53111. var name = item.name.value;
  53112. if (groups.names[name]) {
  53113. throw new Error("Multiple groups with the same name (" + name + ") are not allowed.");
  53114. }
  53115. var index = groups.lastIndex;
  53116. delete item.name;
  53117. groups.names[name] = index;
  53118. if (groups.onNamedGroup) {
  53119. groups.onNamedGroup.call(null, name, index);
  53120. }
  53121. if (groups.unmatchedReferences[name]) {
  53122. groups.unmatchedReferences[name].forEach(function (reference) {
  53123. updateNamedReference(reference, index);
  53124. });
  53125. delete groups.unmatchedReferences[name];
  53126. }
  53127. }
  53128. case 'alternative':
  53129. case 'disjunction':
  53130. case 'quantifier':
  53131. item.body = item.body.map(function (term) {
  53132. return processTerm(term, regenerateOptions, groups);
  53133. });
  53134. break;
  53135. case 'value':
  53136. var codePoint = item.codePoint;
  53137. var set = regenerate(codePoint);
  53138. if (config$1.ignoreCase && config$1.unicode && !config$1.useUnicodeFlag) {
  53139. var folded = caseFold(codePoint);
  53140. if (folded) {
  53141. set.add(folded);
  53142. }
  53143. }
  53144. update(item, set.toString(regenerateOptions));
  53145. break;
  53146. case 'reference':
  53147. if (item.name) {
  53148. var _name = item.name.value;
  53149. var _index = groups.names[_name];
  53150. if (_index) {
  53151. updateNamedReference(item, _index);
  53152. break;
  53153. }
  53154. if (!groups.unmatchedReferences[_name]) {
  53155. groups.unmatchedReferences[_name] = [];
  53156. }
  53157. groups.unmatchedReferences[_name].push(item);
  53158. }
  53159. break;
  53160. case 'anchor':
  53161. case 'empty':
  53162. case 'group':
  53163. break;
  53164. default:
  53165. throw new Error("Unknown term type: " + item.type);
  53166. }
  53167. return item;
  53168. };
  53169. var config$1 = {
  53170. 'ignoreCase': false,
  53171. 'unicode': false,
  53172. 'dotAll': false,
  53173. 'useUnicodeFlag': false
  53174. };
  53175. var rewritePattern = function rewritePattern(pattern, flags, options) {
  53176. var regjsparserFeatures = {
  53177. 'unicodePropertyEscape': options && options.unicodePropertyEscape,
  53178. 'namedGroups': options && options.namedGroup,
  53179. 'lookbehind': options && options.lookbehind
  53180. };
  53181. config$1.ignoreCase = flags && flags.includes('i');
  53182. config$1.unicode = flags && flags.includes('u');
  53183. var supportDotAllFlag = options && options.dotAllFlag;
  53184. config$1.dotAll = supportDotAllFlag && flags && flags.includes('s');
  53185. config$1.useUnicodeFlag = options && options.useUnicodeFlag;
  53186. var regenerateOptions = {
  53187. 'hasUnicodeFlag': config$1.useUnicodeFlag,
  53188. 'bmpOnly': !config$1.unicode
  53189. };
  53190. var groups = {
  53191. 'onNamedGroup': options && options.onNamedGroup,
  53192. 'lastIndex': 0,
  53193. 'names': Object.create(null),
  53194. 'unmatchedReferences': Object.create(null)
  53195. };
  53196. var tree = parse$4(pattern, flags, regjsparserFeatures);
  53197. processTerm(tree, regenerateOptions, groups);
  53198. assertNoUnmatchedReferences(groups);
  53199. return generate(tree);
  53200. };
  53201. var rewritePattern_1 = rewritePattern;
  53202. var FEATURES$1 = Object.freeze({
  53203. unicodeFlag: 1 << 0,
  53204. dotAllFlag: 1 << 1,
  53205. unicodePropertyEscape: 1 << 2,
  53206. namedCaptureGroups: 1 << 3
  53207. });
  53208. var featuresKey$1 = "@babel/plugin-regexp-features/featuresKey";
  53209. var runtimeKey = "@babel/plugin-regexp-features/runtimeKey";
  53210. function enableFeature$1(features, feature) {
  53211. return features | feature;
  53212. }
  53213. function hasFeature$1(features, feature) {
  53214. return !!(features & feature);
  53215. }
  53216. function generateRegexpuOptions(node, features) {
  53217. var useUnicodeFlag = false,
  53218. dotAllFlag = false,
  53219. unicodePropertyEscape = false,
  53220. namedGroup = false;
  53221. var flags = node.flags,
  53222. pattern = node.pattern;
  53223. var flagsIncludesU = flags.includes("u");
  53224. if (flagsIncludesU) {
  53225. if (!hasFeature$1(features, FEATURES$1.unicodeFlag)) {
  53226. useUnicodeFlag = true;
  53227. }
  53228. if (hasFeature$1(features, FEATURES$1.unicodePropertyEscape) && /\\[pP]{/.test(pattern)) {
  53229. unicodePropertyEscape = true;
  53230. }
  53231. }
  53232. if (hasFeature$1(features, FEATURES$1.dotAllFlag) && flags.indexOf("s") >= 0) {
  53233. dotAllFlag = true;
  53234. }
  53235. if (hasFeature$1(features, FEATURES$1.namedCaptureGroups) && /\(\?<(?![=!])/.test(pattern)) {
  53236. namedGroup = true;
  53237. }
  53238. if (!namedGroup && !unicodePropertyEscape && !dotAllFlag && (!flagsIncludesU || useUnicodeFlag)) {
  53239. return null;
  53240. }
  53241. if (flagsIncludesU && flags.indexOf("s") >= 0) {
  53242. dotAllFlag = true;
  53243. }
  53244. return {
  53245. useUnicodeFlag: useUnicodeFlag,
  53246. onNamedGroup: function onNamedGroup() {},
  53247. namedGroup: namedGroup,
  53248. unicodePropertyEscape: unicodePropertyEscape,
  53249. dotAllFlag: dotAllFlag,
  53250. lookbehind: true
  53251. };
  53252. }
  53253. var name$1 = "@babel/helper-create-regexp-features-plugin";
  53254. var version$5 = "7.8.3";
  53255. var author$1 = "The Babel Team (https://babeljs.io/team)";
  53256. var license$1 = "MIT";
  53257. var description$1 = "Compile ESNext Regular Expressions to ES5";
  53258. var repository$1 = {
  53259. type: "git",
  53260. url: "https://github.com/babel/babel",
  53261. directory: "packages/babel-helper-create-regexp-features-plugin"
  53262. };
  53263. var main$1 = "lib/index.js";
  53264. var publishConfig$1 = {
  53265. access: "public"
  53266. };
  53267. var keywords$2 = [
  53268. "babel",
  53269. "babel-plugin"
  53270. ];
  53271. var dependencies$1 = {
  53272. "@babel/helper-regex": "^7.8.3",
  53273. "regexpu-core": "^4.6.0"
  53274. };
  53275. var peerDependencies$1 = {
  53276. "@babel/core": "^7.0.0"
  53277. };
  53278. var devDependencies$1 = {
  53279. "@babel/core": "^7.8.3",
  53280. "@babel/helper-plugin-test-runner": "^7.8.3"
  53281. };
  53282. var gitHead$1 = "a7620bd266ae1345975767bbc7abf09034437017";
  53283. var pkg$1 = {
  53284. name: name$1,
  53285. version: version$5,
  53286. author: author$1,
  53287. license: license$1,
  53288. description: description$1,
  53289. repository: repository$1,
  53290. main: main$1,
  53291. publishConfig: publishConfig$1,
  53292. keywords: keywords$2,
  53293. dependencies: dependencies$1,
  53294. peerDependencies: peerDependencies$1,
  53295. devDependencies: devDependencies$1,
  53296. gitHead: gitHead$1
  53297. };
  53298. function baseIndexOfWith(array, value, fromIndex, comparator) {
  53299. var index = fromIndex - 1,
  53300. length = array.length;
  53301. while (++index < length) {
  53302. if (comparator(array[index], value)) {
  53303. return index;
  53304. }
  53305. }
  53306. return -1;
  53307. }
  53308. var _baseIndexOfWith = baseIndexOfWith;
  53309. var arrayProto$1 = Array.prototype;
  53310. var splice$1 = arrayProto$1.splice;
  53311. function basePullAll(array, values, iteratee, comparator) {
  53312. var indexOf = comparator ? _baseIndexOfWith : _baseIndexOf,
  53313. index = -1,
  53314. length = values.length,
  53315. seen = array;
  53316. if (array === values) {
  53317. values = _copyArray(values);
  53318. }
  53319. if (iteratee) {
  53320. seen = _arrayMap(array, _baseUnary(iteratee));
  53321. }
  53322. while (++index < length) {
  53323. var fromIndex = 0,
  53324. value = values[index],
  53325. computed = iteratee ? iteratee(value) : value;
  53326. while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
  53327. if (seen !== array) {
  53328. splice$1.call(seen, fromIndex, 1);
  53329. }
  53330. splice$1.call(array, fromIndex, 1);
  53331. }
  53332. }
  53333. return array;
  53334. }
  53335. var _basePullAll = basePullAll;
  53336. function pullAll(array, values) {
  53337. return array && array.length && values && values.length ? _basePullAll(array, values) : array;
  53338. }
  53339. var pullAll_1 = pullAll;
  53340. var pull = _baseRest(pullAll_1);
  53341. var pull_1 = pull;
  53342. function is$2(node, flag) {
  53343. return node.type === "RegExpLiteral" && node.flags.indexOf(flag) >= 0;
  53344. }
  53345. function pullFlag(node, flag) {
  53346. var flags = node.flags.split("");
  53347. if (node.flags.indexOf(flag) < 0) return;
  53348. pull_1(flags, flag);
  53349. node.flags = flags.join("");
  53350. }
  53351. var version$6 = pkg$1.version.split(".").reduce(function (v, x) {
  53352. return v * 1e5 + +x;
  53353. }, 0);
  53354. var versionKey$1 = "@babel/plugin-regexp-features/version";
  53355. function createRegExpFeaturePlugin(_ref) {
  53356. var name = _ref.name,
  53357. feature = _ref.feature,
  53358. _ref$options = _ref.options,
  53359. options = _ref$options === void 0 ? {} : _ref$options;
  53360. return {
  53361. name: name,
  53362. pre: function pre() {
  53363. var _file$get;
  53364. var file = this.file;
  53365. var features = (_file$get = file.get(featuresKey$1)) != null ? _file$get : 0;
  53366. var newFeatures = enableFeature$1(features, FEATURES$1[feature]);
  53367. var useUnicodeFlag = options.useUnicodeFlag,
  53368. _options$runtime = options.runtime,
  53369. runtime = _options$runtime === void 0 ? true : _options$runtime;
  53370. if (useUnicodeFlag === false) {
  53371. newFeatures = enableFeature$1(newFeatures, FEATURES$1.unicodeFlag);
  53372. }
  53373. if (newFeatures !== features) {
  53374. file.set(featuresKey$1, newFeatures);
  53375. }
  53376. if (!runtime) {
  53377. file.set(runtimeKey, false);
  53378. }
  53379. if (!file.has(versionKey$1) || file.get(versionKey$1) < version$6) {
  53380. file.set(versionKey$1, version$6);
  53381. }
  53382. },
  53383. visitor: {
  53384. RegExpLiteral: function RegExpLiteral(path) {
  53385. var _file$get2;
  53386. var node = path.node;
  53387. var file = this.file;
  53388. var features = file.get(featuresKey$1);
  53389. var runtime = (_file$get2 = file.get(runtimeKey)) != null ? _file$get2 : true;
  53390. var regexpuOptions = generateRegexpuOptions(node, features);
  53391. if (regexpuOptions === null) {
  53392. return;
  53393. }
  53394. var namedCaptureGroups = {};
  53395. if (regexpuOptions.namedGroup) {
  53396. regexpuOptions.onNamedGroup = function (name, index) {
  53397. namedCaptureGroups[name] = index;
  53398. };
  53399. }
  53400. node.pattern = rewritePattern_1(node.pattern, node.flags, regexpuOptions);
  53401. if (regexpuOptions.namedGroup && Object.keys(namedCaptureGroups).length > 0 && runtime && !isRegExpTest(path)) {
  53402. path.replaceWith(CallExpression(this.addHelper("wrapRegExp"), [node, valueToNode(namedCaptureGroups)]));
  53403. }
  53404. if (hasFeature$1(features, FEATURES$1.unicodeFlag)) {
  53405. pullFlag(node, "u");
  53406. }
  53407. if (hasFeature$1(features, FEATURES$1.dotAllFlag)) {
  53408. pullFlag(node, "s");
  53409. }
  53410. }
  53411. }
  53412. };
  53413. }
  53414. function isRegExpTest(path) {
  53415. return path.parentPath.isMemberExpression({
  53416. object: path.node,
  53417. computed: false
  53418. }) && path.parentPath.get("property").isIdentifier({
  53419. name: "test"
  53420. });
  53421. }
  53422. var proposalUnicodePropertyRegex = declare(function (api, options) {
  53423. api.assertVersion(7);
  53424. var _options$useUnicodeFl = options.useUnicodeFlag,
  53425. useUnicodeFlag = _options$useUnicodeFl === void 0 ? true : _options$useUnicodeFl;
  53426. if (typeof useUnicodeFlag !== "boolean") {
  53427. throw new Error(".useUnicodeFlag must be a boolean, or undefined");
  53428. }
  53429. return createRegExpFeaturePlugin({
  53430. name: "proposal-unicode-property-regex",
  53431. feature: "unicodePropertyEscape",
  53432. options: {
  53433. useUnicodeFlag: useUnicodeFlag
  53434. }
  53435. });
  53436. });
  53437. var inherits$1;
  53438. if (typeof Object.create === 'function') {
  53439. inherits$1 = function inherits(ctor, superCtor) {
  53440. ctor.super_ = superCtor;
  53441. ctor.prototype = Object.create(superCtor.prototype, {
  53442. constructor: {
  53443. value: ctor,
  53444. enumerable: false,
  53445. writable: true,
  53446. configurable: true
  53447. }
  53448. });
  53449. };
  53450. } else {
  53451. inherits$1 = function inherits(ctor, superCtor) {
  53452. ctor.super_ = superCtor;
  53453. var TempCtor = function TempCtor() {};
  53454. TempCtor.prototype = superCtor.prototype;
  53455. ctor.prototype = new TempCtor();
  53456. ctor.prototype.constructor = ctor;
  53457. };
  53458. }
  53459. var inherits$2 = inherits$1;
  53460. var formatRegExp = /%[sdj%]/g;
  53461. function format(f) {
  53462. if (!isString$2(f)) {
  53463. var objects = [];
  53464. for (var i = 0; i < arguments.length; i++) {
  53465. objects.push(inspect(arguments[i]));
  53466. }
  53467. return objects.join(' ');
  53468. }
  53469. var i = 1;
  53470. var args = arguments;
  53471. var len = args.length;
  53472. var str = String(f).replace(formatRegExp, function (x) {
  53473. if (x === '%%') return '%';
  53474. if (i >= len) return x;
  53475. switch (x) {
  53476. case '%s':
  53477. return String(args[i++]);
  53478. case '%d':
  53479. return Number(args[i++]);
  53480. case '%j':
  53481. try {
  53482. return JSON.stringify(args[i++]);
  53483. } catch (_) {
  53484. return '[Circular]';
  53485. }
  53486. default:
  53487. return x;
  53488. }
  53489. });
  53490. for (var x = args[i]; i < len; x = args[++i]) {
  53491. if (isNull(x) || !isObject$2(x)) {
  53492. str += ' ' + x;
  53493. } else {
  53494. str += ' ' + inspect(x);
  53495. }
  53496. }
  53497. return str;
  53498. }
  53499. function deprecate(fn, msg) {
  53500. if (isUndefined(global$1.process)) {
  53501. return function () {
  53502. return deprecate(fn, msg).apply(this, arguments);
  53503. };
  53504. }
  53505. if (process.noDeprecation === true) {
  53506. return fn;
  53507. }
  53508. var warned = false;
  53509. function deprecated() {
  53510. if (!warned) {
  53511. if (process.throwDeprecation) {
  53512. throw new Error(msg);
  53513. } else if (process.traceDeprecation) {
  53514. console.trace(msg);
  53515. } else {
  53516. console.error(msg);
  53517. }
  53518. warned = true;
  53519. }
  53520. return fn.apply(this, arguments);
  53521. }
  53522. return deprecated;
  53523. }
  53524. var debugs = {};
  53525. var debugEnviron;
  53526. function debuglog(set) {
  53527. if (isUndefined(debugEnviron)) debugEnviron = process.env.NODE_DEBUG || '';
  53528. set = set.toUpperCase();
  53529. if (!debugs[set]) {
  53530. if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
  53531. var pid = 0;
  53532. debugs[set] = function () {
  53533. var msg = format.apply(null, arguments);
  53534. console.error('%s %d: %s', set, pid, msg);
  53535. };
  53536. } else {
  53537. debugs[set] = function () {};
  53538. }
  53539. }
  53540. return debugs[set];
  53541. }
  53542. function inspect(obj, opts) {
  53543. var ctx = {
  53544. seen: [],
  53545. stylize: stylizeNoColor
  53546. };
  53547. if (arguments.length >= 3) ctx.depth = arguments[2];
  53548. if (arguments.length >= 4) ctx.colors = arguments[3];
  53549. if (isBoolean(opts)) {
  53550. ctx.showHidden = opts;
  53551. } else if (opts) {
  53552. _extend(ctx, opts);
  53553. }
  53554. if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
  53555. if (isUndefined(ctx.depth)) ctx.depth = 2;
  53556. if (isUndefined(ctx.colors)) ctx.colors = false;
  53557. if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
  53558. if (ctx.colors) ctx.stylize = stylizeWithColor;
  53559. return formatValue(ctx, obj, ctx.depth);
  53560. }
  53561. inspect.colors = {
  53562. 'bold': [1, 22],
  53563. 'italic': [3, 23],
  53564. 'underline': [4, 24],
  53565. 'inverse': [7, 27],
  53566. 'white': [37, 39],
  53567. 'grey': [90, 39],
  53568. 'black': [30, 39],
  53569. 'blue': [34, 39],
  53570. 'cyan': [36, 39],
  53571. 'green': [32, 39],
  53572. 'magenta': [35, 39],
  53573. 'red': [31, 39],
  53574. 'yellow': [33, 39]
  53575. };
  53576. inspect.styles = {
  53577. 'special': 'cyan',
  53578. 'number': 'yellow',
  53579. 'boolean': 'yellow',
  53580. 'undefined': 'grey',
  53581. 'null': 'bold',
  53582. 'string': 'green',
  53583. 'date': 'magenta',
  53584. 'regexp': 'red'
  53585. };
  53586. function stylizeWithColor(str, styleType) {
  53587. var style = inspect.styles[styleType];
  53588. if (style) {
  53589. return "\x1B[" + inspect.colors[style][0] + 'm' + str + "\x1B[" + inspect.colors[style][1] + 'm';
  53590. } else {
  53591. return str;
  53592. }
  53593. }
  53594. function stylizeNoColor(str, styleType) {
  53595. return str;
  53596. }
  53597. function arrayToHash(array) {
  53598. var hash = {};
  53599. array.forEach(function (val, idx) {
  53600. hash[val] = true;
  53601. });
  53602. return hash;
  53603. }
  53604. function formatValue(ctx, value, recurseTimes) {
  53605. if (ctx.customInspect && value && isFunction$3(value.inspect) && value.inspect !== inspect && !(value.constructor && value.constructor.prototype === value)) {
  53606. var ret = value.inspect(recurseTimes, ctx);
  53607. if (!isString$2(ret)) {
  53608. ret = formatValue(ctx, ret, recurseTimes);
  53609. }
  53610. return ret;
  53611. }
  53612. var primitive = formatPrimitive(ctx, value);
  53613. if (primitive) {
  53614. return primitive;
  53615. }
  53616. var keys = Object.keys(value);
  53617. var visibleKeys = arrayToHash(keys);
  53618. if (ctx.showHidden) {
  53619. keys = Object.getOwnPropertyNames(value);
  53620. }
  53621. if (isError(value) && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
  53622. return formatError(value);
  53623. }
  53624. if (keys.length === 0) {
  53625. if (isFunction$3(value)) {
  53626. var name = value.name ? ': ' + value.name : '';
  53627. return ctx.stylize('[Function' + name + ']', 'special');
  53628. }
  53629. if (isRegExp$1(value)) {
  53630. return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
  53631. }
  53632. if (isDate(value)) {
  53633. return ctx.stylize(Date.prototype.toString.call(value), 'date');
  53634. }
  53635. if (isError(value)) {
  53636. return formatError(value);
  53637. }
  53638. }
  53639. var base = '',
  53640. array = false,
  53641. braces = ['{', '}'];
  53642. if (isArray$3(value)) {
  53643. array = true;
  53644. braces = ['[', ']'];
  53645. }
  53646. if (isFunction$3(value)) {
  53647. var n = value.name ? ': ' + value.name : '';
  53648. base = ' [Function' + n + ']';
  53649. }
  53650. if (isRegExp$1(value)) {
  53651. base = ' ' + RegExp.prototype.toString.call(value);
  53652. }
  53653. if (isDate(value)) {
  53654. base = ' ' + Date.prototype.toUTCString.call(value);
  53655. }
  53656. if (isError(value)) {
  53657. base = ' ' + formatError(value);
  53658. }
  53659. if (keys.length === 0 && (!array || value.length == 0)) {
  53660. return braces[0] + base + braces[1];
  53661. }
  53662. if (recurseTimes < 0) {
  53663. if (isRegExp$1(value)) {
  53664. return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
  53665. } else {
  53666. return ctx.stylize('[Object]', 'special');
  53667. }
  53668. }
  53669. ctx.seen.push(value);
  53670. var output;
  53671. if (array) {
  53672. output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
  53673. } else {
  53674. output = keys.map(function (key) {
  53675. return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
  53676. });
  53677. }
  53678. ctx.seen.pop();
  53679. return reduceToSingleString(output, base, braces);
  53680. }
  53681. function formatPrimitive(ctx, value) {
  53682. if (isUndefined(value)) return ctx.stylize('undefined', 'undefined');
  53683. if (isString$2(value)) {
  53684. var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '').replace(/'/g, "\\'").replace(/\\"/g, '"') + '\'';
  53685. return ctx.stylize(simple, 'string');
  53686. }
  53687. if (isNumber$1(value)) return ctx.stylize('' + value, 'number');
  53688. if (isBoolean(value)) return ctx.stylize('' + value, 'boolean');
  53689. if (isNull(value)) return ctx.stylize('null', 'null');
  53690. }
  53691. function formatError(value) {
  53692. return '[' + Error.prototype.toString.call(value) + ']';
  53693. }
  53694. function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
  53695. var output = [];
  53696. for (var i = 0, l = value.length; i < l; ++i) {
  53697. if (hasOwnProperty$f(value, String(i))) {
  53698. output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true));
  53699. } else {
  53700. output.push('');
  53701. }
  53702. }
  53703. keys.forEach(function (key) {
  53704. if (!key.match(/^\d+$/)) {
  53705. output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true));
  53706. }
  53707. });
  53708. return output;
  53709. }
  53710. function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
  53711. var name, str, desc;
  53712. desc = Object.getOwnPropertyDescriptor(value, key) || {
  53713. value: value[key]
  53714. };
  53715. if (desc.get) {
  53716. if (desc.set) {
  53717. str = ctx.stylize('[Getter/Setter]', 'special');
  53718. } else {
  53719. str = ctx.stylize('[Getter]', 'special');
  53720. }
  53721. } else {
  53722. if (desc.set) {
  53723. str = ctx.stylize('[Setter]', 'special');
  53724. }
  53725. }
  53726. if (!hasOwnProperty$f(visibleKeys, key)) {
  53727. name = '[' + key + ']';
  53728. }
  53729. if (!str) {
  53730. if (ctx.seen.indexOf(desc.value) < 0) {
  53731. if (isNull(recurseTimes)) {
  53732. str = formatValue(ctx, desc.value, null);
  53733. } else {
  53734. str = formatValue(ctx, desc.value, recurseTimes - 1);
  53735. }
  53736. if (str.indexOf('\n') > -1) {
  53737. if (array) {
  53738. str = str.split('\n').map(function (line) {
  53739. return ' ' + line;
  53740. }).join('\n').substr(2);
  53741. } else {
  53742. str = '\n' + str.split('\n').map(function (line) {
  53743. return ' ' + line;
  53744. }).join('\n');
  53745. }
  53746. }
  53747. } else {
  53748. str = ctx.stylize('[Circular]', 'special');
  53749. }
  53750. }
  53751. if (isUndefined(name)) {
  53752. if (array && key.match(/^\d+$/)) {
  53753. return str;
  53754. }
  53755. name = JSON.stringify('' + key);
  53756. if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
  53757. name = name.substr(1, name.length - 2);
  53758. name = ctx.stylize(name, 'name');
  53759. } else {
  53760. name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
  53761. name = ctx.stylize(name, 'string');
  53762. }
  53763. }
  53764. return name + ': ' + str;
  53765. }
  53766. function reduceToSingleString(output, base, braces) {
  53767. var length = output.reduce(function (prev, cur) {
  53768. if (cur.indexOf('\n') >= 0) ;
  53769. return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
  53770. }, 0);
  53771. if (length > 60) {
  53772. return braces[0] + (base === '' ? '' : base + '\n ') + ' ' + output.join(',\n ') + ' ' + braces[1];
  53773. }
  53774. return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
  53775. }
  53776. function isArray$3(ar) {
  53777. return Array.isArray(ar);
  53778. }
  53779. function isBoolean(arg) {
  53780. return typeof arg === 'boolean';
  53781. }
  53782. function isNull(arg) {
  53783. return arg === null;
  53784. }
  53785. function isNullOrUndefined(arg) {
  53786. return arg == null;
  53787. }
  53788. function isNumber$1(arg) {
  53789. return typeof arg === 'number';
  53790. }
  53791. function isString$2(arg) {
  53792. return typeof arg === 'string';
  53793. }
  53794. function isSymbol$1(arg) {
  53795. return typeof arg === 'symbol';
  53796. }
  53797. function isUndefined(arg) {
  53798. return arg === void 0;
  53799. }
  53800. function isRegExp$1(re) {
  53801. return isObject$2(re) && objectToString$1(re) === '[object RegExp]';
  53802. }
  53803. function isObject$2(arg) {
  53804. return typeof arg === 'object' && arg !== null;
  53805. }
  53806. function isDate(d) {
  53807. return isObject$2(d) && objectToString$1(d) === '[object Date]';
  53808. }
  53809. function isError(e) {
  53810. return isObject$2(e) && (objectToString$1(e) === '[object Error]' || e instanceof Error);
  53811. }
  53812. function isFunction$3(arg) {
  53813. return typeof arg === 'function';
  53814. }
  53815. function isPrimitive(arg) {
  53816. return arg === null || typeof arg === 'boolean' || typeof arg === 'number' || typeof arg === 'string' || typeof arg === 'symbol' || typeof arg === 'undefined';
  53817. }
  53818. function isBuffer$2(maybeBuf) {
  53819. return isBuffer(maybeBuf);
  53820. }
  53821. function objectToString$1(o) {
  53822. return Object.prototype.toString.call(o);
  53823. }
  53824. function pad(n) {
  53825. return n < 10 ? '0' + n.toString(10) : n.toString(10);
  53826. }
  53827. var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
  53828. function timestamp() {
  53829. var d = new Date();
  53830. var time = [pad(d.getHours()), pad(d.getMinutes()), pad(d.getSeconds())].join(':');
  53831. return [d.getDate(), months[d.getMonth()], time].join(' ');
  53832. }
  53833. function log() {
  53834. console.log('%s - %s', timestamp(), format.apply(null, arguments));
  53835. }
  53836. function _extend(origin, add) {
  53837. if (!add || !isObject$2(add)) return origin;
  53838. var keys = Object.keys(add);
  53839. var i = keys.length;
  53840. while (i--) {
  53841. origin[keys[i]] = add[keys[i]];
  53842. }
  53843. return origin;
  53844. }
  53845. function hasOwnProperty$f(obj, prop) {
  53846. return Object.prototype.hasOwnProperty.call(obj, prop);
  53847. }
  53848. var _util = {
  53849. inherits: inherits$2,
  53850. _extend: _extend,
  53851. log: log,
  53852. isBuffer: isBuffer$2,
  53853. isPrimitive: isPrimitive,
  53854. isFunction: isFunction$3,
  53855. isError: isError,
  53856. isDate: isDate,
  53857. isObject: isObject$2,
  53858. isRegExp: isRegExp$1,
  53859. isUndefined: isUndefined,
  53860. isSymbol: isSymbol$1,
  53861. isString: isString$2,
  53862. isNumber: isNumber$1,
  53863. isNullOrUndefined: isNullOrUndefined,
  53864. isNull: isNull,
  53865. isBoolean: isBoolean,
  53866. isArray: isArray$3,
  53867. inspect: inspect,
  53868. deprecate: deprecate,
  53869. format: format,
  53870. debuglog: debuglog
  53871. };
  53872. function compare(a, b) {
  53873. if (a === b) {
  53874. return 0;
  53875. }
  53876. var x = a.length;
  53877. var y = b.length;
  53878. for (var i = 0, len = Math.min(x, y); i < len; ++i) {
  53879. if (a[i] !== b[i]) {
  53880. x = a[i];
  53881. y = b[i];
  53882. break;
  53883. }
  53884. }
  53885. if (x < y) {
  53886. return -1;
  53887. }
  53888. if (y < x) {
  53889. return 1;
  53890. }
  53891. return 0;
  53892. }
  53893. var hasOwn = Object.prototype.hasOwnProperty;
  53894. var objectKeys = Object.keys || function (obj) {
  53895. var keys = [];
  53896. for (var key in obj) {
  53897. if (hasOwn.call(obj, key)) keys.push(key);
  53898. }
  53899. return keys;
  53900. };
  53901. var pSlice = Array.prototype.slice;
  53902. var _functionsHaveNames;
  53903. function functionsHaveNames() {
  53904. if (typeof _functionsHaveNames !== 'undefined') {
  53905. return _functionsHaveNames;
  53906. }
  53907. return _functionsHaveNames = function () {
  53908. return function foo() {}.name === 'foo';
  53909. }();
  53910. }
  53911. function pToString(obj) {
  53912. return Object.prototype.toString.call(obj);
  53913. }
  53914. function isView(arrbuf) {
  53915. if (isBuffer(arrbuf)) {
  53916. return false;
  53917. }
  53918. if (typeof global$1.ArrayBuffer !== 'function') {
  53919. return false;
  53920. }
  53921. if (typeof ArrayBuffer.isView === 'function') {
  53922. return ArrayBuffer.isView(arrbuf);
  53923. }
  53924. if (!arrbuf) {
  53925. return false;
  53926. }
  53927. if (arrbuf instanceof DataView) {
  53928. return true;
  53929. }
  53930. if (arrbuf.buffer && arrbuf.buffer instanceof ArrayBuffer) {
  53931. return true;
  53932. }
  53933. return false;
  53934. }
  53935. function assert$2(value, message) {
  53936. if (!value) fail(value, true, message, '==', ok);
  53937. }
  53938. var regex = /\s*function\s+([^\(\s]*)\s*/;
  53939. function getName(func) {
  53940. if (!isFunction$3(func)) {
  53941. return;
  53942. }
  53943. if (functionsHaveNames()) {
  53944. return func.name;
  53945. }
  53946. var str = func.toString();
  53947. var match = str.match(regex);
  53948. return match && match[1];
  53949. }
  53950. assert$2.AssertionError = AssertionError;
  53951. function AssertionError(options) {
  53952. this.name = 'AssertionError';
  53953. this.actual = options.actual;
  53954. this.expected = options.expected;
  53955. this.operator = options.operator;
  53956. if (options.message) {
  53957. this.message = options.message;
  53958. this.generatedMessage = false;
  53959. } else {
  53960. this.message = getMessage(this);
  53961. this.generatedMessage = true;
  53962. }
  53963. var stackStartFunction = options.stackStartFunction || fail;
  53964. if (Error.captureStackTrace) {
  53965. Error.captureStackTrace(this, stackStartFunction);
  53966. } else {
  53967. var err = new Error();
  53968. if (err.stack) {
  53969. var out = err.stack;
  53970. var fn_name = getName(stackStartFunction);
  53971. var idx = out.indexOf('\n' + fn_name);
  53972. if (idx >= 0) {
  53973. var next_line = out.indexOf('\n', idx + 1);
  53974. out = out.substring(next_line + 1);
  53975. }
  53976. this.stack = out;
  53977. }
  53978. }
  53979. }
  53980. inherits$2(AssertionError, Error);
  53981. function truncate(s, n) {
  53982. if (typeof s === 'string') {
  53983. return s.length < n ? s : s.slice(0, n);
  53984. } else {
  53985. return s;
  53986. }
  53987. }
  53988. function inspect$1(something) {
  53989. if (functionsHaveNames() || !isFunction$3(something)) {
  53990. return inspect(something);
  53991. }
  53992. var rawname = getName(something);
  53993. var name = rawname ? ': ' + rawname : '';
  53994. return '[Function' + name + ']';
  53995. }
  53996. function getMessage(self) {
  53997. return truncate(inspect$1(self.actual), 128) + ' ' + self.operator + ' ' + truncate(inspect$1(self.expected), 128);
  53998. }
  53999. function fail(actual, expected, message, operator, stackStartFunction) {
  54000. throw new AssertionError({
  54001. message: message,
  54002. actual: actual,
  54003. expected: expected,
  54004. operator: operator,
  54005. stackStartFunction: stackStartFunction
  54006. });
  54007. }
  54008. assert$2.fail = fail;
  54009. function ok(value, message) {
  54010. if (!value) fail(value, true, message, '==', ok);
  54011. }
  54012. assert$2.ok = ok;
  54013. assert$2.equal = equal;
  54014. function equal(actual, expected, message) {
  54015. if (actual != expected) fail(actual, expected, message, '==', equal);
  54016. }
  54017. assert$2.notEqual = notEqual;
  54018. function notEqual(actual, expected, message) {
  54019. if (actual == expected) {
  54020. fail(actual, expected, message, '!=', notEqual);
  54021. }
  54022. }
  54023. assert$2.deepEqual = deepEqual;
  54024. function deepEqual(actual, expected, message) {
  54025. if (!_deepEqual(actual, expected, false)) {
  54026. fail(actual, expected, message, 'deepEqual', deepEqual);
  54027. }
  54028. }
  54029. assert$2.deepStrictEqual = deepStrictEqual;
  54030. function deepStrictEqual(actual, expected, message) {
  54031. if (!_deepEqual(actual, expected, true)) {
  54032. fail(actual, expected, message, 'deepStrictEqual', deepStrictEqual);
  54033. }
  54034. }
  54035. function _deepEqual(actual, expected, strict, memos) {
  54036. if (actual === expected) {
  54037. return true;
  54038. } else if (isBuffer(actual) && isBuffer(expected)) {
  54039. return compare(actual, expected) === 0;
  54040. } else if (isDate(actual) && isDate(expected)) {
  54041. return actual.getTime() === expected.getTime();
  54042. } else if (isRegExp$1(actual) && isRegExp$1(expected)) {
  54043. return actual.source === expected.source && actual.global === expected.global && actual.multiline === expected.multiline && actual.lastIndex === expected.lastIndex && actual.ignoreCase === expected.ignoreCase;
  54044. } else if ((actual === null || typeof actual !== 'object') && (expected === null || typeof expected !== 'object')) {
  54045. return strict ? actual === expected : actual == expected;
  54046. } else if (isView(actual) && isView(expected) && pToString(actual) === pToString(expected) && !(actual instanceof Float32Array || actual instanceof Float64Array)) {
  54047. return compare(new Uint8Array(actual.buffer), new Uint8Array(expected.buffer)) === 0;
  54048. } else if (isBuffer(actual) !== isBuffer(expected)) {
  54049. return false;
  54050. } else {
  54051. memos = memos || {
  54052. actual: [],
  54053. expected: []
  54054. };
  54055. var actualIndex = memos.actual.indexOf(actual);
  54056. if (actualIndex !== -1) {
  54057. if (actualIndex === memos.expected.indexOf(expected)) {
  54058. return true;
  54059. }
  54060. }
  54061. memos.actual.push(actual);
  54062. memos.expected.push(expected);
  54063. return objEquiv(actual, expected, strict, memos);
  54064. }
  54065. }
  54066. function isArguments$1(object) {
  54067. return Object.prototype.toString.call(object) == '[object Arguments]';
  54068. }
  54069. function objEquiv(a, b, strict, actualVisitedObjects) {
  54070. if (a === null || a === undefined || b === null || b === undefined) return false;
  54071. if (isPrimitive(a) || isPrimitive(b)) return a === b;
  54072. if (strict && Object.getPrototypeOf(a) !== Object.getPrototypeOf(b)) return false;
  54073. var aIsArgs = isArguments$1(a);
  54074. var bIsArgs = isArguments$1(b);
  54075. if (aIsArgs && !bIsArgs || !aIsArgs && bIsArgs) return false;
  54076. if (aIsArgs) {
  54077. a = pSlice.call(a);
  54078. b = pSlice.call(b);
  54079. return _deepEqual(a, b, strict);
  54080. }
  54081. var ka = objectKeys(a);
  54082. var kb = objectKeys(b);
  54083. var key, i;
  54084. if (ka.length !== kb.length) return false;
  54085. ka.sort();
  54086. kb.sort();
  54087. for (i = ka.length - 1; i >= 0; i--) {
  54088. if (ka[i] !== kb[i]) return false;
  54089. }
  54090. for (i = ka.length - 1; i >= 0; i--) {
  54091. key = ka[i];
  54092. if (!_deepEqual(a[key], b[key], strict, actualVisitedObjects)) return false;
  54093. }
  54094. return true;
  54095. }
  54096. assert$2.notDeepEqual = notDeepEqual;
  54097. function notDeepEqual(actual, expected, message) {
  54098. if (_deepEqual(actual, expected, false)) {
  54099. fail(actual, expected, message, 'notDeepEqual', notDeepEqual);
  54100. }
  54101. }
  54102. assert$2.notDeepStrictEqual = notDeepStrictEqual;
  54103. function notDeepStrictEqual(actual, expected, message) {
  54104. if (_deepEqual(actual, expected, true)) {
  54105. fail(actual, expected, message, 'notDeepStrictEqual', notDeepStrictEqual);
  54106. }
  54107. }
  54108. assert$2.strictEqual = strictEqual;
  54109. function strictEqual(actual, expected, message) {
  54110. if (actual !== expected) {
  54111. fail(actual, expected, message, '===', strictEqual);
  54112. }
  54113. }
  54114. assert$2.notStrictEqual = notStrictEqual;
  54115. function notStrictEqual(actual, expected, message) {
  54116. if (actual === expected) {
  54117. fail(actual, expected, message, '!==', notStrictEqual);
  54118. }
  54119. }
  54120. function expectedException(actual, expected) {
  54121. if (!actual || !expected) {
  54122. return false;
  54123. }
  54124. if (Object.prototype.toString.call(expected) == '[object RegExp]') {
  54125. return expected.test(actual);
  54126. }
  54127. try {
  54128. if (actual instanceof expected) {
  54129. return true;
  54130. }
  54131. } catch (e) {}
  54132. if (Error.isPrototypeOf(expected)) {
  54133. return false;
  54134. }
  54135. return expected.call({}, actual) === true;
  54136. }
  54137. function _tryBlock(block) {
  54138. var error;
  54139. try {
  54140. block();
  54141. } catch (e) {
  54142. error = e;
  54143. }
  54144. return error;
  54145. }
  54146. function _throws(shouldThrow, block, expected, message) {
  54147. var actual;
  54148. if (typeof block !== 'function') {
  54149. throw new TypeError('"block" argument must be a function');
  54150. }
  54151. if (typeof expected === 'string') {
  54152. message = expected;
  54153. expected = null;
  54154. }
  54155. actual = _tryBlock(block);
  54156. message = (expected && expected.name ? ' (' + expected.name + ').' : '.') + (message ? ' ' + message : '.');
  54157. if (shouldThrow && !actual) {
  54158. fail(actual, expected, 'Missing expected exception' + message);
  54159. }
  54160. var userProvidedMessage = typeof message === 'string';
  54161. var isUnwantedException = !shouldThrow && isError(actual);
  54162. var isUnexpectedException = !shouldThrow && actual && !expected;
  54163. if (isUnwantedException && userProvidedMessage && expectedException(actual, expected) || isUnexpectedException) {
  54164. fail(actual, expected, 'Got unwanted exception' + message);
  54165. }
  54166. if (shouldThrow && actual && expected && !expectedException(actual, expected) || !shouldThrow && actual) {
  54167. throw actual;
  54168. }
  54169. }
  54170. assert$2["throws"] = _throws2;
  54171. function _throws2(block, error, message) {
  54172. _throws(true, block, error, message);
  54173. }
  54174. assert$2.doesNotThrow = doesNotThrow;
  54175. function doesNotThrow(block, error, message) {
  54176. _throws(false, block, error, message);
  54177. }
  54178. assert$2.ifError = ifError;
  54179. function ifError(err) {
  54180. if (err) throw err;
  54181. }
  54182. var ImportBuilder = function () {
  54183. function ImportBuilder(importedSource, scope, hub) {
  54184. this._statements = [];
  54185. this._resultName = null;
  54186. this._scope = null;
  54187. this._hub = null;
  54188. this._scope = scope;
  54189. this._hub = hub;
  54190. this._importedSource = importedSource;
  54191. }
  54192. var _proto = ImportBuilder.prototype;
  54193. _proto.done = function done() {
  54194. return {
  54195. statements: this._statements,
  54196. resultName: this._resultName
  54197. };
  54198. };
  54199. _proto["import"] = function _import() {
  54200. this._statements.push(ImportDeclaration([], StringLiteral(this._importedSource)));
  54201. return this;
  54202. };
  54203. _proto.require = function require() {
  54204. this._statements.push(ExpressionStatement(CallExpression(Identifier("require"), [StringLiteral(this._importedSource)])));
  54205. return this;
  54206. };
  54207. _proto.namespace = function namespace(name) {
  54208. if (name === void 0) {
  54209. name = "namespace";
  54210. }
  54211. name = this._scope.generateUidIdentifier(name);
  54212. var statement = this._statements[this._statements.length - 1];
  54213. assert$2(statement.type === "ImportDeclaration");
  54214. assert$2(statement.specifiers.length === 0);
  54215. statement.specifiers = [ImportNamespaceSpecifier(name)];
  54216. this._resultName = cloneNode(name);
  54217. return this;
  54218. };
  54219. _proto["default"] = function _default(name) {
  54220. name = this._scope.generateUidIdentifier(name);
  54221. var statement = this._statements[this._statements.length - 1];
  54222. assert$2(statement.type === "ImportDeclaration");
  54223. assert$2(statement.specifiers.length === 0);
  54224. statement.specifiers = [ImportDefaultSpecifier(name)];
  54225. this._resultName = cloneNode(name);
  54226. return this;
  54227. };
  54228. _proto.named = function named(name, importName) {
  54229. if (importName === "default") return this["default"](name);
  54230. name = this._scope.generateUidIdentifier(name);
  54231. var statement = this._statements[this._statements.length - 1];
  54232. assert$2(statement.type === "ImportDeclaration");
  54233. assert$2(statement.specifiers.length === 0);
  54234. statement.specifiers = [ImportSpecifier(name, Identifier(importName))];
  54235. this._resultName = cloneNode(name);
  54236. return this;
  54237. };
  54238. _proto["var"] = function _var(name) {
  54239. name = this._scope.generateUidIdentifier(name);
  54240. var statement = this._statements[this._statements.length - 1];
  54241. if (statement.type !== "ExpressionStatement") {
  54242. assert$2(this._resultName);
  54243. statement = ExpressionStatement(this._resultName);
  54244. this._statements.push(statement);
  54245. }
  54246. this._statements[this._statements.length - 1] = VariableDeclaration("var", [VariableDeclarator(name, statement.expression)]);
  54247. this._resultName = cloneNode(name);
  54248. return this;
  54249. };
  54250. _proto.defaultInterop = function defaultInterop() {
  54251. return this._interop(this._hub.addHelper("interopRequireDefault"));
  54252. };
  54253. _proto.wildcardInterop = function wildcardInterop() {
  54254. return this._interop(this._hub.addHelper("interopRequireWildcard"));
  54255. };
  54256. _proto._interop = function _interop(callee) {
  54257. var statement = this._statements[this._statements.length - 1];
  54258. if (statement.type === "ExpressionStatement") {
  54259. statement.expression = CallExpression(callee, [statement.expression]);
  54260. } else if (statement.type === "VariableDeclaration") {
  54261. assert$2(statement.declarations.length === 1);
  54262. statement.declarations[0].init = CallExpression(callee, [statement.declarations[0].init]);
  54263. } else {
  54264. assert$2.fail("Unexpected type.");
  54265. }
  54266. return this;
  54267. };
  54268. _proto.prop = function prop(name) {
  54269. var statement = this._statements[this._statements.length - 1];
  54270. if (statement.type === "ExpressionStatement") {
  54271. statement.expression = MemberExpression(statement.expression, Identifier(name));
  54272. } else if (statement.type === "VariableDeclaration") {
  54273. assert$2(statement.declarations.length === 1);
  54274. statement.declarations[0].init = MemberExpression(statement.declarations[0].init, Identifier(name));
  54275. } else {
  54276. assert$2.fail("Unexpected type:" + statement.type);
  54277. }
  54278. return this;
  54279. };
  54280. _proto.read = function read(name) {
  54281. this._resultName = MemberExpression(this._resultName, Identifier(name));
  54282. };
  54283. return ImportBuilder;
  54284. }();
  54285. function isModule(path) {
  54286. var sourceType = path.node.sourceType;
  54287. if (sourceType !== "module" && sourceType !== "script") {
  54288. throw path.buildCodeFrameError("Unknown sourceType \"" + sourceType + "\", cannot transform.");
  54289. }
  54290. return path.node.sourceType === "module";
  54291. }
  54292. var ImportInjector = function () {
  54293. function ImportInjector(path, importedSource, opts) {
  54294. this._defaultOpts = {
  54295. importedSource: null,
  54296. importedType: "commonjs",
  54297. importedInterop: "babel",
  54298. importingInterop: "babel",
  54299. ensureLiveReference: false,
  54300. ensureNoContext: false
  54301. };
  54302. var programPath = path.find(function (p) {
  54303. return p.isProgram();
  54304. });
  54305. this._programPath = programPath;
  54306. this._programScope = programPath.scope;
  54307. this._hub = programPath.hub;
  54308. this._defaultOpts = this._applyDefaults(importedSource, opts, true);
  54309. }
  54310. var _proto = ImportInjector.prototype;
  54311. _proto.addDefault = function addDefault(importedSourceIn, opts) {
  54312. return this.addNamed("default", importedSourceIn, opts);
  54313. };
  54314. _proto.addNamed = function addNamed(importName, importedSourceIn, opts) {
  54315. assert$2(typeof importName === "string");
  54316. return this._generateImport(this._applyDefaults(importedSourceIn, opts), importName);
  54317. };
  54318. _proto.addNamespace = function addNamespace(importedSourceIn, opts) {
  54319. return this._generateImport(this._applyDefaults(importedSourceIn, opts), null);
  54320. };
  54321. _proto.addSideEffect = function addSideEffect(importedSourceIn, opts) {
  54322. return this._generateImport(this._applyDefaults(importedSourceIn, opts), false);
  54323. };
  54324. _proto._applyDefaults = function _applyDefaults(importedSource, opts, isInit) {
  54325. if (isInit === void 0) {
  54326. isInit = false;
  54327. }
  54328. var optsList = [];
  54329. if (typeof importedSource === "string") {
  54330. optsList.push({
  54331. importedSource: importedSource
  54332. });
  54333. optsList.push(opts);
  54334. } else {
  54335. assert$2(!opts, "Unexpected secondary arguments.");
  54336. optsList.push(importedSource);
  54337. }
  54338. var newOpts = Object.assign({}, this._defaultOpts);
  54339. var _loop = function _loop() {
  54340. var opts = _optsList[_i];
  54341. if (!opts) return "continue";
  54342. Object.keys(newOpts).forEach(function (key) {
  54343. if (opts[key] !== undefined) newOpts[key] = opts[key];
  54344. });
  54345. if (!isInit) {
  54346. if (opts.nameHint !== undefined) newOpts.nameHint = opts.nameHint;
  54347. if (opts.blockHoist !== undefined) newOpts.blockHoist = opts.blockHoist;
  54348. }
  54349. };
  54350. for (var _i = 0, _optsList = optsList; _i < _optsList.length; _i++) {
  54351. var _ret = _loop();
  54352. if (_ret === "continue") continue;
  54353. }
  54354. return newOpts;
  54355. };
  54356. _proto._generateImport = function _generateImport(opts, importName) {
  54357. var isDefault = importName === "default";
  54358. var isNamed = !!importName && !isDefault;
  54359. var isNamespace = importName === null;
  54360. var importedSource = opts.importedSource,
  54361. importedType = opts.importedType,
  54362. importedInterop = opts.importedInterop,
  54363. importingInterop = opts.importingInterop,
  54364. ensureLiveReference = opts.ensureLiveReference,
  54365. ensureNoContext = opts.ensureNoContext,
  54366. nameHint = opts.nameHint,
  54367. blockHoist = opts.blockHoist;
  54368. var name = nameHint || importName;
  54369. var isMod = isModule(this._programPath);
  54370. var isModuleForNode = isMod && importingInterop === "node";
  54371. var isModuleForBabel = isMod && importingInterop === "babel";
  54372. var builder = new ImportBuilder(importedSource, this._programScope, this._hub);
  54373. if (importedType === "es6") {
  54374. if (!isModuleForNode && !isModuleForBabel) {
  54375. throw new Error("Cannot import an ES6 module from CommonJS");
  54376. }
  54377. builder["import"]();
  54378. if (isNamespace) {
  54379. builder.namespace(nameHint || importedSource);
  54380. } else if (isDefault || isNamed) {
  54381. builder.named(name, importName);
  54382. }
  54383. } else if (importedType !== "commonjs") {
  54384. throw new Error("Unexpected interopType \"" + importedType + "\"");
  54385. } else if (importedInterop === "babel") {
  54386. if (isModuleForNode) {
  54387. name = name !== "default" ? name : importedSource;
  54388. var es6Default = importedSource + "$es6Default";
  54389. builder["import"]();
  54390. if (isNamespace) {
  54391. builder["default"](es6Default)["var"](name || importedSource).wildcardInterop();
  54392. } else if (isDefault) {
  54393. if (ensureLiveReference) {
  54394. builder["default"](es6Default)["var"](name || importedSource).defaultInterop().read("default");
  54395. } else {
  54396. builder["default"](es6Default)["var"](name).defaultInterop().prop(importName);
  54397. }
  54398. } else if (isNamed) {
  54399. builder["default"](es6Default).read(importName);
  54400. }
  54401. } else if (isModuleForBabel) {
  54402. builder["import"]();
  54403. if (isNamespace) {
  54404. builder.namespace(name || importedSource);
  54405. } else if (isDefault || isNamed) {
  54406. builder.named(name, importName);
  54407. }
  54408. } else {
  54409. builder.require();
  54410. if (isNamespace) {
  54411. builder["var"](name || importedSource).wildcardInterop();
  54412. } else if ((isDefault || isNamed) && ensureLiveReference) {
  54413. if (isDefault) {
  54414. name = name !== "default" ? name : importedSource;
  54415. builder["var"](name).read(importName);
  54416. builder.defaultInterop();
  54417. } else {
  54418. builder["var"](importedSource).read(importName);
  54419. }
  54420. } else if (isDefault) {
  54421. builder["var"](name).defaultInterop().prop(importName);
  54422. } else if (isNamed) {
  54423. builder["var"](name).prop(importName);
  54424. }
  54425. }
  54426. } else if (importedInterop === "compiled") {
  54427. if (isModuleForNode) {
  54428. builder["import"]();
  54429. if (isNamespace) {
  54430. builder["default"](name || importedSource);
  54431. } else if (isDefault || isNamed) {
  54432. builder["default"](importedSource).read(name);
  54433. }
  54434. } else if (isModuleForBabel) {
  54435. builder["import"]();
  54436. if (isNamespace) {
  54437. builder.namespace(name || importedSource);
  54438. } else if (isDefault || isNamed) {
  54439. builder.named(name, importName);
  54440. }
  54441. } else {
  54442. builder.require();
  54443. if (isNamespace) {
  54444. builder["var"](name || importedSource);
  54445. } else if (isDefault || isNamed) {
  54446. if (ensureLiveReference) {
  54447. builder["var"](importedSource).read(name);
  54448. } else {
  54449. builder.prop(importName)["var"](name);
  54450. }
  54451. }
  54452. }
  54453. } else if (importedInterop === "uncompiled") {
  54454. if (isDefault && ensureLiveReference) {
  54455. throw new Error("No live reference for commonjs default");
  54456. }
  54457. if (isModuleForNode) {
  54458. builder["import"]();
  54459. if (isNamespace) {
  54460. builder["default"](name || importedSource);
  54461. } else if (isDefault) {
  54462. builder["default"](name);
  54463. } else if (isNamed) {
  54464. builder["default"](importedSource).read(name);
  54465. }
  54466. } else if (isModuleForBabel) {
  54467. builder["import"]();
  54468. if (isNamespace) {
  54469. builder["default"](name || importedSource);
  54470. } else if (isDefault) {
  54471. builder["default"](name);
  54472. } else if (isNamed) {
  54473. builder.named(name, importName);
  54474. }
  54475. } else {
  54476. builder.require();
  54477. if (isNamespace) {
  54478. builder["var"](name || importedSource);
  54479. } else if (isDefault) {
  54480. builder["var"](name);
  54481. } else if (isNamed) {
  54482. if (ensureLiveReference) {
  54483. builder["var"](importedSource).read(name);
  54484. } else {
  54485. builder["var"](name).prop(importName);
  54486. }
  54487. }
  54488. }
  54489. } else {
  54490. throw new Error("Unknown importedInterop \"" + importedInterop + "\".");
  54491. }
  54492. var _builder$done = builder.done(),
  54493. statements = _builder$done.statements,
  54494. resultName = _builder$done.resultName;
  54495. this._insertStatements(statements, blockHoist);
  54496. if ((isDefault || isNamed) && ensureNoContext && resultName.type !== "Identifier") {
  54497. return SequenceExpression([NumericLiteral(0), resultName]);
  54498. }
  54499. return resultName;
  54500. };
  54501. _proto._insertStatements = function _insertStatements(statements, blockHoist) {
  54502. if (blockHoist === void 0) {
  54503. blockHoist = 3;
  54504. }
  54505. statements.forEach(function (node) {
  54506. node._blockHoist = blockHoist;
  54507. });
  54508. var targetPath = this._programPath.get("body").find(function (p) {
  54509. var val = p.node._blockHoist;
  54510. return Number.isFinite(val) && val < 4;
  54511. });
  54512. if (targetPath) {
  54513. targetPath.insertBefore(statements);
  54514. } else {
  54515. this._programPath.unshiftContainer("body", statements);
  54516. }
  54517. };
  54518. return ImportInjector;
  54519. }();
  54520. function addDefault(path, importedSource, opts) {
  54521. return new ImportInjector(path).addDefault(importedSource, opts);
  54522. }
  54523. function addNamed(path, name, importedSource, opts) {
  54524. return new ImportInjector(path).addNamed(name, importedSource, opts);
  54525. }
  54526. function addSideEffect(path, importedSource, opts) {
  54527. return new ImportInjector(path).addSideEffect(importedSource, opts);
  54528. }
  54529. var transformAsyncToGenerator = declare(function (api, options) {
  54530. api.assertVersion(7);
  54531. var method = options.method,
  54532. module = options.module;
  54533. if (method && module) {
  54534. return {
  54535. name: "transform-async-to-generator",
  54536. visitor: {
  54537. Function: function Function(path, state) {
  54538. if (!path.node.async || path.node.generator) return;
  54539. var wrapAsync = state.methodWrapper;
  54540. if (wrapAsync) {
  54541. wrapAsync = cloneNode(wrapAsync);
  54542. } else {
  54543. wrapAsync = state.methodWrapper = addNamed(path, method, module);
  54544. }
  54545. remapAsyncToGenerator(path, {
  54546. wrapAsync: wrapAsync
  54547. });
  54548. }
  54549. }
  54550. };
  54551. }
  54552. return {
  54553. name: "transform-async-to-generator",
  54554. visitor: {
  54555. Function: function Function(path, state) {
  54556. if (!path.node.async || path.node.generator) return;
  54557. remapAsyncToGenerator(path, {
  54558. wrapAsync: state.addHelper("asyncToGenerator")
  54559. });
  54560. }
  54561. }
  54562. };
  54563. });
  54564. var transformArrowFunctions = declare(function (api, options) {
  54565. api.assertVersion(7);
  54566. var spec = options.spec;
  54567. return {
  54568. name: "transform-arrow-functions",
  54569. visitor: {
  54570. ArrowFunctionExpression: function ArrowFunctionExpression(path) {
  54571. if (!path.isArrowFunctionExpression()) return;
  54572. path.arrowFunctionToExpression({
  54573. allowInsertArrow: false,
  54574. specCompliant: !!spec
  54575. });
  54576. }
  54577. }
  54578. };
  54579. });
  54580. var transformBlockScopedFunctions = declare(function (api) {
  54581. api.assertVersion(7);
  54582. function statementList(key, path) {
  54583. var paths = path.get(key);
  54584. for (var _iterator = paths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  54585. var _ref;
  54586. if (_isArray) {
  54587. if (_i >= _iterator.length) break;
  54588. _ref = _iterator[_i++];
  54589. } else {
  54590. _i = _iterator.next();
  54591. if (_i.done) break;
  54592. _ref = _i.value;
  54593. }
  54594. var _path = _ref;
  54595. var func = _path.node;
  54596. if (!_path.isFunctionDeclaration()) continue;
  54597. var declar = VariableDeclaration("let", [VariableDeclarator(func.id, toExpression(func))]);
  54598. declar._blockHoist = 2;
  54599. func.id = null;
  54600. _path.replaceWith(declar);
  54601. }
  54602. }
  54603. return {
  54604. name: "transform-block-scoped-functions",
  54605. visitor: {
  54606. BlockStatement: function BlockStatement(path) {
  54607. var node = path.node,
  54608. parent = path.parent;
  54609. if (isFunction(parent, {
  54610. body: node
  54611. }) || isExportDeclaration(parent)) {
  54612. return;
  54613. }
  54614. statementList("body", path);
  54615. },
  54616. SwitchCase: function SwitchCase(path) {
  54617. statementList("consequent", path);
  54618. }
  54619. }
  54620. };
  54621. });
  54622. function _templateObject$5() {
  54623. var data = _taggedTemplateLiteralLoose(["", "(\"", "\")"]);
  54624. _templateObject$5 = function _templateObject() {
  54625. return data;
  54626. };
  54627. return data;
  54628. }
  54629. function getTDZStatus(refPath, bindingPath) {
  54630. var executionStatus = bindingPath._guessExecutionStatusRelativeTo(refPath);
  54631. if (executionStatus === "before") {
  54632. return "outside";
  54633. } else if (executionStatus === "after") {
  54634. return "inside";
  54635. } else {
  54636. return "maybe";
  54637. }
  54638. }
  54639. function buildTDZAssert(node, state) {
  54640. return CallExpression(state.addHelper("temporalRef"), [node, StringLiteral(node.name)]);
  54641. }
  54642. function isReference(node, scope, state) {
  54643. var declared = state.letReferences[node.name];
  54644. if (!declared) return false;
  54645. return scope.getBindingIdentifier(node.name) === declared;
  54646. }
  54647. var visitor$2 = {
  54648. ReferencedIdentifier: function ReferencedIdentifier(path, state) {
  54649. if (!state.tdzEnabled) return;
  54650. var node = path.node,
  54651. parent = path.parent,
  54652. scope = path.scope;
  54653. if (path.parentPath.isFor({
  54654. left: node
  54655. })) return;
  54656. if (!isReference(node, scope, state)) return;
  54657. var bindingPath = scope.getBinding(node.name).path;
  54658. if (bindingPath.isFunctionDeclaration()) return;
  54659. var status = getTDZStatus(path, bindingPath);
  54660. if (status === "outside") return;
  54661. if (status === "maybe") {
  54662. var assert = buildTDZAssert(node, state);
  54663. bindingPath.parent._tdzThis = true;
  54664. path.skip();
  54665. if (path.parentPath.isUpdateExpression()) {
  54666. if (parent._ignoreBlockScopingTDZ) return;
  54667. path.parentPath.replaceWith(SequenceExpression([assert, parent]));
  54668. } else {
  54669. path.replaceWith(assert);
  54670. }
  54671. } else if (status === "inside") {
  54672. path.replaceWith(template.ast(_templateObject$5(), state.addHelper("tdz"), node.name));
  54673. }
  54674. },
  54675. AssignmentExpression: {
  54676. exit: function exit(path, state) {
  54677. if (!state.tdzEnabled) return;
  54678. var node = path.node;
  54679. if (node._ignoreBlockScopingTDZ) return;
  54680. var nodes = [];
  54681. var ids = path.getBindingIdentifiers();
  54682. for (var _i = 0, _Object$keys = Object.keys(ids); _i < _Object$keys.length; _i++) {
  54683. var name = _Object$keys[_i];
  54684. var id = ids[name];
  54685. if (isReference(id, path.scope, state)) {
  54686. nodes.push(id);
  54687. }
  54688. }
  54689. if (nodes.length) {
  54690. node._ignoreBlockScopingTDZ = true;
  54691. nodes.push(node);
  54692. path.replaceWithMultiple(nodes.map(function (n) {
  54693. return ExpressionStatement(n);
  54694. }));
  54695. }
  54696. }
  54697. }
  54698. };
  54699. function createAssigner(assigner) {
  54700. return _baseRest(function (object, sources) {
  54701. var index = -1,
  54702. length = sources.length,
  54703. customizer = length > 1 ? sources[length - 1] : undefined,
  54704. guard = length > 2 ? sources[2] : undefined;
  54705. customizer = assigner.length > 3 && typeof customizer == 'function' ? (length--, customizer) : undefined;
  54706. if (guard && _isIterateeCall(sources[0], sources[1], guard)) {
  54707. customizer = length < 3 ? undefined : customizer;
  54708. length = 1;
  54709. }
  54710. object = Object(object);
  54711. while (++index < length) {
  54712. var source = sources[index];
  54713. if (source) {
  54714. assigner(object, source, index, customizer);
  54715. }
  54716. }
  54717. return object;
  54718. });
  54719. }
  54720. var _createAssigner = createAssigner;
  54721. var assignIn = _createAssigner(function (object, source) {
  54722. _copyObject(source, keysIn_1(source), object);
  54723. });
  54724. var assignIn_1 = assignIn;
  54725. var extend$1 = assignIn_1;
  54726. var DONE = new WeakSet();
  54727. var transformBlockScoping = declare(function (api, opts) {
  54728. api.assertVersion(7);
  54729. var _opts$throwIfClosureR = opts.throwIfClosureRequired,
  54730. throwIfClosureRequired = _opts$throwIfClosureR === void 0 ? false : _opts$throwIfClosureR,
  54731. _opts$tdz = opts.tdz,
  54732. tdzEnabled = _opts$tdz === void 0 ? false : _opts$tdz;
  54733. if (typeof throwIfClosureRequired !== "boolean") {
  54734. throw new Error(".throwIfClosureRequired must be a boolean, or undefined");
  54735. }
  54736. if (typeof tdzEnabled !== "boolean") {
  54737. throw new Error(".tdz must be a boolean, or undefined");
  54738. }
  54739. return {
  54740. name: "transform-block-scoping",
  54741. visitor: {
  54742. VariableDeclaration: function VariableDeclaration(path) {
  54743. var node = path.node,
  54744. parent = path.parent,
  54745. scope = path.scope;
  54746. if (!isBlockScoped$1(node)) return;
  54747. convertBlockScopedToVar(path, null, parent, scope, true);
  54748. if (node._tdzThis) {
  54749. var nodes = [node];
  54750. for (var i = 0; i < node.declarations.length; i++) {
  54751. var decl = node.declarations[i];
  54752. var assign = AssignmentExpression("=", decl.id, decl.init || scope.buildUndefinedNode());
  54753. assign._ignoreBlockScopingTDZ = true;
  54754. nodes.push(ExpressionStatement(assign));
  54755. decl.init = this.addHelper("temporalUndefined");
  54756. }
  54757. node._blockHoist = 2;
  54758. if (path.isCompletionRecord()) {
  54759. nodes.push(ExpressionStatement(scope.buildUndefinedNode()));
  54760. }
  54761. path.replaceWithMultiple(nodes);
  54762. }
  54763. },
  54764. Loop: function Loop(path, state) {
  54765. var parent = path.parent,
  54766. scope = path.scope;
  54767. path.ensureBlock();
  54768. var blockScoping = new BlockScoping(path, path.get("body"), parent, scope, throwIfClosureRequired, tdzEnabled, state);
  54769. var replace = blockScoping.run();
  54770. if (replace) path.replaceWith(replace);
  54771. },
  54772. CatchClause: function CatchClause(path, state) {
  54773. var parent = path.parent,
  54774. scope = path.scope;
  54775. var blockScoping = new BlockScoping(null, path.get("body"), parent, scope, throwIfClosureRequired, tdzEnabled, state);
  54776. blockScoping.run();
  54777. },
  54778. "BlockStatement|SwitchStatement|Program": function BlockStatementSwitchStatementProgram(path, state) {
  54779. if (!ignoreBlock(path)) {
  54780. var blockScoping = new BlockScoping(null, path, path.parent, path.scope, throwIfClosureRequired, tdzEnabled, state);
  54781. blockScoping.run();
  54782. }
  54783. }
  54784. }
  54785. };
  54786. });
  54787. function ignoreBlock(path) {
  54788. return isLoop(path.parent) || isCatchClause(path.parent);
  54789. }
  54790. var buildRetCheck = template("\n if (typeof RETURN === \"object\") return RETURN.v;\n");
  54791. function isBlockScoped$1(node) {
  54792. if (!isVariableDeclaration(node)) return false;
  54793. if (node[BLOCK_SCOPED_SYMBOL]) return true;
  54794. if (node.kind !== "let" && node.kind !== "const") return false;
  54795. return true;
  54796. }
  54797. function isInLoop(path) {
  54798. var loopOrFunctionParent = path.find(function (path) {
  54799. return path.isLoop() || path.isFunction();
  54800. });
  54801. return loopOrFunctionParent && loopOrFunctionParent.isLoop();
  54802. }
  54803. function convertBlockScopedToVar(path, node, parent, scope, moveBindingsToParent) {
  54804. if (moveBindingsToParent === void 0) {
  54805. moveBindingsToParent = false;
  54806. }
  54807. if (!node) {
  54808. node = path.node;
  54809. }
  54810. if (isInLoop(path) && !isFor(parent)) {
  54811. for (var i = 0; i < node.declarations.length; i++) {
  54812. var declar = node.declarations[i];
  54813. declar.init = declar.init || scope.buildUndefinedNode();
  54814. }
  54815. }
  54816. node[BLOCK_SCOPED_SYMBOL] = true;
  54817. node.kind = "var";
  54818. if (moveBindingsToParent) {
  54819. var parentScope = scope.getFunctionParent() || scope.getProgramParent();
  54820. for (var _i = 0, _Object$keys = Object.keys(path.getBindingIdentifiers()); _i < _Object$keys.length; _i++) {
  54821. var name = _Object$keys[_i];
  54822. var binding = scope.getOwnBinding(name);
  54823. if (binding) binding.kind = "var";
  54824. scope.moveBindingTo(name, parentScope);
  54825. }
  54826. }
  54827. }
  54828. function isVar$1(node) {
  54829. return isVariableDeclaration(node, {
  54830. kind: "var"
  54831. }) && !isBlockScoped$1(node);
  54832. }
  54833. var letReferenceBlockVisitor = traverse$1.visitors.merge([{
  54834. Loop: {
  54835. enter: function enter(path, state) {
  54836. state.loopDepth++;
  54837. },
  54838. exit: function exit(path, state) {
  54839. state.loopDepth--;
  54840. }
  54841. },
  54842. Function: function Function(path, state) {
  54843. if (state.loopDepth > 0) {
  54844. path.traverse(letReferenceFunctionVisitor, state);
  54845. } else {
  54846. path.traverse(visitor$2, state);
  54847. }
  54848. return path.skip();
  54849. }
  54850. }, visitor$2]);
  54851. var letReferenceFunctionVisitor = traverse$1.visitors.merge([{
  54852. ReferencedIdentifier: function ReferencedIdentifier(path, state) {
  54853. var ref = state.letReferences[path.node.name];
  54854. if (!ref) return;
  54855. var localBinding = path.scope.getBindingIdentifier(path.node.name);
  54856. if (localBinding && localBinding !== ref) return;
  54857. state.closurify = true;
  54858. }
  54859. }, visitor$2]);
  54860. var hoistVarDeclarationsVisitor = {
  54861. enter: function enter(path, self) {
  54862. var node = path.node,
  54863. parent = path.parent;
  54864. if (path.isForStatement()) {
  54865. if (isVar$1(node.init)) {
  54866. var nodes = self.pushDeclar(node.init);
  54867. if (nodes.length === 1) {
  54868. node.init = nodes[0];
  54869. } else {
  54870. node.init = SequenceExpression(nodes);
  54871. }
  54872. }
  54873. } else if (path.isFor()) {
  54874. if (isVar$1(node.left)) {
  54875. self.pushDeclar(node.left);
  54876. node.left = node.left.declarations[0].id;
  54877. }
  54878. } else if (isVar$1(node)) {
  54879. path.replaceWithMultiple(self.pushDeclar(node).map(function (expr) {
  54880. return ExpressionStatement(expr);
  54881. }));
  54882. } else if (path.isFunction()) {
  54883. return path.skip();
  54884. }
  54885. }
  54886. };
  54887. var loopLabelVisitor = {
  54888. LabeledStatement: function LabeledStatement(_ref, state) {
  54889. var node = _ref.node;
  54890. state.innerLabels.push(node.label.name);
  54891. }
  54892. };
  54893. var continuationVisitor = {
  54894. enter: function enter(path, state) {
  54895. if (path.isAssignmentExpression() || path.isUpdateExpression()) {
  54896. for (var _i2 = 0, _Object$keys2 = Object.keys(path.getBindingIdentifiers()); _i2 < _Object$keys2.length; _i2++) {
  54897. var name = _Object$keys2[_i2];
  54898. if (state.outsideReferences[name] !== path.scope.getBindingIdentifier(name)) {
  54899. continue;
  54900. }
  54901. state.reassignments[name] = true;
  54902. }
  54903. } else if (path.isReturnStatement()) {
  54904. state.returnStatements.push(path);
  54905. }
  54906. }
  54907. };
  54908. function loopNodeTo(node) {
  54909. if (isBreakStatement(node)) {
  54910. return "break";
  54911. } else if (isContinueStatement(node)) {
  54912. return "continue";
  54913. }
  54914. }
  54915. var loopVisitor = {
  54916. Loop: function Loop(path, state) {
  54917. var oldIgnoreLabeless = state.ignoreLabeless;
  54918. state.ignoreLabeless = true;
  54919. path.traverse(loopVisitor, state);
  54920. state.ignoreLabeless = oldIgnoreLabeless;
  54921. path.skip();
  54922. },
  54923. Function: function Function(path) {
  54924. path.skip();
  54925. },
  54926. SwitchCase: function SwitchCase(path, state) {
  54927. var oldInSwitchCase = state.inSwitchCase;
  54928. state.inSwitchCase = true;
  54929. path.traverse(loopVisitor, state);
  54930. state.inSwitchCase = oldInSwitchCase;
  54931. path.skip();
  54932. },
  54933. "BreakStatement|ContinueStatement|ReturnStatement": function BreakStatementContinueStatementReturnStatement(path, state) {
  54934. var node = path.node,
  54935. scope = path.scope;
  54936. if (node[this.LOOP_IGNORE]) return;
  54937. var replace;
  54938. var loopText = loopNodeTo(node);
  54939. if (loopText) {
  54940. if (node.label) {
  54941. if (state.innerLabels.indexOf(node.label.name) >= 0) {
  54942. return;
  54943. }
  54944. loopText = loopText + "|" + node.label.name;
  54945. } else {
  54946. if (state.ignoreLabeless) return;
  54947. if (isBreakStatement(node) && state.inSwitchCase) return;
  54948. }
  54949. state.hasBreakContinue = true;
  54950. state.map[loopText] = node;
  54951. replace = StringLiteral(loopText);
  54952. }
  54953. if (path.isReturnStatement()) {
  54954. state.hasReturn = true;
  54955. replace = ObjectExpression([ObjectProperty(Identifier("v"), node.argument || scope.buildUndefinedNode())]);
  54956. }
  54957. if (replace) {
  54958. replace = ReturnStatement(replace);
  54959. replace[this.LOOP_IGNORE] = true;
  54960. path.skip();
  54961. path.replaceWith(inherits(replace, node));
  54962. }
  54963. }
  54964. };
  54965. var BlockScoping = function () {
  54966. function BlockScoping(loopPath, blockPath, parent, scope, throwIfClosureRequired, tdzEnabled, state) {
  54967. this.parent = parent;
  54968. this.scope = scope;
  54969. this.state = state;
  54970. this.throwIfClosureRequired = throwIfClosureRequired;
  54971. this.tdzEnabled = tdzEnabled;
  54972. this.blockPath = blockPath;
  54973. this.block = blockPath.node;
  54974. this.outsideLetReferences = Object.create(null);
  54975. this.hasLetReferences = false;
  54976. this.letReferences = Object.create(null);
  54977. this.body = [];
  54978. if (loopPath) {
  54979. this.loopParent = loopPath.parent;
  54980. this.loopLabel = isLabeledStatement(this.loopParent) && this.loopParent.label;
  54981. this.loopPath = loopPath;
  54982. this.loop = loopPath.node;
  54983. }
  54984. }
  54985. var _proto = BlockScoping.prototype;
  54986. _proto.run = function run() {
  54987. var block = this.block;
  54988. if (DONE.has(block)) return;
  54989. DONE.add(block);
  54990. var needsClosure = this.getLetReferences();
  54991. this.checkConstants();
  54992. if (isFunction(this.parent) || isProgram(this.block)) {
  54993. this.updateScopeInfo();
  54994. return;
  54995. }
  54996. if (!this.hasLetReferences) return;
  54997. if (needsClosure) {
  54998. this.wrapClosure();
  54999. } else {
  55000. this.remap();
  55001. }
  55002. this.updateScopeInfo(needsClosure);
  55003. if (this.loopLabel && !isLabeledStatement(this.loopParent)) {
  55004. return LabeledStatement(this.loopLabel, this.loop);
  55005. }
  55006. };
  55007. _proto.checkConstants = function checkConstants() {
  55008. var scope = this.scope;
  55009. var state = this.state;
  55010. for (var _i3 = 0, _Object$keys3 = Object.keys(scope.bindings); _i3 < _Object$keys3.length; _i3++) {
  55011. var name = _Object$keys3[_i3];
  55012. var binding = scope.bindings[name];
  55013. if (binding.kind !== "const") continue;
  55014. for (var _i4 = 0, _arr = binding.constantViolations; _i4 < _arr.length; _i4++) {
  55015. var violation = _arr[_i4];
  55016. var readOnlyError = state.addHelper("readOnlyError");
  55017. var throwNode = CallExpression(readOnlyError, [StringLiteral(name)]);
  55018. if (violation.isAssignmentExpression()) {
  55019. violation.get("right").replaceWith(SequenceExpression([throwNode, violation.get("right").node]));
  55020. } else if (violation.isUpdateExpression()) {
  55021. violation.replaceWith(SequenceExpression([throwNode, violation.node]));
  55022. } else if (violation.isForXStatement()) {
  55023. violation.ensureBlock();
  55024. violation.node.body.body.unshift(ExpressionStatement(throwNode));
  55025. }
  55026. }
  55027. }
  55028. };
  55029. _proto.updateScopeInfo = function updateScopeInfo(wrappedInClosure) {
  55030. var blockScope = this.blockPath.scope;
  55031. var parentScope = blockScope.getFunctionParent() || blockScope.getProgramParent();
  55032. var letRefs = this.letReferences;
  55033. for (var _i5 = 0, _Object$keys4 = Object.keys(letRefs); _i5 < _Object$keys4.length; _i5++) {
  55034. var key = _Object$keys4[_i5];
  55035. var ref = letRefs[key];
  55036. var binding = blockScope.getBinding(ref.name);
  55037. if (!binding) continue;
  55038. if (binding.kind === "let" || binding.kind === "const") {
  55039. binding.kind = "var";
  55040. if (wrappedInClosure) {
  55041. if (blockScope.hasOwnBinding(ref.name)) {
  55042. blockScope.removeBinding(ref.name);
  55043. }
  55044. } else {
  55045. blockScope.moveBindingTo(ref.name, parentScope);
  55046. }
  55047. }
  55048. }
  55049. };
  55050. _proto.remap = function remap() {
  55051. var letRefs = this.letReferences;
  55052. var outsideLetRefs = this.outsideLetReferences;
  55053. var scope = this.scope;
  55054. var blockPathScope = this.blockPath.scope;
  55055. for (var _i6 = 0, _Object$keys5 = Object.keys(letRefs); _i6 < _Object$keys5.length; _i6++) {
  55056. var key = _Object$keys5[_i6];
  55057. var ref = letRefs[key];
  55058. if (scope.parentHasBinding(key) || scope.hasGlobal(key)) {
  55059. if (scope.hasOwnBinding(key)) {
  55060. scope.rename(ref.name);
  55061. }
  55062. if (blockPathScope.hasOwnBinding(key)) {
  55063. blockPathScope.rename(ref.name);
  55064. }
  55065. }
  55066. }
  55067. for (var _i7 = 0, _Object$keys6 = Object.keys(outsideLetRefs); _i7 < _Object$keys6.length; _i7++) {
  55068. var _key = _Object$keys6[_i7];
  55069. var _ref2 = letRefs[_key];
  55070. if (isInLoop(this.blockPath) && blockPathScope.hasOwnBinding(_key)) {
  55071. blockPathScope.rename(_ref2.name);
  55072. }
  55073. }
  55074. };
  55075. _proto.wrapClosure = function wrapClosure() {
  55076. if (this.throwIfClosureRequired) {
  55077. throw this.blockPath.buildCodeFrameError("Compiling let/const in this block would add a closure " + "(throwIfClosureRequired).");
  55078. }
  55079. var block = this.block;
  55080. var outsideRefs = this.outsideLetReferences;
  55081. if (this.loop) {
  55082. for (var _i8 = 0, _Object$keys7 = Object.keys(outsideRefs); _i8 < _Object$keys7.length; _i8++) {
  55083. var name = _Object$keys7[_i8];
  55084. var id = outsideRefs[name];
  55085. if (this.scope.hasGlobal(id.name) || this.scope.parentHasBinding(id.name)) {
  55086. delete outsideRefs[id.name];
  55087. delete this.letReferences[id.name];
  55088. this.scope.rename(id.name);
  55089. this.letReferences[id.name] = id;
  55090. outsideRefs[id.name] = id;
  55091. }
  55092. }
  55093. }
  55094. this.has = this.checkLoop();
  55095. this.hoistVarDeclarations();
  55096. var args = values_1(outsideRefs).map(function (id) {
  55097. return cloneNode(id);
  55098. });
  55099. var params = args.map(function (id) {
  55100. return cloneNode(id);
  55101. });
  55102. var isSwitch = this.blockPath.isSwitchStatement();
  55103. var fn = FunctionExpression(null, params, BlockStatement(isSwitch ? [block] : block.body));
  55104. this.addContinuations(fn);
  55105. var call = CallExpression(NullLiteral(), args);
  55106. var basePath = ".callee";
  55107. var hasYield = traverse$1.hasType(fn.body, "YieldExpression", FUNCTION_TYPES);
  55108. if (hasYield) {
  55109. fn.generator = true;
  55110. call = YieldExpression(call, true);
  55111. basePath = ".argument" + basePath;
  55112. }
  55113. var hasAsync = traverse$1.hasType(fn.body, "AwaitExpression", FUNCTION_TYPES);
  55114. if (hasAsync) {
  55115. fn.async = true;
  55116. call = AwaitExpression(call);
  55117. basePath = ".argument" + basePath;
  55118. }
  55119. var placeholderPath;
  55120. var index;
  55121. if (this.has.hasReturn || this.has.hasBreakContinue) {
  55122. var ret = this.scope.generateUid("ret");
  55123. this.body.push(VariableDeclaration("var", [VariableDeclarator(Identifier(ret), call)]));
  55124. placeholderPath = "declarations.0.init" + basePath;
  55125. index = this.body.length - 1;
  55126. this.buildHas(ret);
  55127. } else {
  55128. this.body.push(ExpressionStatement(call));
  55129. placeholderPath = "expression" + basePath;
  55130. index = this.body.length - 1;
  55131. }
  55132. var callPath;
  55133. if (isSwitch) {
  55134. var _this$blockPath = this.blockPath,
  55135. parentPath = _this$blockPath.parentPath,
  55136. listKey = _this$blockPath.listKey,
  55137. key = _this$blockPath.key;
  55138. this.blockPath.replaceWithMultiple(this.body);
  55139. callPath = parentPath.get(listKey)[key + index];
  55140. } else {
  55141. block.body = this.body;
  55142. callPath = this.blockPath.get("body")[index];
  55143. }
  55144. var placeholder = callPath.get(placeholderPath);
  55145. var fnPath;
  55146. if (this.loop) {
  55147. var loopId = this.scope.generateUid("loop");
  55148. var p = this.loopPath.insertBefore(VariableDeclaration("var", [VariableDeclarator(Identifier(loopId), fn)]));
  55149. placeholder.replaceWith(Identifier(loopId));
  55150. fnPath = p[0].get("declarations.0.init");
  55151. } else {
  55152. placeholder.replaceWith(fn);
  55153. fnPath = placeholder;
  55154. }
  55155. fnPath.unwrapFunctionEnvironment();
  55156. };
  55157. _proto.addContinuations = function addContinuations(fn) {
  55158. var _this = this;
  55159. var state = {
  55160. reassignments: {},
  55161. returnStatements: [],
  55162. outsideReferences: this.outsideLetReferences
  55163. };
  55164. this.scope.traverse(fn, continuationVisitor, state);
  55165. var _loop = function _loop(i) {
  55166. var param = fn.params[i];
  55167. if (!state.reassignments[param.name]) return "continue";
  55168. var paramName = param.name;
  55169. var newParamName = _this.scope.generateUid(param.name);
  55170. fn.params[i] = Identifier(newParamName);
  55171. _this.scope.rename(paramName, newParamName, fn);
  55172. state.returnStatements.forEach(function (returnStatement) {
  55173. returnStatement.insertBefore(ExpressionStatement(AssignmentExpression("=", Identifier(paramName), Identifier(newParamName))));
  55174. });
  55175. fn.body.body.push(ExpressionStatement(AssignmentExpression("=", Identifier(paramName), Identifier(newParamName))));
  55176. };
  55177. for (var i = 0; i < fn.params.length; i++) {
  55178. var _ret = _loop(i);
  55179. if (_ret === "continue") continue;
  55180. }
  55181. };
  55182. _proto.getLetReferences = function getLetReferences() {
  55183. var _this2 = this;
  55184. var block = this.block;
  55185. var declarators = [];
  55186. if (this.loop) {
  55187. var init = this.loop.left || this.loop.init;
  55188. if (isBlockScoped$1(init)) {
  55189. declarators.push(init);
  55190. extend$1(this.outsideLetReferences, getBindingIdentifiers(init));
  55191. }
  55192. }
  55193. var addDeclarationsFromChild = function addDeclarationsFromChild(path, node) {
  55194. node = node || path.node;
  55195. if (isClassDeclaration(node) || isFunctionDeclaration(node) || isBlockScoped$1(node)) {
  55196. if (isBlockScoped$1(node)) {
  55197. convertBlockScopedToVar(path, node, block, _this2.scope);
  55198. }
  55199. declarators = declarators.concat(node.declarations || node);
  55200. }
  55201. if (isLabeledStatement(node)) {
  55202. addDeclarationsFromChild(path.get("body"), node.body);
  55203. }
  55204. };
  55205. if (block.body) {
  55206. var declarPaths = this.blockPath.get("body");
  55207. for (var i = 0; i < block.body.length; i++) {
  55208. addDeclarationsFromChild(declarPaths[i]);
  55209. }
  55210. }
  55211. if (block.cases) {
  55212. var _declarPaths = this.blockPath.get("cases");
  55213. for (var _i9 = 0; _i9 < block.cases.length; _i9++) {
  55214. var consequents = block.cases[_i9].consequent;
  55215. for (var j = 0; j < consequents.length; j++) {
  55216. var declar = consequents[j];
  55217. addDeclarationsFromChild(_declarPaths[_i9], declar);
  55218. }
  55219. }
  55220. }
  55221. for (var _i10 = 0; _i10 < declarators.length; _i10++) {
  55222. var _declar = declarators[_i10];
  55223. var keys = getBindingIdentifiers(_declar, false, true);
  55224. extend$1(this.letReferences, keys);
  55225. this.hasLetReferences = true;
  55226. }
  55227. if (!this.hasLetReferences) return;
  55228. var state = {
  55229. letReferences: this.letReferences,
  55230. closurify: false,
  55231. loopDepth: 0,
  55232. tdzEnabled: this.tdzEnabled,
  55233. addHelper: function addHelper(name) {
  55234. return _this2.state.addHelper(name);
  55235. }
  55236. };
  55237. if (isInLoop(this.blockPath)) {
  55238. state.loopDepth++;
  55239. }
  55240. this.blockPath.traverse(letReferenceBlockVisitor, state);
  55241. return state.closurify;
  55242. };
  55243. _proto.checkLoop = function checkLoop() {
  55244. var state = {
  55245. hasBreakContinue: false,
  55246. ignoreLabeless: false,
  55247. inSwitchCase: false,
  55248. innerLabels: [],
  55249. hasReturn: false,
  55250. isLoop: !!this.loop,
  55251. map: {},
  55252. LOOP_IGNORE: Symbol()
  55253. };
  55254. this.blockPath.traverse(loopLabelVisitor, state);
  55255. this.blockPath.traverse(loopVisitor, state);
  55256. return state;
  55257. };
  55258. _proto.hoistVarDeclarations = function hoistVarDeclarations() {
  55259. this.blockPath.traverse(hoistVarDeclarationsVisitor, this);
  55260. };
  55261. _proto.pushDeclar = function pushDeclar(node) {
  55262. var declars = [];
  55263. var names = getBindingIdentifiers(node);
  55264. for (var _i11 = 0, _Object$keys8 = Object.keys(names); _i11 < _Object$keys8.length; _i11++) {
  55265. var name = _Object$keys8[_i11];
  55266. declars.push(VariableDeclarator(names[name]));
  55267. }
  55268. this.body.push(VariableDeclaration(node.kind, declars));
  55269. var replace = [];
  55270. for (var i = 0; i < node.declarations.length; i++) {
  55271. var declar = node.declarations[i];
  55272. if (!declar.init) continue;
  55273. var expr = AssignmentExpression("=", cloneNode(declar.id), cloneNode(declar.init));
  55274. replace.push(inherits(expr, declar));
  55275. }
  55276. return replace;
  55277. };
  55278. _proto.buildHas = function buildHas(ret) {
  55279. var body = this.body;
  55280. var retCheck;
  55281. var has = this.has;
  55282. var cases = [];
  55283. if (has.hasReturn) {
  55284. retCheck = buildRetCheck({
  55285. RETURN: Identifier(ret)
  55286. });
  55287. }
  55288. if (has.hasBreakContinue) {
  55289. for (var _i12 = 0, _Object$keys9 = Object.keys(has.map); _i12 < _Object$keys9.length; _i12++) {
  55290. var key = _Object$keys9[_i12];
  55291. cases.push(SwitchCase(StringLiteral(key), [has.map[key]]));
  55292. }
  55293. if (has.hasReturn) {
  55294. cases.push(SwitchCase(null, [retCheck]));
  55295. }
  55296. if (cases.length === 1) {
  55297. var single = cases[0];
  55298. body.push(IfStatement(BinaryExpression("===", Identifier(ret), single.test), single.consequent[0]));
  55299. } else {
  55300. if (this.loop) {
  55301. for (var i = 0; i < cases.length; i++) {
  55302. var caseConsequent = cases[i].consequent[0];
  55303. if (isBreakStatement(caseConsequent) && !caseConsequent.label) {
  55304. if (!this.loopLabel) {
  55305. this.loopLabel = this.scope.generateUidIdentifier("loop");
  55306. }
  55307. caseConsequent.label = cloneNode(this.loopLabel);
  55308. }
  55309. }
  55310. }
  55311. body.push(SwitchStatement(Identifier(ret), cases));
  55312. }
  55313. } else {
  55314. if (has.hasReturn) {
  55315. body.push(retCheck);
  55316. }
  55317. }
  55318. };
  55319. return BlockScoping;
  55320. }();
  55321. var builtin$1 = {
  55322. "Array": false,
  55323. "ArrayBuffer": false,
  55324. Atomics: false,
  55325. BigInt: false,
  55326. BigInt64Array: false,
  55327. BigUint64Array: false,
  55328. "Boolean": false,
  55329. constructor: false,
  55330. "DataView": false,
  55331. "Date": false,
  55332. "decodeURI": false,
  55333. "decodeURIComponent": false,
  55334. "encodeURI": false,
  55335. "encodeURIComponent": false,
  55336. "Error": false,
  55337. "escape": false,
  55338. "eval": false,
  55339. "EvalError": false,
  55340. "Float32Array": false,
  55341. "Float64Array": false,
  55342. "Function": false,
  55343. globalThis: false,
  55344. hasOwnProperty: false,
  55345. "Infinity": false,
  55346. "Int16Array": false,
  55347. "Int32Array": false,
  55348. "Int8Array": false,
  55349. "isFinite": false,
  55350. "isNaN": false,
  55351. isPrototypeOf: false,
  55352. "JSON": false,
  55353. "Map": false,
  55354. "Math": false,
  55355. "NaN": false,
  55356. "Number": false,
  55357. "Object": false,
  55358. "parseFloat": false,
  55359. "parseInt": false,
  55360. "Promise": false,
  55361. propertyIsEnumerable: false,
  55362. "Proxy": false,
  55363. "RangeError": false,
  55364. "ReferenceError": false,
  55365. "Reflect": false,
  55366. "RegExp": false,
  55367. "Set": false,
  55368. SharedArrayBuffer: false,
  55369. "String": false,
  55370. "Symbol": false,
  55371. "SyntaxError": false,
  55372. toLocaleString: false,
  55373. toString: false,
  55374. "TypeError": false,
  55375. "Uint16Array": false,
  55376. "Uint32Array": false,
  55377. "Uint8Array": false,
  55378. "Uint8ClampedArray": false,
  55379. "undefined": false,
  55380. "unescape": false,
  55381. "URIError": false,
  55382. valueOf: false,
  55383. "WeakMap": false,
  55384. "WeakSet": false
  55385. };
  55386. var es5$1 = {
  55387. "Array": false,
  55388. "Boolean": false,
  55389. constructor: false,
  55390. "Date": false,
  55391. "decodeURI": false,
  55392. "decodeURIComponent": false,
  55393. "encodeURI": false,
  55394. "encodeURIComponent": false,
  55395. "Error": false,
  55396. "escape": false,
  55397. "eval": false,
  55398. "EvalError": false,
  55399. "Function": false,
  55400. hasOwnProperty: false,
  55401. "Infinity": false,
  55402. "isFinite": false,
  55403. "isNaN": false,
  55404. isPrototypeOf: false,
  55405. "JSON": false,
  55406. "Math": false,
  55407. "NaN": false,
  55408. "Number": false,
  55409. "Object": false,
  55410. "parseFloat": false,
  55411. "parseInt": false,
  55412. propertyIsEnumerable: false,
  55413. "RangeError": false,
  55414. "ReferenceError": false,
  55415. "RegExp": false,
  55416. "String": false,
  55417. "SyntaxError": false,
  55418. toLocaleString: false,
  55419. toString: false,
  55420. "TypeError": false,
  55421. "undefined": false,
  55422. "unescape": false,
  55423. "URIError": false,
  55424. valueOf: false
  55425. };
  55426. var es2015$1 = {
  55427. "Array": false,
  55428. "ArrayBuffer": false,
  55429. "Boolean": false,
  55430. constructor: false,
  55431. "DataView": false,
  55432. "Date": false,
  55433. "decodeURI": false,
  55434. "decodeURIComponent": false,
  55435. "encodeURI": false,
  55436. "encodeURIComponent": false,
  55437. "Error": false,
  55438. "escape": false,
  55439. "eval": false,
  55440. "EvalError": false,
  55441. "Float32Array": false,
  55442. "Float64Array": false,
  55443. "Function": false,
  55444. hasOwnProperty: false,
  55445. "Infinity": false,
  55446. "Int16Array": false,
  55447. "Int32Array": false,
  55448. "Int8Array": false,
  55449. "isFinite": false,
  55450. "isNaN": false,
  55451. isPrototypeOf: false,
  55452. "JSON": false,
  55453. "Map": false,
  55454. "Math": false,
  55455. "NaN": false,
  55456. "Number": false,
  55457. "Object": false,
  55458. "parseFloat": false,
  55459. "parseInt": false,
  55460. "Promise": false,
  55461. propertyIsEnumerable: false,
  55462. "Proxy": false,
  55463. "RangeError": false,
  55464. "ReferenceError": false,
  55465. "Reflect": false,
  55466. "RegExp": false,
  55467. "Set": false,
  55468. "String": false,
  55469. "Symbol": false,
  55470. "SyntaxError": false,
  55471. toLocaleString: false,
  55472. toString: false,
  55473. "TypeError": false,
  55474. "Uint16Array": false,
  55475. "Uint32Array": false,
  55476. "Uint8Array": false,
  55477. "Uint8ClampedArray": false,
  55478. "undefined": false,
  55479. "unescape": false,
  55480. "URIError": false,
  55481. valueOf: false,
  55482. "WeakMap": false,
  55483. "WeakSet": false
  55484. };
  55485. var es2017$1 = {
  55486. "Array": false,
  55487. "ArrayBuffer": false,
  55488. Atomics: false,
  55489. "Boolean": false,
  55490. constructor: false,
  55491. "DataView": false,
  55492. "Date": false,
  55493. "decodeURI": false,
  55494. "decodeURIComponent": false,
  55495. "encodeURI": false,
  55496. "encodeURIComponent": false,
  55497. "Error": false,
  55498. "escape": false,
  55499. "eval": false,
  55500. "EvalError": false,
  55501. "Float32Array": false,
  55502. "Float64Array": false,
  55503. "Function": false,
  55504. hasOwnProperty: false,
  55505. "Infinity": false,
  55506. "Int16Array": false,
  55507. "Int32Array": false,
  55508. "Int8Array": false,
  55509. "isFinite": false,
  55510. "isNaN": false,
  55511. isPrototypeOf: false,
  55512. "JSON": false,
  55513. "Map": false,
  55514. "Math": false,
  55515. "NaN": false,
  55516. "Number": false,
  55517. "Object": false,
  55518. "parseFloat": false,
  55519. "parseInt": false,
  55520. "Promise": false,
  55521. propertyIsEnumerable: false,
  55522. "Proxy": false,
  55523. "RangeError": false,
  55524. "ReferenceError": false,
  55525. "Reflect": false,
  55526. "RegExp": false,
  55527. "Set": false,
  55528. SharedArrayBuffer: false,
  55529. "String": false,
  55530. "Symbol": false,
  55531. "SyntaxError": false,
  55532. toLocaleString: false,
  55533. toString: false,
  55534. "TypeError": false,
  55535. "Uint16Array": false,
  55536. "Uint32Array": false,
  55537. "Uint8Array": false,
  55538. "Uint8ClampedArray": false,
  55539. "undefined": false,
  55540. "unescape": false,
  55541. "URIError": false,
  55542. valueOf: false,
  55543. "WeakMap": false,
  55544. "WeakSet": false
  55545. };
  55546. var browser$5 = {
  55547. AbortController: false,
  55548. AbortSignal: false,
  55549. addEventListener: false,
  55550. alert: false,
  55551. AnalyserNode: false,
  55552. Animation: false,
  55553. AnimationEffectReadOnly: false,
  55554. AnimationEffectTiming: false,
  55555. AnimationEffectTimingReadOnly: false,
  55556. AnimationEvent: false,
  55557. AnimationPlaybackEvent: false,
  55558. AnimationTimeline: false,
  55559. applicationCache: false,
  55560. ApplicationCache: false,
  55561. ApplicationCacheErrorEvent: false,
  55562. atob: false,
  55563. Attr: false,
  55564. Audio: false,
  55565. AudioBuffer: false,
  55566. AudioBufferSourceNode: false,
  55567. AudioContext: false,
  55568. AudioDestinationNode: false,
  55569. AudioListener: false,
  55570. AudioNode: false,
  55571. AudioParam: false,
  55572. AudioProcessingEvent: false,
  55573. AudioScheduledSourceNode: false,
  55574. "AudioWorkletGlobalScope ": false,
  55575. AudioWorkletNode: false,
  55576. AudioWorkletProcessor: false,
  55577. BarProp: false,
  55578. BaseAudioContext: false,
  55579. BatteryManager: false,
  55580. BeforeUnloadEvent: false,
  55581. BiquadFilterNode: false,
  55582. Blob: false,
  55583. BlobEvent: false,
  55584. blur: false,
  55585. BroadcastChannel: false,
  55586. btoa: false,
  55587. BudgetService: false,
  55588. ByteLengthQueuingStrategy: false,
  55589. Cache: false,
  55590. caches: false,
  55591. CacheStorage: false,
  55592. cancelAnimationFrame: false,
  55593. cancelIdleCallback: false,
  55594. CanvasCaptureMediaStreamTrack: false,
  55595. CanvasGradient: false,
  55596. CanvasPattern: false,
  55597. CanvasRenderingContext2D: false,
  55598. ChannelMergerNode: false,
  55599. ChannelSplitterNode: false,
  55600. CharacterData: false,
  55601. clearInterval: false,
  55602. clearTimeout: false,
  55603. clientInformation: false,
  55604. ClipboardEvent: false,
  55605. close: false,
  55606. closed: false,
  55607. CloseEvent: false,
  55608. Comment: false,
  55609. CompositionEvent: false,
  55610. confirm: false,
  55611. console: false,
  55612. ConstantSourceNode: false,
  55613. ConvolverNode: false,
  55614. CountQueuingStrategy: false,
  55615. createImageBitmap: false,
  55616. Credential: false,
  55617. CredentialsContainer: false,
  55618. crypto: false,
  55619. Crypto: false,
  55620. CryptoKey: false,
  55621. CSS: false,
  55622. CSSConditionRule: false,
  55623. CSSFontFaceRule: false,
  55624. CSSGroupingRule: false,
  55625. CSSImportRule: false,
  55626. CSSKeyframeRule: false,
  55627. CSSKeyframesRule: false,
  55628. CSSMediaRule: false,
  55629. CSSNamespaceRule: false,
  55630. CSSPageRule: false,
  55631. CSSRule: false,
  55632. CSSRuleList: false,
  55633. CSSStyleDeclaration: false,
  55634. CSSStyleRule: false,
  55635. CSSStyleSheet: false,
  55636. CSSSupportsRule: false,
  55637. CustomElementRegistry: false,
  55638. customElements: false,
  55639. CustomEvent: false,
  55640. DataTransfer: false,
  55641. DataTransferItem: false,
  55642. DataTransferItemList: false,
  55643. defaultstatus: false,
  55644. defaultStatus: false,
  55645. DelayNode: false,
  55646. DeviceMotionEvent: false,
  55647. DeviceOrientationEvent: false,
  55648. devicePixelRatio: false,
  55649. dispatchEvent: false,
  55650. document: false,
  55651. Document: false,
  55652. DocumentFragment: false,
  55653. DocumentType: false,
  55654. DOMError: false,
  55655. DOMException: false,
  55656. DOMImplementation: false,
  55657. DOMMatrix: false,
  55658. DOMMatrixReadOnly: false,
  55659. DOMParser: false,
  55660. DOMPoint: false,
  55661. DOMPointReadOnly: false,
  55662. DOMQuad: false,
  55663. DOMRect: false,
  55664. DOMRectReadOnly: false,
  55665. DOMStringList: false,
  55666. DOMStringMap: false,
  55667. DOMTokenList: false,
  55668. DragEvent: false,
  55669. DynamicsCompressorNode: false,
  55670. Element: false,
  55671. ErrorEvent: false,
  55672. event: false,
  55673. Event: false,
  55674. EventSource: false,
  55675. EventTarget: false,
  55676. external: false,
  55677. fetch: false,
  55678. File: false,
  55679. FileList: false,
  55680. FileReader: false,
  55681. find: false,
  55682. focus: false,
  55683. FocusEvent: false,
  55684. FontFace: false,
  55685. FontFaceSetLoadEvent: false,
  55686. FormData: false,
  55687. frameElement: false,
  55688. frames: false,
  55689. GainNode: false,
  55690. Gamepad: false,
  55691. GamepadButton: false,
  55692. GamepadEvent: false,
  55693. getComputedStyle: false,
  55694. getSelection: false,
  55695. HashChangeEvent: false,
  55696. Headers: false,
  55697. history: false,
  55698. History: false,
  55699. HTMLAllCollection: false,
  55700. HTMLAnchorElement: false,
  55701. HTMLAreaElement: false,
  55702. HTMLAudioElement: false,
  55703. HTMLBaseElement: false,
  55704. HTMLBodyElement: false,
  55705. HTMLBRElement: false,
  55706. HTMLButtonElement: false,
  55707. HTMLCanvasElement: false,
  55708. HTMLCollection: false,
  55709. HTMLContentElement: false,
  55710. HTMLDataElement: false,
  55711. HTMLDataListElement: false,
  55712. HTMLDetailsElement: false,
  55713. HTMLDialogElement: false,
  55714. HTMLDirectoryElement: false,
  55715. HTMLDivElement: false,
  55716. HTMLDListElement: false,
  55717. HTMLDocument: false,
  55718. HTMLElement: false,
  55719. HTMLEmbedElement: false,
  55720. HTMLFieldSetElement: false,
  55721. HTMLFontElement: false,
  55722. HTMLFormControlsCollection: false,
  55723. HTMLFormElement: false,
  55724. HTMLFrameElement: false,
  55725. HTMLFrameSetElement: false,
  55726. HTMLHeadElement: false,
  55727. HTMLHeadingElement: false,
  55728. HTMLHRElement: false,
  55729. HTMLHtmlElement: false,
  55730. HTMLIFrameElement: false,
  55731. HTMLImageElement: false,
  55732. HTMLInputElement: false,
  55733. HTMLLabelElement: false,
  55734. HTMLLegendElement: false,
  55735. HTMLLIElement: false,
  55736. HTMLLinkElement: false,
  55737. HTMLMapElement: false,
  55738. HTMLMarqueeElement: false,
  55739. HTMLMediaElement: false,
  55740. HTMLMenuElement: false,
  55741. HTMLMetaElement: false,
  55742. HTMLMeterElement: false,
  55743. HTMLModElement: false,
  55744. HTMLObjectElement: false,
  55745. HTMLOListElement: false,
  55746. HTMLOptGroupElement: false,
  55747. HTMLOptionElement: false,
  55748. HTMLOptionsCollection: false,
  55749. HTMLOutputElement: false,
  55750. HTMLParagraphElement: false,
  55751. HTMLParamElement: false,
  55752. HTMLPictureElement: false,
  55753. HTMLPreElement: false,
  55754. HTMLProgressElement: false,
  55755. HTMLQuoteElement: false,
  55756. HTMLScriptElement: false,
  55757. HTMLSelectElement: false,
  55758. HTMLShadowElement: false,
  55759. HTMLSlotElement: false,
  55760. HTMLSourceElement: false,
  55761. HTMLSpanElement: false,
  55762. HTMLStyleElement: false,
  55763. HTMLTableCaptionElement: false,
  55764. HTMLTableCellElement: false,
  55765. HTMLTableColElement: false,
  55766. HTMLTableElement: false,
  55767. HTMLTableRowElement: false,
  55768. HTMLTableSectionElement: false,
  55769. HTMLTemplateElement: false,
  55770. HTMLTextAreaElement: false,
  55771. HTMLTimeElement: false,
  55772. HTMLTitleElement: false,
  55773. HTMLTrackElement: false,
  55774. HTMLUListElement: false,
  55775. HTMLUnknownElement: false,
  55776. HTMLVideoElement: false,
  55777. IDBCursor: false,
  55778. IDBCursorWithValue: false,
  55779. IDBDatabase: false,
  55780. IDBFactory: false,
  55781. IDBIndex: false,
  55782. IDBKeyRange: false,
  55783. IDBObjectStore: false,
  55784. IDBOpenDBRequest: false,
  55785. IDBRequest: false,
  55786. IDBTransaction: false,
  55787. IDBVersionChangeEvent: false,
  55788. IdleDeadline: false,
  55789. IIRFilterNode: false,
  55790. Image: false,
  55791. ImageBitmap: false,
  55792. ImageBitmapRenderingContext: false,
  55793. ImageCapture: false,
  55794. ImageData: false,
  55795. indexedDB: false,
  55796. innerHeight: false,
  55797. innerWidth: false,
  55798. InputEvent: false,
  55799. IntersectionObserver: false,
  55800. IntersectionObserverEntry: false,
  55801. "Intl": false,
  55802. isSecureContext: false,
  55803. KeyboardEvent: false,
  55804. KeyframeEffect: false,
  55805. KeyframeEffectReadOnly: false,
  55806. length: false,
  55807. localStorage: false,
  55808. location: true,
  55809. Location: false,
  55810. locationbar: false,
  55811. matchMedia: false,
  55812. MediaDeviceInfo: false,
  55813. MediaDevices: false,
  55814. MediaElementAudioSourceNode: false,
  55815. MediaEncryptedEvent: false,
  55816. MediaError: false,
  55817. MediaKeyMessageEvent: false,
  55818. MediaKeySession: false,
  55819. MediaKeyStatusMap: false,
  55820. MediaKeySystemAccess: false,
  55821. MediaList: false,
  55822. MediaQueryList: false,
  55823. MediaQueryListEvent: false,
  55824. MediaRecorder: false,
  55825. MediaSettingsRange: false,
  55826. MediaSource: false,
  55827. MediaStream: false,
  55828. MediaStreamAudioDestinationNode: false,
  55829. MediaStreamAudioSourceNode: false,
  55830. MediaStreamEvent: false,
  55831. MediaStreamTrack: false,
  55832. MediaStreamTrackEvent: false,
  55833. menubar: false,
  55834. MessageChannel: false,
  55835. MessageEvent: false,
  55836. MessagePort: false,
  55837. MIDIAccess: false,
  55838. MIDIConnectionEvent: false,
  55839. MIDIInput: false,
  55840. MIDIInputMap: false,
  55841. MIDIMessageEvent: false,
  55842. MIDIOutput: false,
  55843. MIDIOutputMap: false,
  55844. MIDIPort: false,
  55845. MimeType: false,
  55846. MimeTypeArray: false,
  55847. MouseEvent: false,
  55848. moveBy: false,
  55849. moveTo: false,
  55850. MutationEvent: false,
  55851. MutationObserver: false,
  55852. MutationRecord: false,
  55853. name: false,
  55854. NamedNodeMap: false,
  55855. NavigationPreloadManager: false,
  55856. navigator: false,
  55857. Navigator: false,
  55858. NetworkInformation: false,
  55859. Node: false,
  55860. NodeFilter: false,
  55861. NodeIterator: false,
  55862. NodeList: false,
  55863. Notification: false,
  55864. OfflineAudioCompletionEvent: false,
  55865. OfflineAudioContext: false,
  55866. offscreenBuffering: false,
  55867. OffscreenCanvas: true,
  55868. onabort: true,
  55869. onafterprint: true,
  55870. onanimationend: true,
  55871. onanimationiteration: true,
  55872. onanimationstart: true,
  55873. onappinstalled: true,
  55874. onauxclick: true,
  55875. onbeforeinstallprompt: true,
  55876. onbeforeprint: true,
  55877. onbeforeunload: true,
  55878. onblur: true,
  55879. oncancel: true,
  55880. oncanplay: true,
  55881. oncanplaythrough: true,
  55882. onchange: true,
  55883. onclick: true,
  55884. onclose: true,
  55885. oncontextmenu: true,
  55886. oncuechange: true,
  55887. ondblclick: true,
  55888. ondevicemotion: true,
  55889. ondeviceorientation: true,
  55890. ondeviceorientationabsolute: true,
  55891. ondrag: true,
  55892. ondragend: true,
  55893. ondragenter: true,
  55894. ondragleave: true,
  55895. ondragover: true,
  55896. ondragstart: true,
  55897. ondrop: true,
  55898. ondurationchange: true,
  55899. onemptied: true,
  55900. onended: true,
  55901. onerror: true,
  55902. onfocus: true,
  55903. ongotpointercapture: true,
  55904. onhashchange: true,
  55905. oninput: true,
  55906. oninvalid: true,
  55907. onkeydown: true,
  55908. onkeypress: true,
  55909. onkeyup: true,
  55910. onlanguagechange: true,
  55911. onload: true,
  55912. onloadeddata: true,
  55913. onloadedmetadata: true,
  55914. onloadstart: true,
  55915. onlostpointercapture: true,
  55916. onmessage: true,
  55917. onmessageerror: true,
  55918. onmousedown: true,
  55919. onmouseenter: true,
  55920. onmouseleave: true,
  55921. onmousemove: true,
  55922. onmouseout: true,
  55923. onmouseover: true,
  55924. onmouseup: true,
  55925. onmousewheel: true,
  55926. onoffline: true,
  55927. ononline: true,
  55928. onpagehide: true,
  55929. onpageshow: true,
  55930. onpause: true,
  55931. onplay: true,
  55932. onplaying: true,
  55933. onpointercancel: true,
  55934. onpointerdown: true,
  55935. onpointerenter: true,
  55936. onpointerleave: true,
  55937. onpointermove: true,
  55938. onpointerout: true,
  55939. onpointerover: true,
  55940. onpointerup: true,
  55941. onpopstate: true,
  55942. onprogress: true,
  55943. onratechange: true,
  55944. onrejectionhandled: true,
  55945. onreset: true,
  55946. onresize: true,
  55947. onscroll: true,
  55948. onsearch: true,
  55949. onseeked: true,
  55950. onseeking: true,
  55951. onselect: true,
  55952. onstalled: true,
  55953. onstorage: true,
  55954. onsubmit: true,
  55955. onsuspend: true,
  55956. ontimeupdate: true,
  55957. ontoggle: true,
  55958. ontransitionend: true,
  55959. onunhandledrejection: true,
  55960. onunload: true,
  55961. onvolumechange: true,
  55962. onwaiting: true,
  55963. onwheel: true,
  55964. open: false,
  55965. openDatabase: false,
  55966. opener: false,
  55967. Option: false,
  55968. origin: false,
  55969. OscillatorNode: false,
  55970. outerHeight: false,
  55971. outerWidth: false,
  55972. PageTransitionEvent: false,
  55973. pageXOffset: false,
  55974. pageYOffset: false,
  55975. PannerNode: false,
  55976. parent: false,
  55977. Path2D: false,
  55978. PaymentAddress: false,
  55979. PaymentRequest: false,
  55980. PaymentRequestUpdateEvent: false,
  55981. PaymentResponse: false,
  55982. performance: false,
  55983. Performance: false,
  55984. PerformanceEntry: false,
  55985. PerformanceLongTaskTiming: false,
  55986. PerformanceMark: false,
  55987. PerformanceMeasure: false,
  55988. PerformanceNavigation: false,
  55989. PerformanceNavigationTiming: false,
  55990. PerformanceObserver: false,
  55991. PerformanceObserverEntryList: false,
  55992. PerformancePaintTiming: false,
  55993. PerformanceResourceTiming: false,
  55994. PerformanceTiming: false,
  55995. PeriodicWave: false,
  55996. Permissions: false,
  55997. PermissionStatus: false,
  55998. personalbar: false,
  55999. PhotoCapabilities: false,
  56000. Plugin: false,
  56001. PluginArray: false,
  56002. PointerEvent: false,
  56003. PopStateEvent: false,
  56004. postMessage: false,
  56005. Presentation: false,
  56006. PresentationAvailability: false,
  56007. PresentationConnection: false,
  56008. PresentationConnectionAvailableEvent: false,
  56009. PresentationConnectionCloseEvent: false,
  56010. PresentationConnectionList: false,
  56011. PresentationReceiver: false,
  56012. PresentationRequest: false,
  56013. print: false,
  56014. ProcessingInstruction: false,
  56015. ProgressEvent: false,
  56016. PromiseRejectionEvent: false,
  56017. prompt: false,
  56018. PushManager: false,
  56019. PushSubscription: false,
  56020. PushSubscriptionOptions: false,
  56021. queueMicrotask: false,
  56022. RadioNodeList: false,
  56023. Range: false,
  56024. ReadableStream: false,
  56025. registerProcessor: false,
  56026. RemotePlayback: false,
  56027. removeEventListener: false,
  56028. Request: false,
  56029. requestAnimationFrame: false,
  56030. requestIdleCallback: false,
  56031. resizeBy: false,
  56032. ResizeObserver: false,
  56033. ResizeObserverEntry: false,
  56034. resizeTo: false,
  56035. Response: false,
  56036. RTCCertificate: false,
  56037. RTCDataChannel: false,
  56038. RTCDataChannelEvent: false,
  56039. RTCDtlsTransport: false,
  56040. RTCIceCandidate: false,
  56041. RTCIceGatherer: false,
  56042. RTCIceTransport: false,
  56043. RTCPeerConnection: false,
  56044. RTCPeerConnectionIceEvent: false,
  56045. RTCRtpContributingSource: false,
  56046. RTCRtpReceiver: false,
  56047. RTCRtpSender: false,
  56048. RTCSctpTransport: false,
  56049. RTCSessionDescription: false,
  56050. RTCStatsReport: false,
  56051. RTCTrackEvent: false,
  56052. screen: false,
  56053. Screen: false,
  56054. screenLeft: false,
  56055. ScreenOrientation: false,
  56056. screenTop: false,
  56057. screenX: false,
  56058. screenY: false,
  56059. ScriptProcessorNode: false,
  56060. scroll: false,
  56061. scrollbars: false,
  56062. scrollBy: false,
  56063. scrollTo: false,
  56064. scrollX: false,
  56065. scrollY: false,
  56066. SecurityPolicyViolationEvent: false,
  56067. Selection: false,
  56068. self: false,
  56069. ServiceWorker: false,
  56070. ServiceWorkerContainer: false,
  56071. ServiceWorkerRegistration: false,
  56072. sessionStorage: false,
  56073. setInterval: false,
  56074. setTimeout: false,
  56075. ShadowRoot: false,
  56076. SharedWorker: false,
  56077. SourceBuffer: false,
  56078. SourceBufferList: false,
  56079. speechSynthesis: false,
  56080. SpeechSynthesisEvent: false,
  56081. SpeechSynthesisUtterance: false,
  56082. StaticRange: false,
  56083. status: false,
  56084. statusbar: false,
  56085. StereoPannerNode: false,
  56086. stop: false,
  56087. Storage: false,
  56088. StorageEvent: false,
  56089. StorageManager: false,
  56090. styleMedia: false,
  56091. StyleSheet: false,
  56092. StyleSheetList: false,
  56093. SubtleCrypto: false,
  56094. SVGAElement: false,
  56095. SVGAngle: false,
  56096. SVGAnimatedAngle: false,
  56097. SVGAnimatedBoolean: false,
  56098. SVGAnimatedEnumeration: false,
  56099. SVGAnimatedInteger: false,
  56100. SVGAnimatedLength: false,
  56101. SVGAnimatedLengthList: false,
  56102. SVGAnimatedNumber: false,
  56103. SVGAnimatedNumberList: false,
  56104. SVGAnimatedPreserveAspectRatio: false,
  56105. SVGAnimatedRect: false,
  56106. SVGAnimatedString: false,
  56107. SVGAnimatedTransformList: false,
  56108. SVGAnimateElement: false,
  56109. SVGAnimateMotionElement: false,
  56110. SVGAnimateTransformElement: false,
  56111. SVGAnimationElement: false,
  56112. SVGCircleElement: false,
  56113. SVGClipPathElement: false,
  56114. SVGComponentTransferFunctionElement: false,
  56115. SVGDefsElement: false,
  56116. SVGDescElement: false,
  56117. SVGDiscardElement: false,
  56118. SVGElement: false,
  56119. SVGEllipseElement: false,
  56120. SVGFEBlendElement: false,
  56121. SVGFEColorMatrixElement: false,
  56122. SVGFEComponentTransferElement: false,
  56123. SVGFECompositeElement: false,
  56124. SVGFEConvolveMatrixElement: false,
  56125. SVGFEDiffuseLightingElement: false,
  56126. SVGFEDisplacementMapElement: false,
  56127. SVGFEDistantLightElement: false,
  56128. SVGFEDropShadowElement: false,
  56129. SVGFEFloodElement: false,
  56130. SVGFEFuncAElement: false,
  56131. SVGFEFuncBElement: false,
  56132. SVGFEFuncGElement: false,
  56133. SVGFEFuncRElement: false,
  56134. SVGFEGaussianBlurElement: false,
  56135. SVGFEImageElement: false,
  56136. SVGFEMergeElement: false,
  56137. SVGFEMergeNodeElement: false,
  56138. SVGFEMorphologyElement: false,
  56139. SVGFEOffsetElement: false,
  56140. SVGFEPointLightElement: false,
  56141. SVGFESpecularLightingElement: false,
  56142. SVGFESpotLightElement: false,
  56143. SVGFETileElement: false,
  56144. SVGFETurbulenceElement: false,
  56145. SVGFilterElement: false,
  56146. SVGForeignObjectElement: false,
  56147. SVGGElement: false,
  56148. SVGGeometryElement: false,
  56149. SVGGradientElement: false,
  56150. SVGGraphicsElement: false,
  56151. SVGImageElement: false,
  56152. SVGLength: false,
  56153. SVGLengthList: false,
  56154. SVGLinearGradientElement: false,
  56155. SVGLineElement: false,
  56156. SVGMarkerElement: false,
  56157. SVGMaskElement: false,
  56158. SVGMatrix: false,
  56159. SVGMetadataElement: false,
  56160. SVGMPathElement: false,
  56161. SVGNumber: false,
  56162. SVGNumberList: false,
  56163. SVGPathElement: false,
  56164. SVGPatternElement: false,
  56165. SVGPoint: false,
  56166. SVGPointList: false,
  56167. SVGPolygonElement: false,
  56168. SVGPolylineElement: false,
  56169. SVGPreserveAspectRatio: false,
  56170. SVGRadialGradientElement: false,
  56171. SVGRect: false,
  56172. SVGRectElement: false,
  56173. SVGScriptElement: false,
  56174. SVGSetElement: false,
  56175. SVGStopElement: false,
  56176. SVGStringList: false,
  56177. SVGStyleElement: false,
  56178. SVGSVGElement: false,
  56179. SVGSwitchElement: false,
  56180. SVGSymbolElement: false,
  56181. SVGTextContentElement: false,
  56182. SVGTextElement: false,
  56183. SVGTextPathElement: false,
  56184. SVGTextPositioningElement: false,
  56185. SVGTitleElement: false,
  56186. SVGTransform: false,
  56187. SVGTransformList: false,
  56188. SVGTSpanElement: false,
  56189. SVGUnitTypes: false,
  56190. SVGUseElement: false,
  56191. SVGViewElement: false,
  56192. TaskAttributionTiming: false,
  56193. Text: false,
  56194. TextDecoder: false,
  56195. TextEncoder: false,
  56196. TextEvent: false,
  56197. TextMetrics: false,
  56198. TextTrack: false,
  56199. TextTrackCue: false,
  56200. TextTrackCueList: false,
  56201. TextTrackList: false,
  56202. TimeRanges: false,
  56203. toolbar: false,
  56204. top: false,
  56205. Touch: false,
  56206. TouchEvent: false,
  56207. TouchList: false,
  56208. TrackEvent: false,
  56209. TransitionEvent: false,
  56210. TreeWalker: false,
  56211. UIEvent: false,
  56212. URL: false,
  56213. URLSearchParams: false,
  56214. ValidityState: false,
  56215. visualViewport: false,
  56216. VisualViewport: false,
  56217. VTTCue: false,
  56218. WaveShaperNode: false,
  56219. WebAssembly: false,
  56220. WebGL2RenderingContext: false,
  56221. WebGLActiveInfo: false,
  56222. WebGLBuffer: false,
  56223. WebGLContextEvent: false,
  56224. WebGLFramebuffer: false,
  56225. WebGLProgram: false,
  56226. WebGLQuery: false,
  56227. WebGLRenderbuffer: false,
  56228. WebGLRenderingContext: false,
  56229. WebGLSampler: false,
  56230. WebGLShader: false,
  56231. WebGLShaderPrecisionFormat: false,
  56232. WebGLSync: false,
  56233. WebGLTexture: false,
  56234. WebGLTransformFeedback: false,
  56235. WebGLUniformLocation: false,
  56236. WebGLVertexArrayObject: false,
  56237. WebSocket: false,
  56238. WheelEvent: false,
  56239. window: false,
  56240. Window: false,
  56241. Worker: false,
  56242. WritableStream: false,
  56243. XMLDocument: false,
  56244. XMLHttpRequest: false,
  56245. XMLHttpRequestEventTarget: false,
  56246. XMLHttpRequestUpload: false,
  56247. XMLSerializer: false,
  56248. XPathEvaluator: false,
  56249. XPathExpression: false,
  56250. XPathResult: false,
  56251. XSLTProcessor: false
  56252. };
  56253. var worker$1 = {
  56254. addEventListener: false,
  56255. applicationCache: false,
  56256. atob: false,
  56257. Blob: false,
  56258. BroadcastChannel: false,
  56259. btoa: false,
  56260. Cache: false,
  56261. caches: false,
  56262. clearInterval: false,
  56263. clearTimeout: false,
  56264. close: true,
  56265. console: false,
  56266. fetch: false,
  56267. FileReaderSync: false,
  56268. FormData: false,
  56269. Headers: false,
  56270. IDBCursor: false,
  56271. IDBCursorWithValue: false,
  56272. IDBDatabase: false,
  56273. IDBFactory: false,
  56274. IDBIndex: false,
  56275. IDBKeyRange: false,
  56276. IDBObjectStore: false,
  56277. IDBOpenDBRequest: false,
  56278. IDBRequest: false,
  56279. IDBTransaction: false,
  56280. IDBVersionChangeEvent: false,
  56281. ImageData: false,
  56282. importScripts: true,
  56283. indexedDB: false,
  56284. location: false,
  56285. MessageChannel: false,
  56286. MessagePort: false,
  56287. name: false,
  56288. navigator: false,
  56289. Notification: false,
  56290. onclose: true,
  56291. onconnect: true,
  56292. onerror: true,
  56293. onlanguagechange: true,
  56294. onmessage: true,
  56295. onoffline: true,
  56296. ononline: true,
  56297. onrejectionhandled: true,
  56298. onunhandledrejection: true,
  56299. performance: false,
  56300. Performance: false,
  56301. PerformanceEntry: false,
  56302. PerformanceMark: false,
  56303. PerformanceMeasure: false,
  56304. PerformanceNavigation: false,
  56305. PerformanceResourceTiming: false,
  56306. PerformanceTiming: false,
  56307. postMessage: true,
  56308. "Promise": false,
  56309. queueMicrotask: false,
  56310. removeEventListener: false,
  56311. Request: false,
  56312. Response: false,
  56313. self: true,
  56314. ServiceWorkerRegistration: false,
  56315. setInterval: false,
  56316. setTimeout: false,
  56317. TextDecoder: false,
  56318. TextEncoder: false,
  56319. URL: false,
  56320. URLSearchParams: false,
  56321. WebSocket: false,
  56322. Worker: false,
  56323. WorkerGlobalScope: false,
  56324. XMLHttpRequest: false
  56325. };
  56326. var node$1 = {
  56327. __dirname: false,
  56328. __filename: false,
  56329. Buffer: false,
  56330. clearImmediate: false,
  56331. clearInterval: false,
  56332. clearTimeout: false,
  56333. console: false,
  56334. exports: true,
  56335. global: false,
  56336. "Intl": false,
  56337. module: false,
  56338. process: false,
  56339. queueMicrotask: false,
  56340. require: false,
  56341. setImmediate: false,
  56342. setInterval: false,
  56343. setTimeout: false,
  56344. TextDecoder: false,
  56345. TextEncoder: false,
  56346. URL: false,
  56347. URLSearchParams: false
  56348. };
  56349. var commonjs$1 = {
  56350. exports: true,
  56351. global: false,
  56352. module: false,
  56353. require: false
  56354. };
  56355. var amd$1 = {
  56356. define: false,
  56357. require: false
  56358. };
  56359. var mocha$1 = {
  56360. after: false,
  56361. afterEach: false,
  56362. before: false,
  56363. beforeEach: false,
  56364. context: false,
  56365. describe: false,
  56366. it: false,
  56367. mocha: false,
  56368. run: false,
  56369. setup: false,
  56370. specify: false,
  56371. suite: false,
  56372. suiteSetup: false,
  56373. suiteTeardown: false,
  56374. teardown: false,
  56375. test: false,
  56376. xcontext: false,
  56377. xdescribe: false,
  56378. xit: false,
  56379. xspecify: false
  56380. };
  56381. var jasmine$1 = {
  56382. afterAll: false,
  56383. afterEach: false,
  56384. beforeAll: false,
  56385. beforeEach: false,
  56386. describe: false,
  56387. expect: false,
  56388. fail: false,
  56389. fdescribe: false,
  56390. fit: false,
  56391. it: false,
  56392. jasmine: false,
  56393. pending: false,
  56394. runs: false,
  56395. spyOn: false,
  56396. spyOnProperty: false,
  56397. waits: false,
  56398. waitsFor: false,
  56399. xdescribe: false,
  56400. xit: false
  56401. };
  56402. var jest$1 = {
  56403. afterAll: false,
  56404. afterEach: false,
  56405. beforeAll: false,
  56406. beforeEach: false,
  56407. describe: false,
  56408. expect: false,
  56409. fdescribe: false,
  56410. fit: false,
  56411. it: false,
  56412. jest: false,
  56413. pit: false,
  56414. require: false,
  56415. test: false,
  56416. xdescribe: false,
  56417. xit: false,
  56418. xtest: false
  56419. };
  56420. var qunit$1 = {
  56421. asyncTest: false,
  56422. deepEqual: false,
  56423. equal: false,
  56424. expect: false,
  56425. module: false,
  56426. notDeepEqual: false,
  56427. notEqual: false,
  56428. notOk: false,
  56429. notPropEqual: false,
  56430. notStrictEqual: false,
  56431. ok: false,
  56432. propEqual: false,
  56433. QUnit: false,
  56434. raises: false,
  56435. start: false,
  56436. stop: false,
  56437. strictEqual: false,
  56438. test: false,
  56439. throws: false
  56440. };
  56441. var phantomjs$1 = {
  56442. console: true,
  56443. exports: true,
  56444. phantom: true,
  56445. require: true,
  56446. WebPage: true
  56447. };
  56448. var couch$1 = {
  56449. emit: false,
  56450. exports: false,
  56451. getRow: false,
  56452. log: false,
  56453. module: false,
  56454. provides: false,
  56455. require: false,
  56456. respond: false,
  56457. send: false,
  56458. start: false,
  56459. sum: false
  56460. };
  56461. var rhino$1 = {
  56462. defineClass: false,
  56463. deserialize: false,
  56464. gc: false,
  56465. help: false,
  56466. importClass: false,
  56467. importPackage: false,
  56468. java: false,
  56469. load: false,
  56470. loadClass: false,
  56471. Packages: false,
  56472. print: false,
  56473. quit: false,
  56474. readFile: false,
  56475. readUrl: false,
  56476. runCommand: false,
  56477. seal: false,
  56478. serialize: false,
  56479. spawn: false,
  56480. sync: false,
  56481. toint32: false,
  56482. version: false
  56483. };
  56484. var nashorn$1 = {
  56485. __DIR__: false,
  56486. __FILE__: false,
  56487. __LINE__: false,
  56488. com: false,
  56489. edu: false,
  56490. exit: false,
  56491. java: false,
  56492. Java: false,
  56493. javafx: false,
  56494. JavaImporter: false,
  56495. javax: false,
  56496. JSAdapter: false,
  56497. load: false,
  56498. loadWithNewGlobal: false,
  56499. org: false,
  56500. Packages: false,
  56501. print: false,
  56502. quit: false
  56503. };
  56504. var wsh$1 = {
  56505. ActiveXObject: true,
  56506. Enumerator: true,
  56507. GetObject: true,
  56508. ScriptEngine: true,
  56509. ScriptEngineBuildVersion: true,
  56510. ScriptEngineMajorVersion: true,
  56511. ScriptEngineMinorVersion: true,
  56512. VBArray: true,
  56513. WScript: true,
  56514. WSH: true,
  56515. XDomainRequest: true
  56516. };
  56517. var jquery$1 = {
  56518. $: false,
  56519. jQuery: false
  56520. };
  56521. var yui$1 = {
  56522. YAHOO: false,
  56523. YAHOO_config: false,
  56524. YUI: false,
  56525. YUI_config: false
  56526. };
  56527. var shelljs$1 = {
  56528. cat: false,
  56529. cd: false,
  56530. chmod: false,
  56531. config: false,
  56532. cp: false,
  56533. dirs: false,
  56534. echo: false,
  56535. env: false,
  56536. error: false,
  56537. exec: false,
  56538. exit: false,
  56539. find: false,
  56540. grep: false,
  56541. ln: false,
  56542. ls: false,
  56543. mkdir: false,
  56544. mv: false,
  56545. popd: false,
  56546. pushd: false,
  56547. pwd: false,
  56548. rm: false,
  56549. sed: false,
  56550. set: false,
  56551. target: false,
  56552. tempdir: false,
  56553. test: false,
  56554. touch: false,
  56555. which: false
  56556. };
  56557. var prototypejs$1 = {
  56558. $: false,
  56559. $$: false,
  56560. $A: false,
  56561. $break: false,
  56562. $continue: false,
  56563. $F: false,
  56564. $H: false,
  56565. $R: false,
  56566. $w: false,
  56567. Abstract: false,
  56568. Ajax: false,
  56569. Autocompleter: false,
  56570. Builder: false,
  56571. Class: false,
  56572. Control: false,
  56573. Draggable: false,
  56574. Draggables: false,
  56575. Droppables: false,
  56576. Effect: false,
  56577. Element: false,
  56578. Enumerable: false,
  56579. Event: false,
  56580. Field: false,
  56581. Form: false,
  56582. Hash: false,
  56583. Insertion: false,
  56584. ObjectRange: false,
  56585. PeriodicalExecuter: false,
  56586. Position: false,
  56587. Prototype: false,
  56588. Scriptaculous: false,
  56589. Selector: false,
  56590. Sortable: false,
  56591. SortableObserver: false,
  56592. Sound: false,
  56593. Template: false,
  56594. Toggle: false,
  56595. Try: false
  56596. };
  56597. var meteor$1 = {
  56598. _: false,
  56599. $: false,
  56600. Accounts: false,
  56601. AccountsClient: false,
  56602. AccountsCommon: false,
  56603. AccountsServer: false,
  56604. App: false,
  56605. Assets: false,
  56606. Blaze: false,
  56607. check: false,
  56608. Cordova: false,
  56609. DDP: false,
  56610. DDPRateLimiter: false,
  56611. DDPServer: false,
  56612. Deps: false,
  56613. EJSON: false,
  56614. Email: false,
  56615. HTTP: false,
  56616. Log: false,
  56617. Match: false,
  56618. Meteor: false,
  56619. Mongo: false,
  56620. MongoInternals: false,
  56621. Npm: false,
  56622. Package: false,
  56623. Plugin: false,
  56624. process: false,
  56625. Random: false,
  56626. ReactiveDict: false,
  56627. ReactiveVar: false,
  56628. Router: false,
  56629. ServiceConfiguration: false,
  56630. Session: false,
  56631. share: false,
  56632. Spacebars: false,
  56633. Template: false,
  56634. Tinytest: false,
  56635. Tracker: false,
  56636. UI: false,
  56637. Utils: false,
  56638. WebApp: false,
  56639. WebAppInternals: false
  56640. };
  56641. var mongo$1 = {
  56642. _isWindows: false,
  56643. _rand: false,
  56644. BulkWriteResult: false,
  56645. cat: false,
  56646. cd: false,
  56647. connect: false,
  56648. db: false,
  56649. getHostName: false,
  56650. getMemInfo: false,
  56651. hostname: false,
  56652. ISODate: false,
  56653. listFiles: false,
  56654. load: false,
  56655. ls: false,
  56656. md5sumFile: false,
  56657. mkdir: false,
  56658. Mongo: false,
  56659. NumberInt: false,
  56660. NumberLong: false,
  56661. ObjectId: false,
  56662. PlanCache: false,
  56663. print: false,
  56664. printjson: false,
  56665. pwd: false,
  56666. quit: false,
  56667. removeFile: false,
  56668. rs: false,
  56669. sh: false,
  56670. UUID: false,
  56671. version: false,
  56672. WriteResult: false
  56673. };
  56674. var applescript$1 = {
  56675. $: false,
  56676. Application: false,
  56677. Automation: false,
  56678. console: false,
  56679. delay: false,
  56680. Library: false,
  56681. ObjC: false,
  56682. ObjectSpecifier: false,
  56683. Path: false,
  56684. Progress: false,
  56685. Ref: false
  56686. };
  56687. var serviceworker$1 = {
  56688. addEventListener: false,
  56689. applicationCache: false,
  56690. atob: false,
  56691. Blob: false,
  56692. BroadcastChannel: false,
  56693. btoa: false,
  56694. Cache: false,
  56695. caches: false,
  56696. CacheStorage: false,
  56697. clearInterval: false,
  56698. clearTimeout: false,
  56699. Client: false,
  56700. clients: false,
  56701. Clients: false,
  56702. close: true,
  56703. console: false,
  56704. ExtendableEvent: false,
  56705. ExtendableMessageEvent: false,
  56706. fetch: false,
  56707. FetchEvent: false,
  56708. FileReaderSync: false,
  56709. FormData: false,
  56710. Headers: false,
  56711. IDBCursor: false,
  56712. IDBCursorWithValue: false,
  56713. IDBDatabase: false,
  56714. IDBFactory: false,
  56715. IDBIndex: false,
  56716. IDBKeyRange: false,
  56717. IDBObjectStore: false,
  56718. IDBOpenDBRequest: false,
  56719. IDBRequest: false,
  56720. IDBTransaction: false,
  56721. IDBVersionChangeEvent: false,
  56722. ImageData: false,
  56723. importScripts: false,
  56724. indexedDB: false,
  56725. location: false,
  56726. MessageChannel: false,
  56727. MessagePort: false,
  56728. name: false,
  56729. navigator: false,
  56730. Notification: false,
  56731. onclose: true,
  56732. onconnect: true,
  56733. onerror: true,
  56734. onfetch: true,
  56735. oninstall: true,
  56736. onlanguagechange: true,
  56737. onmessage: true,
  56738. onmessageerror: true,
  56739. onnotificationclick: true,
  56740. onnotificationclose: true,
  56741. onoffline: true,
  56742. ononline: true,
  56743. onpush: true,
  56744. onpushsubscriptionchange: true,
  56745. onrejectionhandled: true,
  56746. onsync: true,
  56747. onunhandledrejection: true,
  56748. performance: false,
  56749. Performance: false,
  56750. PerformanceEntry: false,
  56751. PerformanceMark: false,
  56752. PerformanceMeasure: false,
  56753. PerformanceNavigation: false,
  56754. PerformanceResourceTiming: false,
  56755. PerformanceTiming: false,
  56756. postMessage: true,
  56757. "Promise": false,
  56758. queueMicrotask: false,
  56759. registration: false,
  56760. removeEventListener: false,
  56761. Request: false,
  56762. Response: false,
  56763. self: false,
  56764. ServiceWorker: false,
  56765. ServiceWorkerContainer: false,
  56766. ServiceWorkerGlobalScope: false,
  56767. ServiceWorkerMessageEvent: false,
  56768. ServiceWorkerRegistration: false,
  56769. setInterval: false,
  56770. setTimeout: false,
  56771. skipWaiting: false,
  56772. TextDecoder: false,
  56773. TextEncoder: false,
  56774. URL: false,
  56775. URLSearchParams: false,
  56776. WebSocket: false,
  56777. WindowClient: false,
  56778. Worker: false,
  56779. WorkerGlobalScope: false,
  56780. XMLHttpRequest: false
  56781. };
  56782. var atomtest$1 = {
  56783. advanceClock: false,
  56784. fakeClearInterval: false,
  56785. fakeClearTimeout: false,
  56786. fakeSetInterval: false,
  56787. fakeSetTimeout: false,
  56788. resetTimeouts: false,
  56789. waitsForPromise: false
  56790. };
  56791. var embertest$1 = {
  56792. andThen: false,
  56793. click: false,
  56794. currentPath: false,
  56795. currentRouteName: false,
  56796. currentURL: false,
  56797. fillIn: false,
  56798. find: false,
  56799. findAll: false,
  56800. findWithAssert: false,
  56801. keyEvent: false,
  56802. pauseTest: false,
  56803. resumeTest: false,
  56804. triggerEvent: false,
  56805. visit: false,
  56806. wait: false
  56807. };
  56808. var protractor$1 = {
  56809. $: false,
  56810. $$: false,
  56811. browser: false,
  56812. by: false,
  56813. By: false,
  56814. DartObject: false,
  56815. element: false,
  56816. protractor: false
  56817. };
  56818. var webextensions$1 = {
  56819. browser: false,
  56820. chrome: false,
  56821. opr: false
  56822. };
  56823. var greasemonkey$1 = {
  56824. cloneInto: false,
  56825. createObjectIn: false,
  56826. exportFunction: false,
  56827. GM: false,
  56828. GM_addStyle: false,
  56829. GM_deleteValue: false,
  56830. GM_getResourceText: false,
  56831. GM_getResourceURL: false,
  56832. GM_getValue: false,
  56833. GM_info: false,
  56834. GM_listValues: false,
  56835. GM_log: false,
  56836. GM_openInTab: false,
  56837. GM_registerMenuCommand: false,
  56838. GM_setClipboard: false,
  56839. GM_setValue: false,
  56840. GM_xmlhttpRequest: false,
  56841. unsafeWindow: false
  56842. };
  56843. var devtools$1 = {
  56844. $: false,
  56845. $_: false,
  56846. $$: false,
  56847. $0: false,
  56848. $1: false,
  56849. $2: false,
  56850. $3: false,
  56851. $4: false,
  56852. $x: false,
  56853. chrome: false,
  56854. clear: false,
  56855. copy: false,
  56856. debug: false,
  56857. dir: false,
  56858. dirxml: false,
  56859. getEventListeners: false,
  56860. inspect: false,
  56861. keys: false,
  56862. monitor: false,
  56863. monitorEvents: false,
  56864. profile: false,
  56865. profileEnd: false,
  56866. queryObjects: false,
  56867. table: false,
  56868. undebug: false,
  56869. unmonitor: false,
  56870. unmonitorEvents: false,
  56871. values: false
  56872. };
  56873. var globals$3 = {
  56874. builtin: builtin$1,
  56875. es5: es5$1,
  56876. es2015: es2015$1,
  56877. es2017: es2017$1,
  56878. browser: browser$5,
  56879. worker: worker$1,
  56880. node: node$1,
  56881. commonjs: commonjs$1,
  56882. amd: amd$1,
  56883. mocha: mocha$1,
  56884. jasmine: jasmine$1,
  56885. jest: jest$1,
  56886. qunit: qunit$1,
  56887. phantomjs: phantomjs$1,
  56888. couch: couch$1,
  56889. rhino: rhino$1,
  56890. nashorn: nashorn$1,
  56891. wsh: wsh$1,
  56892. jquery: jquery$1,
  56893. yui: yui$1,
  56894. shelljs: shelljs$1,
  56895. prototypejs: prototypejs$1,
  56896. meteor: meteor$1,
  56897. mongo: mongo$1,
  56898. applescript: applescript$1,
  56899. serviceworker: serviceworker$1,
  56900. atomtest: atomtest$1,
  56901. embertest: embertest$1,
  56902. protractor: protractor$1,
  56903. "shared-node-browser": {
  56904. clearInterval: false,
  56905. clearTimeout: false,
  56906. console: false,
  56907. setInterval: false,
  56908. setTimeout: false,
  56909. URL: false,
  56910. URLSearchParams: false
  56911. },
  56912. webextensions: webextensions$1,
  56913. greasemonkey: greasemonkey$1,
  56914. devtools: devtools$1
  56915. };
  56916. var globals$4 = /*#__PURE__*/Object.freeze({
  56917. __proto__: null,
  56918. builtin: builtin$1,
  56919. es5: es5$1,
  56920. es2015: es2015$1,
  56921. es2017: es2017$1,
  56922. browser: browser$5,
  56923. worker: worker$1,
  56924. node: node$1,
  56925. commonjs: commonjs$1,
  56926. amd: amd$1,
  56927. mocha: mocha$1,
  56928. jasmine: jasmine$1,
  56929. jest: jest$1,
  56930. qunit: qunit$1,
  56931. phantomjs: phantomjs$1,
  56932. couch: couch$1,
  56933. rhino: rhino$1,
  56934. nashorn: nashorn$1,
  56935. wsh: wsh$1,
  56936. jquery: jquery$1,
  56937. yui: yui$1,
  56938. shelljs: shelljs$1,
  56939. prototypejs: prototypejs$1,
  56940. meteor: meteor$1,
  56941. mongo: mongo$1,
  56942. applescript: applescript$1,
  56943. serviceworker: serviceworker$1,
  56944. atomtest: atomtest$1,
  56945. embertest: embertest$1,
  56946. protractor: protractor$1,
  56947. webextensions: webextensions$1,
  56948. greasemonkey: greasemonkey$1,
  56949. devtools: devtools$1,
  56950. 'default': globals$3
  56951. });
  56952. var require$$0$1 = getCjsExportFromNamespace(globals$4);
  56953. var globals$5 = require$$0$1;
  56954. var objectProto$h = Object.prototype;
  56955. var hasOwnProperty$g = objectProto$h.hasOwnProperty;
  56956. function baseHas(object, key) {
  56957. return object != null && hasOwnProperty$g.call(object, key);
  56958. }
  56959. var _baseHas = baseHas;
  56960. function has$5(object, path) {
  56961. return object != null && _hasPath(object, path, _baseHas);
  56962. }
  56963. var has_1 = has$5;
  56964. function toKind(node) {
  56965. if (isClassMethod(node) || isObjectMethod(node)) {
  56966. if (node.kind === "get" || node.kind === "set") {
  56967. return node.kind;
  56968. }
  56969. }
  56970. return "value";
  56971. }
  56972. function push(mutatorMap, node, kind, file, scope) {
  56973. var alias = toKeyAlias(node);
  56974. var map = {};
  56975. if (has_1(mutatorMap, alias)) map = mutatorMap[alias];
  56976. mutatorMap[alias] = map;
  56977. map._inherits = map._inherits || [];
  56978. map._inherits.push(node);
  56979. map._key = node.key;
  56980. if (node.computed) {
  56981. map._computed = true;
  56982. }
  56983. if (node.decorators) {
  56984. var decorators = map.decorators = map.decorators || ArrayExpression([]);
  56985. decorators.elements = decorators.elements.concat(node.decorators.map(function (dec) {
  56986. return dec.expression;
  56987. }).reverse());
  56988. }
  56989. if (map.value || map.initializer) {
  56990. throw file.buildCodeFrameError(node, "Key conflict with sibling node");
  56991. }
  56992. var key, value;
  56993. if (isObjectProperty(node) || isObjectMethod(node) || isClassMethod(node)) {
  56994. key = toComputedKey(node, node.key);
  56995. }
  56996. if (isProperty(node)) {
  56997. value = node.value;
  56998. } else if (isObjectMethod(node) || isClassMethod(node)) {
  56999. value = FunctionExpression(null, node.params, node.body, node.generator, node.async);
  57000. value.returnType = node.returnType;
  57001. }
  57002. var inheritedKind = toKind(node);
  57003. if (!kind || inheritedKind !== "value") {
  57004. kind = inheritedKind;
  57005. }
  57006. if (scope && isStringLiteral(key) && (kind === "value" || kind === "initializer") && isFunctionExpression(value)) {
  57007. value = nameFunction({
  57008. id: key,
  57009. node: value,
  57010. scope: scope
  57011. });
  57012. }
  57013. if (value) {
  57014. inheritsComments(value, node);
  57015. map[kind] = value;
  57016. }
  57017. return map;
  57018. }
  57019. function toComputedObjectFromClass(obj) {
  57020. var objExpr = ArrayExpression([]);
  57021. for (var i = 0; i < obj.properties.length; i++) {
  57022. var prop = obj.properties[i];
  57023. var val = prop.value;
  57024. val.properties.unshift(ObjectProperty(Identifier("key"), toComputedKey(prop)));
  57025. objExpr.elements.push(val);
  57026. }
  57027. return objExpr;
  57028. }
  57029. function toClassObject(mutatorMap) {
  57030. var objExpr = ObjectExpression([]);
  57031. Object.keys(mutatorMap).forEach(function (mutatorMapKey) {
  57032. var map = mutatorMap[mutatorMapKey];
  57033. var mapNode = ObjectExpression([]);
  57034. var propNode = ObjectProperty(map._key, mapNode, map._computed);
  57035. Object.keys(map).forEach(function (key) {
  57036. var node = map[key];
  57037. if (key[0] === "_") return;
  57038. var prop = ObjectProperty(Identifier(key), node);
  57039. inheritsComments(prop, node);
  57040. removeComments(node);
  57041. mapNode.properties.push(prop);
  57042. });
  57043. objExpr.properties.push(propNode);
  57044. });
  57045. return objExpr;
  57046. }
  57047. function toDefineObject(mutatorMap) {
  57048. Object.keys(mutatorMap).forEach(function (key) {
  57049. var map = mutatorMap[key];
  57050. if (map.value) map.writable = BooleanLiteral(true);
  57051. map.configurable = BooleanLiteral(true);
  57052. map.enumerable = BooleanLiteral(true);
  57053. });
  57054. return toClassObject(mutatorMap);
  57055. }
  57056. function _templateObject$6() {
  57057. var data = _taggedTemplateLiteralLoose(["\n (function () {\n super(...arguments);\n })\n "]);
  57058. _templateObject$6 = function _templateObject() {
  57059. return data;
  57060. };
  57061. return data;
  57062. }
  57063. function buildConstructor(classRef, constructorBody, node) {
  57064. var func = FunctionDeclaration(cloneNode(classRef), [], constructorBody);
  57065. inherits(func, node);
  57066. return func;
  57067. }
  57068. function transformClass(path, file, builtinClasses, isLoose) {
  57069. var classState = {
  57070. parent: undefined,
  57071. scope: undefined,
  57072. node: undefined,
  57073. path: undefined,
  57074. file: undefined,
  57075. classId: undefined,
  57076. classRef: undefined,
  57077. superName: undefined,
  57078. superReturns: [],
  57079. isDerived: false,
  57080. extendsNative: false,
  57081. construct: undefined,
  57082. constructorBody: undefined,
  57083. userConstructor: undefined,
  57084. userConstructorPath: undefined,
  57085. hasConstructor: false,
  57086. instancePropBody: [],
  57087. instancePropRefs: {},
  57088. staticPropBody: [],
  57089. body: [],
  57090. superThises: [],
  57091. pushedConstructor: false,
  57092. pushedInherits: false,
  57093. protoAlias: null,
  57094. isLoose: false,
  57095. hasInstanceDescriptors: false,
  57096. hasStaticDescriptors: false,
  57097. instanceMutatorMap: {},
  57098. staticMutatorMap: {}
  57099. };
  57100. var setState = function setState(newState) {
  57101. Object.assign(classState, newState);
  57102. };
  57103. var findThisesVisitor = traverse$1.visitors.merge([environmentVisitor, {
  57104. ThisExpression: function ThisExpression(path) {
  57105. classState.superThises.push(path);
  57106. }
  57107. }]);
  57108. function pushToMap(node, enumerable, kind, scope) {
  57109. if (kind === void 0) {
  57110. kind = "value";
  57111. }
  57112. var mutatorMap;
  57113. if (node["static"]) {
  57114. setState({
  57115. hasStaticDescriptors: true
  57116. });
  57117. mutatorMap = classState.staticMutatorMap;
  57118. } else {
  57119. setState({
  57120. hasInstanceDescriptors: true
  57121. });
  57122. mutatorMap = classState.instanceMutatorMap;
  57123. }
  57124. var map = push(mutatorMap, node, kind, classState.file, scope);
  57125. if (enumerable) {
  57126. map.enumerable = BooleanLiteral(true);
  57127. }
  57128. return map;
  57129. }
  57130. function maybeCreateConstructor() {
  57131. var hasConstructor = false;
  57132. var paths = classState.path.get("body.body");
  57133. for (var _iterator = paths, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  57134. var _ref;
  57135. if (_isArray) {
  57136. if (_i >= _iterator.length) break;
  57137. _ref = _iterator[_i++];
  57138. } else {
  57139. _i = _iterator.next();
  57140. if (_i.done) break;
  57141. _ref = _i.value;
  57142. }
  57143. var _path = _ref;
  57144. hasConstructor = _path.equals("kind", "constructor");
  57145. if (hasConstructor) break;
  57146. }
  57147. if (hasConstructor) return;
  57148. var params, body;
  57149. if (classState.isDerived) {
  57150. var _constructor = template.expression.ast(_templateObject$6());
  57151. params = _constructor.params;
  57152. body = _constructor.body;
  57153. } else {
  57154. params = [];
  57155. body = BlockStatement([]);
  57156. }
  57157. classState.path.get("body").unshiftContainer("body", ClassMethod("constructor", Identifier("constructor"), params, body));
  57158. }
  57159. function buildBody() {
  57160. maybeCreateConstructor();
  57161. pushBody();
  57162. verifyConstructor();
  57163. if (classState.userConstructor) {
  57164. var constructorBody = classState.constructorBody,
  57165. userConstructor = classState.userConstructor,
  57166. construct = classState.construct;
  57167. constructorBody.body = constructorBody.body.concat(userConstructor.body.body);
  57168. inherits(construct, userConstructor);
  57169. inherits(constructorBody, userConstructor.body);
  57170. }
  57171. pushDescriptors();
  57172. }
  57173. function pushBody() {
  57174. var classBodyPaths = classState.path.get("body.body");
  57175. for (var _iterator2 = classBodyPaths, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  57176. var _ref2;
  57177. if (_isArray2) {
  57178. if (_i2 >= _iterator2.length) break;
  57179. _ref2 = _iterator2[_i2++];
  57180. } else {
  57181. _i2 = _iterator2.next();
  57182. if (_i2.done) break;
  57183. _ref2 = _i2.value;
  57184. }
  57185. var _path2 = _ref2;
  57186. var node = _path2.node;
  57187. if (_path2.isClassProperty()) {
  57188. throw _path2.buildCodeFrameError("Missing class properties transform.");
  57189. }
  57190. if (node.decorators) {
  57191. throw _path2.buildCodeFrameError("Method has decorators, put the decorator plugin before the classes one.");
  57192. }
  57193. if (isClassMethod(node)) {
  57194. (function () {
  57195. var isConstructor = node.kind === "constructor";
  57196. var replaceSupers = new ReplaceSupers({
  57197. methodPath: _path2,
  57198. objectRef: classState.classRef,
  57199. superRef: classState.superName,
  57200. isLoose: classState.isLoose,
  57201. file: classState.file
  57202. });
  57203. replaceSupers.replace();
  57204. var superReturns = [];
  57205. _path2.traverse(traverse$1.visitors.merge([environmentVisitor, {
  57206. ReturnStatement: function ReturnStatement(path) {
  57207. if (!path.getFunctionParent().isArrowFunctionExpression()) {
  57208. superReturns.push(path);
  57209. }
  57210. }
  57211. }]));
  57212. if (isConstructor) {
  57213. pushConstructor(superReturns, node, _path2);
  57214. } else {
  57215. pushMethod(node, _path2);
  57216. }
  57217. })();
  57218. }
  57219. }
  57220. }
  57221. function clearDescriptors() {
  57222. setState({
  57223. hasInstanceDescriptors: false,
  57224. hasStaticDescriptors: false,
  57225. instanceMutatorMap: {},
  57226. staticMutatorMap: {}
  57227. });
  57228. }
  57229. function pushDescriptors() {
  57230. pushInheritsToBody();
  57231. var body = classState.body;
  57232. var instanceProps;
  57233. var staticProps;
  57234. if (classState.hasInstanceDescriptors) {
  57235. instanceProps = toClassObject(classState.instanceMutatorMap);
  57236. }
  57237. if (classState.hasStaticDescriptors) {
  57238. staticProps = toClassObject(classState.staticMutatorMap);
  57239. }
  57240. if (instanceProps || staticProps) {
  57241. if (instanceProps) {
  57242. instanceProps = toComputedObjectFromClass(instanceProps);
  57243. }
  57244. if (staticProps) {
  57245. staticProps = toComputedObjectFromClass(staticProps);
  57246. }
  57247. var args = [cloneNode(classState.classRef), NullLiteral(), NullLiteral()];
  57248. if (instanceProps) args[1] = instanceProps;
  57249. if (staticProps) args[2] = staticProps;
  57250. var lastNonNullIndex = 0;
  57251. for (var i = 0; i < args.length; i++) {
  57252. if (!isNullLiteral(args[i])) lastNonNullIndex = i;
  57253. }
  57254. args = args.slice(0, lastNonNullIndex + 1);
  57255. body.push(ExpressionStatement(CallExpression(classState.file.addHelper("createClass"), args)));
  57256. }
  57257. clearDescriptors();
  57258. }
  57259. function wrapSuperCall(bareSuper, superRef, thisRef, body) {
  57260. var bareSuperNode = bareSuper.node;
  57261. var call;
  57262. if (classState.isLoose) {
  57263. bareSuperNode.arguments.unshift(ThisExpression());
  57264. if (bareSuperNode.arguments.length === 2 && isSpreadElement(bareSuperNode.arguments[1]) && isIdentifier(bareSuperNode.arguments[1].argument, {
  57265. name: "arguments"
  57266. })) {
  57267. bareSuperNode.arguments[1] = bareSuperNode.arguments[1].argument;
  57268. bareSuperNode.callee = MemberExpression(cloneNode(superRef), Identifier("apply"));
  57269. } else {
  57270. bareSuperNode.callee = MemberExpression(cloneNode(superRef), Identifier("call"));
  57271. }
  57272. call = LogicalExpression("||", bareSuperNode, ThisExpression());
  57273. } else {
  57274. bareSuperNode = optimiseCall(CallExpression(classState.file.addHelper("getPrototypeOf"), [cloneNode(classState.classRef)]), ThisExpression(), bareSuperNode.arguments);
  57275. call = CallExpression(classState.file.addHelper("possibleConstructorReturn"), [ThisExpression(), bareSuperNode]);
  57276. }
  57277. if (bareSuper.parentPath.isExpressionStatement() && bareSuper.parentPath.container === body.node.body && body.node.body.length - 1 === bareSuper.parentPath.key) {
  57278. if (classState.superThises.length) {
  57279. call = AssignmentExpression("=", thisRef(), call);
  57280. }
  57281. bareSuper.parentPath.replaceWith(ReturnStatement(call));
  57282. } else {
  57283. bareSuper.replaceWith(AssignmentExpression("=", thisRef(), call));
  57284. }
  57285. }
  57286. function verifyConstructor() {
  57287. if (!classState.isDerived) return;
  57288. var path = classState.userConstructorPath;
  57289. var body = path.get("body");
  57290. path.traverse(findThisesVisitor);
  57291. var _thisRef = function thisRef() {
  57292. var ref = path.scope.generateDeclaredUidIdentifier("this");
  57293. _thisRef = function thisRef() {
  57294. return cloneNode(ref);
  57295. };
  57296. return ref;
  57297. };
  57298. for (var _iterator3 = classState.superThises, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
  57299. var _ref3;
  57300. if (_isArray3) {
  57301. if (_i3 >= _iterator3.length) break;
  57302. _ref3 = _iterator3[_i3++];
  57303. } else {
  57304. _i3 = _iterator3.next();
  57305. if (_i3.done) break;
  57306. _ref3 = _i3.value;
  57307. }
  57308. var thisPath = _ref3;
  57309. var node = thisPath.node,
  57310. parentPath = thisPath.parentPath;
  57311. if (parentPath.isMemberExpression({
  57312. object: node
  57313. })) {
  57314. thisPath.replaceWith(_thisRef());
  57315. continue;
  57316. }
  57317. thisPath.replaceWith(CallExpression(classState.file.addHelper("assertThisInitialized"), [_thisRef()]));
  57318. }
  57319. var bareSupers = new Set();
  57320. path.traverse(traverse$1.visitors.merge([environmentVisitor, {
  57321. Super: function Super(path) {
  57322. var node = path.node,
  57323. parentPath = path.parentPath;
  57324. if (parentPath.isCallExpression({
  57325. callee: node
  57326. })) {
  57327. bareSupers.add(parentPath);
  57328. }
  57329. }
  57330. }]));
  57331. var guaranteedSuperBeforeFinish = !!bareSupers.size;
  57332. for (var _iterator4 = bareSupers, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
  57333. var _ref4;
  57334. if (_isArray4) {
  57335. if (_i4 >= _iterator4.length) break;
  57336. _ref4 = _iterator4[_i4++];
  57337. } else {
  57338. _i4 = _iterator4.next();
  57339. if (_i4.done) break;
  57340. _ref4 = _i4.value;
  57341. }
  57342. var bareSuper = _ref4;
  57343. wrapSuperCall(bareSuper, classState.superName, _thisRef, body);
  57344. if (guaranteedSuperBeforeFinish) {
  57345. bareSuper.find(function (parentPath) {
  57346. if (parentPath === path) {
  57347. return true;
  57348. }
  57349. if (parentPath.isLoop() || parentPath.isConditional() || parentPath.isArrowFunctionExpression()) {
  57350. guaranteedSuperBeforeFinish = false;
  57351. return true;
  57352. }
  57353. });
  57354. }
  57355. }
  57356. var wrapReturn;
  57357. if (classState.isLoose) {
  57358. wrapReturn = function wrapReturn(returnArg) {
  57359. var thisExpr = CallExpression(classState.file.addHelper("assertThisInitialized"), [_thisRef()]);
  57360. return returnArg ? LogicalExpression("||", returnArg, thisExpr) : thisExpr;
  57361. };
  57362. } else {
  57363. wrapReturn = function wrapReturn(returnArg) {
  57364. return CallExpression(classState.file.addHelper("possibleConstructorReturn"), [_thisRef()].concat(returnArg || []));
  57365. };
  57366. }
  57367. var bodyPaths = body.get("body");
  57368. if (!bodyPaths.length || !bodyPaths.pop().isReturnStatement()) {
  57369. body.pushContainer("body", ReturnStatement(guaranteedSuperBeforeFinish ? _thisRef() : wrapReturn()));
  57370. }
  57371. for (var _iterator5 = classState.superReturns, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) {
  57372. var _ref5;
  57373. if (_isArray5) {
  57374. if (_i5 >= _iterator5.length) break;
  57375. _ref5 = _iterator5[_i5++];
  57376. } else {
  57377. _i5 = _iterator5.next();
  57378. if (_i5.done) break;
  57379. _ref5 = _i5.value;
  57380. }
  57381. var returnPath = _ref5;
  57382. returnPath.get("argument").replaceWith(wrapReturn(returnPath.node.argument));
  57383. }
  57384. }
  57385. function pushMethod(node, path) {
  57386. var scope = path ? path.scope : classState.scope;
  57387. if (node.kind === "method") {
  57388. if (processMethod(node, scope)) return;
  57389. }
  57390. pushToMap(node, false, null, scope);
  57391. }
  57392. function processMethod(node, scope) {
  57393. if (classState.isLoose && !node.decorators) {
  57394. var classRef = classState.classRef;
  57395. if (!node["static"]) {
  57396. insertProtoAliasOnce();
  57397. classRef = classState.protoAlias;
  57398. }
  57399. var methodName = MemberExpression(cloneNode(classRef), node.key, node.computed || isLiteral(node.key));
  57400. var func = FunctionExpression(null, node.params, node.body, node.generator, node.async);
  57401. inherits(func, node);
  57402. var key = toComputedKey(node, node.key);
  57403. if (isStringLiteral(key)) {
  57404. func = nameFunction({
  57405. node: func,
  57406. id: key,
  57407. scope: scope
  57408. });
  57409. }
  57410. var expr = ExpressionStatement(AssignmentExpression("=", methodName, func));
  57411. inheritsComments(expr, node);
  57412. classState.body.push(expr);
  57413. return true;
  57414. }
  57415. return false;
  57416. }
  57417. function insertProtoAliasOnce() {
  57418. if (classState.protoAlias === null) {
  57419. setState({
  57420. protoAlias: classState.scope.generateUidIdentifier("proto")
  57421. });
  57422. var classProto = MemberExpression(classState.classRef, Identifier("prototype"));
  57423. var protoDeclaration = VariableDeclaration("var", [VariableDeclarator(classState.protoAlias, classProto)]);
  57424. classState.body.push(protoDeclaration);
  57425. }
  57426. }
  57427. function pushConstructor(superReturns, method, path) {
  57428. if (path.scope.hasOwnBinding(classState.classRef.name)) {
  57429. path.scope.rename(classState.classRef.name);
  57430. }
  57431. setState({
  57432. userConstructorPath: path,
  57433. userConstructor: method,
  57434. hasConstructor: true,
  57435. superReturns: superReturns
  57436. });
  57437. var construct = classState.construct;
  57438. inheritsComments(construct, method);
  57439. construct.params = method.params;
  57440. inherits(construct.body, method.body);
  57441. construct.body.directives = method.body.directives;
  57442. pushConstructorToBody();
  57443. }
  57444. function pushConstructorToBody() {
  57445. if (classState.pushedConstructor) return;
  57446. classState.pushedConstructor = true;
  57447. if (classState.hasInstanceDescriptors || classState.hasStaticDescriptors) {
  57448. pushDescriptors();
  57449. }
  57450. classState.body.push(classState.construct);
  57451. pushInheritsToBody();
  57452. }
  57453. function pushInheritsToBody() {
  57454. if (!classState.isDerived || classState.pushedInherits) return;
  57455. setState({
  57456. pushedInherits: true
  57457. });
  57458. classState.body.unshift(ExpressionStatement(CallExpression(classState.file.addHelper(classState.isLoose ? "inheritsLoose" : "inherits"), [cloneNode(classState.classRef), cloneNode(classState.superName)])));
  57459. }
  57460. function setupClosureParamsArgs() {
  57461. var superName = classState.superName;
  57462. var closureParams = [];
  57463. var closureArgs = [];
  57464. if (classState.isDerived) {
  57465. var arg = classState.extendsNative ? CallExpression(classState.file.addHelper("wrapNativeSuper"), [cloneNode(superName)]) : cloneNode(superName);
  57466. var param = classState.scope.generateUidIdentifierBasedOnNode(superName);
  57467. closureParams.push(param);
  57468. closureArgs.push(arg);
  57469. setState({
  57470. superName: cloneNode(param)
  57471. });
  57472. }
  57473. return {
  57474. closureParams: closureParams,
  57475. closureArgs: closureArgs
  57476. };
  57477. }
  57478. function classTransformer(path, file, builtinClasses, isLoose) {
  57479. setState({
  57480. parent: path.parent,
  57481. scope: path.scope,
  57482. node: path.node,
  57483. path: path,
  57484. file: file,
  57485. isLoose: isLoose
  57486. });
  57487. setState({
  57488. classId: classState.node.id,
  57489. classRef: classState.node.id ? Identifier(classState.node.id.name) : classState.scope.generateUidIdentifier("class"),
  57490. superName: classState.node.superClass,
  57491. isDerived: !!classState.node.superClass,
  57492. constructorBody: BlockStatement([])
  57493. });
  57494. setState({
  57495. extendsNative: classState.isDerived && builtinClasses.has(classState.superName.name) && !classState.scope.hasBinding(classState.superName.name, true)
  57496. });
  57497. var classRef = classState.classRef,
  57498. node = classState.node,
  57499. constructorBody = classState.constructorBody;
  57500. setState({
  57501. construct: buildConstructor(classRef, constructorBody, node)
  57502. });
  57503. var body = classState.body;
  57504. var _setupClosureParamsAr = setupClosureParamsArgs(),
  57505. closureParams = _setupClosureParamsAr.closureParams,
  57506. closureArgs = _setupClosureParamsAr.closureArgs;
  57507. buildBody();
  57508. if (!classState.isLoose) {
  57509. constructorBody.body.unshift(ExpressionStatement(CallExpression(classState.file.addHelper("classCallCheck"), [ThisExpression(), cloneNode(classState.classRef)])));
  57510. }
  57511. body = body.concat(classState.staticPropBody.map(function (fn) {
  57512. return fn(cloneNode(classState.classRef));
  57513. }));
  57514. var isStrict = path.isInStrictMode();
  57515. var constructorOnly = classState.classId && body.length === 1;
  57516. if (constructorOnly && !isStrict) {
  57517. for (var _iterator6 = classState.construct.params, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) {
  57518. var _ref6;
  57519. if (_isArray6) {
  57520. if (_i6 >= _iterator6.length) break;
  57521. _ref6 = _iterator6[_i6++];
  57522. } else {
  57523. _i6 = _iterator6.next();
  57524. if (_i6.done) break;
  57525. _ref6 = _i6.value;
  57526. }
  57527. var param = _ref6;
  57528. if (!isIdentifier(param)) {
  57529. constructorOnly = false;
  57530. break;
  57531. }
  57532. }
  57533. }
  57534. var directives = constructorOnly ? body[0].body.directives : [];
  57535. if (!isStrict) {
  57536. directives.push(Directive(DirectiveLiteral("use strict")));
  57537. }
  57538. if (constructorOnly) {
  57539. return toExpression(body[0]);
  57540. }
  57541. body.push(ReturnStatement(cloneNode(classState.classRef)));
  57542. var container = ArrowFunctionExpression(closureParams, BlockStatement(body, directives));
  57543. return CallExpression(container, closureArgs);
  57544. }
  57545. return classTransformer(path, file, builtinClasses, isLoose);
  57546. }
  57547. var getBuiltinClasses = function getBuiltinClasses(category) {
  57548. return Object.keys(globals$5[category]).filter(function (name) {
  57549. return /^[A-Z]/.test(name);
  57550. });
  57551. };
  57552. var builtinClasses = new Set([].concat(getBuiltinClasses("builtin"), getBuiltinClasses("browser")));
  57553. var transformClasses = declare(function (api, options) {
  57554. api.assertVersion(7);
  57555. var loose = options.loose;
  57556. var VISITED = Symbol();
  57557. return {
  57558. name: "transform-classes",
  57559. visitor: {
  57560. ExportDefaultDeclaration: function ExportDefaultDeclaration(path) {
  57561. if (!path.get("declaration").isClassDeclaration()) return;
  57562. splitExportDeclaration(path);
  57563. },
  57564. ClassDeclaration: function ClassDeclaration(path) {
  57565. var node = path.node;
  57566. var ref = node.id || path.scope.generateUidIdentifier("class");
  57567. path.replaceWith(VariableDeclaration("let", [VariableDeclarator(ref, toExpression(node))]));
  57568. },
  57569. ClassExpression: function ClassExpression(path, state) {
  57570. var node = path.node;
  57571. if (node[VISITED]) return;
  57572. var inferred = nameFunction(path);
  57573. if (inferred && inferred !== node) {
  57574. path.replaceWith(inferred);
  57575. return;
  57576. }
  57577. node[VISITED] = true;
  57578. path.replaceWith(transformClass(path, state.file, builtinClasses, loose));
  57579. if (path.isCallExpression()) {
  57580. annotateAsPure(path);
  57581. if (path.get("callee").isArrowFunctionExpression()) {
  57582. path.get("callee").arrowFunctionToExpression();
  57583. }
  57584. }
  57585. }
  57586. }
  57587. };
  57588. });
  57589. var transformComputedProperties = declare(function (api, options) {
  57590. api.assertVersion(7);
  57591. var loose = options.loose;
  57592. var pushComputedProps = loose ? pushComputedPropsLoose : pushComputedPropsSpec;
  57593. var buildMutatorMapAssign = template("\n MUTATOR_MAP_REF[KEY] = MUTATOR_MAP_REF[KEY] || {};\n MUTATOR_MAP_REF[KEY].KIND = VALUE;\n ");
  57594. function getValue(prop) {
  57595. if (isObjectProperty(prop)) {
  57596. return prop.value;
  57597. } else if (isObjectMethod(prop)) {
  57598. return FunctionExpression(null, prop.params, prop.body, prop.generator, prop.async);
  57599. }
  57600. }
  57601. function pushAssign(objId, prop, body) {
  57602. if (prop.kind === "get" && prop.kind === "set") {
  57603. pushMutatorDefine(objId, prop);
  57604. } else {
  57605. body.push(ExpressionStatement(AssignmentExpression("=", MemberExpression(cloneNode(objId), prop.key, prop.computed || isLiteral(prop.key)), getValue(prop))));
  57606. }
  57607. }
  57608. function pushMutatorDefine(_ref, prop) {
  57609. var body = _ref.body,
  57610. getMutatorId = _ref.getMutatorId,
  57611. scope = _ref.scope;
  57612. var key = !prop.computed && isIdentifier(prop.key) ? StringLiteral(prop.key.name) : prop.key;
  57613. var maybeMemoise = scope.maybeGenerateMemoised(key);
  57614. if (maybeMemoise) {
  57615. body.push(ExpressionStatement(AssignmentExpression("=", maybeMemoise, key)));
  57616. key = maybeMemoise;
  57617. }
  57618. body.push.apply(body, buildMutatorMapAssign({
  57619. MUTATOR_MAP_REF: getMutatorId(),
  57620. KEY: cloneNode(key),
  57621. VALUE: getValue(prop),
  57622. KIND: Identifier(prop.kind)
  57623. }));
  57624. }
  57625. function pushComputedPropsLoose(info) {
  57626. for (var _iterator = info.computedProps, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  57627. var _ref2;
  57628. if (_isArray) {
  57629. if (_i >= _iterator.length) break;
  57630. _ref2 = _iterator[_i++];
  57631. } else {
  57632. _i = _iterator.next();
  57633. if (_i.done) break;
  57634. _ref2 = _i.value;
  57635. }
  57636. var prop = _ref2;
  57637. if (prop.kind === "get" || prop.kind === "set") {
  57638. pushMutatorDefine(info, prop);
  57639. } else {
  57640. pushAssign(cloneNode(info.objId), prop, info.body);
  57641. }
  57642. }
  57643. }
  57644. function pushComputedPropsSpec(info) {
  57645. var objId = info.objId,
  57646. body = info.body,
  57647. computedProps = info.computedProps,
  57648. state = info.state;
  57649. for (var _iterator2 = computedProps, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  57650. var _ref3;
  57651. if (_isArray2) {
  57652. if (_i2 >= _iterator2.length) break;
  57653. _ref3 = _iterator2[_i2++];
  57654. } else {
  57655. _i2 = _iterator2.next();
  57656. if (_i2.done) break;
  57657. _ref3 = _i2.value;
  57658. }
  57659. var prop = _ref3;
  57660. var key = toComputedKey(prop);
  57661. if (prop.kind === "get" || prop.kind === "set") {
  57662. pushMutatorDefine(info, prop);
  57663. } else if (isStringLiteral(key, {
  57664. value: "__proto__"
  57665. })) {
  57666. pushAssign(objId, prop, body);
  57667. } else {
  57668. if (computedProps.length === 1) {
  57669. return CallExpression(state.addHelper("defineProperty"), [info.initPropExpression, key, getValue(prop)]);
  57670. } else {
  57671. body.push(ExpressionStatement(CallExpression(state.addHelper("defineProperty"), [cloneNode(objId), key, getValue(prop)])));
  57672. }
  57673. }
  57674. }
  57675. }
  57676. return {
  57677. name: "transform-computed-properties",
  57678. visitor: {
  57679. ObjectExpression: {
  57680. exit: function exit(path, state) {
  57681. var node = path.node,
  57682. parent = path.parent,
  57683. scope = path.scope;
  57684. var hasComputed = false;
  57685. for (var _i3 = 0, _arr = node.properties; _i3 < _arr.length; _i3++) {
  57686. var prop = _arr[_i3];
  57687. hasComputed = prop.computed === true;
  57688. if (hasComputed) break;
  57689. }
  57690. if (!hasComputed) return;
  57691. var initProps = [];
  57692. var computedProps = [];
  57693. var foundComputed = false;
  57694. for (var _iterator3 = node.properties, _isArray3 = Array.isArray(_iterator3), _i4 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
  57695. var _ref4;
  57696. if (_isArray3) {
  57697. if (_i4 >= _iterator3.length) break;
  57698. _ref4 = _iterator3[_i4++];
  57699. } else {
  57700. _i4 = _iterator3.next();
  57701. if (_i4.done) break;
  57702. _ref4 = _i4.value;
  57703. }
  57704. var _prop = _ref4;
  57705. if (_prop.computed) {
  57706. foundComputed = true;
  57707. }
  57708. if (foundComputed) {
  57709. computedProps.push(_prop);
  57710. } else {
  57711. initProps.push(_prop);
  57712. }
  57713. }
  57714. var objId = scope.generateUidIdentifierBasedOnNode(parent);
  57715. var initPropExpression = ObjectExpression(initProps);
  57716. var body = [];
  57717. body.push(VariableDeclaration("var", [VariableDeclarator(objId, initPropExpression)]));
  57718. var mutatorRef;
  57719. var getMutatorId = function getMutatorId() {
  57720. if (!mutatorRef) {
  57721. mutatorRef = scope.generateUidIdentifier("mutatorMap");
  57722. body.push(VariableDeclaration("var", [VariableDeclarator(mutatorRef, ObjectExpression([]))]));
  57723. }
  57724. return cloneNode(mutatorRef);
  57725. };
  57726. var single = pushComputedProps({
  57727. scope: scope,
  57728. objId: objId,
  57729. body: body,
  57730. computedProps: computedProps,
  57731. initPropExpression: initPropExpression,
  57732. getMutatorId: getMutatorId,
  57733. state: state
  57734. });
  57735. if (mutatorRef) {
  57736. body.push(ExpressionStatement(CallExpression(state.addHelper("defineEnumerableProperties"), [cloneNode(objId), cloneNode(mutatorRef)])));
  57737. }
  57738. if (single) {
  57739. path.replaceWith(single);
  57740. } else {
  57741. body.push(ExpressionStatement(cloneNode(objId)));
  57742. path.replaceWithMultiple(body);
  57743. }
  57744. }
  57745. }
  57746. }
  57747. };
  57748. });
  57749. var transformDestructuring = declare(function (api, options) {
  57750. api.assertVersion(7);
  57751. var _options$loose = options.loose,
  57752. loose = _options$loose === void 0 ? false : _options$loose,
  57753. _options$useBuiltIns = options.useBuiltIns,
  57754. useBuiltIns = _options$useBuiltIns === void 0 ? false : _options$useBuiltIns;
  57755. if (typeof loose !== "boolean") {
  57756. throw new Error(".loose must be a boolean or undefined");
  57757. }
  57758. var arrayOnlySpread = loose;
  57759. function getExtendsHelper(file) {
  57760. return useBuiltIns ? MemberExpression(Identifier("Object"), Identifier("assign")) : file.addHelper("extends");
  57761. }
  57762. function variableDeclarationHasPattern(node) {
  57763. for (var _i = 0, _arr = node.declarations; _i < _arr.length; _i++) {
  57764. var declar = _arr[_i];
  57765. if (isPattern(declar.id)) {
  57766. return true;
  57767. }
  57768. }
  57769. return false;
  57770. }
  57771. function hasRest(pattern) {
  57772. for (var _i2 = 0, _arr2 = pattern.elements; _i2 < _arr2.length; _i2++) {
  57773. var elem = _arr2[_i2];
  57774. if (isRestElement(elem)) {
  57775. return true;
  57776. }
  57777. }
  57778. return false;
  57779. }
  57780. function hasObjectRest(pattern) {
  57781. for (var _i3 = 0, _arr3 = pattern.properties; _i3 < _arr3.length; _i3++) {
  57782. var elem = _arr3[_i3];
  57783. if (isRestElement(elem)) {
  57784. return true;
  57785. }
  57786. }
  57787. return false;
  57788. }
  57789. var STOP_TRAVERSAL = {};
  57790. var arrayUnpackVisitor = function arrayUnpackVisitor(node, ancestors, state) {
  57791. if (!ancestors.length) {
  57792. return;
  57793. }
  57794. if (isIdentifier(node) && isReferenced(node, ancestors[ancestors.length - 1]) && state.bindings[node.name]) {
  57795. state.deopt = true;
  57796. throw STOP_TRAVERSAL;
  57797. }
  57798. };
  57799. var DestructuringTransformer = function () {
  57800. function DestructuringTransformer(opts) {
  57801. this.blockHoist = opts.blockHoist;
  57802. this.operator = opts.operator;
  57803. this.arrays = {};
  57804. this.nodes = opts.nodes || [];
  57805. this.scope = opts.scope;
  57806. this.kind = opts.kind;
  57807. this.arrayOnlySpread = opts.arrayOnlySpread;
  57808. this.addHelper = opts.addHelper;
  57809. }
  57810. var _proto = DestructuringTransformer.prototype;
  57811. _proto.buildVariableAssignment = function buildVariableAssignment(id, init) {
  57812. var op = this.operator;
  57813. if (isMemberExpression(id)) op = "=";
  57814. var node;
  57815. if (op) {
  57816. node = ExpressionStatement(AssignmentExpression(op, id, cloneNode(init) || this.scope.buildUndefinedNode()));
  57817. } else {
  57818. node = VariableDeclaration(this.kind, [VariableDeclarator(id, cloneNode(init))]);
  57819. }
  57820. node._blockHoist = this.blockHoist;
  57821. return node;
  57822. };
  57823. _proto.buildVariableDeclaration = function buildVariableDeclaration(id, init) {
  57824. var declar = VariableDeclaration("var", [VariableDeclarator(cloneNode(id), cloneNode(init))]);
  57825. declar._blockHoist = this.blockHoist;
  57826. return declar;
  57827. };
  57828. _proto.push = function push(id, _init) {
  57829. var init = cloneNode(_init);
  57830. if (isObjectPattern(id)) {
  57831. this.pushObjectPattern(id, init);
  57832. } else if (isArrayPattern(id)) {
  57833. this.pushArrayPattern(id, init);
  57834. } else if (isAssignmentPattern(id)) {
  57835. this.pushAssignmentPattern(id, init);
  57836. } else {
  57837. this.nodes.push(this.buildVariableAssignment(id, init));
  57838. }
  57839. };
  57840. _proto.toArray = function toArray(node, count) {
  57841. if (this.arrayOnlySpread || isIdentifier(node) && this.arrays[node.name]) {
  57842. return node;
  57843. } else {
  57844. return this.scope.toArray(node, count);
  57845. }
  57846. };
  57847. _proto.pushAssignmentPattern = function pushAssignmentPattern(_ref, valueRef) {
  57848. var left = _ref.left,
  57849. right = _ref.right;
  57850. var tempId = this.scope.generateUidIdentifierBasedOnNode(valueRef);
  57851. this.nodes.push(this.buildVariableDeclaration(tempId, valueRef));
  57852. var tempConditional = ConditionalExpression(BinaryExpression("===", cloneNode(tempId), this.scope.buildUndefinedNode()), right, cloneNode(tempId));
  57853. if (isPattern(left)) {
  57854. var patternId;
  57855. var node;
  57856. if (this.kind === "const") {
  57857. patternId = this.scope.generateUidIdentifier(tempId.name);
  57858. node = this.buildVariableDeclaration(patternId, tempConditional);
  57859. } else {
  57860. patternId = tempId;
  57861. node = ExpressionStatement(AssignmentExpression("=", cloneNode(tempId), tempConditional));
  57862. }
  57863. this.nodes.push(node);
  57864. this.push(left, patternId);
  57865. } else {
  57866. this.nodes.push(this.buildVariableAssignment(left, tempConditional));
  57867. }
  57868. };
  57869. _proto.pushObjectRest = function pushObjectRest(pattern, objRef, spreadProp, spreadPropIndex) {
  57870. var keys = [];
  57871. var allLiteral = true;
  57872. for (var i = 0; i < pattern.properties.length; i++) {
  57873. var prop = pattern.properties[i];
  57874. if (i >= spreadPropIndex) break;
  57875. if (isRestElement(prop)) continue;
  57876. var key = prop.key;
  57877. if (isIdentifier(key) && !prop.computed) {
  57878. keys.push(StringLiteral(key.name));
  57879. } else if (isTemplateLiteral(prop.key)) {
  57880. keys.push(cloneNode(prop.key));
  57881. } else if (isLiteral(key)) {
  57882. keys.push(StringLiteral(String(key.value)));
  57883. } else {
  57884. keys.push(cloneNode(key));
  57885. allLiteral = false;
  57886. }
  57887. }
  57888. var value;
  57889. if (keys.length === 0) {
  57890. value = CallExpression(getExtendsHelper(this), [ObjectExpression([]), cloneNode(objRef)]);
  57891. } else {
  57892. var keyExpression = ArrayExpression(keys);
  57893. if (!allLiteral) {
  57894. keyExpression = CallExpression(MemberExpression(keyExpression, Identifier("map")), [this.addHelper("toPropertyKey")]);
  57895. }
  57896. value = CallExpression(this.addHelper("objectWithoutProperties" + (loose ? "Loose" : "")), [cloneNode(objRef), keyExpression]);
  57897. }
  57898. this.nodes.push(this.buildVariableAssignment(spreadProp.argument, value));
  57899. };
  57900. _proto.pushObjectProperty = function pushObjectProperty(prop, propRef) {
  57901. if (isLiteral(prop.key)) prop.computed = true;
  57902. var pattern = prop.value;
  57903. var objRef = MemberExpression(cloneNode(propRef), prop.key, prop.computed);
  57904. if (isPattern(pattern)) {
  57905. this.push(pattern, objRef);
  57906. } else {
  57907. this.nodes.push(this.buildVariableAssignment(pattern, objRef));
  57908. }
  57909. };
  57910. _proto.pushObjectPattern = function pushObjectPattern(pattern, objRef) {
  57911. if (!pattern.properties.length) {
  57912. this.nodes.push(ExpressionStatement(CallExpression(this.addHelper("objectDestructuringEmpty"), [objRef])));
  57913. }
  57914. if (pattern.properties.length > 1 && !this.scope.isStatic(objRef)) {
  57915. var temp = this.scope.generateUidIdentifierBasedOnNode(objRef);
  57916. this.nodes.push(this.buildVariableDeclaration(temp, objRef));
  57917. objRef = temp;
  57918. }
  57919. if (hasObjectRest(pattern)) {
  57920. var copiedPattern;
  57921. for (var i = 0; i < pattern.properties.length; i++) {
  57922. var prop = pattern.properties[i];
  57923. if (isRestElement(prop)) {
  57924. break;
  57925. }
  57926. var key = prop.key;
  57927. if (prop.computed && !this.scope.isPure(key)) {
  57928. var name = this.scope.generateUidIdentifierBasedOnNode(key);
  57929. this.nodes.push(this.buildVariableDeclaration(name, key));
  57930. if (!copiedPattern) {
  57931. copiedPattern = pattern = Object.assign({}, pattern, {
  57932. properties: pattern.properties.slice()
  57933. });
  57934. }
  57935. copiedPattern.properties[i] = Object.assign({}, copiedPattern.properties[i], {
  57936. key: name
  57937. });
  57938. }
  57939. }
  57940. }
  57941. for (var _i4 = 0; _i4 < pattern.properties.length; _i4++) {
  57942. var _prop = pattern.properties[_i4];
  57943. if (isRestElement(_prop)) {
  57944. this.pushObjectRest(pattern, objRef, _prop, _i4);
  57945. } else {
  57946. this.pushObjectProperty(_prop, objRef);
  57947. }
  57948. }
  57949. };
  57950. _proto.canUnpackArrayPattern = function canUnpackArrayPattern(pattern, arr) {
  57951. if (!isArrayExpression(arr)) return false;
  57952. if (pattern.elements.length > arr.elements.length) return;
  57953. if (pattern.elements.length < arr.elements.length && !hasRest(pattern)) {
  57954. return false;
  57955. }
  57956. for (var _i5 = 0, _arr4 = pattern.elements; _i5 < _arr4.length; _i5++) {
  57957. var elem = _arr4[_i5];
  57958. if (!elem) return false;
  57959. if (isMemberExpression(elem)) return false;
  57960. }
  57961. for (var _i6 = 0, _arr5 = arr.elements; _i6 < _arr5.length; _i6++) {
  57962. var _elem = _arr5[_i6];
  57963. if (isSpreadElement(_elem)) return false;
  57964. if (isCallExpression(_elem)) return false;
  57965. if (isMemberExpression(_elem)) return false;
  57966. }
  57967. var bindings = getBindingIdentifiers(pattern);
  57968. var state = {
  57969. deopt: false,
  57970. bindings: bindings
  57971. };
  57972. try {
  57973. traverse(arr, arrayUnpackVisitor, state);
  57974. } catch (e) {
  57975. if (e !== STOP_TRAVERSAL) throw e;
  57976. }
  57977. return !state.deopt;
  57978. };
  57979. _proto.pushUnpackedArrayPattern = function pushUnpackedArrayPattern(pattern, arr) {
  57980. for (var i = 0; i < pattern.elements.length; i++) {
  57981. var elem = pattern.elements[i];
  57982. if (isRestElement(elem)) {
  57983. this.push(elem.argument, ArrayExpression(arr.elements.slice(i)));
  57984. } else {
  57985. this.push(elem, arr.elements[i]);
  57986. }
  57987. }
  57988. };
  57989. _proto.pushArrayPattern = function pushArrayPattern(pattern, arrayRef) {
  57990. if (!pattern.elements) return;
  57991. if (this.canUnpackArrayPattern(pattern, arrayRef)) {
  57992. return this.pushUnpackedArrayPattern(pattern, arrayRef);
  57993. }
  57994. var count = !hasRest(pattern) && pattern.elements.length;
  57995. var toArray = this.toArray(arrayRef, count);
  57996. if (isIdentifier(toArray)) {
  57997. arrayRef = toArray;
  57998. } else {
  57999. arrayRef = this.scope.generateUidIdentifierBasedOnNode(arrayRef);
  58000. this.arrays[arrayRef.name] = true;
  58001. this.nodes.push(this.buildVariableDeclaration(arrayRef, toArray));
  58002. }
  58003. for (var i = 0; i < pattern.elements.length; i++) {
  58004. var elem = pattern.elements[i];
  58005. if (!elem) continue;
  58006. var elemRef = void 0;
  58007. if (isRestElement(elem)) {
  58008. elemRef = this.toArray(arrayRef);
  58009. elemRef = CallExpression(MemberExpression(elemRef, Identifier("slice")), [NumericLiteral(i)]);
  58010. elem = elem.argument;
  58011. } else {
  58012. elemRef = MemberExpression(arrayRef, NumericLiteral(i), true);
  58013. }
  58014. this.push(elem, elemRef);
  58015. }
  58016. };
  58017. _proto.init = function init(pattern, ref) {
  58018. if (!isArrayExpression(ref) && !isMemberExpression(ref)) {
  58019. var memo = this.scope.maybeGenerateMemoised(ref, true);
  58020. if (memo) {
  58021. this.nodes.push(this.buildVariableDeclaration(memo, cloneNode(ref)));
  58022. ref = memo;
  58023. }
  58024. }
  58025. this.push(pattern, ref);
  58026. return this.nodes;
  58027. };
  58028. return DestructuringTransformer;
  58029. }();
  58030. return {
  58031. name: "transform-destructuring",
  58032. visitor: {
  58033. ExportNamedDeclaration: function ExportNamedDeclaration$1(path) {
  58034. var declaration = path.get("declaration");
  58035. if (!declaration.isVariableDeclaration()) return;
  58036. if (!variableDeclarationHasPattern(declaration.node)) return;
  58037. var specifiers = [];
  58038. for (var _i7 = 0, _Object$keys = Object.keys(path.getOuterBindingIdentifiers(path)); _i7 < _Object$keys.length; _i7++) {
  58039. var name = _Object$keys[_i7];
  58040. specifiers.push(ExportSpecifier(Identifier(name), Identifier(name)));
  58041. }
  58042. path.replaceWith(declaration.node);
  58043. path.insertAfter(ExportNamedDeclaration(null, specifiers));
  58044. },
  58045. ForXStatement: function ForXStatement(path) {
  58046. var _this = this;
  58047. var node = path.node,
  58048. scope = path.scope;
  58049. var left = node.left;
  58050. if (isPattern(left)) {
  58051. var temp = scope.generateUidIdentifier("ref");
  58052. node.left = VariableDeclaration("var", [VariableDeclarator(temp)]);
  58053. path.ensureBlock();
  58054. if (node.body.body.length === 0 && path.isCompletionRecord()) {
  58055. node.body.body.unshift(ExpressionStatement(scope.buildUndefinedNode()));
  58056. }
  58057. node.body.body.unshift(ExpressionStatement(AssignmentExpression("=", left, temp)));
  58058. return;
  58059. }
  58060. if (!isVariableDeclaration(left)) return;
  58061. var pattern = left.declarations[0].id;
  58062. if (!isPattern(pattern)) return;
  58063. var key = scope.generateUidIdentifier("ref");
  58064. node.left = VariableDeclaration(left.kind, [VariableDeclarator(key, null)]);
  58065. var nodes = [];
  58066. var destructuring = new DestructuringTransformer({
  58067. kind: left.kind,
  58068. scope: scope,
  58069. nodes: nodes,
  58070. arrayOnlySpread: arrayOnlySpread,
  58071. addHelper: function addHelper(name) {
  58072. return _this.addHelper(name);
  58073. }
  58074. });
  58075. destructuring.init(pattern, key);
  58076. path.ensureBlock();
  58077. var block = node.body;
  58078. block.body = nodes.concat(block.body);
  58079. },
  58080. CatchClause: function CatchClause(_ref2) {
  58081. var _this2 = this;
  58082. var node = _ref2.node,
  58083. scope = _ref2.scope;
  58084. var pattern = node.param;
  58085. if (!isPattern(pattern)) return;
  58086. var ref = scope.generateUidIdentifier("ref");
  58087. node.param = ref;
  58088. var nodes = [];
  58089. var destructuring = new DestructuringTransformer({
  58090. kind: "let",
  58091. scope: scope,
  58092. nodes: nodes,
  58093. arrayOnlySpread: arrayOnlySpread,
  58094. addHelper: function addHelper(name) {
  58095. return _this2.addHelper(name);
  58096. }
  58097. });
  58098. destructuring.init(pattern, ref);
  58099. node.body.body = nodes.concat(node.body.body);
  58100. },
  58101. AssignmentExpression: function AssignmentExpression(path) {
  58102. var _this3 = this;
  58103. var node = path.node,
  58104. scope = path.scope;
  58105. if (!isPattern(node.left)) return;
  58106. var nodes = [];
  58107. var destructuring = new DestructuringTransformer({
  58108. operator: node.operator,
  58109. scope: scope,
  58110. nodes: nodes,
  58111. arrayOnlySpread: arrayOnlySpread,
  58112. addHelper: function addHelper(name) {
  58113. return _this3.addHelper(name);
  58114. }
  58115. });
  58116. var ref;
  58117. if (path.isCompletionRecord() || !path.parentPath.isExpressionStatement()) {
  58118. ref = scope.generateUidIdentifierBasedOnNode(node.right, "ref");
  58119. nodes.push(VariableDeclaration("var", [VariableDeclarator(ref, node.right)]));
  58120. if (isArrayExpression(node.right)) {
  58121. destructuring.arrays[ref.name] = true;
  58122. }
  58123. }
  58124. destructuring.init(node.left, ref || node.right);
  58125. if (ref) {
  58126. if (path.parentPath.isArrowFunctionExpression()) {
  58127. path.replaceWith(BlockStatement([]));
  58128. nodes.push(ReturnStatement(cloneNode(ref)));
  58129. } else {
  58130. nodes.push(ExpressionStatement(cloneNode(ref)));
  58131. }
  58132. }
  58133. path.replaceWithMultiple(nodes);
  58134. },
  58135. VariableDeclaration: function VariableDeclaration(path) {
  58136. var _this4 = this;
  58137. var node = path.node,
  58138. scope = path.scope,
  58139. parent = path.parent;
  58140. if (isForXStatement(parent)) return;
  58141. if (!parent || !path.container) return;
  58142. if (!variableDeclarationHasPattern(node)) return;
  58143. var nodeKind = node.kind;
  58144. var nodes = [];
  58145. var declar;
  58146. for (var i = 0; i < node.declarations.length; i++) {
  58147. declar = node.declarations[i];
  58148. var patternId = declar.init;
  58149. var pattern = declar.id;
  58150. var destructuring = new DestructuringTransformer({
  58151. blockHoist: node._blockHoist,
  58152. nodes: nodes,
  58153. scope: scope,
  58154. kind: node.kind,
  58155. arrayOnlySpread: arrayOnlySpread,
  58156. addHelper: function addHelper(name) {
  58157. return _this4.addHelper(name);
  58158. }
  58159. });
  58160. if (isPattern(pattern)) {
  58161. destructuring.init(pattern, patternId);
  58162. if (+i !== node.declarations.length - 1) {
  58163. inherits(nodes[nodes.length - 1], declar);
  58164. }
  58165. } else {
  58166. nodes.push(inherits(destructuring.buildVariableAssignment(declar.id, cloneNode(declar.init)), declar));
  58167. }
  58168. }
  58169. var tail = null;
  58170. var nodesOut = [];
  58171. for (var _i8 = 0, _nodes = nodes; _i8 < _nodes.length; _i8++) {
  58172. var _node = _nodes[_i8];
  58173. if (tail !== null && isVariableDeclaration(_node)) {
  58174. var _tail$declarations;
  58175. (_tail$declarations = tail.declarations).push.apply(_tail$declarations, _node.declarations);
  58176. } else {
  58177. _node.kind = nodeKind;
  58178. nodesOut.push(_node);
  58179. tail = isVariableDeclaration(_node) ? _node : null;
  58180. }
  58181. }
  58182. for (var _i9 = 0, _nodesOut = nodesOut; _i9 < _nodesOut.length; _i9++) {
  58183. var nodeOut = _nodesOut[_i9];
  58184. if (!nodeOut.declarations) continue;
  58185. for (var _iterator = nodeOut.declarations, _isArray = Array.isArray(_iterator), _i10 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  58186. var _ref3;
  58187. if (_isArray) {
  58188. if (_i10 >= _iterator.length) break;
  58189. _ref3 = _iterator[_i10++];
  58190. } else {
  58191. _i10 = _iterator.next();
  58192. if (_i10.done) break;
  58193. _ref3 = _i10.value;
  58194. }
  58195. var declaration = _ref3;
  58196. var name = declaration.id.name;
  58197. if (scope.bindings[name]) {
  58198. scope.bindings[name].kind = nodeOut.kind;
  58199. }
  58200. }
  58201. }
  58202. if (nodesOut.length === 1) {
  58203. path.replaceWith(nodesOut[0]);
  58204. } else {
  58205. path.replaceWithMultiple(nodesOut);
  58206. }
  58207. }
  58208. }
  58209. };
  58210. });
  58211. var transformDotallRegex = declare(function (api) {
  58212. api.assertVersion(7);
  58213. return createRegExpFeaturePlugin({
  58214. name: "transform-dotall-regex",
  58215. feature: "dotAllFlag"
  58216. });
  58217. });
  58218. function getName$1(key) {
  58219. if (isIdentifier(key)) {
  58220. return key.name;
  58221. }
  58222. return key.value.toString();
  58223. }
  58224. var transformDuplicateKeys = declare(function (api) {
  58225. api.assertVersion(7);
  58226. return {
  58227. name: "transform-duplicate-keys",
  58228. visitor: {
  58229. ObjectExpression: function ObjectExpression(path) {
  58230. var node = path.node;
  58231. var plainProps = node.properties.filter(function (prop) {
  58232. return !isSpreadElement(prop) && !prop.computed;
  58233. });
  58234. var alreadySeenData = Object.create(null);
  58235. var alreadySeenGetters = Object.create(null);
  58236. var alreadySeenSetters = Object.create(null);
  58237. for (var _iterator = plainProps, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  58238. var _ref;
  58239. if (_isArray) {
  58240. if (_i >= _iterator.length) break;
  58241. _ref = _iterator[_i++];
  58242. } else {
  58243. _i = _iterator.next();
  58244. if (_i.done) break;
  58245. _ref = _i.value;
  58246. }
  58247. var prop = _ref;
  58248. var name = getName$1(prop.key);
  58249. var isDuplicate = false;
  58250. switch (prop.kind) {
  58251. case "get":
  58252. if (alreadySeenData[name] || alreadySeenGetters[name]) {
  58253. isDuplicate = true;
  58254. }
  58255. alreadySeenGetters[name] = true;
  58256. break;
  58257. case "set":
  58258. if (alreadySeenData[name] || alreadySeenSetters[name]) {
  58259. isDuplicate = true;
  58260. }
  58261. alreadySeenSetters[name] = true;
  58262. break;
  58263. default:
  58264. if (alreadySeenData[name] || alreadySeenGetters[name] || alreadySeenSetters[name]) {
  58265. isDuplicate = true;
  58266. }
  58267. alreadySeenData[name] = true;
  58268. }
  58269. if (isDuplicate) {
  58270. prop.computed = true;
  58271. prop.key = StringLiteral(name);
  58272. }
  58273. }
  58274. }
  58275. }
  58276. };
  58277. });
  58278. function getObjRef(node, nodes, file, scope) {
  58279. var ref;
  58280. if (isSuper(node)) {
  58281. return node;
  58282. } else if (isIdentifier(node)) {
  58283. if (scope.hasBinding(node.name)) {
  58284. return node;
  58285. } else {
  58286. ref = node;
  58287. }
  58288. } else if (isMemberExpression(node)) {
  58289. ref = node.object;
  58290. if (isSuper(ref) || isIdentifier(ref) && scope.hasBinding(ref.name)) {
  58291. return ref;
  58292. }
  58293. } else {
  58294. throw new Error("We can't explode this node type " + node.type);
  58295. }
  58296. var temp = scope.generateUidIdentifierBasedOnNode(ref);
  58297. scope.push({
  58298. id: temp
  58299. });
  58300. nodes.push(AssignmentExpression("=", cloneNode(temp), cloneNode(ref)));
  58301. return temp;
  58302. }
  58303. function getPropRef(node, nodes, file, scope) {
  58304. var prop = node.property;
  58305. var key = toComputedKey(node, prop);
  58306. if (isLiteral(key) && isPureish(key)) return key;
  58307. var temp = scope.generateUidIdentifierBasedOnNode(prop);
  58308. scope.push({
  58309. id: temp
  58310. });
  58311. nodes.push(AssignmentExpression("=", cloneNode(temp), cloneNode(prop)));
  58312. return temp;
  58313. }
  58314. function explode$1 (node, nodes, file, scope, allowedSingleIdent) {
  58315. var obj;
  58316. if (isIdentifier(node) && allowedSingleIdent) {
  58317. obj = node;
  58318. } else {
  58319. obj = getObjRef(node, nodes, file, scope);
  58320. }
  58321. var ref, uid;
  58322. if (isIdentifier(node)) {
  58323. ref = cloneNode(node);
  58324. uid = obj;
  58325. } else {
  58326. var prop = getPropRef(node, nodes, file, scope);
  58327. var computed = node.computed || isLiteral(prop);
  58328. uid = MemberExpression(cloneNode(obj), cloneNode(prop), computed);
  58329. ref = MemberExpression(cloneNode(obj), cloneNode(prop), computed);
  58330. }
  58331. return {
  58332. uid: uid,
  58333. ref: ref
  58334. };
  58335. }
  58336. function build (opts) {
  58337. var build = opts.build,
  58338. operator = opts.operator;
  58339. return {
  58340. AssignmentExpression: function AssignmentExpression$1(path) {
  58341. var node = path.node,
  58342. scope = path.scope;
  58343. if (node.operator !== operator + "=") return;
  58344. var nodes = [];
  58345. var exploded = explode$1(node.left, nodes, this, scope);
  58346. nodes.push(AssignmentExpression("=", exploded.ref, build(exploded.uid, node.right)));
  58347. path.replaceWith(SequenceExpression(nodes));
  58348. },
  58349. BinaryExpression: function BinaryExpression(path) {
  58350. var node = path.node;
  58351. if (node.operator === operator) {
  58352. path.replaceWith(build(node.left, node.right));
  58353. }
  58354. }
  58355. };
  58356. }
  58357. var transformExponentialOperator = declare(function (api) {
  58358. api.assertVersion(7);
  58359. return {
  58360. name: "transform-exponentiation-operator",
  58361. visitor: build({
  58362. operator: "**",
  58363. build: function build(left, right) {
  58364. return CallExpression(MemberExpression(Identifier("Math"), Identifier("pow")), [left, right]);
  58365. }
  58366. })
  58367. };
  58368. });
  58369. var transformFlowComments = declare(function (api) {
  58370. api.assertVersion(7);
  58371. function commentFromString(comment) {
  58372. return typeof comment === "string" ? {
  58373. type: "CommentBlock",
  58374. value: comment
  58375. } : comment;
  58376. }
  58377. function attachComment(_ref) {
  58378. var ofPath = _ref.ofPath,
  58379. toPath = _ref.toPath,
  58380. _ref$where = _ref.where,
  58381. where = _ref$where === void 0 ? "trailing" : _ref$where,
  58382. _ref$optional = _ref.optional,
  58383. optional = _ref$optional === void 0 ? false : _ref$optional,
  58384. _ref$comments = _ref.comments,
  58385. comments = _ref$comments === void 0 ? generateComment(ofPath, optional) : _ref$comments,
  58386. _ref$keepType = _ref.keepType,
  58387. keepType = _ref$keepType === void 0 ? false : _ref$keepType;
  58388. if (!toPath || !toPath.node) {
  58389. toPath = ofPath.getPrevSibling();
  58390. where = "trailing";
  58391. }
  58392. if (!toPath.node) {
  58393. toPath = ofPath.getNextSibling();
  58394. where = "leading";
  58395. }
  58396. if (!toPath.node) {
  58397. toPath = ofPath.parentPath;
  58398. where = "inner";
  58399. }
  58400. if (!Array.isArray(comments)) {
  58401. comments = [comments];
  58402. }
  58403. comments = comments.map(commentFromString);
  58404. if (!keepType && ofPath && ofPath.node) {
  58405. var node = ofPath.node;
  58406. var parent = ofPath.parentPath;
  58407. var prev = ofPath.getPrevSibling();
  58408. var next = ofPath.getNextSibling();
  58409. var isSingleChild = !(prev.node || next.node);
  58410. var leading = node.leadingComments;
  58411. var trailing = node.trailingComments;
  58412. if (isSingleChild && leading) {
  58413. parent.addComments("inner", leading);
  58414. }
  58415. toPath.addComments(where, comments);
  58416. ofPath.remove();
  58417. if (isSingleChild && trailing) {
  58418. parent.addComments("inner", trailing);
  58419. }
  58420. } else {
  58421. toPath.addComments(where, comments);
  58422. }
  58423. }
  58424. function wrapInFlowComment(path) {
  58425. attachComment({
  58426. ofPath: path,
  58427. comments: generateComment(path, path.parent.optional)
  58428. });
  58429. }
  58430. function generateComment(path, optional) {
  58431. var comment = path.getSource().replace(/\*-\//g, "*-ESCAPED/").replace(/\*\//g, "*-/");
  58432. if (optional) comment = "?" + comment;
  58433. if (comment[0] !== ":") comment = ":: " + comment;
  58434. return comment;
  58435. }
  58436. function isTypeImport(importKind) {
  58437. return importKind === "type" || importKind === "typeof";
  58438. }
  58439. return {
  58440. name: "transform-flow-comments",
  58441. inherits: syntaxFlow,
  58442. visitor: {
  58443. TypeCastExpression: function TypeCastExpression(path) {
  58444. var node = path.node;
  58445. attachComment({
  58446. ofPath: path.get("typeAnnotation"),
  58447. toPath: path.get("expression"),
  58448. keepType: true
  58449. });
  58450. path.replaceWith(ParenthesizedExpression(node.expression));
  58451. },
  58452. Identifier: function Identifier(path) {
  58453. if (path.parentPath.isFlow()) return;
  58454. var node = path.node;
  58455. if (node.typeAnnotation) {
  58456. attachComment({
  58457. ofPath: path.get("typeAnnotation"),
  58458. toPath: path,
  58459. optional: node.optional || node.typeAnnotation.optional
  58460. });
  58461. if (node.optional) {
  58462. node.optional = false;
  58463. }
  58464. } else if (node.optional) {
  58465. attachComment({
  58466. toPath: path,
  58467. comments: ":: ?"
  58468. });
  58469. node.optional = false;
  58470. }
  58471. },
  58472. AssignmentPattern: {
  58473. exit: function exit(_ref2) {
  58474. var node = _ref2.node;
  58475. var left = node.left;
  58476. if (left.optional) {
  58477. left.optional = false;
  58478. }
  58479. }
  58480. },
  58481. Function: function Function(path) {
  58482. if (path.isDeclareFunction()) return;
  58483. var node = path.node;
  58484. if (node.typeParameters) {
  58485. attachComment({
  58486. ofPath: path.get("typeParameters"),
  58487. toPath: path.get("id"),
  58488. optional: node.typeParameters.optional
  58489. });
  58490. }
  58491. if (node.returnType) {
  58492. attachComment({
  58493. ofPath: path.get("returnType"),
  58494. toPath: path.get("body"),
  58495. where: "leading",
  58496. optional: node.returnType.typeAnnotation.optional
  58497. });
  58498. }
  58499. },
  58500. ClassProperty: function ClassProperty(path) {
  58501. var node = path.node;
  58502. if (!node.value) {
  58503. wrapInFlowComment(path);
  58504. } else if (node.typeAnnotation) {
  58505. attachComment({
  58506. ofPath: path.get("typeAnnotation"),
  58507. toPath: path.get("key"),
  58508. optional: node.typeAnnotation.optional
  58509. });
  58510. }
  58511. },
  58512. ExportNamedDeclaration: function ExportNamedDeclaration(path) {
  58513. var node = path.node;
  58514. if (node.exportKind !== "type" && !isFlow(node.declaration)) {
  58515. return;
  58516. }
  58517. wrapInFlowComment(path);
  58518. },
  58519. ImportDeclaration: function ImportDeclaration(path) {
  58520. var node = path.node;
  58521. if (isTypeImport(node.importKind)) {
  58522. wrapInFlowComment(path);
  58523. return;
  58524. }
  58525. var typeSpecifiers = node.specifiers.filter(function (specifier) {
  58526. return isTypeImport(specifier.importKind);
  58527. });
  58528. var nonTypeSpecifiers = node.specifiers.filter(function (specifier) {
  58529. return !isTypeImport(specifier.importKind);
  58530. });
  58531. node.specifiers = nonTypeSpecifiers;
  58532. if (typeSpecifiers.length > 0) {
  58533. var typeImportNode = cloneNode(node);
  58534. typeImportNode.specifiers = typeSpecifiers;
  58535. var comment = ":: " + generateCode(typeImportNode).code;
  58536. if (nonTypeSpecifiers.length > 0) {
  58537. attachComment({
  58538. toPath: path,
  58539. comments: comment
  58540. });
  58541. } else {
  58542. attachComment({
  58543. ofPath: path,
  58544. comments: comment
  58545. });
  58546. }
  58547. }
  58548. },
  58549. ObjectPattern: function ObjectPattern(path) {
  58550. var node = path.node;
  58551. if (node.typeAnnotation) {
  58552. attachComment({
  58553. ofPath: path.get("typeAnnotation"),
  58554. toPath: path,
  58555. optional: node.optional || node.typeAnnotation.optional
  58556. });
  58557. }
  58558. },
  58559. Flow: function Flow(path) {
  58560. wrapInFlowComment(path);
  58561. },
  58562. Class: function Class(path) {
  58563. var node = path.node;
  58564. var comments = [];
  58565. if (node.typeParameters) {
  58566. var typeParameters = path.get("typeParameters");
  58567. comments.push(generateComment(typeParameters, node.typeParameters.optional));
  58568. var trailingComments = node.typeParameters.trailingComments;
  58569. if (trailingComments) {
  58570. var _comments;
  58571. (_comments = comments).push.apply(_comments, trailingComments);
  58572. }
  58573. typeParameters.remove();
  58574. }
  58575. if (node.superClass) {
  58576. if (comments.length > 0) {
  58577. attachComment({
  58578. toPath: path.get("id"),
  58579. comments: comments
  58580. });
  58581. comments = [];
  58582. }
  58583. if (node.superTypeParameters) {
  58584. var superTypeParameters = path.get("superTypeParameters");
  58585. comments.push(generateComment(superTypeParameters, superTypeParameters.node.optional));
  58586. superTypeParameters.remove();
  58587. }
  58588. }
  58589. if (node["implements"]) {
  58590. var impls = path.get("implements");
  58591. var comment = "implements " + impls.map(function (impl) {
  58592. return generateComment(impl).replace(/^:: /, "");
  58593. }).join(", ");
  58594. delete node["implements"];
  58595. if (comments.length === 1) {
  58596. comments[0] += " " + comment;
  58597. } else {
  58598. comments.push(":: " + comment);
  58599. }
  58600. }
  58601. if (comments.length > 0) {
  58602. attachComment({
  58603. toPath: path.get("body"),
  58604. where: "leading",
  58605. comments: comments
  58606. });
  58607. }
  58608. }
  58609. }
  58610. };
  58611. });
  58612. var transformFlowStripTypes = declare(function (api) {
  58613. api.assertVersion(7);
  58614. var FLOW_DIRECTIVE = /(@flow(\s+(strict(-local)?|weak))?|@noflow)/;
  58615. var skipStrip = false;
  58616. return {
  58617. name: "transform-flow-strip-types",
  58618. inherits: syntaxFlow,
  58619. visitor: {
  58620. Program: function Program(path, _ref) {
  58621. var comments = _ref.file.ast.comments,
  58622. opts = _ref.opts;
  58623. skipStrip = false;
  58624. var directiveFound = false;
  58625. if (comments) {
  58626. for (var _i = 0, _arr = comments; _i < _arr.length; _i++) {
  58627. var comment = _arr[_i];
  58628. if (FLOW_DIRECTIVE.test(comment.value)) {
  58629. directiveFound = true;
  58630. comment.value = comment.value.replace(FLOW_DIRECTIVE, "");
  58631. if (!comment.value.replace(/\*/g, "").trim()) {
  58632. comment.ignore = true;
  58633. }
  58634. }
  58635. }
  58636. }
  58637. if (!directiveFound && opts.requireDirective) {
  58638. skipStrip = true;
  58639. }
  58640. },
  58641. ImportDeclaration: function ImportDeclaration(path) {
  58642. if (skipStrip) return;
  58643. if (!path.node.specifiers.length) return;
  58644. var typeCount = 0;
  58645. path.node.specifiers.forEach(function (_ref2) {
  58646. var importKind = _ref2.importKind;
  58647. if (importKind === "type" || importKind === "typeof") {
  58648. typeCount++;
  58649. }
  58650. });
  58651. if (typeCount === path.node.specifiers.length) {
  58652. path.remove();
  58653. }
  58654. },
  58655. Flow: function Flow(path) {
  58656. if (skipStrip) {
  58657. throw path.buildCodeFrameError("A @flow directive is required when using Flow annotations with " + "the `requireDirective` option.");
  58658. }
  58659. path.remove();
  58660. },
  58661. ClassProperty: function ClassProperty(path) {
  58662. if (skipStrip) return;
  58663. path.node.variance = null;
  58664. path.node.typeAnnotation = null;
  58665. if (!path.node.value) path.remove();
  58666. },
  58667. ClassPrivateProperty: function ClassPrivateProperty(path) {
  58668. if (skipStrip) return;
  58669. path.node.typeAnnotation = null;
  58670. },
  58671. Class: function Class(path) {
  58672. if (skipStrip) return;
  58673. path.node["implements"] = null;
  58674. path.get("body.body").forEach(function (child) {
  58675. if (child.isClassProperty()) {
  58676. child.node.typeAnnotation = null;
  58677. if (!child.node.value) child.remove();
  58678. }
  58679. });
  58680. },
  58681. AssignmentPattern: function AssignmentPattern(_ref3) {
  58682. var node = _ref3.node;
  58683. if (skipStrip) return;
  58684. node.left.optional = false;
  58685. },
  58686. Function: function Function(_ref4) {
  58687. var node = _ref4.node;
  58688. if (skipStrip) return;
  58689. for (var i = 0; i < node.params.length; i++) {
  58690. var param = node.params[i];
  58691. param.optional = false;
  58692. if (param.type === "AssignmentPattern") {
  58693. param.left.optional = false;
  58694. }
  58695. }
  58696. node.predicate = null;
  58697. },
  58698. TypeCastExpression: function TypeCastExpression(path) {
  58699. if (skipStrip) return;
  58700. var node = path.node;
  58701. do {
  58702. node = node.expression;
  58703. } while (isTypeCastExpression(node));
  58704. path.replaceWith(node);
  58705. },
  58706. CallExpression: function CallExpression(_ref5) {
  58707. var node = _ref5.node;
  58708. if (skipStrip) return;
  58709. node.typeArguments = null;
  58710. },
  58711. OptionalCallExpression: function OptionalCallExpression(_ref6) {
  58712. var node = _ref6.node;
  58713. if (skipStrip) return;
  58714. node.typeArguments = null;
  58715. },
  58716. NewExpression: function NewExpression(_ref7) {
  58717. var node = _ref7.node;
  58718. if (skipStrip) return;
  58719. node.typeArguments = null;
  58720. }
  58721. }
  58722. };
  58723. });
  58724. var transformForOf = declare(function (api, options) {
  58725. api.assertVersion(7);
  58726. var loose = options.loose,
  58727. assumeArray = options.assumeArray;
  58728. if (loose === true && assumeArray === true) {
  58729. throw new Error("The loose and assumeArray options cannot be used together in @babel/plugin-transform-for-of");
  58730. }
  58731. if (assumeArray) {
  58732. return {
  58733. name: "transform-for-of",
  58734. visitor: {
  58735. ForOfStatement: function ForOfStatement(path) {
  58736. var scope = path.scope;
  58737. var _path$node = path.node,
  58738. left = _path$node.left,
  58739. right = _path$node.right,
  58740. body = _path$node.body;
  58741. var i = scope.generateUidIdentifier("i");
  58742. var array = scope.maybeGenerateMemoised(right, true);
  58743. var inits = [VariableDeclarator(i, NumericLiteral(0))];
  58744. if (array) {
  58745. inits.push(VariableDeclarator(array, right));
  58746. } else {
  58747. array = right;
  58748. }
  58749. var item = MemberExpression(cloneNode(array), cloneNode(i), true);
  58750. var assignment;
  58751. if (isVariableDeclaration(left)) {
  58752. assignment = left;
  58753. assignment.declarations[0].init = item;
  58754. } else {
  58755. assignment = ExpressionStatement(AssignmentExpression("=", left, item));
  58756. }
  58757. var block = toBlock(body);
  58758. block.body.unshift(assignment);
  58759. path.replaceWith(ForStatement(VariableDeclaration("let", inits), BinaryExpression("<", cloneNode(i), MemberExpression(cloneNode(array), Identifier("length"))), UpdateExpression("++", cloneNode(i)), block));
  58760. }
  58761. }
  58762. };
  58763. }
  58764. var pushComputedProps = loose ? pushComputedPropsLoose : pushComputedPropsSpec;
  58765. var buildForOfArray = template("\n for (var KEY = 0, NAME = ARR; KEY < NAME.length; KEY++) BODY;\n ");
  58766. var buildForOfLoose = template("\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 ");
  58767. var buildForOf = template("\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 ");
  58768. function _ForOfStatementArray(path) {
  58769. var node = path.node,
  58770. scope = path.scope;
  58771. var right = scope.generateUidIdentifierBasedOnNode(node.right, "arr");
  58772. var iterationKey = scope.generateUidIdentifier("i");
  58773. var loop = buildForOfArray({
  58774. BODY: node.body,
  58775. KEY: iterationKey,
  58776. NAME: right,
  58777. ARR: node.right
  58778. });
  58779. inherits(loop, node);
  58780. ensureBlock(loop);
  58781. var iterationValue = MemberExpression(cloneNode(right), cloneNode(iterationKey), true);
  58782. var left = node.left;
  58783. if (isVariableDeclaration(left)) {
  58784. left.declarations[0].init = iterationValue;
  58785. loop.body.body.unshift(left);
  58786. } else {
  58787. loop.body.body.unshift(ExpressionStatement(AssignmentExpression("=", left, iterationValue)));
  58788. }
  58789. if (path.parentPath.isLabeledStatement()) {
  58790. loop = LabeledStatement(path.parentPath.node.label, loop);
  58791. }
  58792. return [loop];
  58793. }
  58794. function replaceWithArray(path) {
  58795. if (path.parentPath.isLabeledStatement()) {
  58796. path.parentPath.replaceWithMultiple(_ForOfStatementArray(path));
  58797. } else {
  58798. path.replaceWithMultiple(_ForOfStatementArray(path));
  58799. }
  58800. }
  58801. return {
  58802. name: "transform-for-of",
  58803. visitor: {
  58804. ForOfStatement: function ForOfStatement(path, state) {
  58805. var right = path.get("right");
  58806. if (right.isArrayExpression() || right.isGenericType("Array") || isArrayTypeAnnotation(right.getTypeAnnotation())) {
  58807. replaceWithArray(path);
  58808. return;
  58809. }
  58810. var node = path.node;
  58811. var build = pushComputedProps(path, state);
  58812. var declar = build.declar;
  58813. var loop = build.loop;
  58814. var block = loop.body;
  58815. path.ensureBlock();
  58816. if (declar) {
  58817. block.body.push(declar);
  58818. }
  58819. block.body = block.body.concat(node.body.body);
  58820. inherits(loop, node);
  58821. inherits(loop.body, node.body);
  58822. if (build.replaceParent) {
  58823. path.parentPath.replaceWithMultiple(build.node);
  58824. path.remove();
  58825. } else {
  58826. path.replaceWithMultiple(build.node);
  58827. }
  58828. }
  58829. }
  58830. };
  58831. function pushComputedPropsLoose(path, file) {
  58832. var node = path.node,
  58833. scope = path.scope,
  58834. parent = path.parent;
  58835. var left = node.left;
  58836. var declar, id, intermediate;
  58837. if (isIdentifier(left) || isPattern(left) || isMemberExpression(left)) {
  58838. id = left;
  58839. intermediate = null;
  58840. } else if (isVariableDeclaration(left)) {
  58841. id = scope.generateUidIdentifier("ref");
  58842. declar = VariableDeclaration(left.kind, [VariableDeclarator(left.declarations[0].id, Identifier(id.name))]);
  58843. intermediate = VariableDeclaration("var", [VariableDeclarator(Identifier(id.name))]);
  58844. } else {
  58845. throw file.buildCodeFrameError(left, "Unknown node type " + left.type + " in ForStatement");
  58846. }
  58847. var iteratorKey = scope.generateUidIdentifier("iterator");
  58848. var isArrayKey = scope.generateUidIdentifier("isArray");
  58849. var loop = buildForOfLoose({
  58850. LOOP_OBJECT: iteratorKey,
  58851. IS_ARRAY: isArrayKey,
  58852. OBJECT: node.right,
  58853. INDEX: scope.generateUidIdentifier("i"),
  58854. ID: id,
  58855. INTERMEDIATE: intermediate
  58856. });
  58857. var isLabeledParent = isLabeledStatement(parent);
  58858. var labeled;
  58859. if (isLabeledParent) {
  58860. labeled = LabeledStatement(parent.label, loop);
  58861. }
  58862. return {
  58863. replaceParent: isLabeledParent,
  58864. declar: declar,
  58865. node: labeled || loop,
  58866. loop: loop
  58867. };
  58868. }
  58869. function pushComputedPropsSpec(path, file) {
  58870. var node = path.node,
  58871. scope = path.scope,
  58872. parent = path.parent;
  58873. var left = node.left;
  58874. var declar;
  58875. var stepKey = scope.generateUid("step");
  58876. var stepValue = MemberExpression(Identifier(stepKey), Identifier("value"));
  58877. if (isIdentifier(left) || isPattern(left) || isMemberExpression(left)) {
  58878. declar = ExpressionStatement(AssignmentExpression("=", left, stepValue));
  58879. } else if (isVariableDeclaration(left)) {
  58880. declar = VariableDeclaration(left.kind, [VariableDeclarator(left.declarations[0].id, stepValue)]);
  58881. } else {
  58882. throw file.buildCodeFrameError(left, "Unknown node type " + left.type + " in ForStatement");
  58883. }
  58884. var template = buildForOf({
  58885. ITERATOR_HAD_ERROR_KEY: scope.generateUidIdentifier("didIteratorError"),
  58886. ITERATOR_COMPLETION: scope.generateUidIdentifier("iteratorNormalCompletion"),
  58887. ITERATOR_ERROR_KEY: scope.generateUidIdentifier("iteratorError"),
  58888. ITERATOR_KEY: scope.generateUidIdentifier("iterator"),
  58889. STEP_KEY: Identifier(stepKey),
  58890. OBJECT: node.right
  58891. });
  58892. var isLabeledParent = isLabeledStatement(parent);
  58893. var tryBody = template[3].block.body;
  58894. var loop = tryBody[0];
  58895. if (isLabeledParent) {
  58896. tryBody[0] = LabeledStatement(parent.label, loop);
  58897. }
  58898. return {
  58899. replaceParent: isLabeledParent,
  58900. declar: declar,
  58901. loop: loop,
  58902. node: template
  58903. };
  58904. }
  58905. });
  58906. var transformFunctionName = declare(function (api) {
  58907. api.assertVersion(7);
  58908. return {
  58909. name: "transform-function-name",
  58910. visitor: {
  58911. FunctionExpression: {
  58912. exit: function exit(path) {
  58913. if (path.key !== "value" && !path.parentPath.isObjectProperty()) {
  58914. var replacement = nameFunction(path);
  58915. if (replacement) path.replaceWith(replacement);
  58916. }
  58917. }
  58918. },
  58919. ObjectProperty: function ObjectProperty(path) {
  58920. var value = path.get("value");
  58921. if (value.isFunction()) {
  58922. var newNode = nameFunction(value);
  58923. if (newNode) value.replaceWith(newNode);
  58924. }
  58925. }
  58926. }
  58927. };
  58928. });
  58929. var transformInstanceof = declare(function (api) {
  58930. api.assertVersion(7);
  58931. return {
  58932. name: "transform-instanceof",
  58933. visitor: {
  58934. BinaryExpression: function BinaryExpression(path) {
  58935. var node = path.node;
  58936. if (node.operator === "instanceof") {
  58937. var helper = this.addHelper("instanceof");
  58938. var isUnderHelper = path.findParent(function (path) {
  58939. return path.isVariableDeclarator() && path.node.id === helper || path.isFunctionDeclaration() && path.node.id && path.node.id.name === helper.name;
  58940. });
  58941. if (isUnderHelper) {
  58942. return;
  58943. } else {
  58944. path.replaceWith(CallExpression(helper, [node.left, node.right]));
  58945. }
  58946. }
  58947. }
  58948. }
  58949. };
  58950. });
  58951. var transformJscript = declare(function (api) {
  58952. api.assertVersion(7);
  58953. return {
  58954. name: "transform-jscript",
  58955. visitor: {
  58956. FunctionExpression: {
  58957. exit: function exit(path) {
  58958. var node = path.node;
  58959. if (!node.id) return;
  58960. path.replaceWith(CallExpression(FunctionExpression(null, [], BlockStatement([toStatement(node), ReturnStatement(cloneNode(node.id))])), []));
  58961. }
  58962. }
  58963. }
  58964. };
  58965. });
  58966. var transformLiterals = declare(function (api) {
  58967. api.assertVersion(7);
  58968. return {
  58969. name: "transform-literals",
  58970. visitor: {
  58971. NumericLiteral: function NumericLiteral(_ref) {
  58972. var node = _ref.node;
  58973. if (node.extra && /^0[ob]/i.test(node.extra.raw)) {
  58974. node.extra = undefined;
  58975. }
  58976. },
  58977. StringLiteral: function StringLiteral(_ref2) {
  58978. var node = _ref2.node;
  58979. if (node.extra && /\\[u]/gi.test(node.extra.raw)) {
  58980. node.extra = undefined;
  58981. }
  58982. }
  58983. }
  58984. };
  58985. });
  58986. var transformMemberExpressionLiterals = declare(function (api) {
  58987. api.assertVersion(7);
  58988. return {
  58989. name: "transform-member-expression-literals",
  58990. visitor: {
  58991. MemberExpression: {
  58992. exit: function exit(_ref) {
  58993. var node = _ref.node;
  58994. var prop = node.property;
  58995. if (!node.computed && isIdentifier(prop) && !isValidES3Identifier(prop.name)) {
  58996. node.property = StringLiteral(prop.name);
  58997. node.computed = true;
  58998. }
  58999. }
  59000. }
  59001. }
  59002. };
  59003. });
  59004. function baseSlice(array, start, end) {
  59005. var index = -1,
  59006. length = array.length;
  59007. if (start < 0) {
  59008. start = -start > length ? 0 : length + start;
  59009. }
  59010. end = end > length ? length : end;
  59011. if (end < 0) {
  59012. end += length;
  59013. }
  59014. length = start > end ? 0 : end - start >>> 0;
  59015. start >>>= 0;
  59016. var result = Array(length);
  59017. while (++index < length) {
  59018. result[index] = array[index + start];
  59019. }
  59020. return result;
  59021. }
  59022. var _baseSlice = baseSlice;
  59023. var nativeCeil = Math.ceil,
  59024. nativeMax$2 = Math.max;
  59025. function chunk(array, size, guard) {
  59026. if (guard ? _isIterateeCall(array, size, guard) : size === undefined) {
  59027. size = 1;
  59028. } else {
  59029. size = nativeMax$2(toInteger_1(size), 0);
  59030. }
  59031. var length = array == null ? 0 : array.length;
  59032. if (!length || size < 1) {
  59033. return [];
  59034. }
  59035. var index = 0,
  59036. resIndex = 0,
  59037. result = Array(nativeCeil(length / size));
  59038. while (index < length) {
  59039. result[resIndex++] = _baseSlice(array, index, index += size);
  59040. }
  59041. return result;
  59042. }
  59043. var chunk_1 = chunk;
  59044. function rewriteThis(programPath) {
  59045. programPath.traverse(rewriteThisVisitor);
  59046. }
  59047. var rewriteThisVisitor = {
  59048. ThisExpression: function ThisExpression(path) {
  59049. path.replaceWith(path.scope.buildUndefinedNode());
  59050. },
  59051. Function: function Function(path) {
  59052. if (!path.isArrowFunctionExpression()) path.skip();
  59053. },
  59054. ClassProperty: function ClassProperty(path) {
  59055. path.skip();
  59056. },
  59057. ClassPrivateProperty: function ClassPrivateProperty(path) {
  59058. path.skip();
  59059. }
  59060. };
  59061. function simplifyAccess(path, bindingNames) {
  59062. path.traverse(simpleAssignmentVisitor, {
  59063. scope: path.scope,
  59064. bindingNames: bindingNames,
  59065. seen: new WeakSet()
  59066. });
  59067. }
  59068. var simpleAssignmentVisitor = {
  59069. UpdateExpression: {
  59070. exit: function exit(path) {
  59071. var scope = this.scope,
  59072. bindingNames = this.bindingNames;
  59073. var arg = path.get("argument");
  59074. if (!arg.isIdentifier()) return;
  59075. var localName = arg.node.name;
  59076. if (!bindingNames.has(localName)) return;
  59077. if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {
  59078. return;
  59079. }
  59080. if (path.parentPath.isExpressionStatement() && !path.isCompletionRecord()) {
  59081. var operator = path.node.operator == "++" ? "+=" : "-=";
  59082. path.replaceWith(AssignmentExpression(operator, arg.node, NumericLiteral(1)));
  59083. } else if (path.node.prefix) {
  59084. path.replaceWith(AssignmentExpression("=", Identifier(localName), BinaryExpression(path.node.operator[0], UnaryExpression("+", arg.node), NumericLiteral(1))));
  59085. } else {
  59086. var old = path.scope.generateUidIdentifierBasedOnNode(arg.node, "old");
  59087. var varName = old.name;
  59088. path.scope.push({
  59089. id: old
  59090. });
  59091. var binary = BinaryExpression(path.node.operator[0], Identifier(varName), NumericLiteral(1));
  59092. path.replaceWith(SequenceExpression([AssignmentExpression("=", Identifier(varName), UnaryExpression("+", arg.node)), AssignmentExpression("=", cloneNode(arg.node), binary), Identifier(varName)]));
  59093. }
  59094. }
  59095. },
  59096. AssignmentExpression: {
  59097. exit: function exit(path) {
  59098. var scope = this.scope,
  59099. seen = this.seen,
  59100. bindingNames = this.bindingNames;
  59101. if (path.node.operator === "=") return;
  59102. if (seen.has(path.node)) return;
  59103. seen.add(path.node);
  59104. var left = path.get("left");
  59105. if (!left.isIdentifier()) return;
  59106. var localName = left.node.name;
  59107. if (!bindingNames.has(localName)) return;
  59108. if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {
  59109. return;
  59110. }
  59111. path.node.right = BinaryExpression(path.node.operator.slice(0, -1), cloneNode(path.node.left), path.node.right);
  59112. path.node.operator = "=";
  59113. }
  59114. }
  59115. };
  59116. function _templateObject$7() {
  59117. var data = _taggedTemplateLiteralLoose(["\n (function() {\n throw new Error('\"' + '", "' + '\" is read-only.');\n })()\n "]);
  59118. _templateObject$7 = function _templateObject() {
  59119. return data;
  59120. };
  59121. return data;
  59122. }
  59123. function rewriteLiveReferences(programPath, metadata) {
  59124. var imported = new Map();
  59125. var exported = new Map();
  59126. var requeueInParent = function requeueInParent(path) {
  59127. programPath.requeue(path);
  59128. };
  59129. for (var _iterator = metadata.source, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  59130. var _ref;
  59131. if (_isArray) {
  59132. if (_i >= _iterator.length) break;
  59133. _ref = _iterator[_i++];
  59134. } else {
  59135. _i = _iterator.next();
  59136. if (_i.done) break;
  59137. _ref = _i.value;
  59138. }
  59139. var _ref4 = _ref,
  59140. source = _ref4[0],
  59141. data = _ref4[1];
  59142. for (var _iterator3 = data.imports, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
  59143. var _ref5;
  59144. if (_isArray3) {
  59145. if (_i3 >= _iterator3.length) break;
  59146. _ref5 = _iterator3[_i3++];
  59147. } else {
  59148. _i3 = _iterator3.next();
  59149. if (_i3.done) break;
  59150. _ref5 = _i3.value;
  59151. }
  59152. var _ref7 = _ref5,
  59153. localName = _ref7[0],
  59154. importName = _ref7[1];
  59155. imported.set(localName, [source, importName, null]);
  59156. }
  59157. for (var _iterator4 = data.importsNamespace, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
  59158. var _ref6;
  59159. if (_isArray4) {
  59160. if (_i4 >= _iterator4.length) break;
  59161. _ref6 = _iterator4[_i4++];
  59162. } else {
  59163. _i4 = _iterator4.next();
  59164. if (_i4.done) break;
  59165. _ref6 = _i4.value;
  59166. }
  59167. var _localName = _ref6;
  59168. imported.set(_localName, [source, null, _localName]);
  59169. }
  59170. }
  59171. for (var _iterator2 = metadata.local, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  59172. var _exportMeta;
  59173. var _ref2;
  59174. if (_isArray2) {
  59175. if (_i2 >= _iterator2.length) break;
  59176. _ref2 = _iterator2[_i2++];
  59177. } else {
  59178. _i2 = _iterator2.next();
  59179. if (_i2.done) break;
  59180. _ref2 = _i2.value;
  59181. }
  59182. var _ref8 = _ref2,
  59183. local = _ref8[0],
  59184. _data = _ref8[1];
  59185. var exportMeta = exported.get(local);
  59186. if (!exportMeta) {
  59187. exportMeta = [];
  59188. exported.set(local, exportMeta);
  59189. }
  59190. (_exportMeta = exportMeta).push.apply(_exportMeta, _data.names);
  59191. }
  59192. programPath.traverse(rewriteBindingInitVisitor, {
  59193. metadata: metadata,
  59194. requeueInParent: requeueInParent,
  59195. scope: programPath.scope,
  59196. exported: exported
  59197. });
  59198. simplifyAccess(programPath, new Set([].concat(Array.from(imported.keys()), Array.from(exported.keys()))));
  59199. programPath.traverse(rewriteReferencesVisitor, {
  59200. seen: new WeakSet(),
  59201. metadata: metadata,
  59202. requeueInParent: requeueInParent,
  59203. scope: programPath.scope,
  59204. imported: imported,
  59205. exported: exported,
  59206. buildImportReference: function buildImportReference(_ref3, identNode) {
  59207. var source = _ref3[0],
  59208. importName = _ref3[1],
  59209. localName = _ref3[2];
  59210. var meta = metadata.source.get(source);
  59211. if (localName) {
  59212. if (meta.lazy) identNode = CallExpression(identNode, []);
  59213. return identNode;
  59214. }
  59215. var namespace = Identifier(meta.name);
  59216. if (meta.lazy) namespace = CallExpression(namespace, []);
  59217. return MemberExpression(namespace, Identifier(importName));
  59218. }
  59219. });
  59220. }
  59221. var rewriteBindingInitVisitor = {
  59222. Scope: function Scope(path) {
  59223. path.skip();
  59224. },
  59225. ClassDeclaration: function ClassDeclaration(path) {
  59226. var requeueInParent = this.requeueInParent,
  59227. exported = this.exported,
  59228. metadata = this.metadata;
  59229. var id = path.node.id;
  59230. if (!id) throw new Error("Expected class to have a name");
  59231. var localName = id.name;
  59232. var exportNames = exported.get(localName) || [];
  59233. if (exportNames.length > 0) {
  59234. var statement = ExpressionStatement(buildBindingExportAssignmentExpression(metadata, exportNames, Identifier(localName)));
  59235. statement._blockHoist = path.node._blockHoist;
  59236. requeueInParent(path.insertAfter(statement)[0]);
  59237. }
  59238. },
  59239. VariableDeclaration: function VariableDeclaration(path) {
  59240. var requeueInParent = this.requeueInParent,
  59241. exported = this.exported,
  59242. metadata = this.metadata;
  59243. Object.keys(path.getOuterBindingIdentifiers()).forEach(function (localName) {
  59244. var exportNames = exported.get(localName) || [];
  59245. if (exportNames.length > 0) {
  59246. var statement = ExpressionStatement(buildBindingExportAssignmentExpression(metadata, exportNames, Identifier(localName)));
  59247. statement._blockHoist = path.node._blockHoist;
  59248. requeueInParent(path.insertAfter(statement)[0]);
  59249. }
  59250. });
  59251. }
  59252. };
  59253. var buildBindingExportAssignmentExpression = function buildBindingExportAssignmentExpression(metadata, exportNames, localExpr) {
  59254. return (exportNames || []).reduce(function (expr, exportName) {
  59255. return AssignmentExpression("=", MemberExpression(Identifier(metadata.exportName), Identifier(exportName)), expr);
  59256. }, localExpr);
  59257. };
  59258. var buildImportThrow = function buildImportThrow(localName) {
  59259. return template.expression.ast(_templateObject$7(), localName);
  59260. };
  59261. var rewriteReferencesVisitor = {
  59262. ReferencedIdentifier: function ReferencedIdentifier(path) {
  59263. var seen = this.seen,
  59264. buildImportReference = this.buildImportReference,
  59265. scope = this.scope,
  59266. imported = this.imported,
  59267. requeueInParent = this.requeueInParent;
  59268. if (seen.has(path.node)) return;
  59269. seen.add(path.node);
  59270. var localName = path.node.name;
  59271. var localBinding = path.scope.getBinding(localName);
  59272. var rootBinding = scope.getBinding(localName);
  59273. if (rootBinding !== localBinding) return;
  59274. var importData = imported.get(localName);
  59275. if (importData) {
  59276. var ref = buildImportReference(importData, path.node);
  59277. ref.loc = path.node.loc;
  59278. if ((path.parentPath.isCallExpression({
  59279. callee: path.node
  59280. }) || path.parentPath.isOptionalCallExpression({
  59281. callee: path.node
  59282. }) || path.parentPath.isTaggedTemplateExpression({
  59283. tag: path.node
  59284. })) && isMemberExpression(ref)) {
  59285. path.replaceWith(SequenceExpression([NumericLiteral(0), ref]));
  59286. } else if (path.isJSXIdentifier() && isMemberExpression(ref)) {
  59287. var object = ref.object,
  59288. property = ref.property;
  59289. path.replaceWith(JSXMemberExpression(JSXIdentifier(object.name), JSXIdentifier(property.name)));
  59290. } else {
  59291. path.replaceWith(ref);
  59292. }
  59293. requeueInParent(path);
  59294. path.skip();
  59295. }
  59296. },
  59297. AssignmentExpression: {
  59298. exit: function exit(path) {
  59299. var _this = this;
  59300. var scope = this.scope,
  59301. seen = this.seen,
  59302. imported = this.imported,
  59303. exported = this.exported,
  59304. requeueInParent = this.requeueInParent,
  59305. buildImportReference = this.buildImportReference;
  59306. if (seen.has(path.node)) return;
  59307. seen.add(path.node);
  59308. var left = path.get("left");
  59309. if (left.isMemberExpression()) return;
  59310. if (left.isIdentifier()) {
  59311. var localName = left.node.name;
  59312. if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {
  59313. return;
  59314. }
  59315. var exportedNames = exported.get(localName);
  59316. var importData = imported.get(localName);
  59317. if ((exportedNames == null ? void 0 : exportedNames.length) > 0 || importData) {
  59318. assert$2(path.node.operator === "=", "Path was not simplified");
  59319. var assignment = path.node;
  59320. if (importData) {
  59321. assignment.left = buildImportReference(importData, assignment.left);
  59322. assignment.right = SequenceExpression([assignment.right, buildImportThrow(localName)]);
  59323. }
  59324. path.replaceWith(buildBindingExportAssignmentExpression(this.metadata, exportedNames, assignment));
  59325. requeueInParent(path);
  59326. }
  59327. } else {
  59328. var ids = left.getOuterBindingIdentifiers();
  59329. var programScopeIds = Object.keys(ids).filter(function (localName) {
  59330. return scope.getBinding(localName) === path.scope.getBinding(localName);
  59331. });
  59332. var id = programScopeIds.find(function (localName) {
  59333. return imported.has(localName);
  59334. });
  59335. if (id) {
  59336. path.node.right = SequenceExpression([path.node.right, buildImportThrow(id)]);
  59337. }
  59338. var items = [];
  59339. programScopeIds.forEach(function (localName) {
  59340. var exportedNames = exported.get(localName) || [];
  59341. if (exportedNames.length > 0) {
  59342. items.push(buildBindingExportAssignmentExpression(_this.metadata, exportedNames, Identifier(localName)));
  59343. }
  59344. });
  59345. if (items.length > 0) {
  59346. var node = SequenceExpression(items);
  59347. if (path.parentPath.isExpressionStatement()) {
  59348. node = ExpressionStatement(node);
  59349. node._blockHoist = path.parentPath.node._blockHoist;
  59350. }
  59351. var statement = path.insertAfter(node)[0];
  59352. requeueInParent(statement);
  59353. }
  59354. }
  59355. }
  59356. }
  59357. };
  59358. function hasExports(metadata) {
  59359. return metadata.hasExports;
  59360. }
  59361. function isSideEffectImport(source) {
  59362. return source.imports.size === 0 && source.importsNamespace.size === 0 && source.reexports.size === 0 && source.reexportNamespace.size === 0 && !source.reexportAll;
  59363. }
  59364. function normalizeModuleAndLoadMetadata(programPath, exportName, _temp) {
  59365. var _ref = _temp === void 0 ? {} : _temp,
  59366. _ref$noInterop = _ref.noInterop,
  59367. noInterop = _ref$noInterop === void 0 ? false : _ref$noInterop,
  59368. _ref$loose = _ref.loose,
  59369. loose = _ref$loose === void 0 ? false : _ref$loose,
  59370. _ref$lazy = _ref.lazy,
  59371. lazy = _ref$lazy === void 0 ? false : _ref$lazy,
  59372. _ref$esNamespaceOnly = _ref.esNamespaceOnly,
  59373. esNamespaceOnly = _ref$esNamespaceOnly === void 0 ? false : _ref$esNamespaceOnly;
  59374. if (!exportName) {
  59375. exportName = programPath.scope.generateUidIdentifier("exports").name;
  59376. }
  59377. nameAnonymousExports(programPath);
  59378. var _getModuleMetadata = getModuleMetadata(programPath, {
  59379. loose: loose,
  59380. lazy: lazy
  59381. }),
  59382. local = _getModuleMetadata.local,
  59383. source = _getModuleMetadata.source,
  59384. hasExports = _getModuleMetadata.hasExports;
  59385. removeModuleDeclarations(programPath);
  59386. for (var _iterator = source, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  59387. var _ref2;
  59388. if (_isArray) {
  59389. if (_i >= _iterator.length) break;
  59390. _ref2 = _iterator[_i++];
  59391. } else {
  59392. _i = _iterator.next();
  59393. if (_i.done) break;
  59394. _ref2 = _i.value;
  59395. }
  59396. var _ref3 = _ref2,
  59397. metadata = _ref3[1];
  59398. if (metadata.importsNamespace.size > 0) {
  59399. metadata.name = metadata.importsNamespace.values().next().value;
  59400. }
  59401. if (noInterop) metadata.interop = "none";else if (esNamespaceOnly) {
  59402. if (metadata.interop === "namespace") {
  59403. metadata.interop = "default";
  59404. }
  59405. }
  59406. }
  59407. return {
  59408. exportName: exportName,
  59409. exportNameListName: null,
  59410. hasExports: hasExports,
  59411. local: local,
  59412. source: source
  59413. };
  59414. }
  59415. function getModuleMetadata(programPath, _ref4) {
  59416. var loose = _ref4.loose,
  59417. lazy = _ref4.lazy;
  59418. var localData = getLocalExportMetadata(programPath, loose);
  59419. var sourceData = new Map();
  59420. var getData = function getData(sourceNode) {
  59421. var source = sourceNode.value;
  59422. var data = sourceData.get(source);
  59423. if (!data) {
  59424. data = {
  59425. name: programPath.scope.generateUidIdentifier(basename(source, extname(source))).name,
  59426. interop: "none",
  59427. loc: null,
  59428. imports: new Map(),
  59429. importsNamespace: new Set(),
  59430. reexports: new Map(),
  59431. reexportNamespace: new Set(),
  59432. reexportAll: null,
  59433. lazy: false
  59434. };
  59435. sourceData.set(source, data);
  59436. }
  59437. return data;
  59438. };
  59439. var hasExports = false;
  59440. programPath.get("body").forEach(function (child) {
  59441. if (child.isImportDeclaration()) {
  59442. var data = getData(child.node.source);
  59443. if (!data.loc) data.loc = child.node.loc;
  59444. child.get("specifiers").forEach(function (spec) {
  59445. if (spec.isImportDefaultSpecifier()) {
  59446. var localName = spec.get("local").node.name;
  59447. data.imports.set(localName, "default");
  59448. var reexport = localData.get(localName);
  59449. if (reexport) {
  59450. localData["delete"](localName);
  59451. reexport.names.forEach(function (name) {
  59452. data.reexports.set(name, "default");
  59453. });
  59454. }
  59455. } else if (spec.isImportNamespaceSpecifier()) {
  59456. var _localName = spec.get("local").node.name;
  59457. data.importsNamespace.add(_localName);
  59458. var _reexport = localData.get(_localName);
  59459. if (_reexport) {
  59460. localData["delete"](_localName);
  59461. _reexport.names.forEach(function (name) {
  59462. data.reexportNamespace.add(name);
  59463. });
  59464. }
  59465. } else if (spec.isImportSpecifier()) {
  59466. var importName = spec.get("imported").node.name;
  59467. var _localName2 = spec.get("local").node.name;
  59468. data.imports.set(_localName2, importName);
  59469. var _reexport2 = localData.get(_localName2);
  59470. if (_reexport2) {
  59471. localData["delete"](_localName2);
  59472. _reexport2.names.forEach(function (name) {
  59473. data.reexports.set(name, importName);
  59474. });
  59475. }
  59476. }
  59477. });
  59478. } else if (child.isExportAllDeclaration()) {
  59479. hasExports = true;
  59480. var _data = getData(child.node.source);
  59481. if (!_data.loc) _data.loc = child.node.loc;
  59482. _data.reexportAll = {
  59483. loc: child.node.loc
  59484. };
  59485. } else if (child.isExportNamedDeclaration() && child.node.source) {
  59486. hasExports = true;
  59487. var _data2 = getData(child.node.source);
  59488. if (!_data2.loc) _data2.loc = child.node.loc;
  59489. child.get("specifiers").forEach(function (spec) {
  59490. if (!spec.isExportSpecifier()) {
  59491. throw spec.buildCodeFrameError("Unexpected export specifier type");
  59492. }
  59493. var importName = spec.get("local").node.name;
  59494. var exportName = spec.get("exported").node.name;
  59495. _data2.reexports.set(exportName, importName);
  59496. if (exportName === "__esModule") {
  59497. throw exportName.buildCodeFrameError('Illegal export "__esModule".');
  59498. }
  59499. });
  59500. } else if (child.isExportNamedDeclaration() || child.isExportDefaultDeclaration()) {
  59501. hasExports = true;
  59502. }
  59503. });
  59504. for (var _iterator2 = sourceData.values(), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  59505. var _ref5;
  59506. if (_isArray2) {
  59507. if (_i2 >= _iterator2.length) break;
  59508. _ref5 = _iterator2[_i2++];
  59509. } else {
  59510. _i2 = _iterator2.next();
  59511. if (_i2.done) break;
  59512. _ref5 = _i2.value;
  59513. }
  59514. var metadata = _ref5;
  59515. var needsDefault = false;
  59516. var needsNamed = false;
  59517. if (metadata.importsNamespace.size > 0) {
  59518. needsDefault = true;
  59519. needsNamed = true;
  59520. }
  59521. if (metadata.reexportAll) {
  59522. needsNamed = true;
  59523. }
  59524. for (var _iterator4 = metadata.imports.values(), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
  59525. var _ref7;
  59526. if (_isArray4) {
  59527. if (_i4 >= _iterator4.length) break;
  59528. _ref7 = _iterator4[_i4++];
  59529. } else {
  59530. _i4 = _iterator4.next();
  59531. if (_i4.done) break;
  59532. _ref7 = _i4.value;
  59533. }
  59534. var importName = _ref7;
  59535. if (importName === "default") needsDefault = true;else needsNamed = true;
  59536. }
  59537. for (var _iterator5 = metadata.reexports.values(), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) {
  59538. var _ref8;
  59539. if (_isArray5) {
  59540. if (_i5 >= _iterator5.length) break;
  59541. _ref8 = _iterator5[_i5++];
  59542. } else {
  59543. _i5 = _iterator5.next();
  59544. if (_i5.done) break;
  59545. _ref8 = _i5.value;
  59546. }
  59547. var _importName = _ref8;
  59548. if (_importName === "default") needsDefault = true;else needsNamed = true;
  59549. }
  59550. if (needsDefault && needsNamed) {
  59551. metadata.interop = "namespace";
  59552. } else if (needsDefault) {
  59553. metadata.interop = "default";
  59554. }
  59555. }
  59556. for (var _iterator3 = sourceData, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
  59557. var _ref6;
  59558. if (_isArray3) {
  59559. if (_i3 >= _iterator3.length) break;
  59560. _ref6 = _iterator3[_i3++];
  59561. } else {
  59562. _i3 = _iterator3.next();
  59563. if (_i3.done) break;
  59564. _ref6 = _i3.value;
  59565. }
  59566. var _ref9 = _ref6,
  59567. source = _ref9[0],
  59568. _metadata = _ref9[1];
  59569. if (lazy !== false && !(isSideEffectImport(_metadata) || _metadata.reexportAll)) {
  59570. if (lazy === true) {
  59571. _metadata.lazy = !/\./.test(source);
  59572. } else if (Array.isArray(lazy)) {
  59573. _metadata.lazy = lazy.indexOf(source) !== -1;
  59574. } else if (typeof lazy === "function") {
  59575. _metadata.lazy = lazy(source);
  59576. } else {
  59577. throw new Error(".lazy must be a boolean, string array, or function");
  59578. }
  59579. }
  59580. }
  59581. return {
  59582. hasExports: hasExports,
  59583. local: localData,
  59584. source: sourceData
  59585. };
  59586. }
  59587. function getLocalExportMetadata(programPath, loose) {
  59588. var bindingKindLookup = new Map();
  59589. programPath.get("body").forEach(function (child) {
  59590. var kind;
  59591. if (child.isImportDeclaration()) {
  59592. kind = "import";
  59593. } else {
  59594. if (child.isExportDefaultDeclaration()) child = child.get("declaration");
  59595. if (child.isExportNamedDeclaration()) {
  59596. if (child.node.declaration) {
  59597. child = child.get("declaration");
  59598. } else if (loose && child.node.source && child.get("source").isStringLiteral()) {
  59599. child.node.specifiers.forEach(function (specifier) {
  59600. bindingKindLookup.set(specifier.local.name, "block");
  59601. });
  59602. return;
  59603. }
  59604. }
  59605. if (child.isFunctionDeclaration()) {
  59606. kind = "hoisted";
  59607. } else if (child.isClassDeclaration()) {
  59608. kind = "block";
  59609. } else if (child.isVariableDeclaration({
  59610. kind: "var"
  59611. })) {
  59612. kind = "var";
  59613. } else if (child.isVariableDeclaration()) {
  59614. kind = "block";
  59615. } else {
  59616. return;
  59617. }
  59618. }
  59619. Object.keys(child.getOuterBindingIdentifiers()).forEach(function (name) {
  59620. bindingKindLookup.set(name, kind);
  59621. });
  59622. });
  59623. var localMetadata = new Map();
  59624. var getLocalMetadata = function getLocalMetadata(idPath) {
  59625. var localName = idPath.node.name;
  59626. var metadata = localMetadata.get(localName);
  59627. if (!metadata) {
  59628. var kind = bindingKindLookup.get(localName);
  59629. if (kind === undefined) {
  59630. throw idPath.buildCodeFrameError("Exporting local \"" + localName + "\", which is not declared.");
  59631. }
  59632. metadata = {
  59633. names: [],
  59634. kind: kind
  59635. };
  59636. localMetadata.set(localName, metadata);
  59637. }
  59638. return metadata;
  59639. };
  59640. programPath.get("body").forEach(function (child) {
  59641. if (child.isExportNamedDeclaration() && (loose || !child.node.source)) {
  59642. if (child.node.declaration) {
  59643. var declaration = child.get("declaration");
  59644. var ids = declaration.getOuterBindingIdentifierPaths();
  59645. Object.keys(ids).forEach(function (name) {
  59646. if (name === "__esModule") {
  59647. throw declaration.buildCodeFrameError('Illegal export "__esModule".');
  59648. }
  59649. getLocalMetadata(ids[name]).names.push(name);
  59650. });
  59651. } else {
  59652. child.get("specifiers").forEach(function (spec) {
  59653. var local = spec.get("local");
  59654. var exported = spec.get("exported");
  59655. if (exported.node.name === "__esModule") {
  59656. throw exported.buildCodeFrameError('Illegal export "__esModule".');
  59657. }
  59658. getLocalMetadata(local).names.push(exported.node.name);
  59659. });
  59660. }
  59661. } else if (child.isExportDefaultDeclaration()) {
  59662. var _declaration = child.get("declaration");
  59663. if (_declaration.isFunctionDeclaration() || _declaration.isClassDeclaration()) {
  59664. getLocalMetadata(_declaration.get("id")).names.push("default");
  59665. } else {
  59666. throw _declaration.buildCodeFrameError("Unexpected default expression export.");
  59667. }
  59668. }
  59669. });
  59670. return localMetadata;
  59671. }
  59672. function nameAnonymousExports(programPath) {
  59673. programPath.get("body").forEach(function (child) {
  59674. if (!child.isExportDefaultDeclaration()) return;
  59675. splitExportDeclaration(child);
  59676. });
  59677. }
  59678. function removeModuleDeclarations(programPath) {
  59679. programPath.get("body").forEach(function (child) {
  59680. if (child.isImportDeclaration()) {
  59681. child.remove();
  59682. } else if (child.isExportNamedDeclaration()) {
  59683. if (child.node.declaration) {
  59684. child.node.declaration._blockHoist = child.node._blockHoist;
  59685. child.replaceWith(child.node.declaration);
  59686. } else {
  59687. child.remove();
  59688. }
  59689. } else if (child.isExportDefaultDeclaration()) {
  59690. var declaration = child.get("declaration");
  59691. if (declaration.isFunctionDeclaration() || declaration.isClassDeclaration()) {
  59692. declaration._blockHoist = child.node._blockHoist;
  59693. child.replaceWith(declaration);
  59694. } else {
  59695. throw declaration.buildCodeFrameError("Unexpected default expression export.");
  59696. }
  59697. } else if (child.isExportAllDeclaration()) {
  59698. child.remove();
  59699. }
  59700. });
  59701. }
  59702. function _templateObject11$2() {
  59703. var data = _taggedTemplateLiteralLoose(["EXPORTS.NAME = VALUE"]);
  59704. _templateObject11$2 = function _templateObject11() {
  59705. return data;
  59706. };
  59707. return data;
  59708. }
  59709. function _templateObject10$2() {
  59710. var data = _taggedTemplateLiteralLoose(["\n if (Object.prototype.hasOwnProperty.call(EXPORTS_LIST, key)) return;\n "]);
  59711. _templateObject10$2 = function _templateObject10() {
  59712. return data;
  59713. };
  59714. return data;
  59715. }
  59716. function _templateObject9$2() {
  59717. var data = _taggedTemplateLiteralLoose(["\n Object.keys(NAMESPACE).forEach(function(key) {\n if (key === \"default\" || key === \"__esModule\") return;\n VERIFY_NAME_LIST;\n\n Object.defineProperty(EXPORTS, key, {\n enumerable: true,\n get: function() {\n return NAMESPACE[key];\n },\n });\n });\n "]);
  59718. _templateObject9$2 = function _templateObject9() {
  59719. return data;
  59720. };
  59721. return data;
  59722. }
  59723. function _templateObject8$2() {
  59724. var data = _taggedTemplateLiteralLoose(["\n Object.keys(NAMESPACE).forEach(function(key) {\n if (key === \"default\" || key === \"__esModule\") return;\n VERIFY_NAME_LIST;\n\n EXPORTS[key] = NAMESPACE[key];\n });\n "]);
  59725. _templateObject8$2 = function _templateObject8() {
  59726. return data;
  59727. };
  59728. return data;
  59729. }
  59730. function _templateObject7$2() {
  59731. var data = _taggedTemplateLiteralLoose(["\n Object.defineProperty(EXPORTS, \"__esModule\", {\n value: true,\n });\n "]);
  59732. _templateObject7$2 = function _templateObject7() {
  59733. return data;
  59734. };
  59735. return data;
  59736. }
  59737. function _templateObject6$2() {
  59738. var data = _taggedTemplateLiteralLoose(["\n EXPORTS.__esModule = true;\n "]);
  59739. _templateObject6$2 = function _templateObject6() {
  59740. return data;
  59741. };
  59742. return data;
  59743. }
  59744. function _templateObject5$2() {
  59745. var data = _taggedTemplateLiteralLoose(["\n Object.defineProperty(EXPORTS, \"EXPORT_NAME\", {\n enumerable: true,\n get: function() {\n return NAMESPACE.IMPORT_NAME;\n },\n });\n "]);
  59746. _templateObject5$2 = function _templateObject5() {
  59747. return data;
  59748. };
  59749. return data;
  59750. }
  59751. function _templateObject4$3() {
  59752. var data = _taggedTemplateLiteralLoose(["EXPORTS.EXPORT_NAME = NAMESPACE.IMPORT_NAME;"]);
  59753. _templateObject4$3 = function _templateObject4() {
  59754. return data;
  59755. };
  59756. return data;
  59757. }
  59758. function _templateObject3$3() {
  59759. var data = _taggedTemplateLiteralLoose(["EXPORTS.NAME = NAMESPACE;"]);
  59760. _templateObject3$3 = function _templateObject3() {
  59761. return data;
  59762. };
  59763. return data;
  59764. }
  59765. function _templateObject2$3() {
  59766. var data = _taggedTemplateLiteralLoose(["\n Object.defineProperty(EXPORTS, \"NAME\", {\n enumerable: true,\n get: function() {\n return NAMESPACE;\n }\n });\n "]);
  59767. _templateObject2$3 = function _templateObject2() {
  59768. return data;
  59769. };
  59770. return data;
  59771. }
  59772. function _templateObject$8() {
  59773. var data = _taggedTemplateLiteralLoose(["var NAME = SOURCE;"]);
  59774. _templateObject$8 = function _templateObject() {
  59775. return data;
  59776. };
  59777. return data;
  59778. }
  59779. function rewriteModuleStatementsAndPrepareHeader(path, _ref) {
  59780. var exportName = _ref.exportName,
  59781. strict = _ref.strict,
  59782. allowTopLevelThis = _ref.allowTopLevelThis,
  59783. strictMode = _ref.strictMode,
  59784. loose = _ref.loose,
  59785. noInterop = _ref.noInterop,
  59786. lazy = _ref.lazy,
  59787. esNamespaceOnly = _ref.esNamespaceOnly;
  59788. assert$2(isModule(path), "Cannot process module statements in a script");
  59789. path.node.sourceType = "script";
  59790. var meta = normalizeModuleAndLoadMetadata(path, exportName, {
  59791. noInterop: noInterop,
  59792. loose: loose,
  59793. lazy: lazy,
  59794. esNamespaceOnly: esNamespaceOnly
  59795. });
  59796. if (!allowTopLevelThis) {
  59797. rewriteThis(path);
  59798. }
  59799. rewriteLiveReferences(path, meta);
  59800. if (strictMode !== false) {
  59801. var hasStrict = path.node.directives.some(function (directive) {
  59802. return directive.value.value === "use strict";
  59803. });
  59804. if (!hasStrict) {
  59805. path.unshiftContainer("directives", Directive(DirectiveLiteral("use strict")));
  59806. }
  59807. }
  59808. var headers = [];
  59809. if (hasExports(meta) && !strict) {
  59810. headers.push(buildESModuleHeader(meta, loose));
  59811. }
  59812. var nameList = buildExportNameListDeclaration(path, meta);
  59813. if (nameList) {
  59814. meta.exportNameListName = nameList.name;
  59815. headers.push(nameList.statement);
  59816. }
  59817. headers.push.apply(headers, buildExportInitializationStatements(path, meta, loose));
  59818. return {
  59819. meta: meta,
  59820. headers: headers
  59821. };
  59822. }
  59823. function ensureStatementsHoisted(statements) {
  59824. statements.forEach(function (header) {
  59825. header._blockHoist = 3;
  59826. });
  59827. }
  59828. function wrapInterop(programPath, expr, type) {
  59829. if (type === "none") {
  59830. return null;
  59831. }
  59832. var helper;
  59833. if (type === "default") {
  59834. helper = "interopRequireDefault";
  59835. } else if (type === "namespace") {
  59836. helper = "interopRequireWildcard";
  59837. } else {
  59838. throw new Error("Unknown interop: " + type);
  59839. }
  59840. return CallExpression(programPath.hub.addHelper(helper), [expr]);
  59841. }
  59842. function buildNamespaceInitStatements(metadata, sourceMetadata, loose) {
  59843. if (loose === void 0) {
  59844. loose = false;
  59845. }
  59846. var statements = [];
  59847. var srcNamespace = Identifier(sourceMetadata.name);
  59848. if (sourceMetadata.lazy) srcNamespace = CallExpression(srcNamespace, []);
  59849. for (var _iterator = sourceMetadata.importsNamespace, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  59850. var _ref2;
  59851. if (_isArray) {
  59852. if (_i >= _iterator.length) break;
  59853. _ref2 = _iterator[_i++];
  59854. } else {
  59855. _i = _iterator.next();
  59856. if (_i.done) break;
  59857. _ref2 = _i.value;
  59858. }
  59859. var localName = _ref2;
  59860. if (localName === sourceMetadata.name) continue;
  59861. statements.push(template.statement(_templateObject$8())({
  59862. NAME: localName,
  59863. SOURCE: cloneNode(srcNamespace)
  59864. }));
  59865. }
  59866. if (loose) {
  59867. statements.push.apply(statements, buildReexportsFromMeta(metadata, sourceMetadata, loose));
  59868. }
  59869. for (var _iterator2 = sourceMetadata.reexportNamespace, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  59870. var _ref3;
  59871. if (_isArray2) {
  59872. if (_i2 >= _iterator2.length) break;
  59873. _ref3 = _iterator2[_i2++];
  59874. } else {
  59875. _i2 = _iterator2.next();
  59876. if (_i2.done) break;
  59877. _ref3 = _i2.value;
  59878. }
  59879. var exportName = _ref3;
  59880. statements.push((sourceMetadata.lazy ? template.statement(_templateObject2$3()) : template.statement(_templateObject3$3()))({
  59881. EXPORTS: metadata.exportName,
  59882. NAME: exportName,
  59883. NAMESPACE: cloneNode(srcNamespace)
  59884. }));
  59885. }
  59886. if (sourceMetadata.reexportAll) {
  59887. var statement = buildNamespaceReexport(metadata, cloneNode(srcNamespace), loose);
  59888. statement.loc = sourceMetadata.reexportAll.loc;
  59889. statements.push(statement);
  59890. }
  59891. return statements;
  59892. }
  59893. var getTemplateForReexport = function getTemplateForReexport(loose) {
  59894. return loose ? template.statement(_templateObject4$3()) : template(_templateObject5$2());
  59895. };
  59896. var buildReexportsFromMeta = function buildReexportsFromMeta(meta, metadata, loose) {
  59897. var namespace = metadata.lazy ? CallExpression(Identifier(metadata.name), []) : Identifier(metadata.name);
  59898. var templateForCurrentMode = getTemplateForReexport(loose);
  59899. return Array.from(metadata.reexports, function (_ref4) {
  59900. var exportName = _ref4[0],
  59901. importName = _ref4[1];
  59902. return templateForCurrentMode({
  59903. EXPORTS: meta.exportName,
  59904. EXPORT_NAME: exportName,
  59905. NAMESPACE: cloneNode(namespace),
  59906. IMPORT_NAME: importName
  59907. });
  59908. });
  59909. };
  59910. function buildESModuleHeader(metadata, enumerable) {
  59911. if (enumerable === void 0) {
  59912. enumerable = false;
  59913. }
  59914. return (enumerable ? template.statement(_templateObject6$2()) : template.statement(_templateObject7$2()))({
  59915. EXPORTS: metadata.exportName
  59916. });
  59917. }
  59918. function buildNamespaceReexport(metadata, namespace, loose) {
  59919. return (loose ? template.statement(_templateObject8$2()) : template.statement(_templateObject9$2()))({
  59920. NAMESPACE: namespace,
  59921. EXPORTS: metadata.exportName,
  59922. VERIFY_NAME_LIST: metadata.exportNameListName ? template(_templateObject10$2())({
  59923. EXPORTS_LIST: metadata.exportNameListName
  59924. }) : null
  59925. });
  59926. }
  59927. function buildExportNameListDeclaration(programPath, metadata) {
  59928. var exportedVars = Object.create(null);
  59929. for (var _iterator3 = metadata.local.values(), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
  59930. var _ref5;
  59931. if (_isArray3) {
  59932. if (_i3 >= _iterator3.length) break;
  59933. _ref5 = _iterator3[_i3++];
  59934. } else {
  59935. _i3 = _iterator3.next();
  59936. if (_i3.done) break;
  59937. _ref5 = _i3.value;
  59938. }
  59939. var data = _ref5;
  59940. for (var _iterator5 = data.names, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) {
  59941. var _ref7;
  59942. if (_isArray5) {
  59943. if (_i5 >= _iterator5.length) break;
  59944. _ref7 = _iterator5[_i5++];
  59945. } else {
  59946. _i5 = _iterator5.next();
  59947. if (_i5.done) break;
  59948. _ref7 = _i5.value;
  59949. }
  59950. var _name = _ref7;
  59951. exportedVars[_name] = true;
  59952. }
  59953. }
  59954. var hasReexport = false;
  59955. for (var _iterator4 = metadata.source.values(), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
  59956. var _ref6;
  59957. if (_isArray4) {
  59958. if (_i4 >= _iterator4.length) break;
  59959. _ref6 = _iterator4[_i4++];
  59960. } else {
  59961. _i4 = _iterator4.next();
  59962. if (_i4.done) break;
  59963. _ref6 = _i4.value;
  59964. }
  59965. var _data = _ref6;
  59966. for (var _iterator6 = _data.reexports.keys(), _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) {
  59967. var _ref8;
  59968. if (_isArray6) {
  59969. if (_i6 >= _iterator6.length) break;
  59970. _ref8 = _iterator6[_i6++];
  59971. } else {
  59972. _i6 = _iterator6.next();
  59973. if (_i6.done) break;
  59974. _ref8 = _i6.value;
  59975. }
  59976. var exportName = _ref8;
  59977. exportedVars[exportName] = true;
  59978. }
  59979. for (var _iterator7 = _data.reexportNamespace, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) {
  59980. var _ref9;
  59981. if (_isArray7) {
  59982. if (_i7 >= _iterator7.length) break;
  59983. _ref9 = _iterator7[_i7++];
  59984. } else {
  59985. _i7 = _iterator7.next();
  59986. if (_i7.done) break;
  59987. _ref9 = _i7.value;
  59988. }
  59989. var _exportName = _ref9;
  59990. exportedVars[_exportName] = true;
  59991. }
  59992. hasReexport = hasReexport || _data.reexportAll;
  59993. }
  59994. if (!hasReexport || Object.keys(exportedVars).length === 0) return null;
  59995. var name = programPath.scope.generateUidIdentifier("exportNames");
  59996. delete exportedVars["default"];
  59997. return {
  59998. name: name.name,
  59999. statement: VariableDeclaration("var", [VariableDeclarator(name, valueToNode(exportedVars))])
  60000. };
  60001. }
  60002. function buildExportInitializationStatements(programPath, metadata, loose) {
  60003. if (loose === void 0) {
  60004. loose = false;
  60005. }
  60006. var initStatements = [];
  60007. var exportNames = [];
  60008. for (var _iterator8 = metadata.local, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : _iterator8[Symbol.iterator]();;) {
  60009. var _ref10;
  60010. if (_isArray8) {
  60011. if (_i8 >= _iterator8.length) break;
  60012. _ref10 = _iterator8[_i8++];
  60013. } else {
  60014. _i8 = _iterator8.next();
  60015. if (_i8.done) break;
  60016. _ref10 = _i8.value;
  60017. }
  60018. var _ref12 = _ref10,
  60019. localName = _ref12[0],
  60020. data = _ref12[1];
  60021. if (data.kind === "import") ; else if (data.kind === "hoisted") {
  60022. initStatements.push(buildInitStatement(metadata, data.names, Identifier(localName)));
  60023. } else {
  60024. exportNames.push.apply(exportNames, data.names);
  60025. }
  60026. }
  60027. for (var _iterator9 = metadata.source.values(), _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : _iterator9[Symbol.iterator]();;) {
  60028. var _ref11;
  60029. if (_isArray9) {
  60030. if (_i9 >= _iterator9.length) break;
  60031. _ref11 = _iterator9[_i9++];
  60032. } else {
  60033. _i9 = _iterator9.next();
  60034. if (_i9.done) break;
  60035. _ref11 = _i9.value;
  60036. }
  60037. var _data2 = _ref11;
  60038. if (!loose) {
  60039. initStatements.push.apply(initStatements, buildReexportsFromMeta(metadata, _data2, loose));
  60040. }
  60041. for (var _iterator10 = _data2.reexportNamespace, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : _iterator10[Symbol.iterator]();;) {
  60042. var _ref13;
  60043. if (_isArray10) {
  60044. if (_i10 >= _iterator10.length) break;
  60045. _ref13 = _iterator10[_i10++];
  60046. } else {
  60047. _i10 = _iterator10.next();
  60048. if (_i10.done) break;
  60049. _ref13 = _i10.value;
  60050. }
  60051. var exportName = _ref13;
  60052. exportNames.push(exportName);
  60053. }
  60054. }
  60055. initStatements.push.apply(initStatements, chunk_1(exportNames, 100).map(function (members) {
  60056. return buildInitStatement(metadata, members, programPath.scope.buildUndefinedNode());
  60057. }));
  60058. return initStatements;
  60059. }
  60060. function buildInitStatement(metadata, exportNames, initExpr) {
  60061. return ExpressionStatement(exportNames.reduce(function (acc, exportName) {
  60062. return template.expression(_templateObject11$2())({
  60063. EXPORTS: metadata.exportName,
  60064. NAME: exportName,
  60065. VALUE: acc
  60066. });
  60067. }, initExpr));
  60068. }
  60069. var utils$1 = createCommonjsModule(function (module, exports) {
  60070. Object.defineProperty(exports, "__esModule", {
  60071. value: true
  60072. });
  60073. exports.getImportSource = getImportSource;
  60074. exports.createDynamicImportTransform = createDynamicImportTransform;
  60075. function _slicedToArray(arr, i) {
  60076. return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
  60077. }
  60078. function _nonIterableRest() {
  60079. throw new TypeError("Invalid attempt to destructure non-iterable instance");
  60080. }
  60081. function _iterableToArrayLimit(arr, i) {
  60082. var _arr = [];
  60083. var _n = true;
  60084. var _d = false;
  60085. var _e = undefined;
  60086. try {
  60087. for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
  60088. _arr.push(_s.value);
  60089. if (i && _arr.length === i) break;
  60090. }
  60091. } catch (err) {
  60092. _d = true;
  60093. _e = err;
  60094. } finally {
  60095. try {
  60096. if (!_n && _i["return"] != null) _i["return"]();
  60097. } finally {
  60098. if (_d) throw _e;
  60099. }
  60100. }
  60101. return _arr;
  60102. }
  60103. function _arrayWithHoles(arr) {
  60104. if (Array.isArray(arr)) return arr;
  60105. }
  60106. function getImportSource(t, callNode) {
  60107. var importArguments = callNode.arguments;
  60108. var _importArguments = _slicedToArray(importArguments, 1),
  60109. importPath = _importArguments[0];
  60110. var isString = t.isStringLiteral(importPath) || t.isTemplateLiteral(importPath);
  60111. if (isString) {
  60112. t.removeComments(importPath);
  60113. return importPath;
  60114. }
  60115. return t.templateLiteral([t.templateElement({
  60116. raw: '',
  60117. cooked: ''
  60118. }), t.templateElement({
  60119. raw: '',
  60120. cooked: ''
  60121. }, true)], importArguments);
  60122. }
  60123. function createDynamicImportTransform(_ref) {
  60124. var template = _ref.template,
  60125. t = _ref.types;
  60126. var buildImport = template('Promise.resolve().then(() => MODULE)');
  60127. return function (context, path) {
  60128. var requireCall = t.callExpression(t.identifier('require'), [getImportSource(t, path.parent)]);
  60129. var _context$opts$noInter = context.opts.noInterop,
  60130. noInterop = _context$opts$noInter === undefined ? false : _context$opts$noInter;
  60131. var MODULE = noInterop === true ? requireCall : t.callExpression(context.addHelper('interopRequireWildcard'), [requireCall]);
  60132. var newImport = buildImport({
  60133. MODULE: MODULE
  60134. });
  60135. path.parentPath.replaceWith(newImport);
  60136. };
  60137. }
  60138. });
  60139. unwrapExports(utils$1);
  60140. var utils_1$1 = utils$1.getImportSource;
  60141. var utils_2$1 = utils$1.createDynamicImportTransform;
  60142. var utils$2 = utils$1;
  60143. var utils_1$2 = utils$2.createDynamicImportTransform;
  60144. var utils_2$2 = utils$2.getImportSource;
  60145. function _templateObject$9() {
  60146. var data = _taggedTemplateLiteralLoose(["\n new Promise((", ", ", ") =>\n ", "(\n [", "],\n imported => ", "(", "),\n ", "\n )\n )"]);
  60147. _templateObject$9 = function _templateObject() {
  60148. return data;
  60149. };
  60150. return data;
  60151. }
  60152. var buildWrapper = template("\n define(MODULE_NAME, AMD_ARGUMENTS, function(IMPORT_NAMES) {\n })\n");
  60153. var buildAnonymousWrapper = template("\n define([\"require\"], function(REQUIRE) {\n })\n");
  60154. function injectWrapper(path, wrapper) {
  60155. var _path$node = path.node,
  60156. body = _path$node.body,
  60157. directives = _path$node.directives;
  60158. path.node.directives = [];
  60159. path.node.body = [];
  60160. var amdWrapper = path.pushContainer("body", wrapper)[0];
  60161. var amdFactory = amdWrapper.get("expression.arguments").filter(function (arg) {
  60162. return arg.isFunctionExpression();
  60163. })[0].get("body");
  60164. amdFactory.pushContainer("directives", directives);
  60165. amdFactory.pushContainer("body", body);
  60166. }
  60167. var transformModulesAmd = declare(function (api, options) {
  60168. api.assertVersion(7);
  60169. var loose = options.loose,
  60170. allowTopLevelThis = options.allowTopLevelThis,
  60171. strict = options.strict,
  60172. strictMode = options.strictMode,
  60173. noInterop = options.noInterop;
  60174. return {
  60175. name: "transform-modules-amd",
  60176. pre: function pre() {
  60177. this.file.set("@babel/plugin-transform-modules-*", "amd");
  60178. },
  60179. visitor: {
  60180. CallExpression: function CallExpression(path, state) {
  60181. if (!this.file.has("@babel/plugin-proposal-dynamic-import")) return;
  60182. if (!path.get("callee").isImport()) return;
  60183. var requireId = state.requireId,
  60184. resolveId = state.resolveId,
  60185. rejectId = state.rejectId;
  60186. if (!requireId) {
  60187. requireId = path.scope.generateUidIdentifier("require");
  60188. state.requireId = requireId;
  60189. }
  60190. if (!resolveId || !rejectId) {
  60191. resolveId = path.scope.generateUidIdentifier("resolve");
  60192. rejectId = path.scope.generateUidIdentifier("reject");
  60193. state.resolveId = resolveId;
  60194. state.rejectId = rejectId;
  60195. }
  60196. var result = Identifier("imported");
  60197. if (!noInterop) result = wrapInterop(path, result, "namespace");
  60198. path.replaceWith(template.expression.ast(_templateObject$9(), resolveId, rejectId, requireId, utils_2$2(t, path.node), resolveId, result, rejectId));
  60199. },
  60200. Program: {
  60201. exit: function exit(path, _ref) {
  60202. var requireId = _ref.requireId;
  60203. if (!isModule(path)) {
  60204. if (requireId) {
  60205. injectWrapper(path, buildAnonymousWrapper({
  60206. REQUIRE: requireId
  60207. }));
  60208. }
  60209. return;
  60210. }
  60211. var amdArgs = [];
  60212. var importNames = [];
  60213. if (requireId) {
  60214. amdArgs.push(StringLiteral("require"));
  60215. importNames.push(requireId);
  60216. }
  60217. var moduleName = this.getModuleName();
  60218. if (moduleName) moduleName = StringLiteral(moduleName);
  60219. var _rewriteModuleStateme = rewriteModuleStatementsAndPrepareHeader(path, {
  60220. loose: loose,
  60221. strict: strict,
  60222. strictMode: strictMode,
  60223. allowTopLevelThis: allowTopLevelThis,
  60224. noInterop: noInterop
  60225. }),
  60226. meta = _rewriteModuleStateme.meta,
  60227. headers = _rewriteModuleStateme.headers;
  60228. if (hasExports(meta)) {
  60229. amdArgs.push(StringLiteral("exports"));
  60230. importNames.push(Identifier(meta.exportName));
  60231. }
  60232. for (var _iterator = meta.source, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  60233. var _ref2;
  60234. if (_isArray) {
  60235. if (_i >= _iterator.length) break;
  60236. _ref2 = _iterator[_i++];
  60237. } else {
  60238. _i = _iterator.next();
  60239. if (_i.done) break;
  60240. _ref2 = _i.value;
  60241. }
  60242. var _ref3 = _ref2,
  60243. source = _ref3[0],
  60244. metadata = _ref3[1];
  60245. amdArgs.push(StringLiteral(source));
  60246. importNames.push(Identifier(metadata.name));
  60247. if (!isSideEffectImport(metadata)) {
  60248. var interop = wrapInterop(path, Identifier(metadata.name), metadata.interop);
  60249. if (interop) {
  60250. var header = ExpressionStatement(AssignmentExpression("=", Identifier(metadata.name), interop));
  60251. header.loc = metadata.loc;
  60252. headers.push(header);
  60253. }
  60254. }
  60255. headers.push.apply(headers, buildNamespaceInitStatements(meta, metadata, loose));
  60256. }
  60257. ensureStatementsHoisted(headers);
  60258. path.unshiftContainer("body", headers);
  60259. injectWrapper(path, buildWrapper({
  60260. MODULE_NAME: moduleName,
  60261. AMD_ARGUMENTS: ArrayExpression(amdArgs),
  60262. IMPORT_NAMES: importNames
  60263. }));
  60264. }
  60265. }
  60266. }
  60267. };
  60268. });
  60269. function _templateObject3$4() {
  60270. var data = _taggedTemplateLiteralLoose(["\n var ", " = ", ";\n "]);
  60271. _templateObject3$4 = function _templateObject3() {
  60272. return data;
  60273. };
  60274. return data;
  60275. }
  60276. function _templateObject2$4() {
  60277. var data = _taggedTemplateLiteralLoose(["\n function ", "() {\n const data = ", ";\n ", " = function(){ return data; };\n return data;\n }\n "]);
  60278. _templateObject2$4 = function _templateObject2() {
  60279. return data;
  60280. };
  60281. return data;
  60282. }
  60283. function _templateObject$a() {
  60284. var data = _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 "]);
  60285. _templateObject$a = function _templateObject() {
  60286. return data;
  60287. };
  60288. return data;
  60289. }
  60290. var transformModulesCommonjs = declare(function (api, options) {
  60291. api.assertVersion(7);
  60292. var transformImportCall = utils_1$2(api);
  60293. var loose = options.loose,
  60294. _options$strictNamesp = options.strictNamespace,
  60295. strictNamespace = _options$strictNamesp === void 0 ? false : _options$strictNamesp,
  60296. _options$mjsStrictNam = options.mjsStrictNamespace,
  60297. mjsStrictNamespace = _options$mjsStrictNam === void 0 ? true : _options$mjsStrictNam,
  60298. allowTopLevelThis = options.allowTopLevelThis,
  60299. strict = options.strict,
  60300. strictMode = options.strictMode,
  60301. noInterop = options.noInterop,
  60302. _options$lazy = options.lazy,
  60303. lazy = _options$lazy === void 0 ? false : _options$lazy,
  60304. _options$allowCommonJ = options.allowCommonJSExports,
  60305. allowCommonJSExports = _options$allowCommonJ === void 0 ? true : _options$allowCommonJ;
  60306. if (typeof lazy !== "boolean" && typeof lazy !== "function" && (!Array.isArray(lazy) || !lazy.every(function (item) {
  60307. return typeof item === "string";
  60308. }))) {
  60309. throw new Error(".lazy must be a boolean, array of strings, or a function");
  60310. }
  60311. if (typeof strictNamespace !== "boolean") {
  60312. throw new Error(".strictNamespace must be a boolean, or undefined");
  60313. }
  60314. if (typeof mjsStrictNamespace !== "boolean") {
  60315. throw new Error(".mjsStrictNamespace must be a boolean, or undefined");
  60316. }
  60317. var getAssertion = function getAssertion(localName) {
  60318. return template.expression.ast(_templateObject$a(), localName);
  60319. };
  60320. var moduleExportsVisitor = {
  60321. ReferencedIdentifier: function ReferencedIdentifier(path) {
  60322. var localName = path.node.name;
  60323. if (localName !== "module" && localName !== "exports") return;
  60324. var localBinding = path.scope.getBinding(localName);
  60325. var rootBinding = this.scope.getBinding(localName);
  60326. if (rootBinding !== localBinding || path.parentPath.isObjectProperty({
  60327. value: path.node
  60328. }) && path.parentPath.parentPath.isObjectPattern() || path.parentPath.isAssignmentExpression({
  60329. left: path.node
  60330. }) || path.isAssignmentExpression({
  60331. left: path.node
  60332. })) {
  60333. return;
  60334. }
  60335. path.replaceWith(getAssertion(localName));
  60336. },
  60337. AssignmentExpression: function AssignmentExpression(path) {
  60338. var _this = this;
  60339. var left = path.get("left");
  60340. if (left.isIdentifier()) {
  60341. var localName = path.node.name;
  60342. if (localName !== "module" && localName !== "exports") return;
  60343. var localBinding = path.scope.getBinding(localName);
  60344. var rootBinding = this.scope.getBinding(localName);
  60345. if (rootBinding !== localBinding) return;
  60346. var right = path.get("right");
  60347. right.replaceWith(SequenceExpression([right.node, getAssertion(localName)]));
  60348. } else if (left.isPattern()) {
  60349. var ids = left.getOuterBindingIdentifiers();
  60350. var _localName = Object.keys(ids).filter(function (localName) {
  60351. if (localName !== "module" && localName !== "exports") return false;
  60352. return _this.scope.getBinding(localName) === path.scope.getBinding(localName);
  60353. })[0];
  60354. if (_localName) {
  60355. var _right = path.get("right");
  60356. _right.replaceWith(SequenceExpression([_right.node, getAssertion(_localName)]));
  60357. }
  60358. }
  60359. }
  60360. };
  60361. return {
  60362. name: "transform-modules-commonjs",
  60363. pre: function pre() {
  60364. this.file.set("@babel/plugin-transform-modules-*", "commonjs");
  60365. },
  60366. visitor: {
  60367. CallExpression: function CallExpression(path) {
  60368. if (!this.file.has("@babel/plugin-proposal-dynamic-import")) return;
  60369. if (!path.get("callee").isImport()) return;
  60370. var scope = path.scope;
  60371. do {
  60372. scope.rename("require");
  60373. } while (scope = scope.parent);
  60374. transformImportCall(this, path.get("callee"));
  60375. },
  60376. Program: {
  60377. exit: function exit(path, state) {
  60378. if (!isModule(path)) return;
  60379. path.scope.rename("exports");
  60380. path.scope.rename("module");
  60381. path.scope.rename("require");
  60382. path.scope.rename("__filename");
  60383. path.scope.rename("__dirname");
  60384. if (!allowCommonJSExports) {
  60385. simplifyAccess(path, new Set(["module", "exports"]));
  60386. path.traverse(moduleExportsVisitor, {
  60387. scope: path.scope
  60388. });
  60389. }
  60390. var moduleName = this.getModuleName();
  60391. if (moduleName) moduleName = StringLiteral(moduleName);
  60392. var _rewriteModuleStateme = rewriteModuleStatementsAndPrepareHeader(path, {
  60393. exportName: "exports",
  60394. loose: loose,
  60395. strict: strict,
  60396. strictMode: strictMode,
  60397. allowTopLevelThis: allowTopLevelThis,
  60398. noInterop: noInterop,
  60399. lazy: lazy,
  60400. esNamespaceOnly: typeof state.filename === "string" && /\.mjs$/.test(state.filename) ? mjsStrictNamespace : strictNamespace
  60401. }),
  60402. meta = _rewriteModuleStateme.meta,
  60403. headers = _rewriteModuleStateme.headers;
  60404. for (var _iterator = meta.source, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  60405. var _ref;
  60406. if (_isArray) {
  60407. if (_i >= _iterator.length) break;
  60408. _ref = _iterator[_i++];
  60409. } else {
  60410. _i = _iterator.next();
  60411. if (_i.done) break;
  60412. _ref = _i.value;
  60413. }
  60414. var _ref2 = _ref,
  60415. source = _ref2[0],
  60416. metadata = _ref2[1];
  60417. var loadExpr = CallExpression(Identifier("require"), [StringLiteral(source)]);
  60418. var header = void 0;
  60419. if (isSideEffectImport(metadata)) {
  60420. if (metadata.lazy) throw new Error("Assertion failure");
  60421. header = ExpressionStatement(loadExpr);
  60422. } else {
  60423. var init = wrapInterop(path, loadExpr, metadata.interop) || loadExpr;
  60424. if (metadata.lazy) {
  60425. header = template.ast(_templateObject2$4(), metadata.name, init, metadata.name);
  60426. } else {
  60427. header = template.ast(_templateObject3$4(), metadata.name, init);
  60428. }
  60429. }
  60430. header.loc = metadata.loc;
  60431. headers.push(header);
  60432. headers.push.apply(headers, buildNamespaceInitStatements(meta, metadata, loose));
  60433. }
  60434. ensureStatementsHoisted(headers);
  60435. path.unshiftContainer("body", headers);
  60436. }
  60437. }
  60438. }
  60439. };
  60440. });
  60441. var visitor$3 = {
  60442. Scope: function Scope(path, state) {
  60443. if (state.kind === "let") path.skip();
  60444. },
  60445. Function: function Function(path) {
  60446. path.skip();
  60447. },
  60448. VariableDeclaration: function VariableDeclaration(path, state) {
  60449. if (state.kind && path.node.kind !== state.kind) return;
  60450. var nodes = [];
  60451. var declarations = path.get("declarations");
  60452. var firstId;
  60453. for (var _iterator = declarations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  60454. var _ref;
  60455. if (_isArray) {
  60456. if (_i >= _iterator.length) break;
  60457. _ref = _iterator[_i++];
  60458. } else {
  60459. _i = _iterator.next();
  60460. if (_i.done) break;
  60461. _ref = _i.value;
  60462. }
  60463. var declar = _ref;
  60464. firstId = declar.node.id;
  60465. if (declar.node.init) {
  60466. nodes.push(ExpressionStatement(AssignmentExpression("=", declar.node.id, declar.node.init)));
  60467. }
  60468. for (var _i2 = 0, _Object$keys = Object.keys(declar.getBindingIdentifiers()); _i2 < _Object$keys.length; _i2++) {
  60469. var name = _Object$keys[_i2];
  60470. state.emit(Identifier(name), name, declar.node.init !== null);
  60471. }
  60472. }
  60473. if (path.parentPath.isFor({
  60474. left: path.node
  60475. })) {
  60476. path.replaceWith(firstId);
  60477. } else {
  60478. path.replaceWithMultiple(nodes);
  60479. }
  60480. }
  60481. };
  60482. function hoistVariables (path, emit, kind) {
  60483. if (kind === void 0) {
  60484. kind = "var";
  60485. }
  60486. path.traverse(visitor$3, {
  60487. kind: kind,
  60488. emit: emit
  60489. });
  60490. }
  60491. var buildTemplate = template("\n SYSTEM_REGISTER(MODULE_NAME, SOURCES, function (EXPORT_IDENTIFIER, CONTEXT_IDENTIFIER) {\n \"use strict\";\n BEFORE_BODY;\n return {\n setters: SETTERS,\n execute: function () {\n BODY;\n }\n };\n });\n");
  60492. var buildExportAll = template("\n for (var KEY in TARGET) {\n if (KEY !== \"default\" && KEY !== \"__esModule\") EXPORT_OBJ[KEY] = TARGET[KEY];\n }\n");
  60493. 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";
  60494. function constructExportCall(path, exportIdent, exportNames, exportValues, exportStarTarget) {
  60495. var statements = [];
  60496. if (exportNames.length === 1) {
  60497. statements.push(ExpressionStatement(CallExpression(exportIdent, [StringLiteral(exportNames[0]), exportValues[0]])));
  60498. } else if (!exportStarTarget) {
  60499. var objectProperties = [];
  60500. for (var i = 0; i < exportNames.length; i++) {
  60501. var exportName = exportNames[i];
  60502. var exportValue = exportValues[i];
  60503. objectProperties.push(ObjectProperty(Identifier(exportName), exportValue));
  60504. }
  60505. statements.push(ExpressionStatement(CallExpression(exportIdent, [ObjectExpression(objectProperties)])));
  60506. } else {
  60507. var exportObj = path.scope.generateUid("exportObj");
  60508. statements.push(VariableDeclaration("var", [VariableDeclarator(Identifier(exportObj), ObjectExpression([]))]));
  60509. statements.push(buildExportAll({
  60510. KEY: path.scope.generateUidIdentifier("key"),
  60511. EXPORT_OBJ: Identifier(exportObj),
  60512. TARGET: exportStarTarget
  60513. }));
  60514. for (var _i = 0; _i < exportNames.length; _i++) {
  60515. var _exportName = exportNames[_i];
  60516. var _exportValue = exportValues[_i];
  60517. statements.push(ExpressionStatement(AssignmentExpression("=", MemberExpression(Identifier(exportObj), Identifier(_exportName)), _exportValue)));
  60518. }
  60519. statements.push(ExpressionStatement(CallExpression(exportIdent, [Identifier(exportObj)])));
  60520. }
  60521. return statements;
  60522. }
  60523. var transformModulesSystemjs = declare(function (api, options) {
  60524. api.assertVersion(7);
  60525. var _options$systemGlobal = options.systemGlobal,
  60526. systemGlobal = _options$systemGlobal === void 0 ? "System" : _options$systemGlobal,
  60527. _options$allowTopLeve = options.allowTopLevelThis,
  60528. allowTopLevelThis = _options$allowTopLeve === void 0 ? false : _options$allowTopLeve;
  60529. var IGNORE_REASSIGNMENT_SYMBOL = Symbol();
  60530. var reassignmentVisitor = {
  60531. "AssignmentExpression|UpdateExpression": function AssignmentExpressionUpdateExpression(path) {
  60532. if (path.node[IGNORE_REASSIGNMENT_SYMBOL]) return;
  60533. path.node[IGNORE_REASSIGNMENT_SYMBOL] = true;
  60534. var arg = path.get(path.isAssignmentExpression() ? "left" : "argument");
  60535. if (arg.isObjectPattern() || arg.isArrayPattern()) {
  60536. var exprs = [path.node];
  60537. for (var _i2 = 0, _Object$keys = Object.keys(arg.getBindingIdentifiers()); _i2 < _Object$keys.length; _i2++) {
  60538. var _name = _Object$keys[_i2];
  60539. if (this.scope.getBinding(_name) !== path.scope.getBinding(_name)) {
  60540. return;
  60541. }
  60542. var _exportedNames = this.exports[_name];
  60543. if (!_exportedNames) return;
  60544. for (var _iterator = _exportedNames, _isArray = Array.isArray(_iterator), _i3 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  60545. var _ref;
  60546. if (_isArray) {
  60547. if (_i3 >= _iterator.length) break;
  60548. _ref = _iterator[_i3++];
  60549. } else {
  60550. _i3 = _iterator.next();
  60551. if (_i3.done) break;
  60552. _ref = _i3.value;
  60553. }
  60554. var exportedName = _ref;
  60555. exprs.push(this.buildCall(exportedName, Identifier(_name)).expression);
  60556. }
  60557. }
  60558. path.replaceWith(SequenceExpression(exprs));
  60559. return;
  60560. }
  60561. if (!arg.isIdentifier()) return;
  60562. var name = arg.node.name;
  60563. if (this.scope.getBinding(name) !== path.scope.getBinding(name)) return;
  60564. var exportedNames = this.exports[name];
  60565. if (!exportedNames) return;
  60566. var node = path.node;
  60567. var isPostUpdateExpression = path.isUpdateExpression({
  60568. prefix: false
  60569. });
  60570. if (isPostUpdateExpression) {
  60571. node = BinaryExpression(node.operator[0], UnaryExpression("+", cloneNode(node.argument)), NumericLiteral(1));
  60572. }
  60573. for (var _iterator2 = exportedNames, _isArray2 = Array.isArray(_iterator2), _i4 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  60574. var _ref2;
  60575. if (_isArray2) {
  60576. if (_i4 >= _iterator2.length) break;
  60577. _ref2 = _iterator2[_i4++];
  60578. } else {
  60579. _i4 = _iterator2.next();
  60580. if (_i4.done) break;
  60581. _ref2 = _i4.value;
  60582. }
  60583. var _exportedName = _ref2;
  60584. node = this.buildCall(_exportedName, node).expression;
  60585. }
  60586. if (isPostUpdateExpression) {
  60587. node = SequenceExpression([node, path.node]);
  60588. }
  60589. path.replaceWith(node);
  60590. }
  60591. };
  60592. return {
  60593. name: "transform-modules-systemjs",
  60594. pre: function pre() {
  60595. this.file.set("@babel/plugin-transform-modules-*", "systemjs");
  60596. },
  60597. visitor: {
  60598. CallExpression: function CallExpression$1(path, state) {
  60599. if (isImport(path.node.callee)) {
  60600. if (!this.file.has("@babel/plugin-proposal-dynamic-import")) {
  60601. console.warn(MISSING_PLUGIN_WARNING);
  60602. }
  60603. path.replaceWith(CallExpression(MemberExpression(Identifier(state.contextIdent), Identifier("import")), [utils_2$2(t, path.node)]));
  60604. }
  60605. },
  60606. MetaProperty: function MetaProperty(path, state) {
  60607. if (path.node.meta.name === "import" && path.node.property.name === "meta") {
  60608. path.replaceWith(MemberExpression(Identifier(state.contextIdent), Identifier("meta")));
  60609. }
  60610. },
  60611. ReferencedIdentifier: function ReferencedIdentifier(path, state) {
  60612. if (path.node.name === "__moduleName" && !path.scope.hasBinding("__moduleName")) {
  60613. path.replaceWith(MemberExpression(Identifier(state.contextIdent), Identifier("id")));
  60614. }
  60615. },
  60616. Program: {
  60617. enter: function enter(path, state) {
  60618. state.contextIdent = path.scope.generateUid("context");
  60619. if (!allowTopLevelThis) {
  60620. rewriteThis(path);
  60621. }
  60622. },
  60623. exit: function exit(path, state) {
  60624. var undefinedIdent = path.scope.buildUndefinedNode();
  60625. var exportIdent = path.scope.generateUid("export");
  60626. var contextIdent = state.contextIdent;
  60627. var exportMap = Object.create(null);
  60628. var modules = [];
  60629. var beforeBody = [];
  60630. var setters = [];
  60631. var sources = [];
  60632. var variableIds = [];
  60633. var removedPaths = [];
  60634. function addExportName(key, val) {
  60635. exportMap[key] = exportMap[key] || [];
  60636. exportMap[key].push(val);
  60637. }
  60638. function pushModule(source, key, specifiers) {
  60639. var module;
  60640. modules.forEach(function (m) {
  60641. if (m.key === source) {
  60642. module = m;
  60643. }
  60644. });
  60645. if (!module) {
  60646. modules.push(module = {
  60647. key: source,
  60648. imports: [],
  60649. exports: []
  60650. });
  60651. }
  60652. module[key] = module[key].concat(specifiers);
  60653. }
  60654. function buildExportCall(name, val) {
  60655. return ExpressionStatement(CallExpression(Identifier(exportIdent), [StringLiteral(name), val]));
  60656. }
  60657. var exportNames = [];
  60658. var exportValues = [];
  60659. var body = path.get("body");
  60660. for (var _iterator3 = body, _isArray3 = Array.isArray(_iterator3), _i5 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
  60661. var _ref3;
  60662. if (_isArray3) {
  60663. if (_i5 >= _iterator3.length) break;
  60664. _ref3 = _iterator3[_i5++];
  60665. } else {
  60666. _i5 = _iterator3.next();
  60667. if (_i5.done) break;
  60668. _ref3 = _i5.value;
  60669. }
  60670. var _path = _ref3;
  60671. if (_path.isFunctionDeclaration()) {
  60672. beforeBody.push(_path.node);
  60673. removedPaths.push(_path);
  60674. } else if (_path.isClassDeclaration()) {
  60675. variableIds.push(_path.node.id);
  60676. _path.replaceWith(ExpressionStatement(AssignmentExpression("=", cloneNode(_path.node.id), toExpression(_path.node))));
  60677. } else if (_path.isImportDeclaration()) {
  60678. var source = _path.node.source.value;
  60679. pushModule(source, "imports", _path.node.specifiers);
  60680. for (var _i9 = 0, _Object$keys2 = Object.keys(_path.getBindingIdentifiers()); _i9 < _Object$keys2.length; _i9++) {
  60681. var name = _Object$keys2[_i9];
  60682. _path.scope.removeBinding(name);
  60683. variableIds.push(Identifier(name));
  60684. }
  60685. _path.remove();
  60686. } else if (_path.isExportAllDeclaration()) {
  60687. pushModule(_path.node.source.value, "exports", _path.node);
  60688. _path.remove();
  60689. } else if (_path.isExportDefaultDeclaration()) {
  60690. var declar = _path.get("declaration");
  60691. var id = declar.node.id;
  60692. if (declar.isClassDeclaration()) {
  60693. if (id) {
  60694. exportNames.push("default");
  60695. exportValues.push(undefinedIdent);
  60696. variableIds.push(id);
  60697. addExportName(id.name, "default");
  60698. _path.replaceWith(ExpressionStatement(AssignmentExpression("=", cloneNode(id), toExpression(declar.node))));
  60699. } else {
  60700. exportNames.push("default");
  60701. exportValues.push(toExpression(declar.node));
  60702. removedPaths.push(_path);
  60703. }
  60704. } else if (declar.isFunctionDeclaration()) {
  60705. if (id) {
  60706. beforeBody.push(declar.node);
  60707. exportNames.push("default");
  60708. exportValues.push(cloneNode(id));
  60709. addExportName(id.name, "default");
  60710. } else {
  60711. exportNames.push("default");
  60712. exportValues.push(toExpression(declar.node));
  60713. }
  60714. removedPaths.push(_path);
  60715. } else {
  60716. _path.replaceWith(buildExportCall("default", declar.node));
  60717. }
  60718. } else if (_path.isExportNamedDeclaration()) {
  60719. var _declar = _path.get("declaration");
  60720. if (_declar.node) {
  60721. _path.replaceWith(_declar);
  60722. if (_path.isFunction()) {
  60723. var node = _declar.node;
  60724. var _name2 = node.id.name;
  60725. addExportName(_name2, _name2);
  60726. beforeBody.push(node);
  60727. exportNames.push(_name2);
  60728. exportValues.push(cloneNode(node.id));
  60729. removedPaths.push(_path);
  60730. } else if (_path.isClass()) {
  60731. var _name3 = _declar.node.id.name;
  60732. exportNames.push(_name3);
  60733. exportValues.push(undefinedIdent);
  60734. variableIds.push(_declar.node.id);
  60735. _path.replaceWith(ExpressionStatement(AssignmentExpression("=", cloneNode(_declar.node.id), toExpression(_declar.node))));
  60736. addExportName(_name3, _name3);
  60737. } else {
  60738. for (var _i10 = 0, _Object$keys3 = Object.keys(_declar.getBindingIdentifiers()); _i10 < _Object$keys3.length; _i10++) {
  60739. var _name4 = _Object$keys3[_i10];
  60740. addExportName(_name4, _name4);
  60741. }
  60742. }
  60743. } else {
  60744. var specifiers = _path.node.specifiers;
  60745. if (specifiers && specifiers.length) {
  60746. if (_path.node.source) {
  60747. pushModule(_path.node.source.value, "exports", specifiers);
  60748. _path.remove();
  60749. } else {
  60750. var nodes = [];
  60751. for (var _iterator6 = specifiers, _isArray6 = Array.isArray(_iterator6), _i11 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) {
  60752. var _ref6;
  60753. if (_isArray6) {
  60754. if (_i11 >= _iterator6.length) break;
  60755. _ref6 = _iterator6[_i11++];
  60756. } else {
  60757. _i11 = _iterator6.next();
  60758. if (_i11.done) break;
  60759. _ref6 = _i11.value;
  60760. }
  60761. var specifier = _ref6;
  60762. var binding = _path.scope.getBinding(specifier.local.name);
  60763. if (binding && isFunctionDeclaration(binding.path.node)) {
  60764. exportNames.push(specifier.exported.name);
  60765. exportValues.push(cloneNode(specifier.local));
  60766. } else if (!binding) {
  60767. nodes.push(buildExportCall(specifier.exported.name, specifier.local));
  60768. }
  60769. addExportName(specifier.local.name, specifier.exported.name);
  60770. }
  60771. _path.replaceWithMultiple(nodes);
  60772. }
  60773. } else {
  60774. _path.remove();
  60775. }
  60776. }
  60777. }
  60778. }
  60779. modules.forEach(function (specifiers) {
  60780. var setterBody = [];
  60781. var target = path.scope.generateUid(specifiers.key);
  60782. for (var _iterator4 = specifiers.imports, _isArray4 = Array.isArray(_iterator4), _i6 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
  60783. var _ref4;
  60784. if (_isArray4) {
  60785. if (_i6 >= _iterator4.length) break;
  60786. _ref4 = _iterator4[_i6++];
  60787. } else {
  60788. _i6 = _iterator4.next();
  60789. if (_i6.done) break;
  60790. _ref4 = _i6.value;
  60791. }
  60792. var specifier = _ref4;
  60793. if (isImportNamespaceSpecifier(specifier)) {
  60794. setterBody.push(ExpressionStatement(AssignmentExpression("=", specifier.local, Identifier(target))));
  60795. } else if (isImportDefaultSpecifier(specifier)) {
  60796. specifier = ImportSpecifier(specifier.local, Identifier("default"));
  60797. }
  60798. if (isImportSpecifier(specifier)) {
  60799. setterBody.push(ExpressionStatement(AssignmentExpression("=", specifier.local, MemberExpression(Identifier(target), specifier.imported))));
  60800. }
  60801. }
  60802. if (specifiers.exports.length) {
  60803. var _exportNames = [];
  60804. var _exportValues = [];
  60805. var hasExportStar = false;
  60806. for (var _iterator5 = specifiers.exports, _isArray5 = Array.isArray(_iterator5), _i7 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) {
  60807. var _ref5;
  60808. if (_isArray5) {
  60809. if (_i7 >= _iterator5.length) break;
  60810. _ref5 = _iterator5[_i7++];
  60811. } else {
  60812. _i7 = _iterator5.next();
  60813. if (_i7.done) break;
  60814. _ref5 = _i7.value;
  60815. }
  60816. var node = _ref5;
  60817. if (isExportAllDeclaration(node)) {
  60818. hasExportStar = true;
  60819. } else if (isExportSpecifier(node)) {
  60820. _exportNames.push(node.exported.name);
  60821. _exportValues.push(MemberExpression(Identifier(target), node.local));
  60822. }
  60823. }
  60824. setterBody = setterBody.concat(constructExportCall(path, Identifier(exportIdent), _exportNames, _exportValues, hasExportStar ? Identifier(target) : null));
  60825. }
  60826. sources.push(StringLiteral(specifiers.key));
  60827. setters.push(FunctionExpression(null, [Identifier(target)], BlockStatement(setterBody)));
  60828. });
  60829. var moduleName = this.getModuleName();
  60830. if (moduleName) moduleName = StringLiteral(moduleName);
  60831. hoistVariables(path, function (id, name, hasInit) {
  60832. variableIds.push(id);
  60833. if (!hasInit) {
  60834. exportNames.push(name);
  60835. exportValues.push(undefinedIdent);
  60836. }
  60837. }, null);
  60838. if (variableIds.length) {
  60839. beforeBody.unshift(VariableDeclaration("var", variableIds.map(function (id) {
  60840. return VariableDeclarator(id);
  60841. })));
  60842. }
  60843. if (exportNames.length) {
  60844. beforeBody = beforeBody.concat(constructExportCall(path, Identifier(exportIdent), exportNames, exportValues, null));
  60845. }
  60846. path.traverse(reassignmentVisitor, {
  60847. exports: exportMap,
  60848. buildCall: buildExportCall,
  60849. scope: path.scope
  60850. });
  60851. for (var _i8 = 0, _removedPaths = removedPaths; _i8 < _removedPaths.length; _i8++) {
  60852. var _path2 = _removedPaths[_i8];
  60853. _path2.remove();
  60854. }
  60855. path.node.body = [buildTemplate({
  60856. SYSTEM_REGISTER: MemberExpression(Identifier(systemGlobal), Identifier("register")),
  60857. BEFORE_BODY: beforeBody,
  60858. MODULE_NAME: moduleName,
  60859. SETTERS: ArrayExpression(setters),
  60860. SOURCES: ArrayExpression(sources),
  60861. BODY: path.node.body,
  60862. EXPORT_IDENTIFIER: Identifier(exportIdent),
  60863. CONTEXT_IDENTIFIER: Identifier(contextIdent)
  60864. })];
  60865. }
  60866. }
  60867. }
  60868. };
  60869. });
  60870. var buildPrerequisiteAssignment = template("\n GLOBAL_REFERENCE = GLOBAL_REFERENCE || {}\n");
  60871. var buildWrapper$1 = template("\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");
  60872. var transformModulesUmd = declare(function (api, options) {
  60873. api.assertVersion(7);
  60874. var globals = options.globals,
  60875. exactGlobals = options.exactGlobals,
  60876. loose = options.loose,
  60877. allowTopLevelThis = options.allowTopLevelThis,
  60878. strict = options.strict,
  60879. strictMode = options.strictMode,
  60880. noInterop = options.noInterop;
  60881. function buildBrowserInit(browserGlobals, exactGlobals, filename, moduleName) {
  60882. var moduleNameOrBasename = moduleName ? moduleName.value : basename(filename, extname(filename));
  60883. var globalToAssign = MemberExpression(Identifier("global"), Identifier(toIdentifier(moduleNameOrBasename)));
  60884. var initAssignments = [];
  60885. if (exactGlobals) {
  60886. var globalName = browserGlobals[moduleNameOrBasename];
  60887. if (globalName) {
  60888. initAssignments = [];
  60889. var members = globalName.split(".");
  60890. globalToAssign = members.slice(1).reduce(function (accum, curr) {
  60891. initAssignments.push(buildPrerequisiteAssignment({
  60892. GLOBAL_REFERENCE: cloneNode(accum)
  60893. }));
  60894. return MemberExpression(accum, Identifier(curr));
  60895. }, MemberExpression(Identifier("global"), Identifier(members[0])));
  60896. }
  60897. }
  60898. initAssignments.push(ExpressionStatement(AssignmentExpression("=", globalToAssign, MemberExpression(Identifier("mod"), Identifier("exports")))));
  60899. return initAssignments;
  60900. }
  60901. function buildBrowserArg(browserGlobals, exactGlobals, source) {
  60902. var memberExpression;
  60903. if (exactGlobals) {
  60904. var globalRef = browserGlobals[source];
  60905. if (globalRef) {
  60906. memberExpression = globalRef.split(".").reduce(function (accum, curr) {
  60907. return MemberExpression(accum, Identifier(curr));
  60908. }, Identifier("global"));
  60909. } else {
  60910. memberExpression = MemberExpression(Identifier("global"), Identifier(toIdentifier(source)));
  60911. }
  60912. } else {
  60913. var requireName = basename(source, extname(source));
  60914. var globalName = browserGlobals[requireName] || requireName;
  60915. memberExpression = MemberExpression(Identifier("global"), Identifier(toIdentifier(globalName)));
  60916. }
  60917. return memberExpression;
  60918. }
  60919. return {
  60920. name: "transform-modules-umd",
  60921. visitor: {
  60922. Program: {
  60923. exit: function exit(path) {
  60924. if (!isModule(path)) return;
  60925. var browserGlobals = globals || {};
  60926. var moduleName = this.getModuleName();
  60927. if (moduleName) moduleName = StringLiteral(moduleName);
  60928. var _rewriteModuleStateme = rewriteModuleStatementsAndPrepareHeader(path, {
  60929. loose: loose,
  60930. strict: strict,
  60931. strictMode: strictMode,
  60932. allowTopLevelThis: allowTopLevelThis,
  60933. noInterop: noInterop
  60934. }),
  60935. meta = _rewriteModuleStateme.meta,
  60936. headers = _rewriteModuleStateme.headers;
  60937. var amdArgs = [];
  60938. var commonjsArgs = [];
  60939. var browserArgs = [];
  60940. var importNames = [];
  60941. if (hasExports(meta)) {
  60942. amdArgs.push(StringLiteral("exports"));
  60943. commonjsArgs.push(Identifier("exports"));
  60944. browserArgs.push(MemberExpression(Identifier("mod"), Identifier("exports")));
  60945. importNames.push(Identifier(meta.exportName));
  60946. }
  60947. for (var _iterator = meta.source, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  60948. var _ref;
  60949. if (_isArray) {
  60950. if (_i >= _iterator.length) break;
  60951. _ref = _iterator[_i++];
  60952. } else {
  60953. _i = _iterator.next();
  60954. if (_i.done) break;
  60955. _ref = _i.value;
  60956. }
  60957. var _ref2 = _ref,
  60958. source = _ref2[0],
  60959. metadata = _ref2[1];
  60960. amdArgs.push(StringLiteral(source));
  60961. commonjsArgs.push(CallExpression(Identifier("require"), [StringLiteral(source)]));
  60962. browserArgs.push(buildBrowserArg(browserGlobals, exactGlobals, source));
  60963. importNames.push(Identifier(metadata.name));
  60964. if (!isSideEffectImport(metadata)) {
  60965. var interop = wrapInterop(path, Identifier(metadata.name), metadata.interop);
  60966. if (interop) {
  60967. var header = ExpressionStatement(AssignmentExpression("=", Identifier(metadata.name), interop));
  60968. header.loc = meta.loc;
  60969. headers.push(header);
  60970. }
  60971. }
  60972. headers.push.apply(headers, buildNamespaceInitStatements(meta, metadata, loose));
  60973. }
  60974. ensureStatementsHoisted(headers);
  60975. path.unshiftContainer("body", headers);
  60976. var _path$node = path.node,
  60977. body = _path$node.body,
  60978. directives = _path$node.directives;
  60979. path.node.directives = [];
  60980. path.node.body = [];
  60981. var umdWrapper = path.pushContainer("body", [buildWrapper$1({
  60982. MODULE_NAME: moduleName,
  60983. AMD_ARGUMENTS: ArrayExpression(amdArgs),
  60984. COMMONJS_ARGUMENTS: commonjsArgs,
  60985. BROWSER_ARGUMENTS: browserArgs,
  60986. IMPORT_NAMES: importNames,
  60987. GLOBAL_TO_ASSIGN: buildBrowserInit(browserGlobals, exactGlobals, this.filename || "unknown", moduleName)
  60988. })])[0];
  60989. var umdFactory = umdWrapper.get("expression.arguments")[1].get("body");
  60990. umdFactory.pushContainer("directives", directives);
  60991. umdFactory.pushContainer("body", body);
  60992. }
  60993. }
  60994. }
  60995. };
  60996. });
  60997. function transformNamedCapturingGroupsRegex (core, options) {
  60998. var _options$runtime = options.runtime,
  60999. runtime = _options$runtime === void 0 ? true : _options$runtime;
  61000. if (typeof runtime !== "boolean") {
  61001. throw new Error("The 'runtime' option must be boolean");
  61002. }
  61003. return createRegExpFeaturePlugin({
  61004. name: "transform-named-capturing-groups-regex",
  61005. feature: "namedCaptureGroups",
  61006. options: {
  61007. runtime: runtime
  61008. }
  61009. });
  61010. }
  61011. var transformNewTarget = declare(function (api) {
  61012. api.assertVersion(7);
  61013. return {
  61014. name: "transform-new-target",
  61015. visitor: {
  61016. MetaProperty: function MetaProperty(path) {
  61017. var meta = path.get("meta");
  61018. var property = path.get("property");
  61019. var scope = path.scope;
  61020. if (meta.isIdentifier({
  61021. name: "new"
  61022. }) && property.isIdentifier({
  61023. name: "target"
  61024. })) {
  61025. var func = path.findParent(function (path) {
  61026. if (path.isClass()) return true;
  61027. if (path.isFunction() && !path.isArrowFunctionExpression()) {
  61028. if (path.isClassMethod({
  61029. kind: "constructor"
  61030. })) {
  61031. return false;
  61032. }
  61033. return true;
  61034. }
  61035. return false;
  61036. });
  61037. if (!func) {
  61038. throw path.buildCodeFrameError("new.target must be under a (non-arrow) function or a class.");
  61039. }
  61040. var node = func.node;
  61041. if (!node.id) {
  61042. if (func.isMethod()) {
  61043. path.replaceWith(scope.buildUndefinedNode());
  61044. return;
  61045. }
  61046. node.id = scope.generateUidIdentifier("target");
  61047. }
  61048. var _constructor = MemberExpression(ThisExpression(), Identifier("constructor"));
  61049. if (func.isClass()) {
  61050. path.replaceWith(_constructor);
  61051. return;
  61052. }
  61053. path.replaceWith(ConditionalExpression(BinaryExpression("instanceof", ThisExpression(), cloneNode(node.id)), _constructor, scope.buildUndefinedNode()));
  61054. }
  61055. }
  61056. }
  61057. };
  61058. });
  61059. var transformObjectAssign = declare(function (api) {
  61060. api.assertVersion(7);
  61061. return {
  61062. name: "transform-object-assign",
  61063. visitor: {
  61064. CallExpression: function CallExpression(path, file) {
  61065. if (path.get("callee").matchesPattern("Object.assign")) {
  61066. path.node.callee = file.addHelper("extends");
  61067. }
  61068. }
  61069. }
  61070. };
  61071. });
  61072. function replacePropertySuper(path, getObjectRef, file) {
  61073. var replaceSupers = new ReplaceSupers({
  61074. getObjectRef: getObjectRef,
  61075. methodPath: path,
  61076. file: file
  61077. });
  61078. replaceSupers.replace();
  61079. }
  61080. var transformObjectSuper = declare(function (api) {
  61081. api.assertVersion(7);
  61082. return {
  61083. name: "transform-object-super",
  61084. visitor: {
  61085. ObjectExpression: function ObjectExpression(path, state) {
  61086. var objectRef;
  61087. var getObjectRef = function getObjectRef() {
  61088. return objectRef = objectRef || path.scope.generateUidIdentifier("obj");
  61089. };
  61090. path.get("properties").forEach(function (propPath) {
  61091. if (!propPath.isMethod()) return;
  61092. replacePropertySuper(propPath, getObjectRef, state);
  61093. });
  61094. if (objectRef) {
  61095. path.scope.push({
  61096. id: cloneNode(objectRef)
  61097. });
  61098. path.replaceWith(AssignmentExpression("=", cloneNode(objectRef), path.node));
  61099. }
  61100. }
  61101. }
  61102. };
  61103. });
  61104. var transformObjectSetPrototypeOfToAssign = declare(function (api) {
  61105. api.assertVersion(7);
  61106. return {
  61107. name: "transform-object-set-prototype-of-to-assign",
  61108. visitor: {
  61109. CallExpression: function CallExpression(path, file) {
  61110. if (path.get("callee").matchesPattern("Object.setPrototypeOf")) {
  61111. path.node.callee = file.addHelper("defaults");
  61112. }
  61113. }
  61114. }
  61115. };
  61116. });
  61117. var visitor$4 = {
  61118. enter: function enter(path, state) {
  61119. if (path.isThisExpression()) {
  61120. state.foundThis = true;
  61121. }
  61122. if (path.isReferencedIdentifier({
  61123. name: "arguments"
  61124. })) {
  61125. state.foundArguments = true;
  61126. }
  61127. },
  61128. Function: function Function(path) {
  61129. path.skip();
  61130. }
  61131. };
  61132. function callDelegate (path, scope) {
  61133. if (scope === void 0) {
  61134. scope = path.scope;
  61135. }
  61136. var node = path.node;
  61137. var container = FunctionExpression(null, [], node.body, node.generator, node.async);
  61138. var callee = container;
  61139. var args = [];
  61140. hoistVariables(path, function (id) {
  61141. return scope.push({
  61142. id: id
  61143. });
  61144. });
  61145. var state = {
  61146. foundThis: false,
  61147. foundArguments: false
  61148. };
  61149. path.traverse(visitor$4, state);
  61150. if (state.foundArguments || state.foundThis) {
  61151. callee = MemberExpression(container, Identifier("apply"));
  61152. args = [];
  61153. if (state.foundThis) {
  61154. args.push(ThisExpression());
  61155. }
  61156. if (state.foundArguments) {
  61157. if (!state.foundThis) args.push(NullLiteral());
  61158. args.push(Identifier("arguments"));
  61159. }
  61160. }
  61161. var call = CallExpression(callee, args);
  61162. if (node.generator) call = YieldExpression(call, true);
  61163. return ReturnStatement(call);
  61164. }
  61165. var buildDefaultParam = template("\n let VARIABLE_NAME =\n arguments.length > ARGUMENT_KEY && arguments[ARGUMENT_KEY] !== undefined ?\n arguments[ARGUMENT_KEY]\n :\n DEFAULT_VALUE;\n");
  61166. var buildLooseDefaultParam = template("\n if (ASSIGNMENT_IDENTIFIER === UNDEFINED) {\n ASSIGNMENT_IDENTIFIER = DEFAULT_VALUE;\n }\n");
  61167. var buildLooseDestructuredDefaultParam = template("\n let ASSIGNMENT_IDENTIFIER = PARAMETER_NAME === UNDEFINED ? DEFAULT_VALUE : PARAMETER_NAME ;\n");
  61168. var buildSafeArgumentsAccess = template("\n let $0 = arguments.length > $1 ? arguments[$1] : undefined;\n");
  61169. function isSafeBinding(scope, node) {
  61170. if (!scope.hasOwnBinding(node.name)) return true;
  61171. var _scope$getOwnBinding = scope.getOwnBinding(node.name),
  61172. kind = _scope$getOwnBinding.kind;
  61173. return kind === "param" || kind === "local";
  61174. }
  61175. var iifeVisitor = {
  61176. ReferencedIdentifier: function ReferencedIdentifier(path, state) {
  61177. var scope = path.scope,
  61178. node = path.node;
  61179. if (node.name === "eval" || !isSafeBinding(scope, node) || !isSafeBinding(state.scope, node)) {
  61180. state.iife = true;
  61181. path.stop();
  61182. }
  61183. },
  61184. Scope: function Scope(path) {
  61185. path.skip();
  61186. }
  61187. };
  61188. function convertFunctionParams(path, loose) {
  61189. var node = path.node,
  61190. scope = path.scope;
  61191. var state = {
  61192. iife: false,
  61193. scope: scope
  61194. };
  61195. var body = [];
  61196. var params = path.get("params");
  61197. var firstOptionalIndex = null;
  61198. for (var i = 0; i < params.length; i++) {
  61199. var param = params[i];
  61200. var paramIsAssignmentPattern = param.isAssignmentPattern();
  61201. if (paramIsAssignmentPattern && (loose || node.kind === "set")) {
  61202. var left = param.get("left");
  61203. var right = param.get("right");
  61204. var undefinedNode = scope.buildUndefinedNode();
  61205. if (left.isIdentifier()) {
  61206. body.push(buildLooseDefaultParam({
  61207. ASSIGNMENT_IDENTIFIER: cloneNode(left.node),
  61208. DEFAULT_VALUE: right.node,
  61209. UNDEFINED: undefinedNode
  61210. }));
  61211. param.replaceWith(left.node);
  61212. } else if (left.isObjectPattern() || left.isArrayPattern()) {
  61213. var paramName = scope.generateUidIdentifier();
  61214. body.push(buildLooseDestructuredDefaultParam({
  61215. ASSIGNMENT_IDENTIFIER: left.node,
  61216. DEFAULT_VALUE: right.node,
  61217. PARAMETER_NAME: cloneNode(paramName),
  61218. UNDEFINED: undefinedNode
  61219. }));
  61220. param.replaceWith(paramName);
  61221. }
  61222. } else if (paramIsAssignmentPattern) {
  61223. if (firstOptionalIndex === null) firstOptionalIndex = i;
  61224. var _left = param.get("left");
  61225. var _right = param.get("right");
  61226. if (!state.iife) {
  61227. if (_right.isIdentifier() && !isSafeBinding(scope, _right.node)) {
  61228. state.iife = true;
  61229. } else {
  61230. _right.traverse(iifeVisitor, state);
  61231. }
  61232. }
  61233. var defNode = buildDefaultParam({
  61234. VARIABLE_NAME: _left.node,
  61235. DEFAULT_VALUE: _right.node,
  61236. ARGUMENT_KEY: NumericLiteral(i)
  61237. });
  61238. body.push(defNode);
  61239. } else if (firstOptionalIndex !== null) {
  61240. var _defNode = buildSafeArgumentsAccess([param.node, NumericLiteral(i)]);
  61241. body.push(_defNode);
  61242. } else if (param.isObjectPattern() || param.isArrayPattern()) {
  61243. var uid = path.scope.generateUidIdentifier("ref");
  61244. var _defNode2 = VariableDeclaration("let", [VariableDeclarator(param.node, uid)]);
  61245. body.push(_defNode2);
  61246. param.replaceWith(cloneNode(uid));
  61247. }
  61248. if (!state.iife && !param.isIdentifier()) {
  61249. param.traverse(iifeVisitor, state);
  61250. }
  61251. }
  61252. if (body.length === 0) return false;
  61253. if (firstOptionalIndex !== null) {
  61254. node.params = node.params.slice(0, firstOptionalIndex);
  61255. }
  61256. path.ensureBlock();
  61257. if (state.iife) {
  61258. body.push(callDelegate(path, scope));
  61259. path.set("body", BlockStatement(body));
  61260. } else {
  61261. path.get("body").unshiftContainer("body", body);
  61262. }
  61263. return true;
  61264. }
  61265. var buildRest = template("\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");
  61266. var restIndex = template("\n (INDEX < OFFSET || ARGUMENTS.length <= INDEX) ? undefined : ARGUMENTS[INDEX]\n");
  61267. var restIndexImpure = template("\n REF = INDEX, (REF < OFFSET || ARGUMENTS.length <= REF) ? undefined : ARGUMENTS[REF]\n");
  61268. var restLength = template("\n ARGUMENTS.length <= OFFSET ? 0 : ARGUMENTS.length - OFFSET\n");
  61269. function referencesRest(path, state) {
  61270. if (path.node.name === state.name) {
  61271. return path.scope.bindingIdentifierEquals(state.name, state.outerBinding);
  61272. }
  61273. return false;
  61274. }
  61275. var memberExpressionOptimisationVisitor = {
  61276. Scope: function Scope(path, state) {
  61277. if (!path.scope.bindingIdentifierEquals(state.name, state.outerBinding)) {
  61278. path.skip();
  61279. }
  61280. },
  61281. Flow: function Flow(path) {
  61282. if (path.isTypeCastExpression()) return;
  61283. path.skip();
  61284. },
  61285. Function: function Function(path, state) {
  61286. var oldNoOptimise = state.noOptimise;
  61287. state.noOptimise = true;
  61288. path.traverse(memberExpressionOptimisationVisitor, state);
  61289. state.noOptimise = oldNoOptimise;
  61290. path.skip();
  61291. },
  61292. ReferencedIdentifier: function ReferencedIdentifier(path, state) {
  61293. var node = path.node;
  61294. if (node.name === "arguments") {
  61295. state.deopted = true;
  61296. }
  61297. if (!referencesRest(path, state)) return;
  61298. if (state.noOptimise) {
  61299. state.deopted = true;
  61300. } else {
  61301. var parentPath = path.parentPath;
  61302. if (parentPath.listKey === "params" && parentPath.key < state.offset) {
  61303. return;
  61304. }
  61305. if (parentPath.isMemberExpression({
  61306. object: node
  61307. })) {
  61308. var grandparentPath = parentPath.parentPath;
  61309. var argsOptEligible = !state.deopted && !(grandparentPath.isAssignmentExpression() && parentPath.node === grandparentPath.node.left || grandparentPath.isLVal() || grandparentPath.isForXStatement() || grandparentPath.isUpdateExpression() || grandparentPath.isUnaryExpression({
  61310. operator: "delete"
  61311. }) || (grandparentPath.isCallExpression() || grandparentPath.isNewExpression()) && parentPath.node === grandparentPath.node.callee);
  61312. if (argsOptEligible) {
  61313. if (parentPath.node.computed) {
  61314. if (parentPath.get("property").isBaseType("number")) {
  61315. state.candidates.push({
  61316. cause: "indexGetter",
  61317. path: path
  61318. });
  61319. return;
  61320. }
  61321. } else if (parentPath.node.property.name === "length") {
  61322. state.candidates.push({
  61323. cause: "lengthGetter",
  61324. path: path
  61325. });
  61326. return;
  61327. }
  61328. }
  61329. }
  61330. if (state.offset === 0 && parentPath.isSpreadElement()) {
  61331. var call = parentPath.parentPath;
  61332. if (call.isCallExpression() && call.node.arguments.length === 1) {
  61333. state.candidates.push({
  61334. cause: "argSpread",
  61335. path: path
  61336. });
  61337. return;
  61338. }
  61339. }
  61340. state.references.push(path);
  61341. }
  61342. },
  61343. BindingIdentifier: function BindingIdentifier(path, state) {
  61344. if (referencesRest(path, state)) {
  61345. state.deopted = true;
  61346. }
  61347. }
  61348. };
  61349. function hasRest(node) {
  61350. var length = node.params.length;
  61351. return length > 0 && isRestElement(node.params[length - 1]);
  61352. }
  61353. function optimiseIndexGetter(path, argsId, offset) {
  61354. var offsetLiteral = NumericLiteral(offset);
  61355. var index;
  61356. if (isNumericLiteral(path.parent.property)) {
  61357. index = NumericLiteral(path.parent.property.value + offset);
  61358. } else if (offset === 0) {
  61359. index = path.parent.property;
  61360. } else {
  61361. index = BinaryExpression("+", path.parent.property, cloneNode(offsetLiteral));
  61362. }
  61363. var scope = path.scope;
  61364. if (!scope.isPure(index)) {
  61365. var temp = scope.generateUidIdentifierBasedOnNode(index);
  61366. scope.push({
  61367. id: temp,
  61368. kind: "var"
  61369. });
  61370. path.parentPath.replaceWith(restIndexImpure({
  61371. ARGUMENTS: argsId,
  61372. OFFSET: offsetLiteral,
  61373. INDEX: index,
  61374. REF: cloneNode(temp)
  61375. }));
  61376. } else {
  61377. var parentPath = path.parentPath;
  61378. parentPath.replaceWith(restIndex({
  61379. ARGUMENTS: argsId,
  61380. OFFSET: offsetLiteral,
  61381. INDEX: index
  61382. }));
  61383. var offsetTestPath = parentPath.get("test").get("left");
  61384. var valRes = offsetTestPath.evaluate();
  61385. if (valRes.confident) {
  61386. if (valRes.value === true) {
  61387. parentPath.replaceWith(parentPath.scope.buildUndefinedNode());
  61388. } else {
  61389. parentPath.get("test").replaceWith(parentPath.get("test").get("right"));
  61390. }
  61391. }
  61392. }
  61393. }
  61394. function optimiseLengthGetter(path, argsId, offset) {
  61395. if (offset) {
  61396. path.parentPath.replaceWith(restLength({
  61397. ARGUMENTS: argsId,
  61398. OFFSET: NumericLiteral(offset)
  61399. }));
  61400. } else {
  61401. path.replaceWith(argsId);
  61402. }
  61403. }
  61404. function convertFunctionRest(path) {
  61405. var node = path.node,
  61406. scope = path.scope;
  61407. if (!hasRest(node)) return false;
  61408. var rest = node.params.pop().argument;
  61409. var argsId = Identifier("arguments");
  61410. if (isPattern(rest)) {
  61411. var pattern = rest;
  61412. rest = scope.generateUidIdentifier("ref");
  61413. var declar = VariableDeclaration("let", [VariableDeclarator(pattern, rest)]);
  61414. node.body.body.unshift(declar);
  61415. }
  61416. var state = {
  61417. references: [],
  61418. offset: node.params.length,
  61419. argumentsNode: argsId,
  61420. outerBinding: scope.getBindingIdentifier(rest.name),
  61421. candidates: [],
  61422. name: rest.name,
  61423. deopted: false
  61424. };
  61425. path.traverse(memberExpressionOptimisationVisitor, state);
  61426. if (!state.deopted && !state.references.length) {
  61427. for (var _i = 0, _arr = state.candidates; _i < _arr.length; _i++) {
  61428. var _arr$_i = _arr[_i],
  61429. _path = _arr$_i.path,
  61430. cause = _arr$_i.cause;
  61431. var clonedArgsId = cloneNode(argsId);
  61432. switch (cause) {
  61433. case "indexGetter":
  61434. optimiseIndexGetter(_path, clonedArgsId, state.offset);
  61435. break;
  61436. case "lengthGetter":
  61437. optimiseLengthGetter(_path, clonedArgsId, state.offset);
  61438. break;
  61439. default:
  61440. _path.replaceWith(clonedArgsId);
  61441. }
  61442. }
  61443. return true;
  61444. }
  61445. state.references = state.references.concat(state.candidates.map(function (_ref) {
  61446. var path = _ref.path;
  61447. return path;
  61448. }));
  61449. var start = NumericLiteral(node.params.length);
  61450. var key = scope.generateUidIdentifier("key");
  61451. var len = scope.generateUidIdentifier("len");
  61452. var arrKey, arrLen;
  61453. if (node.params.length) {
  61454. arrKey = BinaryExpression("-", cloneNode(key), cloneNode(start));
  61455. arrLen = ConditionalExpression(BinaryExpression(">", cloneNode(len), cloneNode(start)), BinaryExpression("-", cloneNode(len), cloneNode(start)), NumericLiteral(0));
  61456. } else {
  61457. arrKey = Identifier(key.name);
  61458. arrLen = Identifier(len.name);
  61459. }
  61460. var loop = buildRest({
  61461. ARGUMENTS: argsId,
  61462. ARRAY_KEY: arrKey,
  61463. ARRAY_LEN: arrLen,
  61464. START: start,
  61465. ARRAY: rest,
  61466. KEY: key,
  61467. LEN: len
  61468. });
  61469. if (state.deopted) {
  61470. node.body.body.unshift(loop);
  61471. } else {
  61472. var target = path.getEarliestCommonAncestorFrom(state.references).getStatementParent();
  61473. target.findParent(function (path) {
  61474. if (path.isLoop()) {
  61475. target = path;
  61476. } else {
  61477. return path.isFunction();
  61478. }
  61479. });
  61480. target.insertBefore(loop);
  61481. }
  61482. return true;
  61483. }
  61484. var transformParameters = declare(function (api, options) {
  61485. api.assertVersion(7);
  61486. var loose = options.loose;
  61487. return {
  61488. name: "transform-parameters",
  61489. visitor: {
  61490. Function: function Function(path) {
  61491. if (path.isArrowFunctionExpression() && path.get("params").some(function (param) {
  61492. return param.isRestElement() || param.isAssignmentPattern();
  61493. })) {
  61494. path.arrowFunctionToExpression();
  61495. }
  61496. var convertedRest = convertFunctionRest(path);
  61497. var convertedParams = convertFunctionParams(path, loose);
  61498. if (convertedRest || convertedParams) {
  61499. path.scope.crawl();
  61500. }
  61501. }
  61502. }
  61503. };
  61504. });
  61505. var transformPropertyLiterals = declare(function (api) {
  61506. api.assertVersion(7);
  61507. return {
  61508. name: "transform-property-literals",
  61509. visitor: {
  61510. ObjectProperty: {
  61511. exit: function exit(_ref) {
  61512. var node = _ref.node;
  61513. var key = node.key;
  61514. if (!node.computed && isIdentifier(key) && !isValidES3Identifier(key.name)) {
  61515. node.key = StringLiteral(key.name);
  61516. }
  61517. }
  61518. }
  61519. }
  61520. };
  61521. });
  61522. var transformPropertyMutators = declare(function (api) {
  61523. api.assertVersion(7);
  61524. return {
  61525. name: "transform-property-mutators",
  61526. visitor: {
  61527. ObjectExpression: function ObjectExpression(path, file) {
  61528. var node = path.node;
  61529. var hasAny = false;
  61530. for (var _i = 0, _arr = node.properties; _i < _arr.length; _i++) {
  61531. var prop = _arr[_i];
  61532. if (prop.kind === "get" || prop.kind === "set") {
  61533. hasAny = true;
  61534. break;
  61535. }
  61536. }
  61537. if (!hasAny) return;
  61538. var mutatorMap = {};
  61539. node.properties = node.properties.filter(function (prop) {
  61540. if (!prop.computed && (prop.kind === "get" || prop.kind === "set")) {
  61541. push(mutatorMap, prop, null, file);
  61542. return false;
  61543. } else {
  61544. return true;
  61545. }
  61546. });
  61547. path.replaceWith(CallExpression(MemberExpression(Identifier("Object"), Identifier("defineProperties")), [node, toDefineObject(mutatorMap)]));
  61548. }
  61549. }
  61550. };
  61551. });
  61552. var transformProtoToAssign = declare(function (api) {
  61553. api.assertVersion(7);
  61554. function isProtoKey(node) {
  61555. return isLiteral(toComputedKey(node, node.key), {
  61556. value: "__proto__"
  61557. });
  61558. }
  61559. function isProtoAssignmentExpression(node) {
  61560. var left = node.left;
  61561. return isMemberExpression(left) && isLiteral(toComputedKey(left, left.property), {
  61562. value: "__proto__"
  61563. });
  61564. }
  61565. function buildDefaultsCallExpression(expr, ref, file) {
  61566. return ExpressionStatement(CallExpression(file.addHelper("defaults"), [ref, expr.right]));
  61567. }
  61568. return {
  61569. name: "transform-proto-to-assign",
  61570. visitor: {
  61571. AssignmentExpression: function AssignmentExpression$1(path, file) {
  61572. if (!isProtoAssignmentExpression(path.node)) return;
  61573. var nodes = [];
  61574. var left = path.node.left.object;
  61575. var temp = path.scope.maybeGenerateMemoised(left);
  61576. if (temp) {
  61577. nodes.push(ExpressionStatement(AssignmentExpression("=", temp, left)));
  61578. }
  61579. nodes.push(buildDefaultsCallExpression(path.node, cloneNode(temp || left), file));
  61580. if (temp) nodes.push(cloneNode(temp));
  61581. path.replaceWithMultiple(nodes);
  61582. },
  61583. ExpressionStatement: function ExpressionStatement(path, file) {
  61584. var expr = path.node.expression;
  61585. if (!isAssignmentExpression(expr, {
  61586. operator: "="
  61587. })) return;
  61588. if (isProtoAssignmentExpression(expr)) {
  61589. path.replaceWith(buildDefaultsCallExpression(expr, expr.left.object, file));
  61590. }
  61591. },
  61592. ObjectExpression: function ObjectExpression$1(path, file) {
  61593. var proto;
  61594. var node = path.node;
  61595. for (var _i = 0, _arr = node.properties; _i < _arr.length; _i++) {
  61596. var prop = _arr[_i];
  61597. if (isProtoKey(prop)) {
  61598. proto = prop.value;
  61599. pull_1(node.properties, prop);
  61600. }
  61601. }
  61602. if (proto) {
  61603. var args = [ObjectExpression([]), proto];
  61604. if (node.properties.length) args.push(node);
  61605. path.replaceWith(CallExpression(file.addHelper("extends"), args));
  61606. }
  61607. }
  61608. }
  61609. };
  61610. });
  61611. var transformReactConstantElements = declare(function (api, options) {
  61612. api.assertVersion(7);
  61613. var allowMutablePropsOnTags = options.allowMutablePropsOnTags;
  61614. if (allowMutablePropsOnTags != null && !Array.isArray(allowMutablePropsOnTags)) {
  61615. throw new Error(".allowMutablePropsOnTags must be an array, null, or undefined.");
  61616. }
  61617. var HOISTED = new WeakSet();
  61618. var immutabilityVisitor = {
  61619. enter: function enter(path, state) {
  61620. var stop = function stop() {
  61621. state.isImmutable = false;
  61622. path.stop();
  61623. };
  61624. if (path.isJSXClosingElement()) {
  61625. path.skip();
  61626. return;
  61627. }
  61628. if (path.isJSXIdentifier({
  61629. name: "ref"
  61630. }) && path.parentPath.isJSXAttribute({
  61631. name: path.node
  61632. })) {
  61633. return stop();
  61634. }
  61635. if (path.isJSXIdentifier() || path.isIdentifier() || path.isJSXMemberExpression()) {
  61636. return;
  61637. }
  61638. if (!path.isImmutable()) {
  61639. if (path.isPure()) {
  61640. var expressionResult = path.evaluate();
  61641. if (expressionResult.confident) {
  61642. var value = expressionResult.value;
  61643. var isMutable = !state.mutablePropsAllowed && value && typeof value === "object" || typeof value === "function";
  61644. if (!isMutable) {
  61645. path.skip();
  61646. return;
  61647. }
  61648. } else if (isIdentifier(expressionResult.deopt)) {
  61649. return;
  61650. }
  61651. }
  61652. stop();
  61653. }
  61654. }
  61655. };
  61656. return {
  61657. name: "transform-react-constant-elements",
  61658. visitor: {
  61659. JSXElement: function JSXElement(path) {
  61660. if (HOISTED.has(path.node)) return;
  61661. HOISTED.add(path.node);
  61662. var state = {
  61663. isImmutable: true
  61664. };
  61665. if (allowMutablePropsOnTags != null) {
  61666. var namePath = path.get("openingElement.name");
  61667. while (namePath.isJSXMemberExpression()) {
  61668. namePath = namePath.get("property");
  61669. }
  61670. var elementName = namePath.node.name;
  61671. state.mutablePropsAllowed = allowMutablePropsOnTags.indexOf(elementName) > -1;
  61672. }
  61673. path.traverse(immutabilityVisitor, state);
  61674. if (state.isImmutable) {
  61675. var hoisted = path.hoist();
  61676. if (hoisted) {
  61677. annotateAsPure(hoisted);
  61678. }
  61679. }
  61680. }
  61681. }
  61682. };
  61683. });
  61684. var transformReactDisplayName = declare(function (api) {
  61685. api.assertVersion(7);
  61686. function addDisplayName(id, call) {
  61687. var props = call.arguments[0].properties;
  61688. var safe = true;
  61689. for (var i = 0; i < props.length; i++) {
  61690. var prop = props[i];
  61691. var key = toComputedKey(prop);
  61692. if (isLiteral(key, {
  61693. value: "displayName"
  61694. })) {
  61695. safe = false;
  61696. break;
  61697. }
  61698. }
  61699. if (safe) {
  61700. props.unshift(ObjectProperty(Identifier("displayName"), StringLiteral(id)));
  61701. }
  61702. }
  61703. var isCreateClassCallExpression = buildMatchMemberExpression("React.createClass");
  61704. var isCreateClassAddon = function isCreateClassAddon(callee) {
  61705. return callee.name === "createReactClass";
  61706. };
  61707. function isCreateClass(node) {
  61708. if (!node || !isCallExpression(node)) return false;
  61709. if (!isCreateClassCallExpression(node.callee) && !isCreateClassAddon(node.callee)) {
  61710. return false;
  61711. }
  61712. var args = node.arguments;
  61713. if (args.length !== 1) return false;
  61714. var first = args[0];
  61715. if (!isObjectExpression(first)) return false;
  61716. return true;
  61717. }
  61718. return {
  61719. name: "transform-react-display-name",
  61720. visitor: {
  61721. ExportDefaultDeclaration: function ExportDefaultDeclaration(_ref, state) {
  61722. var node = _ref.node;
  61723. if (isCreateClass(node.declaration)) {
  61724. var filename = state.filename || "unknown";
  61725. var displayName = path$1.basename(filename, path$1.extname(filename));
  61726. if (displayName === "index") {
  61727. displayName = path$1.basename(path$1.dirname(filename));
  61728. }
  61729. addDisplayName(displayName, node.declaration);
  61730. }
  61731. },
  61732. CallExpression: function CallExpression(path) {
  61733. var node = path.node;
  61734. if (!isCreateClass(node)) return;
  61735. var id;
  61736. path.find(function (path) {
  61737. if (path.isAssignmentExpression()) {
  61738. id = path.node.left;
  61739. } else if (path.isObjectProperty()) {
  61740. id = path.node.key;
  61741. } else if (path.isVariableDeclarator()) {
  61742. id = path.node.id;
  61743. } else if (path.isStatement()) {
  61744. return true;
  61745. }
  61746. if (id) return true;
  61747. });
  61748. if (!id) return;
  61749. if (isMemberExpression(id)) {
  61750. id = id.property;
  61751. }
  61752. if (isIdentifier(id)) {
  61753. addDisplayName(id.name, node);
  61754. }
  61755. }
  61756. }
  61757. };
  61758. });
  61759. function helper$1 (opts) {
  61760. var visitor = {};
  61761. visitor.JSXNamespacedName = function (path) {
  61762. if (opts.throwIfNamespace) {
  61763. throw path.buildCodeFrameError("Namespace tags are not supported by default. React's JSX doesn't support namespace tags. You can turn on the 'throwIfNamespace' flag to bypass this warning.");
  61764. }
  61765. };
  61766. visitor.JSXSpreadChild = function (path) {
  61767. throw path.buildCodeFrameError("Spread children are not supported in React.");
  61768. };
  61769. visitor.JSXElement = {
  61770. exit: function exit(path, file) {
  61771. var callExpr = buildElementCall(path, file);
  61772. if (callExpr) {
  61773. path.replaceWith(inherits(callExpr, path.node));
  61774. }
  61775. }
  61776. };
  61777. visitor.JSXFragment = {
  61778. exit: function exit(path, file) {
  61779. if (opts.compat) {
  61780. throw path.buildCodeFrameError("Fragment tags are only supported in React 16 and up.");
  61781. }
  61782. var callExpr = buildFragmentCall(path, file);
  61783. if (callExpr) {
  61784. path.replaceWith(inherits(callExpr, path.node));
  61785. }
  61786. }
  61787. };
  61788. return visitor;
  61789. function convertJSXIdentifier(node, parent) {
  61790. if (isJSXIdentifier(node)) {
  61791. if (node.name === "this" && isReferenced(node, parent)) {
  61792. return ThisExpression();
  61793. } else if (utils.keyword.isIdentifierNameES6(node.name)) {
  61794. node.type = "Identifier";
  61795. } else {
  61796. return StringLiteral(node.name);
  61797. }
  61798. } else if (isJSXMemberExpression(node)) {
  61799. return MemberExpression(convertJSXIdentifier(node.object, node), convertJSXIdentifier(node.property, node));
  61800. } else if (isJSXNamespacedName(node)) {
  61801. return StringLiteral(node.namespace.name + ":" + node.name.name);
  61802. }
  61803. return node;
  61804. }
  61805. function convertAttributeValue(node) {
  61806. if (isJSXExpressionContainer(node)) {
  61807. return node.expression;
  61808. } else {
  61809. return node;
  61810. }
  61811. }
  61812. function convertAttribute(node) {
  61813. var value = convertAttributeValue(node.value || BooleanLiteral(true));
  61814. if (isJSXSpreadAttribute(node)) {
  61815. return SpreadElement(node.argument);
  61816. }
  61817. if (isStringLiteral(value) && !isJSXExpressionContainer(node.value)) {
  61818. var _value$extra;
  61819. value.value = value.value.replace(/\n\s+/g, " ");
  61820. (_value$extra = value.extra) == null ? true : delete _value$extra.raw;
  61821. }
  61822. if (isJSXNamespacedName(node.name)) {
  61823. node.name = StringLiteral(node.name.namespace.name + ":" + node.name.name.name);
  61824. } else if (utils.keyword.isIdentifierNameES6(node.name.name)) {
  61825. node.name.type = "Identifier";
  61826. } else {
  61827. node.name = StringLiteral(node.name.name);
  61828. }
  61829. return inherits(ObjectProperty(node.name, value), node);
  61830. }
  61831. function buildElementCall(path, file) {
  61832. if (opts.filter && !opts.filter(path.node, file)) return;
  61833. var openingPath = path.get("openingElement");
  61834. openingPath.parent.children = react.buildChildren(openingPath.parent);
  61835. var tagExpr = convertJSXIdentifier(openingPath.node.name, openingPath.node);
  61836. var args = [];
  61837. var tagName;
  61838. if (isIdentifier(tagExpr)) {
  61839. tagName = tagExpr.name;
  61840. } else if (isLiteral(tagExpr)) {
  61841. tagName = tagExpr.value;
  61842. }
  61843. var state = {
  61844. tagExpr: tagExpr,
  61845. tagName: tagName,
  61846. args: args
  61847. };
  61848. if (opts.pre) {
  61849. opts.pre(state, file);
  61850. }
  61851. var attribs = openingPath.node.attributes;
  61852. if (attribs.length) {
  61853. attribs = buildOpeningElementAttributes(attribs, file);
  61854. } else {
  61855. attribs = NullLiteral();
  61856. }
  61857. args.push.apply(args, [attribs].concat(path.node.children));
  61858. if (opts.post) {
  61859. opts.post(state, file);
  61860. }
  61861. return state.call || CallExpression(state.callee, args);
  61862. }
  61863. function pushProps(_props, objs) {
  61864. if (!_props.length) return _props;
  61865. objs.push(ObjectExpression(_props));
  61866. return [];
  61867. }
  61868. function buildOpeningElementAttributes(attribs, file) {
  61869. var _props = [];
  61870. var objs = [];
  61871. var _file$opts$useSpread = file.opts.useSpread,
  61872. useSpread = _file$opts$useSpread === void 0 ? false : _file$opts$useSpread;
  61873. if (typeof useSpread !== "boolean") {
  61874. throw new Error("transform-react-jsx currently only accepts a boolean option for " + "useSpread (defaults to false)");
  61875. }
  61876. var useBuiltIns = file.opts.useBuiltIns || false;
  61877. if (typeof useBuiltIns !== "boolean") {
  61878. throw new Error("transform-react-jsx currently only accepts a boolean option for " + "useBuiltIns (defaults to false)");
  61879. }
  61880. if (useSpread && useBuiltIns) {
  61881. throw new Error("transform-react-jsx currently only accepts useBuiltIns or useSpread " + "but not both");
  61882. }
  61883. if (useSpread) {
  61884. var props = attribs.map(convertAttribute);
  61885. return ObjectExpression(props);
  61886. }
  61887. while (attribs.length) {
  61888. var prop = attribs.shift();
  61889. if (isJSXSpreadAttribute(prop)) {
  61890. _props = pushProps(_props, objs);
  61891. objs.push(prop.argument);
  61892. } else {
  61893. _props.push(convertAttribute(prop));
  61894. }
  61895. }
  61896. pushProps(_props, objs);
  61897. if (objs.length === 1) {
  61898. attribs = objs[0];
  61899. } else {
  61900. if (!isObjectExpression(objs[0])) {
  61901. objs.unshift(ObjectExpression([]));
  61902. }
  61903. var helper = useBuiltIns ? MemberExpression(Identifier("Object"), Identifier("assign")) : file.addHelper("extends");
  61904. attribs = CallExpression(helper, objs);
  61905. }
  61906. return attribs;
  61907. }
  61908. function buildFragmentCall(path, file) {
  61909. if (opts.filter && !opts.filter(path.node, file)) return;
  61910. var openingPath = path.get("openingElement");
  61911. openingPath.parent.children = react.buildChildren(openingPath.parent);
  61912. var args = [];
  61913. var tagName = null;
  61914. var tagExpr = file.get("jsxFragIdentifier")();
  61915. var state = {
  61916. tagExpr: tagExpr,
  61917. tagName: tagName,
  61918. args: args
  61919. };
  61920. if (opts.pre) {
  61921. opts.pre(state, file);
  61922. }
  61923. args.push.apply(args, [NullLiteral()].concat(path.node.children));
  61924. if (opts.post) {
  61925. opts.post(state, file);
  61926. }
  61927. file.set("usedFragment", true);
  61928. return state.call || CallExpression(state.callee, args);
  61929. }
  61930. }
  61931. var transformReactInlineElements = declare(function (api) {
  61932. api.assertVersion(7);
  61933. function hasRefOrSpread(attrs) {
  61934. for (var i = 0; i < attrs.length; i++) {
  61935. var attr = attrs[i];
  61936. if (isJSXSpreadAttribute(attr)) return true;
  61937. if (isJSXAttributeOfName(attr, "ref")) return true;
  61938. }
  61939. return false;
  61940. }
  61941. function isJSXAttributeOfName(attr, name) {
  61942. return isJSXAttribute(attr) && isJSXIdentifier(attr.name, {
  61943. name: name
  61944. });
  61945. }
  61946. var visitor = helper$1({
  61947. filter: function filter(node) {
  61948. return node.openingElement && !hasRefOrSpread(node.openingElement.attributes);
  61949. },
  61950. pre: function pre(state) {
  61951. var tagName = state.tagName;
  61952. var args = state.args;
  61953. if (react.isCompatTag(tagName)) {
  61954. args.push(StringLiteral(tagName));
  61955. } else {
  61956. args.push(state.tagExpr);
  61957. }
  61958. },
  61959. post: function post(state, pass) {
  61960. state.callee = pass.addHelper("jsx");
  61961. var props = state.args[1];
  61962. var hasKey = false;
  61963. if (isObjectExpression(props)) {
  61964. var keyIndex = props.properties.findIndex(function (prop) {
  61965. return isIdentifier(prop.key, {
  61966. name: "key"
  61967. });
  61968. });
  61969. if (keyIndex > -1) {
  61970. state.args.splice(2, 0, props.properties[keyIndex].value);
  61971. props.properties.splice(keyIndex, 1);
  61972. hasKey = true;
  61973. }
  61974. } else if (isNullLiteral(props)) {
  61975. state.args.splice(1, 1, ObjectExpression([]));
  61976. }
  61977. if (!hasKey && state.args.length > 2) {
  61978. state.args.splice(2, 0, UnaryExpression("void", NumericLiteral(0)));
  61979. }
  61980. }
  61981. });
  61982. return {
  61983. name: "transform-react-inline-elements",
  61984. visitor: visitor
  61985. };
  61986. });
  61987. var transformReactJSX = declare(function (api, options) {
  61988. api.assertVersion(7);
  61989. var THROW_IF_NAMESPACE = options.throwIfNamespace === undefined ? true : !!options.throwIfNamespace;
  61990. var PRAGMA_DEFAULT = options.pragma || "React.createElement";
  61991. var PRAGMA_FRAG_DEFAULT = options.pragmaFrag || "React.Fragment";
  61992. var JSX_ANNOTATION_REGEX = /\*?\s*@jsx\s+([^\s]+)/;
  61993. var JSX_FRAG_ANNOTATION_REGEX = /\*?\s*@jsxFrag\s+([^\s]+)/;
  61994. var createIdentifierParser = function createIdentifierParser(id) {
  61995. return function () {
  61996. return id.split(".").map(function (name) {
  61997. return Identifier(name);
  61998. }).reduce(function (object, property) {
  61999. return MemberExpression(object, property);
  62000. });
  62001. };
  62002. };
  62003. var visitor = helper$1({
  62004. pre: function pre(state) {
  62005. var tagName = state.tagName;
  62006. var args = state.args;
  62007. if (react.isCompatTag(tagName)) {
  62008. args.push(StringLiteral(tagName));
  62009. } else {
  62010. args.push(state.tagExpr);
  62011. }
  62012. },
  62013. post: function post(state, pass) {
  62014. state.callee = pass.get("jsxIdentifier")();
  62015. },
  62016. throwIfNamespace: THROW_IF_NAMESPACE
  62017. });
  62018. visitor.Program = {
  62019. enter: function enter(path, state) {
  62020. var file = state.file;
  62021. var pragma = PRAGMA_DEFAULT;
  62022. var pragmaFrag = PRAGMA_FRAG_DEFAULT;
  62023. var pragmaSet = !!options.pragma;
  62024. var pragmaFragSet = !!options.pragmaFrag;
  62025. if (file.ast.comments) {
  62026. for (var _i = 0, _arr = file.ast.comments; _i < _arr.length; _i++) {
  62027. var comment = _arr[_i];
  62028. var jsxMatches = JSX_ANNOTATION_REGEX.exec(comment.value);
  62029. if (jsxMatches) {
  62030. pragma = jsxMatches[1];
  62031. pragmaSet = true;
  62032. }
  62033. var jsxFragMatches = JSX_FRAG_ANNOTATION_REGEX.exec(comment.value);
  62034. if (jsxFragMatches) {
  62035. pragmaFrag = jsxFragMatches[1];
  62036. pragmaFragSet = true;
  62037. }
  62038. }
  62039. }
  62040. state.set("jsxIdentifier", createIdentifierParser(pragma));
  62041. state.set("jsxFragIdentifier", createIdentifierParser(pragmaFrag));
  62042. state.set("usedFragment", false);
  62043. state.set("pragmaSet", pragmaSet);
  62044. state.set("pragmaFragSet", pragmaFragSet);
  62045. },
  62046. exit: function exit(path, state) {
  62047. if (state.get("pragmaSet") && state.get("usedFragment") && !state.get("pragmaFragSet")) {
  62048. throw new Error("transform-react-jsx: pragma has been set but " + "pragmaFrag has not been set");
  62049. }
  62050. }
  62051. };
  62052. visitor.JSXAttribute = function (path) {
  62053. if (isJSXElement(path.node.value)) {
  62054. path.node.value = JSXExpressionContainer(path.node.value);
  62055. }
  62056. };
  62057. return {
  62058. name: "transform-react-jsx",
  62059. inherits: syntaxJsx,
  62060. visitor: visitor
  62061. };
  62062. });
  62063. var transformReactJsxCompat = declare(function (api) {
  62064. api.assertVersion(7);
  62065. return {
  62066. name: "transform-react-jsx-compat",
  62067. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  62068. parserOpts.plugins.push("jsx");
  62069. },
  62070. visitor: helper$1({
  62071. pre: function pre(state) {
  62072. state.callee = state.tagExpr;
  62073. },
  62074. post: function post(state) {
  62075. if (react.isCompatTag(state.tagName)) {
  62076. state.call = CallExpression(MemberExpression(MemberExpression(Identifier("React"), Identifier("DOM")), state.tagExpr, isLiteral(state.tagExpr)), state.args);
  62077. }
  62078. },
  62079. compat: true
  62080. })
  62081. };
  62082. });
  62083. var TRACE_ID = "__self";
  62084. var transformReactJSXSelf = declare(function (api) {
  62085. api.assertVersion(7);
  62086. var visitor = {
  62087. JSXOpeningElement: function JSXOpeningElement(_ref) {
  62088. var node = _ref.node;
  62089. var id = JSXIdentifier(TRACE_ID);
  62090. var trace = ThisExpression();
  62091. node.attributes.push(JSXAttribute(id, JSXExpressionContainer(trace)));
  62092. }
  62093. };
  62094. return {
  62095. name: "transform-react-jsx-self",
  62096. visitor: visitor
  62097. };
  62098. });
  62099. var TRACE_ID$1 = "__source";
  62100. var FILE_NAME_VAR = "_jsxFileName";
  62101. var transformReactJSXSource = declare(function (api) {
  62102. api.assertVersion(7);
  62103. function makeTrace(fileNameIdentifier, lineNumber) {
  62104. var fileLineLiteral = lineNumber != null ? NumericLiteral(lineNumber) : NullLiteral();
  62105. var fileNameProperty = ObjectProperty(Identifier("fileName"), fileNameIdentifier);
  62106. var lineNumberProperty = ObjectProperty(Identifier("lineNumber"), fileLineLiteral);
  62107. return ObjectExpression([fileNameProperty, lineNumberProperty]);
  62108. }
  62109. var visitor = {
  62110. JSXOpeningElement: function JSXOpeningElement(path, state) {
  62111. var id = JSXIdentifier(TRACE_ID$1);
  62112. var location = path.container.openingElement.loc;
  62113. if (!location) {
  62114. return;
  62115. }
  62116. var attributes = path.container.openingElement.attributes;
  62117. for (var i = 0; i < attributes.length; i++) {
  62118. var name = attributes[i].name;
  62119. if (name && name.name === TRACE_ID$1) {
  62120. return;
  62121. }
  62122. }
  62123. if (!state.fileNameIdentifier) {
  62124. var fileName = state.filename || "";
  62125. var fileNameIdentifier = path.scope.generateUidIdentifier(FILE_NAME_VAR);
  62126. var scope = path.hub.getScope();
  62127. if (scope) {
  62128. scope.push({
  62129. id: fileNameIdentifier,
  62130. init: StringLiteral(fileName)
  62131. });
  62132. }
  62133. state.fileNameIdentifier = fileNameIdentifier;
  62134. }
  62135. var trace = makeTrace(state.fileNameIdentifier, location.start.line);
  62136. attributes.push(JSXAttribute(id, JSXExpressionContainer(trace)));
  62137. }
  62138. };
  62139. return {
  62140. name: "transform-react-jsx-source",
  62141. visitor: visitor
  62142. };
  62143. });
  62144. var util$1 = createCommonjsModule(function (module, exports) {
  62145. exports.__esModule = true;
  62146. exports.wrapWithTypes = wrapWithTypes;
  62147. exports.getTypes = getTypes;
  62148. exports.runtimeProperty = runtimeProperty;
  62149. exports.isReference = isReference;
  62150. exports.replaceWithOrRemove = replaceWithOrRemove;
  62151. var currentTypes = null;
  62152. function wrapWithTypes(types, fn) {
  62153. return function () {
  62154. var oldTypes = currentTypes;
  62155. currentTypes = types;
  62156. try {
  62157. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  62158. args[_key] = arguments[_key];
  62159. }
  62160. return fn.apply(this, args);
  62161. } finally {
  62162. currentTypes = oldTypes;
  62163. }
  62164. };
  62165. }
  62166. function getTypes() {
  62167. return currentTypes;
  62168. }
  62169. function runtimeProperty(name) {
  62170. var t = getTypes();
  62171. return t.memberExpression(t.identifier("regeneratorRuntime"), t.identifier(name), false);
  62172. }
  62173. function isReference(path) {
  62174. return path.isReferenced() || path.parentPath.isAssignmentExpression({
  62175. left: path.node
  62176. });
  62177. }
  62178. function replaceWithOrRemove(path, replacement) {
  62179. if (replacement) {
  62180. path.replaceWith(replacement);
  62181. } else {
  62182. path.remove();
  62183. }
  62184. }
  62185. });
  62186. unwrapExports(util$1);
  62187. var util_1$1 = util$1.wrapWithTypes;
  62188. var util_2$1 = util$1.getTypes;
  62189. var util_3$1 = util$1.runtimeProperty;
  62190. var util_4$1 = util$1.isReference;
  62191. var util_5$1 = util$1.replaceWithOrRemove;
  62192. var hoist$1 = createCommonjsModule(function (module, exports) {
  62193. var util = _interopRequireWildcard(util$1);
  62194. function _interopRequireWildcard(obj) {
  62195. if (obj && obj.__esModule) {
  62196. return obj;
  62197. } else {
  62198. var newObj = {};
  62199. if (obj != null) {
  62200. for (var key in obj) {
  62201. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  62202. var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
  62203. if (desc.get || desc.set) {
  62204. Object.defineProperty(newObj, key, desc);
  62205. } else {
  62206. newObj[key] = obj[key];
  62207. }
  62208. }
  62209. }
  62210. }
  62211. newObj["default"] = obj;
  62212. return newObj;
  62213. }
  62214. }
  62215. var hasOwn = Object.prototype.hasOwnProperty;
  62216. exports.hoist = function (funPath) {
  62217. var t = util.getTypes();
  62218. t.assertFunction(funPath.node);
  62219. var vars = {};
  62220. function varDeclToExpr(_ref, includeIdentifiers) {
  62221. var vdec = _ref.node,
  62222. scope = _ref.scope;
  62223. t.assertVariableDeclaration(vdec);
  62224. var exprs = [];
  62225. vdec.declarations.forEach(function (dec) {
  62226. vars[dec.id.name] = t.identifier(dec.id.name);
  62227. scope.removeBinding(dec.id.name);
  62228. if (dec.init) {
  62229. exprs.push(t.assignmentExpression("=", dec.id, dec.init));
  62230. } else if (includeIdentifiers) {
  62231. exprs.push(dec.id);
  62232. }
  62233. });
  62234. if (exprs.length === 0) return null;
  62235. if (exprs.length === 1) return exprs[0];
  62236. return t.sequenceExpression(exprs);
  62237. }
  62238. funPath.get("body").traverse({
  62239. VariableDeclaration: {
  62240. exit: function exit(path) {
  62241. var expr = varDeclToExpr(path, false);
  62242. if (expr === null) {
  62243. path.remove();
  62244. } else {
  62245. util.replaceWithOrRemove(path, t.expressionStatement(expr));
  62246. }
  62247. path.skip();
  62248. }
  62249. },
  62250. ForStatement: function ForStatement(path) {
  62251. var init = path.get("init");
  62252. if (init.isVariableDeclaration()) {
  62253. util.replaceWithOrRemove(init, varDeclToExpr(init, false));
  62254. }
  62255. },
  62256. ForXStatement: function ForXStatement(path) {
  62257. var left = path.get("left");
  62258. if (left.isVariableDeclaration()) {
  62259. util.replaceWithOrRemove(left, varDeclToExpr(left, true));
  62260. }
  62261. },
  62262. FunctionDeclaration: function FunctionDeclaration(path) {
  62263. var node = path.node;
  62264. vars[node.id.name] = node.id;
  62265. var assignment = t.expressionStatement(t.assignmentExpression("=", t.clone(node.id), t.functionExpression(path.scope.generateUidIdentifierBasedOnNode(node), node.params, node.body, node.generator, node.expression)));
  62266. if (path.parentPath.isBlockStatement()) {
  62267. path.parentPath.unshiftContainer("body", assignment);
  62268. path.remove();
  62269. } else {
  62270. util.replaceWithOrRemove(path, assignment);
  62271. }
  62272. path.scope.removeBinding(node.id.name);
  62273. path.skip();
  62274. },
  62275. FunctionExpression: function FunctionExpression(path) {
  62276. path.skip();
  62277. },
  62278. ArrowFunctionExpression: function ArrowFunctionExpression(path) {
  62279. path.skip();
  62280. }
  62281. });
  62282. var paramNames = {};
  62283. funPath.get("params").forEach(function (paramPath) {
  62284. var param = paramPath.node;
  62285. if (t.isIdentifier(param)) {
  62286. paramNames[param.name] = param;
  62287. }
  62288. });
  62289. var declarations = [];
  62290. Object.keys(vars).forEach(function (name) {
  62291. if (!hasOwn.call(paramNames, name)) {
  62292. declarations.push(t.variableDeclarator(vars[name], null));
  62293. }
  62294. });
  62295. if (declarations.length === 0) {
  62296. return null;
  62297. }
  62298. return t.variableDeclaration("var", declarations);
  62299. };
  62300. });
  62301. unwrapExports(hoist$1);
  62302. var hoist_1 = hoist$1.hoist;
  62303. var leap = createCommonjsModule(function (module, exports) {
  62304. var _assert = _interopRequireDefault(assert$2);
  62305. function _interopRequireDefault(obj) {
  62306. return obj && obj.__esModule ? obj : {
  62307. "default": obj
  62308. };
  62309. }
  62310. function Entry() {
  62311. _assert["default"].ok(this instanceof Entry);
  62312. }
  62313. function FunctionEntry(returnLoc) {
  62314. Entry.call(this);
  62315. (0, util$1.getTypes)().assertLiteral(returnLoc);
  62316. this.returnLoc = returnLoc;
  62317. }
  62318. (0, _util.inherits)(FunctionEntry, Entry);
  62319. exports.FunctionEntry = FunctionEntry;
  62320. function LoopEntry(breakLoc, continueLoc, label) {
  62321. Entry.call(this);
  62322. var t = (0, util$1.getTypes)();
  62323. t.assertLiteral(breakLoc);
  62324. t.assertLiteral(continueLoc);
  62325. if (label) {
  62326. t.assertIdentifier(label);
  62327. } else {
  62328. label = null;
  62329. }
  62330. this.breakLoc = breakLoc;
  62331. this.continueLoc = continueLoc;
  62332. this.label = label;
  62333. }
  62334. (0, _util.inherits)(LoopEntry, Entry);
  62335. exports.LoopEntry = LoopEntry;
  62336. function SwitchEntry(breakLoc) {
  62337. Entry.call(this);
  62338. (0, util$1.getTypes)().assertLiteral(breakLoc);
  62339. this.breakLoc = breakLoc;
  62340. }
  62341. (0, _util.inherits)(SwitchEntry, Entry);
  62342. exports.SwitchEntry = SwitchEntry;
  62343. function TryEntry(firstLoc, catchEntry, finallyEntry) {
  62344. Entry.call(this);
  62345. var t = (0, util$1.getTypes)();
  62346. t.assertLiteral(firstLoc);
  62347. if (catchEntry) {
  62348. _assert["default"].ok(catchEntry instanceof CatchEntry);
  62349. } else {
  62350. catchEntry = null;
  62351. }
  62352. if (finallyEntry) {
  62353. _assert["default"].ok(finallyEntry instanceof FinallyEntry);
  62354. } else {
  62355. finallyEntry = null;
  62356. }
  62357. _assert["default"].ok(catchEntry || finallyEntry);
  62358. this.firstLoc = firstLoc;
  62359. this.catchEntry = catchEntry;
  62360. this.finallyEntry = finallyEntry;
  62361. }
  62362. (0, _util.inherits)(TryEntry, Entry);
  62363. exports.TryEntry = TryEntry;
  62364. function CatchEntry(firstLoc, paramId) {
  62365. Entry.call(this);
  62366. var t = (0, util$1.getTypes)();
  62367. t.assertLiteral(firstLoc);
  62368. t.assertIdentifier(paramId);
  62369. this.firstLoc = firstLoc;
  62370. this.paramId = paramId;
  62371. }
  62372. (0, _util.inherits)(CatchEntry, Entry);
  62373. exports.CatchEntry = CatchEntry;
  62374. function FinallyEntry(firstLoc, afterLoc) {
  62375. Entry.call(this);
  62376. var t = (0, util$1.getTypes)();
  62377. t.assertLiteral(firstLoc);
  62378. t.assertLiteral(afterLoc);
  62379. this.firstLoc = firstLoc;
  62380. this.afterLoc = afterLoc;
  62381. }
  62382. (0, _util.inherits)(FinallyEntry, Entry);
  62383. exports.FinallyEntry = FinallyEntry;
  62384. function LabeledEntry(breakLoc, label) {
  62385. Entry.call(this);
  62386. var t = (0, util$1.getTypes)();
  62387. t.assertLiteral(breakLoc);
  62388. t.assertIdentifier(label);
  62389. this.breakLoc = breakLoc;
  62390. this.label = label;
  62391. }
  62392. (0, _util.inherits)(LabeledEntry, Entry);
  62393. exports.LabeledEntry = LabeledEntry;
  62394. function LeapManager(emitter) {
  62395. _assert["default"].ok(this instanceof LeapManager);
  62396. _assert["default"].ok(emitter instanceof emit$1.Emitter);
  62397. this.emitter = emitter;
  62398. this.entryStack = [new FunctionEntry(emitter.finalLoc)];
  62399. }
  62400. var LMp = LeapManager.prototype;
  62401. exports.LeapManager = LeapManager;
  62402. LMp.withEntry = function (entry, callback) {
  62403. _assert["default"].ok(entry instanceof Entry);
  62404. this.entryStack.push(entry);
  62405. try {
  62406. callback.call(this.emitter);
  62407. } finally {
  62408. var popped = this.entryStack.pop();
  62409. _assert["default"].strictEqual(popped, entry);
  62410. }
  62411. };
  62412. LMp._findLeapLocation = function (property, label) {
  62413. for (var i = this.entryStack.length - 1; i >= 0; --i) {
  62414. var entry = this.entryStack[i];
  62415. var loc = entry[property];
  62416. if (loc) {
  62417. if (label) {
  62418. if (entry.label && entry.label.name === label.name) {
  62419. return loc;
  62420. }
  62421. } else if (entry instanceof LabeledEntry) ; else {
  62422. return loc;
  62423. }
  62424. }
  62425. }
  62426. return null;
  62427. };
  62428. LMp.getBreakLoc = function (label) {
  62429. return this._findLeapLocation("breakLoc", label);
  62430. };
  62431. LMp.getContinueLoc = function (label) {
  62432. return this._findLeapLocation("continueLoc", label);
  62433. };
  62434. });
  62435. unwrapExports(leap);
  62436. var leap_1 = leap.FunctionEntry;
  62437. var leap_2 = leap.LoopEntry;
  62438. var leap_3 = leap.SwitchEntry;
  62439. var leap_4 = leap.TryEntry;
  62440. var leap_5 = leap.CatchEntry;
  62441. var leap_6 = leap.FinallyEntry;
  62442. var leap_7 = leap.LabeledEntry;
  62443. var leap_8 = leap.LeapManager;
  62444. var originalObject = Object;
  62445. var originalDefProp = Object.defineProperty;
  62446. var originalCreate = Object.create;
  62447. function defProp(obj, name, value) {
  62448. if (originalDefProp) try {
  62449. originalDefProp.call(originalObject, obj, name, {
  62450. value: value
  62451. });
  62452. } catch (definePropertyIsBrokenInIE8) {
  62453. obj[name] = value;
  62454. } else {
  62455. obj[name] = value;
  62456. }
  62457. }
  62458. function makeSafeToCall(fun) {
  62459. if (fun) {
  62460. defProp(fun, "call", fun.call);
  62461. defProp(fun, "apply", fun.apply);
  62462. }
  62463. return fun;
  62464. }
  62465. makeSafeToCall(originalDefProp);
  62466. makeSafeToCall(originalCreate);
  62467. var hasOwn$1 = makeSafeToCall(Object.prototype.hasOwnProperty);
  62468. var numToStr = makeSafeToCall(Number.prototype.toString);
  62469. var strSlice = makeSafeToCall(String.prototype.slice);
  62470. var cloner = function cloner() {};
  62471. function create(prototype) {
  62472. if (originalCreate) {
  62473. return originalCreate.call(originalObject, prototype);
  62474. }
  62475. cloner.prototype = prototype || null;
  62476. return new cloner();
  62477. }
  62478. var rand = Math.random;
  62479. var uniqueKeys = create(null);
  62480. function makeUniqueKey() {
  62481. do {
  62482. var uniqueKey = internString(strSlice.call(numToStr.call(rand(), 36), 2));
  62483. } while (hasOwn$1.call(uniqueKeys, uniqueKey));
  62484. return uniqueKeys[uniqueKey] = uniqueKey;
  62485. }
  62486. function internString(str) {
  62487. var obj = {};
  62488. obj[str] = true;
  62489. return Object.keys(obj)[0];
  62490. }
  62491. var makeUniqueKey_1 = makeUniqueKey;
  62492. var originalGetOPNs = Object.getOwnPropertyNames;
  62493. Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
  62494. for (var names = originalGetOPNs(object), src = 0, dst = 0, len = names.length; src < len; ++src) {
  62495. if (!hasOwn$1.call(uniqueKeys, names[src])) {
  62496. if (src > dst) {
  62497. names[dst] = names[src];
  62498. }
  62499. ++dst;
  62500. }
  62501. }
  62502. names.length = dst;
  62503. return names;
  62504. };
  62505. function defaultCreatorFn(object) {
  62506. return create(null);
  62507. }
  62508. function makeAccessor(secretCreatorFn) {
  62509. var brand = makeUniqueKey();
  62510. var passkey = create(null);
  62511. secretCreatorFn = secretCreatorFn || defaultCreatorFn;
  62512. function register(object) {
  62513. var secret;
  62514. function vault(key, forget) {
  62515. if (key === passkey) {
  62516. return forget ? secret = null : secret || (secret = secretCreatorFn(object));
  62517. }
  62518. }
  62519. defProp(object, brand, vault);
  62520. }
  62521. function accessor(object) {
  62522. if (!hasOwn$1.call(object, brand)) register(object);
  62523. return object[brand](passkey);
  62524. }
  62525. accessor.forget = function (object) {
  62526. if (hasOwn$1.call(object, brand)) object[brand](passkey, true);
  62527. };
  62528. return accessor;
  62529. }
  62530. var makeAccessor_1 = makeAccessor;
  62531. var _private = {
  62532. makeUniqueKey: makeUniqueKey_1,
  62533. makeAccessor: makeAccessor_1
  62534. };
  62535. var meta = createCommonjsModule(function (module, exports) {
  62536. var _assert = _interopRequireDefault(assert$2);
  62537. function _interopRequireDefault(obj) {
  62538. return obj && obj.__esModule ? obj : {
  62539. "default": obj
  62540. };
  62541. }
  62542. var m = (0, _private.makeAccessor)();
  62543. var hasOwn = Object.prototype.hasOwnProperty;
  62544. function makePredicate(propertyName, knownTypes) {
  62545. function onlyChildren(node) {
  62546. var t = (0, util$1.getTypes)();
  62547. t.assertNode(node);
  62548. var result = false;
  62549. function check(child) {
  62550. if (result) ; else if (Array.isArray(child)) {
  62551. child.some(check);
  62552. } else if (t.isNode(child)) {
  62553. _assert["default"].strictEqual(result, false);
  62554. result = predicate(child);
  62555. }
  62556. return result;
  62557. }
  62558. var keys = t.VISITOR_KEYS[node.type];
  62559. if (keys) {
  62560. for (var i = 0; i < keys.length; i++) {
  62561. var key = keys[i];
  62562. var child = node[key];
  62563. check(child);
  62564. }
  62565. }
  62566. return result;
  62567. }
  62568. function predicate(node) {
  62569. (0, util$1.getTypes)().assertNode(node);
  62570. var meta = m(node);
  62571. if (hasOwn.call(meta, propertyName)) return meta[propertyName];
  62572. if (hasOwn.call(opaqueTypes, node.type)) return meta[propertyName] = false;
  62573. if (hasOwn.call(knownTypes, node.type)) return meta[propertyName] = true;
  62574. return meta[propertyName] = onlyChildren(node);
  62575. }
  62576. predicate.onlyChildren = onlyChildren;
  62577. return predicate;
  62578. }
  62579. var opaqueTypes = {
  62580. FunctionExpression: true,
  62581. ArrowFunctionExpression: true
  62582. };
  62583. var sideEffectTypes = {
  62584. CallExpression: true,
  62585. ForInStatement: true,
  62586. UnaryExpression: true,
  62587. BinaryExpression: true,
  62588. AssignmentExpression: true,
  62589. UpdateExpression: true,
  62590. NewExpression: true
  62591. };
  62592. var leapTypes = {
  62593. YieldExpression: true,
  62594. BreakStatement: true,
  62595. ContinueStatement: true,
  62596. ReturnStatement: true,
  62597. ThrowStatement: true
  62598. };
  62599. for (var type in leapTypes) {
  62600. if (hasOwn.call(leapTypes, type)) {
  62601. sideEffectTypes[type] = leapTypes[type];
  62602. }
  62603. }
  62604. exports.hasSideEffects = makePredicate("hasSideEffects", sideEffectTypes);
  62605. exports.containsLeap = makePredicate("containsLeap", leapTypes);
  62606. });
  62607. unwrapExports(meta);
  62608. var meta_1 = meta.hasSideEffects;
  62609. var meta_2 = meta.containsLeap;
  62610. var emit$1 = createCommonjsModule(function (module, exports) {
  62611. var _assert = _interopRequireDefault(assert$2);
  62612. var leap$1 = _interopRequireWildcard(leap);
  62613. var meta$1 = _interopRequireWildcard(meta);
  62614. var util = _interopRequireWildcard(util$1);
  62615. function _interopRequireWildcard(obj) {
  62616. if (obj && obj.__esModule) {
  62617. return obj;
  62618. } else {
  62619. var newObj = {};
  62620. if (obj != null) {
  62621. for (var key in obj) {
  62622. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  62623. var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
  62624. if (desc.get || desc.set) {
  62625. Object.defineProperty(newObj, key, desc);
  62626. } else {
  62627. newObj[key] = obj[key];
  62628. }
  62629. }
  62630. }
  62631. }
  62632. newObj["default"] = obj;
  62633. return newObj;
  62634. }
  62635. }
  62636. function _interopRequireDefault(obj) {
  62637. return obj && obj.__esModule ? obj : {
  62638. "default": obj
  62639. };
  62640. }
  62641. var hasOwn = Object.prototype.hasOwnProperty;
  62642. function Emitter(contextId) {
  62643. _assert["default"].ok(this instanceof Emitter);
  62644. util.getTypes().assertIdentifier(contextId);
  62645. this.nextTempId = 0;
  62646. this.contextId = contextId;
  62647. this.listing = [];
  62648. this.marked = [true];
  62649. this.insertedLocs = new Set();
  62650. this.finalLoc = this.loc();
  62651. this.tryEntries = [];
  62652. this.leapManager = new leap$1.LeapManager(this);
  62653. }
  62654. var Ep = Emitter.prototype;
  62655. exports.Emitter = Emitter;
  62656. Ep.loc = function () {
  62657. var l = util.getTypes().numericLiteral(-1);
  62658. this.insertedLocs.add(l);
  62659. return l;
  62660. };
  62661. Ep.getInsertedLocs = function () {
  62662. return this.insertedLocs;
  62663. };
  62664. Ep.getContextId = function () {
  62665. return util.getTypes().clone(this.contextId);
  62666. };
  62667. Ep.mark = function (loc) {
  62668. util.getTypes().assertLiteral(loc);
  62669. var index = this.listing.length;
  62670. if (loc.value === -1) {
  62671. loc.value = index;
  62672. } else {
  62673. _assert["default"].strictEqual(loc.value, index);
  62674. }
  62675. this.marked[index] = true;
  62676. return loc;
  62677. };
  62678. Ep.emit = function (node) {
  62679. var t = util.getTypes();
  62680. if (t.isExpression(node)) {
  62681. node = t.expressionStatement(node);
  62682. }
  62683. t.assertStatement(node);
  62684. this.listing.push(node);
  62685. };
  62686. Ep.emitAssign = function (lhs, rhs) {
  62687. this.emit(this.assign(lhs, rhs));
  62688. return lhs;
  62689. };
  62690. Ep.assign = function (lhs, rhs) {
  62691. var t = util.getTypes();
  62692. return t.expressionStatement(t.assignmentExpression("=", t.cloneDeep(lhs), rhs));
  62693. };
  62694. Ep.contextProperty = function (name, computed) {
  62695. var t = util.getTypes();
  62696. return t.memberExpression(this.getContextId(), computed ? t.stringLiteral(name) : t.identifier(name), !!computed);
  62697. };
  62698. Ep.stop = function (rval) {
  62699. if (rval) {
  62700. this.setReturnValue(rval);
  62701. }
  62702. this.jump(this.finalLoc);
  62703. };
  62704. Ep.setReturnValue = function (valuePath) {
  62705. util.getTypes().assertExpression(valuePath.value);
  62706. this.emitAssign(this.contextProperty("rval"), this.explodeExpression(valuePath));
  62707. };
  62708. Ep.clearPendingException = function (tryLoc, assignee) {
  62709. var t = util.getTypes();
  62710. t.assertLiteral(tryLoc);
  62711. var catchCall = t.callExpression(this.contextProperty("catch", true), [t.clone(tryLoc)]);
  62712. if (assignee) {
  62713. this.emitAssign(assignee, catchCall);
  62714. } else {
  62715. this.emit(catchCall);
  62716. }
  62717. };
  62718. Ep.jump = function (toLoc) {
  62719. this.emitAssign(this.contextProperty("next"), toLoc);
  62720. this.emit(util.getTypes().breakStatement());
  62721. };
  62722. Ep.jumpIf = function (test, toLoc) {
  62723. var t = util.getTypes();
  62724. t.assertExpression(test);
  62725. t.assertLiteral(toLoc);
  62726. this.emit(t.ifStatement(test, t.blockStatement([this.assign(this.contextProperty("next"), toLoc), t.breakStatement()])));
  62727. };
  62728. Ep.jumpIfNot = function (test, toLoc) {
  62729. var t = util.getTypes();
  62730. t.assertExpression(test);
  62731. t.assertLiteral(toLoc);
  62732. var negatedTest;
  62733. if (t.isUnaryExpression(test) && test.operator === "!") {
  62734. negatedTest = test.argument;
  62735. } else {
  62736. negatedTest = t.unaryExpression("!", test);
  62737. }
  62738. this.emit(t.ifStatement(negatedTest, t.blockStatement([this.assign(this.contextProperty("next"), toLoc), t.breakStatement()])));
  62739. };
  62740. Ep.makeTempVar = function () {
  62741. return this.contextProperty("t" + this.nextTempId++);
  62742. };
  62743. Ep.getContextFunction = function (id) {
  62744. var t = util.getTypes();
  62745. return t.functionExpression(id || null, [this.getContextId()], t.blockStatement([this.getDispatchLoop()]), false, false);
  62746. };
  62747. Ep.getDispatchLoop = function () {
  62748. var self = this;
  62749. var t = util.getTypes();
  62750. var cases = [];
  62751. var current;
  62752. var alreadyEnded = false;
  62753. self.listing.forEach(function (stmt, i) {
  62754. if (self.marked.hasOwnProperty(i)) {
  62755. cases.push(t.switchCase(t.numericLiteral(i), current = []));
  62756. alreadyEnded = false;
  62757. }
  62758. if (!alreadyEnded) {
  62759. current.push(stmt);
  62760. if (t.isCompletionStatement(stmt)) alreadyEnded = true;
  62761. }
  62762. });
  62763. this.finalLoc.value = this.listing.length;
  62764. cases.push(t.switchCase(this.finalLoc, []), t.switchCase(t.stringLiteral("end"), [t.returnStatement(t.callExpression(this.contextProperty("stop"), []))]));
  62765. return t.whileStatement(t.numericLiteral(1), t.switchStatement(t.assignmentExpression("=", this.contextProperty("prev"), this.contextProperty("next")), cases));
  62766. };
  62767. Ep.getTryLocsList = function () {
  62768. if (this.tryEntries.length === 0) {
  62769. return null;
  62770. }
  62771. var t = util.getTypes();
  62772. var lastLocValue = 0;
  62773. return t.arrayExpression(this.tryEntries.map(function (tryEntry) {
  62774. var thisLocValue = tryEntry.firstLoc.value;
  62775. _assert["default"].ok(thisLocValue >= lastLocValue, "try entries out of order");
  62776. lastLocValue = thisLocValue;
  62777. var ce = tryEntry.catchEntry;
  62778. var fe = tryEntry.finallyEntry;
  62779. var locs = [tryEntry.firstLoc, ce ? ce.firstLoc : null];
  62780. if (fe) {
  62781. locs[2] = fe.firstLoc;
  62782. locs[3] = fe.afterLoc;
  62783. }
  62784. return t.arrayExpression(locs.map(function (loc) {
  62785. return loc && t.clone(loc);
  62786. }));
  62787. }));
  62788. };
  62789. Ep.explode = function (path, ignoreResult) {
  62790. var t = util.getTypes();
  62791. var node = path.node;
  62792. var self = this;
  62793. t.assertNode(node);
  62794. if (t.isDeclaration(node)) throw getDeclError(node);
  62795. if (t.isStatement(node)) return self.explodeStatement(path);
  62796. if (t.isExpression(node)) return self.explodeExpression(path, ignoreResult);
  62797. switch (node.type) {
  62798. case "Program":
  62799. return path.get("body").map(self.explodeStatement, self);
  62800. case "VariableDeclarator":
  62801. throw getDeclError(node);
  62802. case "Property":
  62803. case "SwitchCase":
  62804. case "CatchClause":
  62805. throw new Error(node.type + " nodes should be handled by their parents");
  62806. default:
  62807. throw new Error("unknown Node of type " + JSON.stringify(node.type));
  62808. }
  62809. };
  62810. function getDeclError(node) {
  62811. return new Error("all declarations should have been transformed into " + "assignments before the Exploder began its work: " + JSON.stringify(node));
  62812. }
  62813. Ep.explodeStatement = function (path, labelId) {
  62814. var t = util.getTypes();
  62815. var stmt = path.node;
  62816. var self = this;
  62817. var before, after, head;
  62818. t.assertStatement(stmt);
  62819. if (labelId) {
  62820. t.assertIdentifier(labelId);
  62821. } else {
  62822. labelId = null;
  62823. }
  62824. if (t.isBlockStatement(stmt)) {
  62825. path.get("body").forEach(function (path) {
  62826. self.explodeStatement(path);
  62827. });
  62828. return;
  62829. }
  62830. if (!meta$1.containsLeap(stmt)) {
  62831. self.emit(stmt);
  62832. return;
  62833. }
  62834. switch (stmt.type) {
  62835. case "ExpressionStatement":
  62836. self.explodeExpression(path.get("expression"), true);
  62837. break;
  62838. case "LabeledStatement":
  62839. after = this.loc();
  62840. self.leapManager.withEntry(new leap$1.LabeledEntry(after, stmt.label), function () {
  62841. self.explodeStatement(path.get("body"), stmt.label);
  62842. });
  62843. self.mark(after);
  62844. break;
  62845. case "WhileStatement":
  62846. before = this.loc();
  62847. after = this.loc();
  62848. self.mark(before);
  62849. self.jumpIfNot(self.explodeExpression(path.get("test")), after);
  62850. self.leapManager.withEntry(new leap$1.LoopEntry(after, before, labelId), function () {
  62851. self.explodeStatement(path.get("body"));
  62852. });
  62853. self.jump(before);
  62854. self.mark(after);
  62855. break;
  62856. case "DoWhileStatement":
  62857. var first = this.loc();
  62858. var test = this.loc();
  62859. after = this.loc();
  62860. self.mark(first);
  62861. self.leapManager.withEntry(new leap$1.LoopEntry(after, test, labelId), function () {
  62862. self.explode(path.get("body"));
  62863. });
  62864. self.mark(test);
  62865. self.jumpIf(self.explodeExpression(path.get("test")), first);
  62866. self.mark(after);
  62867. break;
  62868. case "ForStatement":
  62869. head = this.loc();
  62870. var update = this.loc();
  62871. after = this.loc();
  62872. if (stmt.init) {
  62873. self.explode(path.get("init"), true);
  62874. }
  62875. self.mark(head);
  62876. if (stmt.test) {
  62877. self.jumpIfNot(self.explodeExpression(path.get("test")), after);
  62878. }
  62879. self.leapManager.withEntry(new leap$1.LoopEntry(after, update, labelId), function () {
  62880. self.explodeStatement(path.get("body"));
  62881. });
  62882. self.mark(update);
  62883. if (stmt.update) {
  62884. self.explode(path.get("update"), true);
  62885. }
  62886. self.jump(head);
  62887. self.mark(after);
  62888. break;
  62889. case "TypeCastExpression":
  62890. return self.explodeExpression(path.get("expression"));
  62891. case "ForInStatement":
  62892. head = this.loc();
  62893. after = this.loc();
  62894. var keyIterNextFn = self.makeTempVar();
  62895. self.emitAssign(keyIterNextFn, t.callExpression(util.runtimeProperty("keys"), [self.explodeExpression(path.get("right"))]));
  62896. self.mark(head);
  62897. var keyInfoTmpVar = self.makeTempVar();
  62898. self.jumpIf(t.memberExpression(t.assignmentExpression("=", keyInfoTmpVar, t.callExpression(t.cloneDeep(keyIterNextFn), [])), t.identifier("done"), false), after);
  62899. self.emitAssign(stmt.left, t.memberExpression(t.cloneDeep(keyInfoTmpVar), t.identifier("value"), false));
  62900. self.leapManager.withEntry(new leap$1.LoopEntry(after, head, labelId), function () {
  62901. self.explodeStatement(path.get("body"));
  62902. });
  62903. self.jump(head);
  62904. self.mark(after);
  62905. break;
  62906. case "BreakStatement":
  62907. self.emitAbruptCompletion({
  62908. type: "break",
  62909. target: self.leapManager.getBreakLoc(stmt.label)
  62910. });
  62911. break;
  62912. case "ContinueStatement":
  62913. self.emitAbruptCompletion({
  62914. type: "continue",
  62915. target: self.leapManager.getContinueLoc(stmt.label)
  62916. });
  62917. break;
  62918. case "SwitchStatement":
  62919. var disc = self.emitAssign(self.makeTempVar(), self.explodeExpression(path.get("discriminant")));
  62920. after = this.loc();
  62921. var defaultLoc = this.loc();
  62922. var condition = defaultLoc;
  62923. var caseLocs = [];
  62924. var cases = stmt.cases || [];
  62925. for (var i = cases.length - 1; i >= 0; --i) {
  62926. var c = cases[i];
  62927. t.assertSwitchCase(c);
  62928. if (c.test) {
  62929. condition = t.conditionalExpression(t.binaryExpression("===", t.cloneDeep(disc), c.test), caseLocs[i] = this.loc(), condition);
  62930. } else {
  62931. caseLocs[i] = defaultLoc;
  62932. }
  62933. }
  62934. var discriminant = path.get("discriminant");
  62935. util.replaceWithOrRemove(discriminant, condition);
  62936. self.jump(self.explodeExpression(discriminant));
  62937. self.leapManager.withEntry(new leap$1.SwitchEntry(after), function () {
  62938. path.get("cases").forEach(function (casePath) {
  62939. var i = casePath.key;
  62940. self.mark(caseLocs[i]);
  62941. casePath.get("consequent").forEach(function (path) {
  62942. self.explodeStatement(path);
  62943. });
  62944. });
  62945. });
  62946. self.mark(after);
  62947. if (defaultLoc.value === -1) {
  62948. self.mark(defaultLoc);
  62949. _assert["default"].strictEqual(after.value, defaultLoc.value);
  62950. }
  62951. break;
  62952. case "IfStatement":
  62953. var elseLoc = stmt.alternate && this.loc();
  62954. after = this.loc();
  62955. self.jumpIfNot(self.explodeExpression(path.get("test")), elseLoc || after);
  62956. self.explodeStatement(path.get("consequent"));
  62957. if (elseLoc) {
  62958. self.jump(after);
  62959. self.mark(elseLoc);
  62960. self.explodeStatement(path.get("alternate"));
  62961. }
  62962. self.mark(after);
  62963. break;
  62964. case "ReturnStatement":
  62965. self.emitAbruptCompletion({
  62966. type: "return",
  62967. value: self.explodeExpression(path.get("argument"))
  62968. });
  62969. break;
  62970. case "WithStatement":
  62971. throw new Error("WithStatement not supported in generator functions.");
  62972. case "TryStatement":
  62973. after = this.loc();
  62974. var handler = stmt.handler;
  62975. var catchLoc = handler && this.loc();
  62976. var catchEntry = catchLoc && new leap$1.CatchEntry(catchLoc, handler.param);
  62977. var finallyLoc = stmt.finalizer && this.loc();
  62978. var finallyEntry = finallyLoc && new leap$1.FinallyEntry(finallyLoc, after);
  62979. var tryEntry = new leap$1.TryEntry(self.getUnmarkedCurrentLoc(), catchEntry, finallyEntry);
  62980. self.tryEntries.push(tryEntry);
  62981. self.updateContextPrevLoc(tryEntry.firstLoc);
  62982. self.leapManager.withEntry(tryEntry, function () {
  62983. self.explodeStatement(path.get("block"));
  62984. if (catchLoc) {
  62985. if (finallyLoc) {
  62986. self.jump(finallyLoc);
  62987. } else {
  62988. self.jump(after);
  62989. }
  62990. self.updateContextPrevLoc(self.mark(catchLoc));
  62991. var bodyPath = path.get("handler.body");
  62992. var safeParam = self.makeTempVar();
  62993. self.clearPendingException(tryEntry.firstLoc, safeParam);
  62994. bodyPath.traverse(catchParamVisitor, {
  62995. getSafeParam: function getSafeParam() {
  62996. return t.cloneDeep(safeParam);
  62997. },
  62998. catchParamName: handler.param.name
  62999. });
  63000. self.leapManager.withEntry(catchEntry, function () {
  63001. self.explodeStatement(bodyPath);
  63002. });
  63003. }
  63004. if (finallyLoc) {
  63005. self.updateContextPrevLoc(self.mark(finallyLoc));
  63006. self.leapManager.withEntry(finallyEntry, function () {
  63007. self.explodeStatement(path.get("finalizer"));
  63008. });
  63009. self.emit(t.returnStatement(t.callExpression(self.contextProperty("finish"), [finallyEntry.firstLoc])));
  63010. }
  63011. });
  63012. self.mark(after);
  63013. break;
  63014. case "ThrowStatement":
  63015. self.emit(t.throwStatement(self.explodeExpression(path.get("argument"))));
  63016. break;
  63017. default:
  63018. throw new Error("unknown Statement of type " + JSON.stringify(stmt.type));
  63019. }
  63020. };
  63021. var catchParamVisitor = {
  63022. Identifier: function Identifier(path, state) {
  63023. if (path.node.name === state.catchParamName && util.isReference(path)) {
  63024. util.replaceWithOrRemove(path, state.getSafeParam());
  63025. }
  63026. },
  63027. Scope: function Scope(path, state) {
  63028. if (path.scope.hasOwnBinding(state.catchParamName)) {
  63029. path.skip();
  63030. }
  63031. }
  63032. };
  63033. Ep.emitAbruptCompletion = function (record) {
  63034. if (!isValidCompletion(record)) {
  63035. _assert["default"].ok(false, "invalid completion record: " + JSON.stringify(record));
  63036. }
  63037. _assert["default"].notStrictEqual(record.type, "normal", "normal completions are not abrupt");
  63038. var t = util.getTypes();
  63039. var abruptArgs = [t.stringLiteral(record.type)];
  63040. if (record.type === "break" || record.type === "continue") {
  63041. t.assertLiteral(record.target);
  63042. abruptArgs[1] = this.insertedLocs.has(record.target) ? record.target : t.cloneDeep(record.target);
  63043. } else if (record.type === "return" || record.type === "throw") {
  63044. if (record.value) {
  63045. t.assertExpression(record.value);
  63046. abruptArgs[1] = this.insertedLocs.has(record.value) ? record.value : t.cloneDeep(record.value);
  63047. }
  63048. }
  63049. this.emit(t.returnStatement(t.callExpression(this.contextProperty("abrupt"), abruptArgs)));
  63050. };
  63051. function isValidCompletion(record) {
  63052. var type = record.type;
  63053. if (type === "normal") {
  63054. return !hasOwn.call(record, "target");
  63055. }
  63056. if (type === "break" || type === "continue") {
  63057. return !hasOwn.call(record, "value") && util.getTypes().isLiteral(record.target);
  63058. }
  63059. if (type === "return" || type === "throw") {
  63060. return hasOwn.call(record, "value") && !hasOwn.call(record, "target");
  63061. }
  63062. return false;
  63063. }
  63064. Ep.getUnmarkedCurrentLoc = function () {
  63065. return util.getTypes().numericLiteral(this.listing.length);
  63066. };
  63067. Ep.updateContextPrevLoc = function (loc) {
  63068. var t = util.getTypes();
  63069. if (loc) {
  63070. t.assertLiteral(loc);
  63071. if (loc.value === -1) {
  63072. loc.value = this.listing.length;
  63073. } else {
  63074. _assert["default"].strictEqual(loc.value, this.listing.length);
  63075. }
  63076. } else {
  63077. loc = this.getUnmarkedCurrentLoc();
  63078. }
  63079. this.emitAssign(this.contextProperty("prev"), loc);
  63080. };
  63081. Ep.explodeExpression = function (path, ignoreResult) {
  63082. var t = util.getTypes();
  63083. var expr = path.node;
  63084. if (expr) {
  63085. t.assertExpression(expr);
  63086. } else {
  63087. return expr;
  63088. }
  63089. var self = this;
  63090. var result;
  63091. var after;
  63092. function finish(expr) {
  63093. t.assertExpression(expr);
  63094. if (ignoreResult) {
  63095. self.emit(expr);
  63096. } else {
  63097. return expr;
  63098. }
  63099. }
  63100. if (!meta$1.containsLeap(expr)) {
  63101. return finish(expr);
  63102. }
  63103. var hasLeapingChildren = meta$1.containsLeap.onlyChildren(expr);
  63104. function explodeViaTempVar(tempVar, childPath, ignoreChildResult) {
  63105. _assert["default"].ok(!ignoreChildResult || !tempVar, "Ignoring the result of a child expression but forcing it to " + "be assigned to a temporary variable?");
  63106. var result = self.explodeExpression(childPath, ignoreChildResult);
  63107. if (ignoreChildResult) ; else if (tempVar || hasLeapingChildren && !t.isLiteral(result)) {
  63108. result = self.emitAssign(tempVar || self.makeTempVar(), result);
  63109. }
  63110. return result;
  63111. }
  63112. switch (expr.type) {
  63113. case "MemberExpression":
  63114. return finish(t.memberExpression(self.explodeExpression(path.get("object")), expr.computed ? explodeViaTempVar(null, path.get("property")) : expr.property, expr.computed));
  63115. case "CallExpression":
  63116. var calleePath = path.get("callee");
  63117. var argsPath = path.get("arguments");
  63118. var newCallee;
  63119. var newArgs = [];
  63120. var hasLeapingArgs = false;
  63121. argsPath.forEach(function (argPath) {
  63122. hasLeapingArgs = hasLeapingArgs || meta$1.containsLeap(argPath.node);
  63123. });
  63124. if (t.isMemberExpression(calleePath.node)) {
  63125. if (hasLeapingArgs) {
  63126. var newObject = explodeViaTempVar(self.makeTempVar(), calleePath.get("object"));
  63127. var newProperty = calleePath.node.computed ? explodeViaTempVar(null, calleePath.get("property")) : calleePath.node.property;
  63128. newArgs.unshift(newObject);
  63129. newCallee = t.memberExpression(t.memberExpression(t.cloneDeep(newObject), newProperty, calleePath.node.computed), t.identifier("call"), false);
  63130. } else {
  63131. newCallee = self.explodeExpression(calleePath);
  63132. }
  63133. } else {
  63134. newCallee = explodeViaTempVar(null, calleePath);
  63135. if (t.isMemberExpression(newCallee)) {
  63136. newCallee = t.sequenceExpression([t.numericLiteral(0), t.cloneDeep(newCallee)]);
  63137. }
  63138. }
  63139. argsPath.forEach(function (argPath) {
  63140. newArgs.push(explodeViaTempVar(null, argPath));
  63141. });
  63142. return finish(t.callExpression(newCallee, newArgs.map(function (arg) {
  63143. return t.cloneDeep(arg);
  63144. })));
  63145. case "NewExpression":
  63146. return finish(t.newExpression(explodeViaTempVar(null, path.get("callee")), path.get("arguments").map(function (argPath) {
  63147. return explodeViaTempVar(null, argPath);
  63148. })));
  63149. case "ObjectExpression":
  63150. return finish(t.objectExpression(path.get("properties").map(function (propPath) {
  63151. if (propPath.isObjectProperty()) {
  63152. return t.objectProperty(propPath.node.key, explodeViaTempVar(null, propPath.get("value")), propPath.node.computed);
  63153. } else {
  63154. return propPath.node;
  63155. }
  63156. })));
  63157. case "ArrayExpression":
  63158. return finish(t.arrayExpression(path.get("elements").map(function (elemPath) {
  63159. return explodeViaTempVar(null, elemPath);
  63160. })));
  63161. case "SequenceExpression":
  63162. var lastIndex = expr.expressions.length - 1;
  63163. path.get("expressions").forEach(function (exprPath) {
  63164. if (exprPath.key === lastIndex) {
  63165. result = self.explodeExpression(exprPath, ignoreResult);
  63166. } else {
  63167. self.explodeExpression(exprPath, true);
  63168. }
  63169. });
  63170. return result;
  63171. case "LogicalExpression":
  63172. after = this.loc();
  63173. if (!ignoreResult) {
  63174. result = self.makeTempVar();
  63175. }
  63176. var left = explodeViaTempVar(result, path.get("left"));
  63177. if (expr.operator === "&&") {
  63178. self.jumpIfNot(left, after);
  63179. } else {
  63180. _assert["default"].strictEqual(expr.operator, "||");
  63181. self.jumpIf(left, after);
  63182. }
  63183. explodeViaTempVar(result, path.get("right"), ignoreResult);
  63184. self.mark(after);
  63185. return result;
  63186. case "ConditionalExpression":
  63187. var elseLoc = this.loc();
  63188. after = this.loc();
  63189. var test = self.explodeExpression(path.get("test"));
  63190. self.jumpIfNot(test, elseLoc);
  63191. if (!ignoreResult) {
  63192. result = self.makeTempVar();
  63193. }
  63194. explodeViaTempVar(result, path.get("consequent"), ignoreResult);
  63195. self.jump(after);
  63196. self.mark(elseLoc);
  63197. explodeViaTempVar(result, path.get("alternate"), ignoreResult);
  63198. self.mark(after);
  63199. return result;
  63200. case "UnaryExpression":
  63201. return finish(t.unaryExpression(expr.operator, self.explodeExpression(path.get("argument")), !!expr.prefix));
  63202. case "BinaryExpression":
  63203. return finish(t.binaryExpression(expr.operator, explodeViaTempVar(null, path.get("left")), explodeViaTempVar(null, path.get("right"))));
  63204. case "AssignmentExpression":
  63205. if (expr.operator === "=") {
  63206. return finish(t.assignmentExpression(expr.operator, self.explodeExpression(path.get("left")), self.explodeExpression(path.get("right"))));
  63207. }
  63208. var lhs = self.explodeExpression(path.get("left"));
  63209. var temp = self.emitAssign(self.makeTempVar(), lhs);
  63210. return finish(t.assignmentExpression("=", t.cloneDeep(lhs), t.assignmentExpression(expr.operator, t.cloneDeep(temp), self.explodeExpression(path.get("right")))));
  63211. case "UpdateExpression":
  63212. return finish(t.updateExpression(expr.operator, self.explodeExpression(path.get("argument")), expr.prefix));
  63213. case "YieldExpression":
  63214. after = this.loc();
  63215. var arg = expr.argument && self.explodeExpression(path.get("argument"));
  63216. if (arg && expr.delegate) {
  63217. var _result = self.makeTempVar();
  63218. var _ret = t.returnStatement(t.callExpression(self.contextProperty("delegateYield"), [arg, t.stringLiteral(_result.property.name), after]));
  63219. _ret.loc = expr.loc;
  63220. self.emit(_ret);
  63221. self.mark(after);
  63222. return _result;
  63223. }
  63224. self.emitAssign(self.contextProperty("next"), after);
  63225. var ret = t.returnStatement(t.cloneDeep(arg) || null);
  63226. ret.loc = expr.loc;
  63227. self.emit(ret);
  63228. self.mark(after);
  63229. return self.contextProperty("sent");
  63230. default:
  63231. throw new Error("unknown Expression of type " + JSON.stringify(expr.type));
  63232. }
  63233. };
  63234. });
  63235. unwrapExports(emit$1);
  63236. var emit_1 = emit$1.Emitter;
  63237. var replaceShorthandObjectMethod_1 = createCommonjsModule(function (module, exports) {
  63238. exports.__esModule = true;
  63239. exports["default"] = replaceShorthandObjectMethod;
  63240. var util = _interopRequireWildcard(util$1);
  63241. function _interopRequireWildcard(obj) {
  63242. if (obj && obj.__esModule) {
  63243. return obj;
  63244. } else {
  63245. var newObj = {};
  63246. if (obj != null) {
  63247. for (var key in obj) {
  63248. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  63249. var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
  63250. if (desc.get || desc.set) {
  63251. Object.defineProperty(newObj, key, desc);
  63252. } else {
  63253. newObj[key] = obj[key];
  63254. }
  63255. }
  63256. }
  63257. }
  63258. newObj["default"] = obj;
  63259. return newObj;
  63260. }
  63261. }
  63262. function replaceShorthandObjectMethod(path) {
  63263. var t = util.getTypes();
  63264. if (!path.node || !t.isFunction(path.node)) {
  63265. throw new Error("replaceShorthandObjectMethod can only be called on Function AST node paths.");
  63266. }
  63267. if (!t.isObjectMethod(path.node)) {
  63268. return path;
  63269. }
  63270. if (!path.node.generator) {
  63271. return path;
  63272. }
  63273. var parameters = path.node.params.map(function (param) {
  63274. return t.cloneDeep(param);
  63275. });
  63276. var functionExpression = t.functionExpression(null, parameters, t.cloneDeep(path.node.body), path.node.generator, path.node.async);
  63277. util.replaceWithOrRemove(path, t.objectProperty(t.cloneDeep(path.node.key), functionExpression, path.node.computed, false));
  63278. return path.get("value");
  63279. }
  63280. });
  63281. unwrapExports(replaceShorthandObjectMethod_1);
  63282. var visit$2 = createCommonjsModule(function (module, exports) {
  63283. var _assert = _interopRequireDefault(assert$2);
  63284. var _replaceShorthandObjectMethod = _interopRequireDefault(replaceShorthandObjectMethod_1);
  63285. var util = _interopRequireWildcard(util$1);
  63286. function _interopRequireWildcard(obj) {
  63287. if (obj && obj.__esModule) {
  63288. return obj;
  63289. } else {
  63290. var newObj = {};
  63291. if (obj != null) {
  63292. for (var key in obj) {
  63293. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  63294. var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
  63295. if (desc.get || desc.set) {
  63296. Object.defineProperty(newObj, key, desc);
  63297. } else {
  63298. newObj[key] = obj[key];
  63299. }
  63300. }
  63301. }
  63302. }
  63303. newObj["default"] = obj;
  63304. return newObj;
  63305. }
  63306. }
  63307. function _interopRequireDefault(obj) {
  63308. return obj && obj.__esModule ? obj : {
  63309. "default": obj
  63310. };
  63311. }
  63312. exports.getVisitor = function (_ref) {
  63313. var t = _ref.types;
  63314. return {
  63315. Method: function Method(path, state) {
  63316. var node = path.node;
  63317. if (!shouldRegenerate(node, state)) return;
  63318. var container = t.functionExpression(null, [], t.cloneNode(node.body, false), node.generator, node.async);
  63319. path.get("body").set("body", [t.returnStatement(t.callExpression(container, []))]);
  63320. node.async = false;
  63321. node.generator = false;
  63322. path.get("body.body.0.argument.callee").unwrapFunctionEnvironment();
  63323. },
  63324. Function: {
  63325. exit: util.wrapWithTypes(t, function (path, state) {
  63326. var node = path.node;
  63327. if (!shouldRegenerate(node, state)) return;
  63328. path = (0, _replaceShorthandObjectMethod["default"])(path);
  63329. node = path.node;
  63330. var contextId = path.scope.generateUidIdentifier("context");
  63331. var argsId = path.scope.generateUidIdentifier("args");
  63332. path.ensureBlock();
  63333. var bodyBlockPath = path.get("body");
  63334. if (node.async) {
  63335. bodyBlockPath.traverse(awaitVisitor);
  63336. }
  63337. bodyBlockPath.traverse(functionSentVisitor, {
  63338. context: contextId
  63339. });
  63340. var outerBody = [];
  63341. var innerBody = [];
  63342. bodyBlockPath.get("body").forEach(function (childPath) {
  63343. var node = childPath.node;
  63344. if (t.isExpressionStatement(node) && t.isStringLiteral(node.expression)) {
  63345. outerBody.push(node);
  63346. } else if (node && node._blockHoist != null) {
  63347. outerBody.push(node);
  63348. } else {
  63349. innerBody.push(node);
  63350. }
  63351. });
  63352. if (outerBody.length > 0) {
  63353. bodyBlockPath.node.body = innerBody;
  63354. }
  63355. var outerFnExpr = getOuterFnExpr(path);
  63356. t.assertIdentifier(node.id);
  63357. var innerFnId = t.identifier(node.id.name + "$");
  63358. var vars = (0, hoist$1.hoist)(path);
  63359. var context = {
  63360. usesThis: false,
  63361. usesArguments: false,
  63362. getArgsId: function getArgsId() {
  63363. return t.clone(argsId);
  63364. }
  63365. };
  63366. path.traverse(argumentsThisVisitor, context);
  63367. if (context.usesArguments) {
  63368. vars = vars || t.variableDeclaration("var", []);
  63369. var argumentIdentifier = t.identifier("arguments");
  63370. argumentIdentifier._shadowedFunctionLiteral = path;
  63371. vars.declarations.push(t.variableDeclarator(t.clone(argsId), argumentIdentifier));
  63372. }
  63373. var emitter = new emit$1.Emitter(contextId);
  63374. emitter.explode(path.get("body"));
  63375. if (vars && vars.declarations.length > 0) {
  63376. outerBody.push(vars);
  63377. }
  63378. var wrapArgs = [emitter.getContextFunction(innerFnId)];
  63379. var tryLocsList = emitter.getTryLocsList();
  63380. if (node.generator) {
  63381. wrapArgs.push(outerFnExpr);
  63382. } else if (context.usesThis || tryLocsList) {
  63383. wrapArgs.push(t.nullLiteral());
  63384. }
  63385. if (context.usesThis) {
  63386. wrapArgs.push(t.thisExpression());
  63387. } else if (tryLocsList) {
  63388. wrapArgs.push(t.nullLiteral());
  63389. }
  63390. if (tryLocsList) {
  63391. wrapArgs.push(tryLocsList);
  63392. }
  63393. var wrapCall = t.callExpression(util.runtimeProperty(node.async ? "async" : "wrap"), wrapArgs);
  63394. outerBody.push(t.returnStatement(wrapCall));
  63395. node.body = t.blockStatement(outerBody);
  63396. path.get("body.body").forEach(function (p) {
  63397. return p.scope.registerDeclaration(p);
  63398. });
  63399. var oldDirectives = bodyBlockPath.node.directives;
  63400. if (oldDirectives) {
  63401. node.body.directives = oldDirectives;
  63402. }
  63403. var wasGeneratorFunction = node.generator;
  63404. if (wasGeneratorFunction) {
  63405. node.generator = false;
  63406. }
  63407. if (node.async) {
  63408. node.async = false;
  63409. }
  63410. if (wasGeneratorFunction && t.isExpression(node)) {
  63411. util.replaceWithOrRemove(path, t.callExpression(util.runtimeProperty("mark"), [node]));
  63412. path.addComment("leading", "#__PURE__");
  63413. }
  63414. var insertedLocs = emitter.getInsertedLocs();
  63415. path.traverse({
  63416. NumericLiteral: function NumericLiteral(path) {
  63417. if (!insertedLocs.has(path.node)) {
  63418. return;
  63419. }
  63420. path.replaceWith(t.numericLiteral(path.node.value));
  63421. }
  63422. });
  63423. path.requeue();
  63424. })
  63425. }
  63426. };
  63427. };
  63428. function shouldRegenerate(node, state) {
  63429. if (node.generator) {
  63430. if (node.async) {
  63431. return state.opts.asyncGenerators !== false;
  63432. } else {
  63433. return state.opts.generators !== false;
  63434. }
  63435. } else if (node.async) {
  63436. return state.opts.async !== false;
  63437. } else {
  63438. return false;
  63439. }
  63440. }
  63441. function getOuterFnExpr(funPath) {
  63442. var t = util.getTypes();
  63443. var node = funPath.node;
  63444. t.assertFunction(node);
  63445. if (!node.id) {
  63446. node.id = funPath.scope.parent.generateUidIdentifier("callee");
  63447. }
  63448. if (node.generator && t.isFunctionDeclaration(node)) {
  63449. return getMarkedFunctionId(funPath);
  63450. }
  63451. return t.clone(node.id);
  63452. }
  63453. var getMarkInfo = (0, _private.makeAccessor)();
  63454. function getMarkedFunctionId(funPath) {
  63455. var t = util.getTypes();
  63456. var node = funPath.node;
  63457. t.assertIdentifier(node.id);
  63458. var blockPath = funPath.findParent(function (path) {
  63459. return path.isProgram() || path.isBlockStatement();
  63460. });
  63461. if (!blockPath) {
  63462. return node.id;
  63463. }
  63464. var block = blockPath.node;
  63465. _assert["default"].ok(Array.isArray(block.body));
  63466. var info = getMarkInfo(block);
  63467. if (!info.decl) {
  63468. info.decl = t.variableDeclaration("var", []);
  63469. blockPath.unshiftContainer("body", info.decl);
  63470. info.declPath = blockPath.get("body.0");
  63471. }
  63472. _assert["default"].strictEqual(info.declPath.node, info.decl);
  63473. var markedId = blockPath.scope.generateUidIdentifier("marked");
  63474. var markCallExp = t.callExpression(util.runtimeProperty("mark"), [t.clone(node.id)]);
  63475. var index = info.decl.declarations.push(t.variableDeclarator(markedId, markCallExp)) - 1;
  63476. var markCallExpPath = info.declPath.get("declarations." + index + ".init");
  63477. _assert["default"].strictEqual(markCallExpPath.node, markCallExp);
  63478. markCallExpPath.addComment("leading", "#__PURE__");
  63479. return t.clone(markedId);
  63480. }
  63481. var argumentsThisVisitor = {
  63482. "FunctionExpression|FunctionDeclaration|Method": function FunctionExpressionFunctionDeclarationMethod(path) {
  63483. path.skip();
  63484. },
  63485. Identifier: function Identifier(path, state) {
  63486. if (path.node.name === "arguments" && util.isReference(path)) {
  63487. util.replaceWithOrRemove(path, state.getArgsId());
  63488. state.usesArguments = true;
  63489. }
  63490. },
  63491. ThisExpression: function ThisExpression(path, state) {
  63492. state.usesThis = true;
  63493. }
  63494. };
  63495. var functionSentVisitor = {
  63496. MetaProperty: function MetaProperty(path) {
  63497. var node = path.node;
  63498. if (node.meta.name === "function" && node.property.name === "sent") {
  63499. var t = util.getTypes();
  63500. util.replaceWithOrRemove(path, t.memberExpression(t.clone(this.context), t.identifier("_sent")));
  63501. }
  63502. }
  63503. };
  63504. var awaitVisitor = {
  63505. Function: function Function(path) {
  63506. path.skip();
  63507. },
  63508. AwaitExpression: function AwaitExpression(path) {
  63509. var t = util.getTypes();
  63510. var argument = path.node.argument;
  63511. util.replaceWithOrRemove(path, t.yieldExpression(t.callExpression(util.runtimeProperty("awrap"), [argument]), false));
  63512. }
  63513. };
  63514. });
  63515. unwrapExports(visit$2);
  63516. var visit_1 = visit$2.getVisitor;
  63517. var lib$b = createCommonjsModule(function (module, exports) {
  63518. exports.__esModule = true;
  63519. exports["default"] = _default;
  63520. function _default(context) {
  63521. var plugin = {
  63522. visitor: (0, visit$2.getVisitor)(context)
  63523. };
  63524. var version = context && context.version;
  63525. if (version && parseInt(version, 10) >= 7) {
  63526. plugin.name = "regenerator-transform";
  63527. }
  63528. return plugin;
  63529. }
  63530. });
  63531. var transformRegenerator = unwrapExports(lib$b);
  63532. var transformReservedWords = declare(function (api) {
  63533. api.assertVersion(7);
  63534. return {
  63535. name: "transform-reserved-words",
  63536. visitor: {
  63537. "BindingIdentifier|ReferencedIdentifier": function BindingIdentifierReferencedIdentifier(path) {
  63538. if (!isValidES3Identifier(path.node.name)) {
  63539. path.scope.rename(path.node.name);
  63540. }
  63541. }
  63542. }
  63543. };
  63544. });
  63545. var caller = function () {
  63546. var origPrepareStackTrace = Error.prepareStackTrace;
  63547. Error.prepareStackTrace = function (_, stack) {
  63548. return stack;
  63549. };
  63550. var stack = new Error().stack;
  63551. Error.prepareStackTrace = origPrepareStackTrace;
  63552. return stack[2].getFileName();
  63553. };
  63554. var pathParse = createCommonjsModule(function (module) {
  63555. var isWindows = process.platform === 'win32';
  63556. var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
  63557. var splitTailRe = /^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/;
  63558. var win32 = {};
  63559. function win32SplitPath(filename) {
  63560. var result = splitDeviceRe.exec(filename),
  63561. device = (result[1] || '') + (result[2] || ''),
  63562. tail = result[3] || '';
  63563. var result2 = splitTailRe.exec(tail),
  63564. dir = result2[1],
  63565. basename = result2[2],
  63566. ext = result2[3];
  63567. return [device, dir, basename, ext];
  63568. }
  63569. win32.parse = function (pathString) {
  63570. if (typeof pathString !== 'string') {
  63571. throw new TypeError("Parameter 'pathString' must be a string, not " + typeof pathString);
  63572. }
  63573. var allParts = win32SplitPath(pathString);
  63574. if (!allParts || allParts.length !== 4) {
  63575. throw new TypeError("Invalid path '" + pathString + "'");
  63576. }
  63577. return {
  63578. root: allParts[0],
  63579. dir: allParts[0] + allParts[1].slice(0, -1),
  63580. base: allParts[2],
  63581. ext: allParts[3],
  63582. name: allParts[2].slice(0, allParts[2].length - allParts[3].length)
  63583. };
  63584. };
  63585. var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
  63586. var posix = {};
  63587. function posixSplitPath(filename) {
  63588. return splitPathRe.exec(filename).slice(1);
  63589. }
  63590. posix.parse = function (pathString) {
  63591. if (typeof pathString !== 'string') {
  63592. throw new TypeError("Parameter 'pathString' must be a string, not " + typeof pathString);
  63593. }
  63594. var allParts = posixSplitPath(pathString);
  63595. if (!allParts || allParts.length !== 4) {
  63596. throw new TypeError("Invalid path '" + pathString + "'");
  63597. }
  63598. allParts[1] = allParts[1] || '';
  63599. allParts[2] = allParts[2] || '';
  63600. allParts[3] = allParts[3] || '';
  63601. return {
  63602. root: allParts[0],
  63603. dir: allParts[0] + allParts[1].slice(0, -1),
  63604. base: allParts[2],
  63605. ext: allParts[3],
  63606. name: allParts[2].slice(0, allParts[2].length - allParts[3].length)
  63607. };
  63608. };
  63609. if (isWindows) module.exports = win32.parse;else module.exports = posix.parse;
  63610. module.exports.posix = posix.parse;
  63611. module.exports.win32 = win32.parse;
  63612. });
  63613. var pathParse_1 = pathParse.posix;
  63614. var pathParse_2 = pathParse.win32;
  63615. var parse$5 = path$1.parse || pathParse;
  63616. var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) {
  63617. var prefix = '/';
  63618. if (/^([A-Za-z]:)/.test(absoluteStart)) {
  63619. prefix = '';
  63620. } else if (/^\\\\/.test(absoluteStart)) {
  63621. prefix = '\\\\';
  63622. }
  63623. var paths = [absoluteStart];
  63624. var parsed = parse$5(absoluteStart);
  63625. while (parsed.dir !== paths[paths.length - 1]) {
  63626. paths.push(parsed.dir);
  63627. parsed = parse$5(parsed.dir);
  63628. }
  63629. return paths.reduce(function (dirs, aPath) {
  63630. return dirs.concat(modules.map(function (moduleDir) {
  63631. return path$1.resolve(prefix, aPath, moduleDir);
  63632. }));
  63633. }, []);
  63634. };
  63635. var nodeModulesPaths = function nodeModulesPaths(start, opts, request) {
  63636. var modules = opts && opts.moduleDirectory ? [].concat(opts.moduleDirectory) : ['node_modules'];
  63637. if (opts && typeof opts.paths === 'function') {
  63638. return opts.paths(request, start, function () {
  63639. return getNodeModulesDirs(start, modules);
  63640. }, opts);
  63641. }
  63642. var dirs = getNodeModulesDirs(start, modules);
  63643. return opts && opts.paths ? dirs.concat(opts.paths) : dirs;
  63644. };
  63645. var normalizeOptions$3 = function (x, opts) {
  63646. return opts || {};
  63647. };
  63648. var assert$3 = true;
  63649. var async_hooks = ">= 8";
  63650. var buffer_ieee754 = "< 0.9.7";
  63651. var buffer = true;
  63652. var child_process = true;
  63653. var cluster = true;
  63654. var console$1 = true;
  63655. var constants = true;
  63656. var crypto = true;
  63657. var _debug_agent = ">= 1 && < 8";
  63658. var _debugger = "< 8";
  63659. var dgram = true;
  63660. var dns = true;
  63661. var domain = true;
  63662. var events = true;
  63663. var freelist = "< 6";
  63664. var fs$1 = true;
  63665. var _http_agent = ">= 0.11.1";
  63666. var _http_client = ">= 0.11.1";
  63667. var _http_common = ">= 0.11.1";
  63668. var _http_incoming = ">= 0.11.1";
  63669. var _http_outgoing = ">= 0.11.1";
  63670. var _http_server = ">= 0.11.1";
  63671. var http = true;
  63672. var http2 = ">= 8.8";
  63673. var https = true;
  63674. var inspector = ">= 8.0.0";
  63675. var _linklist = "< 8";
  63676. var module = true;
  63677. var net = true;
  63678. var os = true;
  63679. var path$3 = true;
  63680. var perf_hooks = ">= 8.5";
  63681. var process$1 = ">= 1";
  63682. var punycode = true;
  63683. var querystring = true;
  63684. var readline = true;
  63685. var repl = true;
  63686. var smalloc = ">= 0.11.5 && < 3";
  63687. var _stream_duplex = ">= 0.9.4";
  63688. var _stream_transform = ">= 0.9.4";
  63689. var _stream_wrap = ">= 1.4.1";
  63690. var _stream_passthrough = ">= 0.9.4";
  63691. var _stream_readable = ">= 0.9.4";
  63692. var _stream_writable = ">= 0.9.4";
  63693. var stream = true;
  63694. var string_decoder = true;
  63695. var sys = true;
  63696. var timers = true;
  63697. var _tls_common = ">= 0.11.13";
  63698. var _tls_legacy = ">= 0.11.3 && < 10";
  63699. var _tls_wrap = ">= 0.11.3";
  63700. var tls = true;
  63701. var trace_events = ">= 10";
  63702. var tty = true;
  63703. var url = true;
  63704. var util$2 = true;
  63705. var v8 = ">= 1";
  63706. var vm = true;
  63707. var wasi = ">= 13.4 && < 13.5";
  63708. var worker_threads = ">= 11.7";
  63709. var zlib = true;
  63710. var core = {
  63711. assert: assert$3,
  63712. async_hooks: async_hooks,
  63713. buffer_ieee754: buffer_ieee754,
  63714. buffer: buffer,
  63715. child_process: child_process,
  63716. cluster: cluster,
  63717. console: console$1,
  63718. constants: constants,
  63719. crypto: crypto,
  63720. _debug_agent: _debug_agent,
  63721. _debugger: _debugger,
  63722. dgram: dgram,
  63723. dns: dns,
  63724. domain: domain,
  63725. events: events,
  63726. freelist: freelist,
  63727. fs: fs$1,
  63728. "fs/promises": ">= 10 && < 10.1",
  63729. _http_agent: _http_agent,
  63730. _http_client: _http_client,
  63731. _http_common: _http_common,
  63732. _http_incoming: _http_incoming,
  63733. _http_outgoing: _http_outgoing,
  63734. _http_server: _http_server,
  63735. http: http,
  63736. http2: http2,
  63737. https: https,
  63738. inspector: inspector,
  63739. _linklist: _linklist,
  63740. module: module,
  63741. net: net,
  63742. "node-inspect/lib/_inspect": ">= 7.6.0 && < 12",
  63743. "node-inspect/lib/internal/inspect_client": ">= 7.6.0 && < 12",
  63744. "node-inspect/lib/internal/inspect_repl": ">= 7.6.0 && < 12",
  63745. os: os,
  63746. path: path$3,
  63747. perf_hooks: perf_hooks,
  63748. process: process$1,
  63749. punycode: punycode,
  63750. querystring: querystring,
  63751. readline: readline,
  63752. repl: repl,
  63753. smalloc: smalloc,
  63754. _stream_duplex: _stream_duplex,
  63755. _stream_transform: _stream_transform,
  63756. _stream_wrap: _stream_wrap,
  63757. _stream_passthrough: _stream_passthrough,
  63758. _stream_readable: _stream_readable,
  63759. _stream_writable: _stream_writable,
  63760. stream: stream,
  63761. string_decoder: string_decoder,
  63762. sys: sys,
  63763. timers: timers,
  63764. _tls_common: _tls_common,
  63765. _tls_legacy: _tls_legacy,
  63766. _tls_wrap: _tls_wrap,
  63767. tls: tls,
  63768. trace_events: trace_events,
  63769. tty: tty,
  63770. url: url,
  63771. util: util$2,
  63772. "v8/tools/arguments": ">= 10 && < 12",
  63773. "v8/tools/codemap": [
  63774. ">= 4.4.0 && < 5",
  63775. ">= 5.2.0 && < 12"
  63776. ],
  63777. "v8/tools/consarray": [
  63778. ">= 4.4.0 && < 5",
  63779. ">= 5.2.0 && < 12"
  63780. ],
  63781. "v8/tools/csvparser": [
  63782. ">= 4.4.0 && < 5",
  63783. ">= 5.2.0 && < 12"
  63784. ],
  63785. "v8/tools/logreader": [
  63786. ">= 4.4.0 && < 5",
  63787. ">= 5.2.0 && < 12"
  63788. ],
  63789. "v8/tools/profile_view": [
  63790. ">= 4.4.0 && < 5",
  63791. ">= 5.2.0 && < 12"
  63792. ],
  63793. "v8/tools/splaytree": [
  63794. ">= 4.4.0 && < 5",
  63795. ">= 5.2.0 && < 12"
  63796. ],
  63797. v8: v8,
  63798. vm: vm,
  63799. wasi: wasi,
  63800. worker_threads: worker_threads,
  63801. zlib: zlib
  63802. };
  63803. var core$1 = /*#__PURE__*/Object.freeze({
  63804. __proto__: null,
  63805. assert: assert$3,
  63806. async_hooks: async_hooks,
  63807. buffer_ieee754: buffer_ieee754,
  63808. buffer: buffer,
  63809. child_process: child_process,
  63810. cluster: cluster,
  63811. console: console$1,
  63812. constants: constants,
  63813. crypto: crypto,
  63814. _debug_agent: _debug_agent,
  63815. _debugger: _debugger,
  63816. dgram: dgram,
  63817. dns: dns,
  63818. domain: domain,
  63819. events: events,
  63820. freelist: freelist,
  63821. fs: fs$1,
  63822. _http_agent: _http_agent,
  63823. _http_client: _http_client,
  63824. _http_common: _http_common,
  63825. _http_incoming: _http_incoming,
  63826. _http_outgoing: _http_outgoing,
  63827. _http_server: _http_server,
  63828. http: http,
  63829. http2: http2,
  63830. https: https,
  63831. inspector: inspector,
  63832. _linklist: _linklist,
  63833. module: module,
  63834. net: net,
  63835. os: os,
  63836. path: path$3,
  63837. perf_hooks: perf_hooks,
  63838. process: process$1,
  63839. punycode: punycode,
  63840. querystring: querystring,
  63841. readline: readline,
  63842. repl: repl,
  63843. smalloc: smalloc,
  63844. _stream_duplex: _stream_duplex,
  63845. _stream_transform: _stream_transform,
  63846. _stream_wrap: _stream_wrap,
  63847. _stream_passthrough: _stream_passthrough,
  63848. _stream_readable: _stream_readable,
  63849. _stream_writable: _stream_writable,
  63850. stream: stream,
  63851. string_decoder: string_decoder,
  63852. sys: sys,
  63853. timers: timers,
  63854. _tls_common: _tls_common,
  63855. _tls_legacy: _tls_legacy,
  63856. _tls_wrap: _tls_wrap,
  63857. tls: tls,
  63858. trace_events: trace_events,
  63859. tty: tty,
  63860. url: url,
  63861. util: util$2,
  63862. v8: v8,
  63863. vm: vm,
  63864. wasi: wasi,
  63865. worker_threads: worker_threads,
  63866. zlib: zlib,
  63867. 'default': core
  63868. });
  63869. var data = getCjsExportFromNamespace(core$1);
  63870. var current = process.versions && process.versions.node && process.versions.node.split('.') || [];
  63871. function specifierIncluded(specifier) {
  63872. var parts = specifier.split(' ');
  63873. var op = parts.length > 1 ? parts[0] : '=';
  63874. var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.');
  63875. for (var i = 0; i < 3; ++i) {
  63876. var cur = Number(current[i] || 0);
  63877. var ver = Number(versionParts[i] || 0);
  63878. if (cur === ver) {
  63879. continue;
  63880. }
  63881. if (op === '<') {
  63882. return cur < ver;
  63883. } else if (op === '>=') {
  63884. return cur >= ver;
  63885. } else {
  63886. return false;
  63887. }
  63888. }
  63889. return op === '>=';
  63890. }
  63891. function matchesRange(range) {
  63892. var specifiers = range.split(/ ?&& ?/);
  63893. if (specifiers.length === 0) {
  63894. return false;
  63895. }
  63896. for (var i = 0; i < specifiers.length; ++i) {
  63897. if (!specifierIncluded(specifiers[i])) {
  63898. return false;
  63899. }
  63900. }
  63901. return true;
  63902. }
  63903. function versionIncluded(specifierValue) {
  63904. if (typeof specifierValue === 'boolean') {
  63905. return specifierValue;
  63906. }
  63907. if (specifierValue && typeof specifierValue === 'object') {
  63908. for (var i = 0; i < specifierValue.length; ++i) {
  63909. if (matchesRange(specifierValue[i])) {
  63910. return true;
  63911. }
  63912. }
  63913. return false;
  63914. }
  63915. return matchesRange(specifierValue);
  63916. }
  63917. var core$2 = {};
  63918. for (var mod in data) {
  63919. if (Object.prototype.hasOwnProperty.call(data, mod)) {
  63920. core$2[mod] = versionIncluded(data[mod]);
  63921. }
  63922. }
  63923. var core_1 = core$2;
  63924. var isCore = function isCore(x) {
  63925. return Object.prototype.hasOwnProperty.call(core_1, x);
  63926. };
  63927. var defaultIsFile = function isFile(file, cb) {
  63928. fs.stat(file, function (err, stat) {
  63929. if (!err) {
  63930. return cb(null, stat.isFile() || stat.isFIFO());
  63931. }
  63932. if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
  63933. return cb(err);
  63934. });
  63935. };
  63936. var defaultIsDir = function isDirectory(dir, cb) {
  63937. fs.stat(dir, function (err, stat) {
  63938. if (!err) {
  63939. return cb(null, stat.isDirectory());
  63940. }
  63941. if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
  63942. return cb(err);
  63943. });
  63944. };
  63945. var maybeUnwrapSymlink = function maybeUnwrapSymlink(x, opts, cb) {
  63946. if (opts && opts.preserveSymlinks === false) {
  63947. fs.realpath(x, function (realPathErr, realPath) {
  63948. if (realPathErr && realPathErr.code !== 'ENOENT') cb(realPathErr);else cb(null, realPathErr ? x : realPath);
  63949. });
  63950. } else {
  63951. cb(null, x);
  63952. }
  63953. };
  63954. var async = function resolve(x, options, callback) {
  63955. var cb = callback;
  63956. var opts = options;
  63957. if (typeof options === 'function') {
  63958. cb = opts;
  63959. opts = {};
  63960. }
  63961. if (typeof x !== 'string') {
  63962. var err = new TypeError('Path must be a string.');
  63963. return nextTick(function () {
  63964. cb(err);
  63965. });
  63966. }
  63967. opts = normalizeOptions$3(x, opts);
  63968. var isFile = opts.isFile || defaultIsFile;
  63969. var isDirectory = opts.isDirectory || defaultIsDir;
  63970. var readFile = opts.readFile || fs.readFile;
  63971. var extensions = opts.extensions || ['.js'];
  63972. var basedir = opts.basedir || path$1.dirname(caller());
  63973. var parent = opts.filename || basedir;
  63974. opts.paths = opts.paths || [];
  63975. var absoluteStart = path$1.resolve(basedir);
  63976. maybeUnwrapSymlink(absoluteStart, opts, function (err, realStart) {
  63977. if (err) cb(err);else init(realStart);
  63978. });
  63979. var res;
  63980. function init(basedir) {
  63981. if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) {
  63982. res = path$1.resolve(basedir, x);
  63983. if (x === '..' || x.slice(-1) === '/') res += '/';
  63984. if (/\/$/.test(x) && res === basedir) {
  63985. loadAsDirectory(res, opts["package"], onfile);
  63986. } else loadAsFile(res, opts["package"], onfile);
  63987. } else if (isCore(x)) {
  63988. return cb(null, x);
  63989. } else loadNodeModules(x, basedir, function (err, n, pkg) {
  63990. if (err) cb(err);else if (n) {
  63991. return maybeUnwrapSymlink(n, opts, function (err, realN) {
  63992. if (err) {
  63993. cb(err);
  63994. } else {
  63995. cb(null, realN, pkg);
  63996. }
  63997. });
  63998. } else {
  63999. var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
  64000. moduleError.code = 'MODULE_NOT_FOUND';
  64001. cb(moduleError);
  64002. }
  64003. });
  64004. }
  64005. function onfile(err, m, pkg) {
  64006. if (err) cb(err);else if (m) cb(null, m, pkg);else loadAsDirectory(res, function (err, d, pkg) {
  64007. if (err) cb(err);else if (d) {
  64008. maybeUnwrapSymlink(d, opts, function (err, realD) {
  64009. if (err) {
  64010. cb(err);
  64011. } else {
  64012. cb(null, realD, pkg);
  64013. }
  64014. });
  64015. } else {
  64016. var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
  64017. moduleError.code = 'MODULE_NOT_FOUND';
  64018. cb(moduleError);
  64019. }
  64020. });
  64021. }
  64022. function loadAsFile(x, thePackage, callback) {
  64023. var loadAsFilePackage = thePackage;
  64024. var cb = callback;
  64025. if (typeof loadAsFilePackage === 'function') {
  64026. cb = loadAsFilePackage;
  64027. loadAsFilePackage = undefined;
  64028. }
  64029. var exts = [''].concat(extensions);
  64030. load(exts, x, loadAsFilePackage);
  64031. function load(exts, x, loadPackage) {
  64032. if (exts.length === 0) return cb(null, undefined, loadPackage);
  64033. var file = x + exts[0];
  64034. var pkg = loadPackage;
  64035. if (pkg) onpkg(null, pkg);else loadpkg(path$1.dirname(file), onpkg);
  64036. function onpkg(err, pkg_, dir) {
  64037. pkg = pkg_;
  64038. if (err) return cb(err);
  64039. if (dir && pkg && opts.pathFilter) {
  64040. var rfile = path$1.relative(dir, file);
  64041. var rel = rfile.slice(0, rfile.length - exts[0].length);
  64042. var r = opts.pathFilter(pkg, x, rel);
  64043. if (r) return load([''].concat(extensions.slice()), path$1.resolve(dir, r), pkg);
  64044. }
  64045. isFile(file, onex);
  64046. }
  64047. function onex(err, ex) {
  64048. if (err) return cb(err);
  64049. if (ex) return cb(null, file, pkg);
  64050. load(exts.slice(1), x, pkg);
  64051. }
  64052. }
  64053. }
  64054. function loadpkg(dir, cb) {
  64055. if (dir === '' || dir === '/') return cb(null);
  64056. if (process.platform === 'win32' && /^\w:[/\\]*$/.test(dir)) {
  64057. return cb(null);
  64058. }
  64059. if (/[/\\]node_modules[/\\]*$/.test(dir)) return cb(null);
  64060. maybeUnwrapSymlink(dir, opts, function (unwrapErr, pkgdir) {
  64061. if (unwrapErr) return loadpkg(path$1.dirname(dir), cb);
  64062. var pkgfile = path$1.join(pkgdir, 'package.json');
  64063. isFile(pkgfile, function (err, ex) {
  64064. if (!ex) return loadpkg(path$1.dirname(dir), cb);
  64065. readFile(pkgfile, function (err, body) {
  64066. if (err) cb(err);
  64067. try {
  64068. var pkg = JSON.parse(body);
  64069. } catch (jsonErr) {}
  64070. if (pkg && opts.packageFilter) {
  64071. pkg = opts.packageFilter(pkg, pkgfile);
  64072. }
  64073. cb(null, pkg, dir);
  64074. });
  64075. });
  64076. });
  64077. }
  64078. function loadAsDirectory(x, loadAsDirectoryPackage, callback) {
  64079. var cb = callback;
  64080. var fpkg = loadAsDirectoryPackage;
  64081. if (typeof fpkg === 'function') {
  64082. cb = fpkg;
  64083. fpkg = opts["package"];
  64084. }
  64085. maybeUnwrapSymlink(x, opts, function (unwrapErr, pkgdir) {
  64086. if (unwrapErr) return cb(unwrapErr);
  64087. var pkgfile = path$1.join(pkgdir, 'package.json');
  64088. isFile(pkgfile, function (err, ex) {
  64089. if (err) return cb(err);
  64090. if (!ex) return loadAsFile(path$1.join(x, 'index'), fpkg, cb);
  64091. readFile(pkgfile, function (err, body) {
  64092. if (err) return cb(err);
  64093. try {
  64094. var pkg = JSON.parse(body);
  64095. } catch (jsonErr) {}
  64096. if (pkg && opts.packageFilter) {
  64097. pkg = opts.packageFilter(pkg, pkgfile);
  64098. }
  64099. if (pkg && pkg.main) {
  64100. if (typeof pkg.main !== 'string') {
  64101. var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');
  64102. mainError.code = 'INVALID_PACKAGE_MAIN';
  64103. return cb(mainError);
  64104. }
  64105. if (pkg.main === '.' || pkg.main === './') {
  64106. pkg.main = 'index';
  64107. }
  64108. loadAsFile(path$1.resolve(x, pkg.main), pkg, function (err, m, pkg) {
  64109. if (err) return cb(err);
  64110. if (m) return cb(null, m, pkg);
  64111. if (!pkg) return loadAsFile(path$1.join(x, 'index'), pkg, cb);
  64112. var dir = path$1.resolve(x, pkg.main);
  64113. loadAsDirectory(dir, pkg, function (err, n, pkg) {
  64114. if (err) return cb(err);
  64115. if (n) return cb(null, n, pkg);
  64116. loadAsFile(path$1.join(x, 'index'), pkg, cb);
  64117. });
  64118. });
  64119. return;
  64120. }
  64121. loadAsFile(path$1.join(x, '/index'), pkg, cb);
  64122. });
  64123. });
  64124. });
  64125. }
  64126. function processDirs(cb, dirs) {
  64127. if (dirs.length === 0) return cb(null, undefined);
  64128. var dir = dirs[0];
  64129. isDirectory(dir, isdir);
  64130. function isdir(err, isdir) {
  64131. if (err) return cb(err);
  64132. if (!isdir) return processDirs(cb, dirs.slice(1));
  64133. var file = path$1.join(dir, x);
  64134. loadAsFile(file, opts["package"], onfile);
  64135. }
  64136. function onfile(err, m, pkg) {
  64137. if (err) return cb(err);
  64138. if (m) return cb(null, m, pkg);
  64139. loadAsDirectory(path$1.join(dir, x), opts["package"], ondir);
  64140. }
  64141. function ondir(err, n, pkg) {
  64142. if (err) return cb(err);
  64143. if (n) return cb(null, n, pkg);
  64144. processDirs(cb, dirs.slice(1));
  64145. }
  64146. }
  64147. function loadNodeModules(x, start, cb) {
  64148. processDirs(cb, nodeModulesPaths(start, opts, x));
  64149. }
  64150. };
  64151. var defaultIsFile$1 = function isFile(file) {
  64152. try {
  64153. var stat = fs.statSync(file);
  64154. } catch (e) {
  64155. if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
  64156. throw e;
  64157. }
  64158. return stat.isFile() || stat.isFIFO();
  64159. };
  64160. var defaultIsDir$1 = function isDirectory(dir) {
  64161. try {
  64162. var stat = fs.statSync(dir);
  64163. } catch (e) {
  64164. if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
  64165. throw e;
  64166. }
  64167. return stat.isDirectory();
  64168. };
  64169. var maybeUnwrapSymlink$1 = function maybeUnwrapSymlink(x, opts) {
  64170. if (opts && opts.preserveSymlinks === false) {
  64171. try {
  64172. return fs.realpathSync(x);
  64173. } catch (realPathErr) {
  64174. if (realPathErr.code !== 'ENOENT') {
  64175. throw realPathErr;
  64176. }
  64177. }
  64178. }
  64179. return x;
  64180. };
  64181. var sync = function (x, options) {
  64182. if (typeof x !== 'string') {
  64183. throw new TypeError('Path must be a string.');
  64184. }
  64185. var opts = normalizeOptions$3(x, options);
  64186. var isFile = opts.isFile || defaultIsFile$1;
  64187. var readFileSync = opts.readFileSync || fs.readFileSync;
  64188. var isDirectory = opts.isDirectory || defaultIsDir$1;
  64189. var extensions = opts.extensions || ['.js'];
  64190. var basedir = opts.basedir || path$1.dirname(caller());
  64191. var parent = opts.filename || basedir;
  64192. opts.paths = opts.paths || [];
  64193. var absoluteStart = maybeUnwrapSymlink$1(path$1.resolve(basedir), opts);
  64194. if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) {
  64195. var res = path$1.resolve(absoluteStart, x);
  64196. if (x === '..' || x.slice(-1) === '/') res += '/';
  64197. var m = loadAsFileSync(res) || loadAsDirectorySync(res);
  64198. if (m) return maybeUnwrapSymlink$1(m, opts);
  64199. } else if (isCore(x)) {
  64200. return x;
  64201. } else {
  64202. var n = loadNodeModulesSync(x, absoluteStart);
  64203. if (n) return maybeUnwrapSymlink$1(n, opts);
  64204. }
  64205. var err = new Error("Cannot find module '" + x + "' from '" + parent + "'");
  64206. err.code = 'MODULE_NOT_FOUND';
  64207. throw err;
  64208. function loadAsFileSync(x) {
  64209. var pkg = loadpkg(path$1.dirname(x));
  64210. if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) {
  64211. var rfile = path$1.relative(pkg.dir, x);
  64212. var r = opts.pathFilter(pkg.pkg, x, rfile);
  64213. if (r) {
  64214. x = path$1.resolve(pkg.dir, r);
  64215. }
  64216. }
  64217. if (isFile(x)) {
  64218. return x;
  64219. }
  64220. for (var i = 0; i < extensions.length; i++) {
  64221. var file = x + extensions[i];
  64222. if (isFile(file)) {
  64223. return file;
  64224. }
  64225. }
  64226. }
  64227. function loadpkg(dir) {
  64228. if (dir === '' || dir === '/') return;
  64229. if (process.platform === 'win32' && /^\w:[/\\]*$/.test(dir)) {
  64230. return;
  64231. }
  64232. if (/[/\\]node_modules[/\\]*$/.test(dir)) return;
  64233. var pkgfile = path$1.join(maybeUnwrapSymlink$1(dir, opts), 'package.json');
  64234. if (!isFile(pkgfile)) {
  64235. return loadpkg(path$1.dirname(dir));
  64236. }
  64237. var body = readFileSync(pkgfile);
  64238. try {
  64239. var pkg = JSON.parse(body);
  64240. } catch (jsonErr) {}
  64241. if (pkg && opts.packageFilter) {
  64242. pkg = opts.packageFilter(pkg, dir);
  64243. }
  64244. return {
  64245. pkg: pkg,
  64246. dir: dir
  64247. };
  64248. }
  64249. function loadAsDirectorySync(x) {
  64250. var pkgfile = path$1.join(maybeUnwrapSymlink$1(x, opts), '/package.json');
  64251. if (isFile(pkgfile)) {
  64252. try {
  64253. var body = readFileSync(pkgfile, 'UTF8');
  64254. var pkg = JSON.parse(body);
  64255. } catch (e) {}
  64256. if (pkg && opts.packageFilter) {
  64257. pkg = opts.packageFilter(pkg, x);
  64258. }
  64259. if (pkg && pkg.main) {
  64260. if (typeof pkg.main !== 'string') {
  64261. var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');
  64262. mainError.code = 'INVALID_PACKAGE_MAIN';
  64263. throw mainError;
  64264. }
  64265. if (pkg.main === '.' || pkg.main === './') {
  64266. pkg.main = 'index';
  64267. }
  64268. try {
  64269. var m = loadAsFileSync(path$1.resolve(x, pkg.main));
  64270. if (m) return m;
  64271. var n = loadAsDirectorySync(path$1.resolve(x, pkg.main));
  64272. if (n) return n;
  64273. } catch (e) {}
  64274. }
  64275. }
  64276. return loadAsFileSync(path$1.join(x, '/index'));
  64277. }
  64278. function loadNodeModulesSync(x, start) {
  64279. var dirs = nodeModulesPaths(start, opts, x);
  64280. for (var i = 0; i < dirs.length; i++) {
  64281. var dir = dirs[i];
  64282. if (isDirectory(dir)) {
  64283. var m = loadAsFileSync(path$1.join(dir, '/', x));
  64284. if (m) return m;
  64285. var n = loadAsDirectorySync(path$1.join(dir, '/', x));
  64286. if (n) return n;
  64287. }
  64288. }
  64289. }
  64290. };
  64291. var resolve$2 = createCommonjsModule(function (module, exports) {
  64292. async.core = core_1;
  64293. async.isCore = isCore;
  64294. async.sync = sync;
  64295. module.exports = async;
  64296. });
  64297. function hasMinVersion(minVersion, runtimeVersion) {
  64298. if (!runtimeVersion) return true;
  64299. if (semver.valid(runtimeVersion)) runtimeVersion = "^" + runtimeVersion;
  64300. return !semver.intersects("<" + minVersion, runtimeVersion) && !semver.intersects(">=8.0.0", runtimeVersion);
  64301. }
  64302. function typeAnnotationToString(node) {
  64303. switch (node.type) {
  64304. case "GenericTypeAnnotation":
  64305. if (isIdentifier(node.id, {
  64306. name: "Array"
  64307. })) return "array";
  64308. break;
  64309. case "StringTypeAnnotation":
  64310. return "string";
  64311. }
  64312. }
  64313. var getCoreJS2Definitions = (function (runtimeVersion) {
  64314. var includeMathModule = hasMinVersion("7.0.1", runtimeVersion);
  64315. return {
  64316. BuiltIns: {
  64317. Symbol: {
  64318. stable: true,
  64319. path: "symbol"
  64320. },
  64321. Promise: {
  64322. stable: true,
  64323. path: "promise"
  64324. },
  64325. Map: {
  64326. stable: true,
  64327. path: "map"
  64328. },
  64329. WeakMap: {
  64330. stable: true,
  64331. path: "weak-map"
  64332. },
  64333. Set: {
  64334. stable: true,
  64335. path: "set"
  64336. },
  64337. WeakSet: {
  64338. stable: true,
  64339. path: "weak-set"
  64340. },
  64341. setImmediate: {
  64342. stable: true,
  64343. path: "set-immediate"
  64344. },
  64345. clearImmediate: {
  64346. stable: true,
  64347. path: "clear-immediate"
  64348. },
  64349. parseFloat: {
  64350. stable: true,
  64351. path: "parse-float"
  64352. },
  64353. parseInt: {
  64354. stable: true,
  64355. path: "parse-int"
  64356. }
  64357. },
  64358. StaticProperties: Object.assign({
  64359. Array: {
  64360. from: {
  64361. stable: true,
  64362. path: "array/from"
  64363. },
  64364. isArray: {
  64365. stable: true,
  64366. path: "array/is-array"
  64367. },
  64368. of: {
  64369. stable: true,
  64370. path: "array/of"
  64371. }
  64372. },
  64373. JSON: {
  64374. stringify: {
  64375. stable: true,
  64376. path: "json/stringify"
  64377. }
  64378. },
  64379. Object: {
  64380. assign: {
  64381. stable: true,
  64382. path: "object/assign"
  64383. },
  64384. create: {
  64385. stable: true,
  64386. path: "object/create"
  64387. },
  64388. defineProperties: {
  64389. stable: true,
  64390. path: "object/define-properties"
  64391. },
  64392. defineProperty: {
  64393. stable: true,
  64394. path: "object/define-property"
  64395. },
  64396. entries: {
  64397. stable: true,
  64398. path: "object/entries"
  64399. },
  64400. freeze: {
  64401. stable: true,
  64402. path: "object/freeze"
  64403. },
  64404. getOwnPropertyDescriptor: {
  64405. stable: true,
  64406. path: "object/get-own-property-descriptor"
  64407. },
  64408. getOwnPropertyDescriptors: {
  64409. stable: true,
  64410. path: "object/get-own-property-descriptors"
  64411. },
  64412. getOwnPropertyNames: {
  64413. stable: true,
  64414. path: "object/get-own-property-names"
  64415. },
  64416. getOwnPropertySymbols: {
  64417. stable: true,
  64418. path: "object/get-own-property-symbols"
  64419. },
  64420. getPrototypeOf: {
  64421. stable: true,
  64422. path: "object/get-prototype-of"
  64423. },
  64424. isExtensible: {
  64425. stable: true,
  64426. path: "object/is-extensible"
  64427. },
  64428. isFrozen: {
  64429. stable: true,
  64430. path: "object/is-frozen"
  64431. },
  64432. isSealed: {
  64433. stable: true,
  64434. path: "object/is-sealed"
  64435. },
  64436. is: {
  64437. stable: true,
  64438. path: "object/is"
  64439. },
  64440. keys: {
  64441. stable: true,
  64442. path: "object/keys"
  64443. },
  64444. preventExtensions: {
  64445. stable: true,
  64446. path: "object/prevent-extensions"
  64447. },
  64448. seal: {
  64449. stable: true,
  64450. path: "object/seal"
  64451. },
  64452. setPrototypeOf: {
  64453. stable: true,
  64454. path: "object/set-prototype-of"
  64455. },
  64456. values: {
  64457. stable: true,
  64458. path: "object/values"
  64459. }
  64460. }
  64461. }, includeMathModule ? {
  64462. Math: {
  64463. acosh: {
  64464. stable: true,
  64465. path: "math/acosh"
  64466. },
  64467. asinh: {
  64468. stable: true,
  64469. path: "math/asinh"
  64470. },
  64471. atanh: {
  64472. stable: true,
  64473. path: "math/atanh"
  64474. },
  64475. cbrt: {
  64476. stable: true,
  64477. path: "math/cbrt"
  64478. },
  64479. clz32: {
  64480. stable: true,
  64481. path: "math/clz32"
  64482. },
  64483. cosh: {
  64484. stable: true,
  64485. path: "math/cosh"
  64486. },
  64487. expm1: {
  64488. stable: true,
  64489. path: "math/expm1"
  64490. },
  64491. fround: {
  64492. stable: true,
  64493. path: "math/fround"
  64494. },
  64495. hypot: {
  64496. stable: true,
  64497. path: "math/hypot"
  64498. },
  64499. imul: {
  64500. stable: true,
  64501. path: "math/imul"
  64502. },
  64503. log10: {
  64504. stable: true,
  64505. path: "math/log10"
  64506. },
  64507. log1p: {
  64508. stable: true,
  64509. path: "math/log1p"
  64510. },
  64511. log2: {
  64512. stable: true,
  64513. path: "math/log2"
  64514. },
  64515. sign: {
  64516. stable: true,
  64517. path: "math/sign"
  64518. },
  64519. sinh: {
  64520. stable: true,
  64521. path: "math/sinh"
  64522. },
  64523. tanh: {
  64524. stable: true,
  64525. path: "math/tanh"
  64526. },
  64527. trunc: {
  64528. stable: true,
  64529. path: "math/trunc"
  64530. }
  64531. }
  64532. } : {}, {
  64533. Symbol: {
  64534. "for": {
  64535. stable: true,
  64536. path: "symbol/for"
  64537. },
  64538. hasInstance: {
  64539. stable: true,
  64540. path: "symbol/has-instance"
  64541. },
  64542. isConcatSpreadable: {
  64543. stable: true,
  64544. path: "symbol/is-concat-spreadable"
  64545. },
  64546. iterator: {
  64547. stable: true,
  64548. path: "symbol/iterator"
  64549. },
  64550. keyFor: {
  64551. stable: true,
  64552. path: "symbol/key-for"
  64553. },
  64554. match: {
  64555. stable: true,
  64556. path: "symbol/match"
  64557. },
  64558. replace: {
  64559. stable: true,
  64560. path: "symbol/replace"
  64561. },
  64562. search: {
  64563. stable: true,
  64564. path: "symbol/search"
  64565. },
  64566. species: {
  64567. stable: true,
  64568. path: "symbol/species"
  64569. },
  64570. split: {
  64571. stable: true,
  64572. path: "symbol/split"
  64573. },
  64574. toPrimitive: {
  64575. stable: true,
  64576. path: "symbol/to-primitive"
  64577. },
  64578. toStringTag: {
  64579. stable: true,
  64580. path: "symbol/to-string-tag"
  64581. },
  64582. unscopables: {
  64583. stable: true,
  64584. path: "symbol/unscopables"
  64585. }
  64586. },
  64587. String: {
  64588. at: {
  64589. stable: true,
  64590. path: "string/at"
  64591. },
  64592. fromCodePoint: {
  64593. stable: true,
  64594. path: "string/from-code-point"
  64595. },
  64596. raw: {
  64597. stable: true,
  64598. path: "string/raw"
  64599. }
  64600. },
  64601. Number: {
  64602. EPSILON: {
  64603. stable: true,
  64604. path: "number/epsilon"
  64605. },
  64606. isFinite: {
  64607. stable: true,
  64608. path: "number/is-finite"
  64609. },
  64610. isInteger: {
  64611. stable: true,
  64612. path: "number/is-integer"
  64613. },
  64614. isNaN: {
  64615. stable: true,
  64616. path: "number/is-nan"
  64617. },
  64618. isSafeInteger: {
  64619. stable: true,
  64620. path: "number/is-safe-integer"
  64621. },
  64622. MAX_SAFE_INTEGER: {
  64623. stable: true,
  64624. path: "number/max-safe-integer"
  64625. },
  64626. MIN_SAFE_INTEGER: {
  64627. stable: true,
  64628. path: "number/min-safe-integer"
  64629. },
  64630. parseFloat: {
  64631. stable: true,
  64632. path: "number/parse-float"
  64633. },
  64634. parseInt: {
  64635. stable: true,
  64636. path: "number/parse-int"
  64637. }
  64638. },
  64639. Reflect: {
  64640. apply: {
  64641. stable: true,
  64642. path: "reflect/apply"
  64643. },
  64644. construct: {
  64645. stable: true,
  64646. path: "reflect/construct"
  64647. },
  64648. defineProperty: {
  64649. stable: true,
  64650. path: "reflect/define-property"
  64651. },
  64652. deleteProperty: {
  64653. stable: true,
  64654. path: "reflect/delete-property"
  64655. },
  64656. getOwnPropertyDescriptor: {
  64657. stable: true,
  64658. path: "reflect/get-own-property-descriptor"
  64659. },
  64660. getPrototypeOf: {
  64661. stable: true,
  64662. path: "reflect/get-prototype-of"
  64663. },
  64664. get: {
  64665. stable: true,
  64666. path: "reflect/get"
  64667. },
  64668. has: {
  64669. stable: true,
  64670. path: "reflect/has"
  64671. },
  64672. isExtensible: {
  64673. stable: true,
  64674. path: "reflect/is-extensible"
  64675. },
  64676. ownKeys: {
  64677. stable: true,
  64678. path: "reflect/own-keys"
  64679. },
  64680. preventExtensions: {
  64681. stable: true,
  64682. path: "reflect/prevent-extensions"
  64683. },
  64684. setPrototypeOf: {
  64685. stable: true,
  64686. path: "reflect/set-prototype-of"
  64687. },
  64688. set: {
  64689. stable: true,
  64690. path: "reflect/set"
  64691. }
  64692. },
  64693. Date: {
  64694. now: {
  64695. stable: true,
  64696. path: "date/now"
  64697. }
  64698. }
  64699. })
  64700. };
  64701. });
  64702. var getCoreJS3Definitions = (function () {
  64703. return {
  64704. BuiltIns: {
  64705. AggregateError: {
  64706. stable: false,
  64707. path: "aggregate-error"
  64708. },
  64709. Map: {
  64710. stable: true,
  64711. path: "map"
  64712. },
  64713. Observable: {
  64714. stable: false,
  64715. path: "observable"
  64716. },
  64717. Promise: {
  64718. stable: true,
  64719. path: "promise"
  64720. },
  64721. Set: {
  64722. stable: true,
  64723. path: "set"
  64724. },
  64725. Symbol: {
  64726. stable: true,
  64727. path: "symbol"
  64728. },
  64729. URL: {
  64730. stable: true,
  64731. path: "url"
  64732. },
  64733. URLSearchParams: {
  64734. stable: true,
  64735. path: "url-search-params"
  64736. },
  64737. WeakMap: {
  64738. stable: true,
  64739. path: "weak-map"
  64740. },
  64741. WeakSet: {
  64742. stable: true,
  64743. path: "weak-set"
  64744. },
  64745. clearImmediate: {
  64746. stable: true,
  64747. path: "clear-immediate"
  64748. },
  64749. compositeKey: {
  64750. stable: false,
  64751. path: "composite-key"
  64752. },
  64753. compositeSymbol: {
  64754. stable: false,
  64755. path: "composite-symbol"
  64756. },
  64757. globalThis: {
  64758. stable: false,
  64759. path: "global-this"
  64760. },
  64761. parseFloat: {
  64762. stable: true,
  64763. path: "parse-float"
  64764. },
  64765. parseInt: {
  64766. stable: true,
  64767. path: "parse-int"
  64768. },
  64769. queueMicrotask: {
  64770. stable: true,
  64771. path: "queue-microtask"
  64772. },
  64773. setImmediate: {
  64774. stable: true,
  64775. path: "set-immediate"
  64776. },
  64777. setInterval: {
  64778. stable: true,
  64779. path: "set-interval"
  64780. },
  64781. setTimeout: {
  64782. stable: true,
  64783. path: "set-timeout"
  64784. }
  64785. },
  64786. StaticProperties: {
  64787. Array: {
  64788. from: {
  64789. stable: true,
  64790. path: "array/from"
  64791. },
  64792. isArray: {
  64793. stable: true,
  64794. path: "array/is-array"
  64795. },
  64796. of: {
  64797. stable: true,
  64798. path: "array/of"
  64799. }
  64800. },
  64801. Date: {
  64802. now: {
  64803. stable: true,
  64804. path: "date/now"
  64805. }
  64806. },
  64807. JSON: {
  64808. stringify: {
  64809. stable: true,
  64810. path: "json/stringify"
  64811. }
  64812. },
  64813. Math: {
  64814. DEG_PER_RAD: {
  64815. stable: false,
  64816. path: "math/deg-per-rad"
  64817. },
  64818. RAD_PER_DEG: {
  64819. stable: false,
  64820. path: "math/rad-per-deg"
  64821. },
  64822. acosh: {
  64823. stable: true,
  64824. path: "math/acosh"
  64825. },
  64826. asinh: {
  64827. stable: true,
  64828. path: "math/asinh"
  64829. },
  64830. atanh: {
  64831. stable: true,
  64832. path: "math/atanh"
  64833. },
  64834. cbrt: {
  64835. stable: true,
  64836. path: "math/cbrt"
  64837. },
  64838. clamp: {
  64839. stable: false,
  64840. path: "math/clamp"
  64841. },
  64842. clz32: {
  64843. stable: true,
  64844. path: "math/clz32"
  64845. },
  64846. cosh: {
  64847. stable: true,
  64848. path: "math/cosh"
  64849. },
  64850. degrees: {
  64851. stable: false,
  64852. path: "math/degrees"
  64853. },
  64854. expm1: {
  64855. stable: true,
  64856. path: "math/expm1"
  64857. },
  64858. fround: {
  64859. stable: true,
  64860. path: "math/fround"
  64861. },
  64862. fscale: {
  64863. stable: false,
  64864. path: "math/fscale"
  64865. },
  64866. hypot: {
  64867. stable: true,
  64868. path: "math/hypot"
  64869. },
  64870. iaddh: {
  64871. stable: false,
  64872. path: "math/iaddh"
  64873. },
  64874. imul: {
  64875. stable: true,
  64876. path: "math/imul"
  64877. },
  64878. imulh: {
  64879. stable: false,
  64880. path: "math/imulh"
  64881. },
  64882. isubh: {
  64883. stable: false,
  64884. path: "math/isubh"
  64885. },
  64886. log10: {
  64887. stable: true,
  64888. path: "math/log10"
  64889. },
  64890. log1p: {
  64891. stable: true,
  64892. path: "math/log1p"
  64893. },
  64894. log2: {
  64895. stable: true,
  64896. path: "math/log2"
  64897. },
  64898. radians: {
  64899. stable: false,
  64900. path: "math/radians"
  64901. },
  64902. scale: {
  64903. stable: false,
  64904. path: "math/scale"
  64905. },
  64906. seededPRNG: {
  64907. stable: false,
  64908. path: "math/seeded-prng"
  64909. },
  64910. sign: {
  64911. stable: true,
  64912. path: "math/sign"
  64913. },
  64914. signbit: {
  64915. stable: false,
  64916. path: "math/signbit"
  64917. },
  64918. sinh: {
  64919. stable: true,
  64920. path: "math/sinh"
  64921. },
  64922. tanh: {
  64923. stable: true,
  64924. path: "math/tanh"
  64925. },
  64926. trunc: {
  64927. stable: true,
  64928. path: "math/trunc"
  64929. },
  64930. umulh: {
  64931. stable: false,
  64932. path: "math/umulh"
  64933. }
  64934. },
  64935. Number: {
  64936. EPSILON: {
  64937. stable: true,
  64938. path: "number/epsilon"
  64939. },
  64940. MAX_SAFE_INTEGER: {
  64941. stable: true,
  64942. path: "number/max-safe-integer"
  64943. },
  64944. MIN_SAFE_INTEGER: {
  64945. stable: true,
  64946. path: "number/min-safe-integer"
  64947. },
  64948. fromString: {
  64949. stable: false,
  64950. path: "number/from-string"
  64951. },
  64952. isFinite: {
  64953. stable: true,
  64954. path: "number/is-finite"
  64955. },
  64956. isInteger: {
  64957. stable: true,
  64958. path: "number/is-integer"
  64959. },
  64960. isNaN: {
  64961. stable: true,
  64962. path: "number/is-nan"
  64963. },
  64964. isSafeInteger: {
  64965. stable: true,
  64966. path: "number/is-safe-integer"
  64967. },
  64968. parseFloat: {
  64969. stable: true,
  64970. path: "number/parse-float"
  64971. },
  64972. parseInt: {
  64973. stable: true,
  64974. path: "number/parse-int"
  64975. }
  64976. },
  64977. Object: {
  64978. assign: {
  64979. stable: true,
  64980. path: "object/assign"
  64981. },
  64982. create: {
  64983. stable: true,
  64984. path: "object/create"
  64985. },
  64986. defineProperties: {
  64987. stable: true,
  64988. path: "object/define-properties"
  64989. },
  64990. defineProperty: {
  64991. stable: true,
  64992. path: "object/define-property"
  64993. },
  64994. entries: {
  64995. stable: true,
  64996. path: "object/entries"
  64997. },
  64998. freeze: {
  64999. stable: true,
  65000. path: "object/freeze"
  65001. },
  65002. fromEntries: {
  65003. stable: true,
  65004. path: "object/from-entries"
  65005. },
  65006. getOwnPropertyDescriptor: {
  65007. stable: true,
  65008. path: "object/get-own-property-descriptor"
  65009. },
  65010. getOwnPropertyDescriptors: {
  65011. stable: true,
  65012. path: "object/get-own-property-descriptors"
  65013. },
  65014. getOwnPropertyNames: {
  65015. stable: true,
  65016. path: "object/get-own-property-names"
  65017. },
  65018. getOwnPropertySymbols: {
  65019. stable: true,
  65020. path: "object/get-own-property-symbols"
  65021. },
  65022. getPrototypeOf: {
  65023. stable: true,
  65024. path: "object/get-prototype-of"
  65025. },
  65026. isExtensible: {
  65027. stable: true,
  65028. path: "object/is-extensible"
  65029. },
  65030. isFrozen: {
  65031. stable: true,
  65032. path: "object/is-frozen"
  65033. },
  65034. isSealed: {
  65035. stable: true,
  65036. path: "object/is-sealed"
  65037. },
  65038. is: {
  65039. stable: true,
  65040. path: "object/is"
  65041. },
  65042. keys: {
  65043. stable: true,
  65044. path: "object/keys"
  65045. },
  65046. preventExtensions: {
  65047. stable: true,
  65048. path: "object/prevent-extensions"
  65049. },
  65050. seal: {
  65051. stable: true,
  65052. path: "object/seal"
  65053. },
  65054. setPrototypeOf: {
  65055. stable: true,
  65056. path: "object/set-prototype-of"
  65057. },
  65058. values: {
  65059. stable: true,
  65060. path: "object/values"
  65061. }
  65062. },
  65063. Reflect: {
  65064. apply: {
  65065. stable: true,
  65066. path: "reflect/apply"
  65067. },
  65068. construct: {
  65069. stable: true,
  65070. path: "reflect/construct"
  65071. },
  65072. defineMetadata: {
  65073. stable: false,
  65074. path: "reflect/define-metadata"
  65075. },
  65076. defineProperty: {
  65077. stable: true,
  65078. path: "reflect/define-property"
  65079. },
  65080. deleteMetadata: {
  65081. stable: false,
  65082. path: "reflect/delete-metadata"
  65083. },
  65084. deleteProperty: {
  65085. stable: true,
  65086. path: "reflect/delete-property"
  65087. },
  65088. getMetadata: {
  65089. stable: false,
  65090. path: "reflect/get-metadata"
  65091. },
  65092. getMetadataKeys: {
  65093. stable: false,
  65094. path: "reflect/get-metadata-keys"
  65095. },
  65096. getOwnMetadata: {
  65097. stable: false,
  65098. path: "reflect/get-own-metadata"
  65099. },
  65100. getOwnMetadataKeys: {
  65101. stable: false,
  65102. path: "reflect/get-own-metadata-keys"
  65103. },
  65104. getOwnPropertyDescriptor: {
  65105. stable: true,
  65106. path: "reflect/get-own-property-descriptor"
  65107. },
  65108. getPrototypeOf: {
  65109. stable: true,
  65110. path: "reflect/get-prototype-of"
  65111. },
  65112. get: {
  65113. stable: true,
  65114. path: "reflect/get"
  65115. },
  65116. has: {
  65117. stable: true,
  65118. path: "reflect/has"
  65119. },
  65120. hasMetadata: {
  65121. stable: false,
  65122. path: "reflect/has-metadata"
  65123. },
  65124. hasOwnMetadata: {
  65125. stable: false,
  65126. path: "reflect/has-own-metadata"
  65127. },
  65128. isExtensible: {
  65129. stable: true,
  65130. path: "reflect/is-extensible"
  65131. },
  65132. metadata: {
  65133. stable: false,
  65134. path: "reflect/metadata"
  65135. },
  65136. ownKeys: {
  65137. stable: true,
  65138. path: "reflect/own-keys"
  65139. },
  65140. preventExtensions: {
  65141. stable: true,
  65142. path: "reflect/prevent-extensions"
  65143. },
  65144. set: {
  65145. stable: true,
  65146. path: "reflect/set"
  65147. },
  65148. setPrototypeOf: {
  65149. stable: true,
  65150. path: "reflect/set-prototype-of"
  65151. }
  65152. },
  65153. String: {
  65154. fromCodePoint: {
  65155. stable: true,
  65156. path: "string/from-code-point"
  65157. },
  65158. raw: {
  65159. stable: true,
  65160. path: "string/raw"
  65161. }
  65162. },
  65163. Symbol: {
  65164. asyncIterator: {
  65165. stable: true,
  65166. path: "symbol/async-iterator"
  65167. },
  65168. dispose: {
  65169. stable: false,
  65170. path: "symbol/dispose"
  65171. },
  65172. "for": {
  65173. stable: true,
  65174. path: "symbol/for"
  65175. },
  65176. hasInstance: {
  65177. stable: true,
  65178. path: "symbol/has-instance"
  65179. },
  65180. isConcatSpreadable: {
  65181. stable: true,
  65182. path: "symbol/is-concat-spreadable"
  65183. },
  65184. iterator: {
  65185. stable: true,
  65186. path: "symbol/iterator"
  65187. },
  65188. keyFor: {
  65189. stable: true,
  65190. path: "symbol/key-for"
  65191. },
  65192. match: {
  65193. stable: true,
  65194. path: "symbol/match"
  65195. },
  65196. observable: {
  65197. stable: false,
  65198. path: "symbol/observable"
  65199. },
  65200. patternMatch: {
  65201. stable: false,
  65202. path: "symbol/pattern-match"
  65203. },
  65204. replace: {
  65205. stable: true,
  65206. path: "symbol/replace"
  65207. },
  65208. search: {
  65209. stable: true,
  65210. path: "symbol/search"
  65211. },
  65212. species: {
  65213. stable: true,
  65214. path: "symbol/species"
  65215. },
  65216. split: {
  65217. stable: true,
  65218. path: "symbol/split"
  65219. },
  65220. toPrimitive: {
  65221. stable: true,
  65222. path: "symbol/to-primitive"
  65223. },
  65224. toStringTag: {
  65225. stable: true,
  65226. path: "symbol/to-string-tag"
  65227. },
  65228. unscopables: {
  65229. stable: true,
  65230. path: "symbol/unscopables"
  65231. }
  65232. }
  65233. },
  65234. InstanceProperties: {
  65235. at: {
  65236. stable: false,
  65237. path: "at"
  65238. },
  65239. bind: {
  65240. stable: true,
  65241. path: "bind"
  65242. },
  65243. codePointAt: {
  65244. stable: true,
  65245. path: "code-point-at"
  65246. },
  65247. codePoints: {
  65248. stable: false,
  65249. path: "code-points"
  65250. },
  65251. concat: {
  65252. stable: true,
  65253. path: "concat",
  65254. types: ["array"]
  65255. },
  65256. copyWithin: {
  65257. stable: true,
  65258. path: "copy-within"
  65259. },
  65260. endsWith: {
  65261. stable: true,
  65262. path: "ends-with"
  65263. },
  65264. entries: {
  65265. stable: true,
  65266. path: "entries"
  65267. },
  65268. every: {
  65269. stable: true,
  65270. path: "every"
  65271. },
  65272. fill: {
  65273. stable: true,
  65274. path: "fill"
  65275. },
  65276. filter: {
  65277. stable: true,
  65278. path: "filter"
  65279. },
  65280. find: {
  65281. stable: true,
  65282. path: "find"
  65283. },
  65284. findIndex: {
  65285. stable: true,
  65286. path: "find-index"
  65287. },
  65288. flags: {
  65289. stable: true,
  65290. path: "flags"
  65291. },
  65292. flatMap: {
  65293. stable: true,
  65294. path: "flat-map"
  65295. },
  65296. flat: {
  65297. stable: true,
  65298. path: "flat"
  65299. },
  65300. forEach: {
  65301. stable: true,
  65302. path: "for-each"
  65303. },
  65304. includes: {
  65305. stable: true,
  65306. path: "includes"
  65307. },
  65308. indexOf: {
  65309. stable: true,
  65310. path: "index-of"
  65311. },
  65312. keys: {
  65313. stable: true,
  65314. path: "keys"
  65315. },
  65316. lastIndexOf: {
  65317. stable: true,
  65318. path: "last-index-of"
  65319. },
  65320. map: {
  65321. stable: true,
  65322. path: "map"
  65323. },
  65324. matchAll: {
  65325. stable: false,
  65326. path: "match-all"
  65327. },
  65328. padEnd: {
  65329. stable: true,
  65330. path: "pad-end"
  65331. },
  65332. padStart: {
  65333. stable: true,
  65334. path: "pad-start"
  65335. },
  65336. reduce: {
  65337. stable: true,
  65338. path: "reduce"
  65339. },
  65340. reduceRight: {
  65341. stable: true,
  65342. path: "reduce-right"
  65343. },
  65344. repeat: {
  65345. stable: true,
  65346. path: "repeat"
  65347. },
  65348. replaceAll: {
  65349. stable: false,
  65350. path: "replace-all"
  65351. },
  65352. reverse: {
  65353. stable: true,
  65354. path: "reverse"
  65355. },
  65356. slice: {
  65357. stable: true,
  65358. path: "slice"
  65359. },
  65360. some: {
  65361. stable: true,
  65362. path: "some"
  65363. },
  65364. sort: {
  65365. stable: true,
  65366. path: "sort"
  65367. },
  65368. splice: {
  65369. stable: true,
  65370. path: "splice"
  65371. },
  65372. startsWith: {
  65373. stable: true,
  65374. path: "starts-with"
  65375. },
  65376. trim: {
  65377. stable: true,
  65378. path: "trim"
  65379. },
  65380. trimEnd: {
  65381. stable: true,
  65382. path: "trim-end"
  65383. },
  65384. trimLeft: {
  65385. stable: true,
  65386. path: "trim-left"
  65387. },
  65388. trimRight: {
  65389. stable: true,
  65390. path: "trim-right"
  65391. },
  65392. trimStart: {
  65393. stable: true,
  65394. path: "trim-start"
  65395. },
  65396. values: {
  65397. stable: true,
  65398. path: "values"
  65399. }
  65400. }
  65401. };
  65402. });
  65403. function resolveAbsoluteRuntime(moduleName, dirname) {
  65404. try {
  65405. return path$1.dirname(resolve$2.sync(moduleName + "/package.json", {
  65406. basedir: dirname
  65407. }));
  65408. } catch (err) {
  65409. if (err.code !== "MODULE_NOT_FOUND") throw err;
  65410. throw Object.assign(new Error("Failed to resolve \"" + moduleName + "\" relative to \"" + dirname + "\""), {
  65411. code: "BABEL_RUNTIME_NOT_FOUND",
  65412. runtime: moduleName,
  65413. dirname: dirname
  65414. });
  65415. }
  65416. }
  65417. function supportsStaticESM(caller) {
  65418. return !!(caller && caller.supportsStaticESM);
  65419. }
  65420. var transformRuntime = declare(function (api, options, dirname) {
  65421. api.assertVersion(7);
  65422. var corejs = options.corejs,
  65423. _options$helpers = options.helpers,
  65424. useRuntimeHelpers = _options$helpers === void 0 ? true : _options$helpers,
  65425. _options$regenerator = options.regenerator,
  65426. useRuntimeRegenerator = _options$regenerator === void 0 ? true : _options$regenerator,
  65427. _options$useESModules = options.useESModules,
  65428. useESModules = _options$useESModules === void 0 ? false : _options$useESModules,
  65429. _options$version = options.version,
  65430. runtimeVersion = _options$version === void 0 ? "7.0.0-beta.0" : _options$version,
  65431. _options$absoluteRunt = options.absoluteRuntime,
  65432. absoluteRuntime = _options$absoluteRunt === void 0 ? false : _options$absoluteRunt;
  65433. var proposals = false;
  65434. var rawVersion;
  65435. if (typeof corejs === "object" && corejs !== null) {
  65436. rawVersion = corejs.version;
  65437. proposals = Boolean(corejs.proposals);
  65438. } else {
  65439. rawVersion = corejs;
  65440. }
  65441. var corejsVersion = rawVersion ? Number(rawVersion) : false;
  65442. if (![false, 2, 3].includes(corejsVersion)) {
  65443. throw new Error("The `core-js` version must be false, 2 or 3, but got " + JSON.stringify(rawVersion) + ".");
  65444. }
  65445. if (proposals && (!corejsVersion || corejsVersion < 3)) {
  65446. throw new Error("The 'proposals' option is only supported when using 'corejs: 3'");
  65447. }
  65448. if (typeof useRuntimeRegenerator !== "boolean") {
  65449. throw new Error("The 'regenerator' option must be undefined, or a boolean.");
  65450. }
  65451. if (typeof useRuntimeHelpers !== "boolean") {
  65452. throw new Error("The 'helpers' option must be undefined, or a boolean.");
  65453. }
  65454. if (typeof useESModules !== "boolean" && useESModules !== "auto") {
  65455. throw new Error("The 'useESModules' option must be undefined, or a boolean, or 'auto'.");
  65456. }
  65457. if (typeof absoluteRuntime !== "boolean" && typeof absoluteRuntime !== "string") {
  65458. throw new Error("The 'absoluteRuntime' option must be undefined, a boolean, or a string.");
  65459. }
  65460. if (typeof runtimeVersion !== "string") {
  65461. throw new Error("The 'version' option must be a version string.");
  65462. }
  65463. function has(obj, key) {
  65464. return Object.prototype.hasOwnProperty.call(obj, key);
  65465. }
  65466. function hasMapping(methods, name) {
  65467. return has(methods, name) && (proposals || methods[name].stable);
  65468. }
  65469. function hasStaticMapping(object, method) {
  65470. return has(StaticProperties, object) && hasMapping(StaticProperties[object], method);
  65471. }
  65472. function isNamespaced(path) {
  65473. var binding = path.scope.getBinding(path.node.name);
  65474. if (!binding) return false;
  65475. return binding.path.isImportNamespaceSpecifier();
  65476. }
  65477. function maybeNeedsPolyfill(path, methods, name) {
  65478. if (isNamespaced(path.get("object"))) return false;
  65479. if (!methods[name].types) return true;
  65480. var typeAnnotation = path.get("object").getTypeAnnotation();
  65481. var type = typeAnnotationToString(typeAnnotation);
  65482. if (!type) return true;
  65483. return methods[name].types.some(function (name) {
  65484. return name === type;
  65485. });
  65486. }
  65487. function resolvePropertyName(path, computed) {
  65488. var node = path.node;
  65489. if (!computed) return node.name;
  65490. if (path.isStringLiteral()) return node.value;
  65491. var result = path.evaluate();
  65492. return result.value;
  65493. }
  65494. if (has(options, "useBuiltIns")) {
  65495. if (options.useBuiltIns) {
  65496. throw new Error("The 'useBuiltIns' option has been removed. The @babel/runtime " + "module now uses builtins by default.");
  65497. } else {
  65498. throw new Error("The 'useBuiltIns' option has been removed. Use the 'corejs'" + "option to polyfill with `core-js` via @babel/runtime.");
  65499. }
  65500. }
  65501. if (has(options, "polyfill")) {
  65502. if (options.polyfill === false) {
  65503. throw new Error("The 'polyfill' option has been removed. The @babel/runtime " + "module now skips polyfilling by default.");
  65504. } else {
  65505. throw new Error("The 'polyfill' option has been removed. Use the 'corejs'" + "option to polyfill with `core-js` via @babel/runtime.");
  65506. }
  65507. }
  65508. if (has(options, "moduleName")) {
  65509. 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.");
  65510. }
  65511. var esModules = useESModules === "auto" ? api.caller(supportsStaticESM) : useESModules;
  65512. var injectCoreJS2 = corejsVersion === 2;
  65513. var injectCoreJS3 = corejsVersion === 3;
  65514. var injectCoreJS = corejsVersion !== false;
  65515. var moduleName = injectCoreJS3 ? "@babel/runtime-corejs3" : injectCoreJS2 ? "@babel/runtime-corejs2" : "@babel/runtime";
  65516. var corejsRoot = injectCoreJS3 && !proposals ? "core-js-stable" : "core-js";
  65517. var _ref = (injectCoreJS2 ? getCoreJS2Definitions : getCoreJS3Definitions)(runtimeVersion),
  65518. BuiltIns = _ref.BuiltIns,
  65519. StaticProperties = _ref.StaticProperties,
  65520. InstanceProperties = _ref.InstanceProperties;
  65521. var HEADER_HELPERS = ["interopRequireWildcard", "interopRequireDefault"];
  65522. var modulePath = moduleName;
  65523. if (absoluteRuntime !== false) {
  65524. modulePath = resolveAbsoluteRuntime(moduleName, path$1.resolve(dirname, absoluteRuntime === true ? "." : absoluteRuntime));
  65525. }
  65526. return {
  65527. name: "transform-runtime",
  65528. pre: function pre(file) {
  65529. var _this = this;
  65530. if (useRuntimeHelpers) {
  65531. file.set("helperGenerator", function (name) {
  65532. if (file.availableHelper && !file.availableHelper(name, runtimeVersion)) {
  65533. return;
  65534. }
  65535. var isInteropHelper = HEADER_HELPERS.indexOf(name) !== -1;
  65536. var blockHoist = isInteropHelper && !isModule(file.path) ? 4 : undefined;
  65537. var helpersDir = esModules && file.path.node.sourceType === "module" ? "helpers/esm" : "helpers";
  65538. return _this.addDefaultImport(modulePath + "/" + helpersDir + "/" + name, name, blockHoist);
  65539. });
  65540. }
  65541. var cache = new Map();
  65542. this.addDefaultImport = function (source, nameHint, blockHoist) {
  65543. var cacheKey = isModule(file.path);
  65544. var key = source + ":" + nameHint + ":" + (cacheKey || "");
  65545. var cached = cache.get(key);
  65546. if (cached) {
  65547. cached = cloneNode(cached);
  65548. } else {
  65549. cached = addDefault(file.path, source, {
  65550. importedInterop: "uncompiled",
  65551. nameHint: nameHint,
  65552. blockHoist: blockHoist
  65553. });
  65554. cache.set(key, cached);
  65555. }
  65556. return cached;
  65557. };
  65558. },
  65559. visitor: {
  65560. ReferencedIdentifier: function ReferencedIdentifier(path) {
  65561. var node = path.node,
  65562. parent = path.parent,
  65563. scope = path.scope;
  65564. var name = node.name;
  65565. if (name === "regeneratorRuntime" && useRuntimeRegenerator) {
  65566. path.replaceWith(this.addDefaultImport(modulePath + "/regenerator", "regeneratorRuntime"));
  65567. return;
  65568. }
  65569. if (!injectCoreJS) return;
  65570. if (isMemberExpression(parent)) return;
  65571. if (!hasMapping(BuiltIns, name)) return;
  65572. if (scope.getBindingIdentifier(name)) return;
  65573. path.replaceWith(this.addDefaultImport(modulePath + "/" + corejsRoot + "/" + BuiltIns[name].path, name));
  65574. },
  65575. CallExpression: function CallExpression$1(path) {
  65576. if (!injectCoreJS) return;
  65577. var node = path.node;
  65578. var callee = node.callee;
  65579. if (!isMemberExpression(callee)) return;
  65580. var object = callee.object;
  65581. var propertyName = resolvePropertyName(path.get("callee.property"), callee.computed);
  65582. if (injectCoreJS3 && !hasStaticMapping(object.name, propertyName)) {
  65583. if (hasMapping(InstanceProperties, propertyName) && maybeNeedsPolyfill(path.get("callee"), InstanceProperties, propertyName)) {
  65584. var context1, context2;
  65585. if (isIdentifier(object)) {
  65586. context1 = object;
  65587. context2 = cloneNode(object);
  65588. } else {
  65589. context1 = path.scope.generateDeclaredUidIdentifier("context");
  65590. context2 = AssignmentExpression("=", context1, object);
  65591. }
  65592. node.callee = MemberExpression(CallExpression(this.addDefaultImport(moduleName + "/" + corejsRoot + "/instance/" + InstanceProperties[propertyName].path, propertyName + "InstanceProperty"), [context2]), Identifier("call"));
  65593. node.arguments.unshift(context1);
  65594. return;
  65595. }
  65596. }
  65597. if (node.arguments.length) return;
  65598. if (!callee.computed) return;
  65599. if (!path.get("callee.property").matchesPattern("Symbol.iterator")) {
  65600. return;
  65601. }
  65602. path.replaceWith(CallExpression(this.addDefaultImport(modulePath + "/core-js/get-iterator", "getIterator"), [object]));
  65603. },
  65604. BinaryExpression: function BinaryExpression(path) {
  65605. if (!injectCoreJS) return;
  65606. if (path.node.operator !== "in") return;
  65607. if (!path.get("left").matchesPattern("Symbol.iterator")) return;
  65608. path.replaceWith(CallExpression(this.addDefaultImport(modulePath + "/core-js/is-iterable", "isIterable"), [path.node.right]));
  65609. },
  65610. MemberExpression: {
  65611. enter: function enter(path) {
  65612. if (!injectCoreJS) return;
  65613. if (!path.isReferenced()) return;
  65614. var node = path.node;
  65615. var object = node.object;
  65616. if (!isReferenced(object, node)) return;
  65617. if (!injectCoreJS2 && node.computed && path.get("property").matchesPattern("Symbol.iterator")) {
  65618. path.replaceWith(CallExpression(this.addDefaultImport(moduleName + "/core-js/get-iterator-method", "getIteratorMethod"), [object]));
  65619. return;
  65620. }
  65621. var objectName = object.name;
  65622. var propertyName = resolvePropertyName(path.get("property"), node.computed);
  65623. if (path.scope.getBindingIdentifier(objectName) || !hasStaticMapping(objectName, propertyName)) {
  65624. if (injectCoreJS3 && hasMapping(InstanceProperties, propertyName) && maybeNeedsPolyfill(path, InstanceProperties, propertyName)) {
  65625. path.replaceWith(CallExpression(this.addDefaultImport(moduleName + "/" + corejsRoot + "/instance/" + InstanceProperties[propertyName].path, propertyName + "InstanceProperty"), [object]));
  65626. }
  65627. return;
  65628. }
  65629. path.replaceWith(this.addDefaultImport(modulePath + "/" + corejsRoot + "/" + StaticProperties[objectName][propertyName].path, objectName + "$" + propertyName));
  65630. },
  65631. exit: function exit(path) {
  65632. if (!injectCoreJS) return;
  65633. if (!path.isReferenced()) return;
  65634. if (path.node.computed) return;
  65635. var node = path.node;
  65636. var object = node.object;
  65637. var name = object.name;
  65638. if (!hasMapping(BuiltIns, name)) return;
  65639. if (path.scope.getBindingIdentifier(name)) return;
  65640. path.replaceWith(MemberExpression(this.addDefaultImport(modulePath + "/" + corejsRoot + "/" + BuiltIns[name].path, name), node.property));
  65641. }
  65642. }
  65643. }
  65644. };
  65645. });
  65646. var transformShorthandProperties = declare(function (api) {
  65647. api.assertVersion(7);
  65648. return {
  65649. name: "transform-shorthand-properties",
  65650. visitor: {
  65651. ObjectMethod: function ObjectMethod(path) {
  65652. var node = path.node;
  65653. if (node.kind === "method") {
  65654. var func = FunctionExpression(null, node.params, node.body, node.generator, node.async);
  65655. func.returnType = node.returnType;
  65656. path.replaceWith(ObjectProperty(node.key, func, node.computed));
  65657. }
  65658. },
  65659. ObjectProperty: function ObjectProperty(_ref) {
  65660. var node = _ref.node;
  65661. if (node.shorthand) {
  65662. node.shorthand = false;
  65663. }
  65664. }
  65665. }
  65666. };
  65667. });
  65668. var transformSpread = declare(function (api, options) {
  65669. api.assertVersion(7);
  65670. var loose = options.loose;
  65671. function getSpreadLiteral(spread, scope) {
  65672. if (loose && !isIdentifier(spread.argument, {
  65673. name: "arguments"
  65674. })) {
  65675. return spread.argument;
  65676. } else {
  65677. return scope.toArray(spread.argument, true);
  65678. }
  65679. }
  65680. function hasSpread(nodes) {
  65681. for (var i = 0; i < nodes.length; i++) {
  65682. if (isSpreadElement(nodes[i])) {
  65683. return true;
  65684. }
  65685. }
  65686. return false;
  65687. }
  65688. function push(_props, nodes) {
  65689. if (!_props.length) return _props;
  65690. nodes.push(ArrayExpression(_props));
  65691. return [];
  65692. }
  65693. function build(props, scope) {
  65694. var nodes = [];
  65695. var _props = [];
  65696. for (var _iterator = props, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  65697. var _ref;
  65698. if (_isArray) {
  65699. if (_i >= _iterator.length) break;
  65700. _ref = _iterator[_i++];
  65701. } else {
  65702. _i = _iterator.next();
  65703. if (_i.done) break;
  65704. _ref = _i.value;
  65705. }
  65706. var prop = _ref;
  65707. if (isSpreadElement(prop)) {
  65708. _props = push(_props, nodes);
  65709. nodes.push(getSpreadLiteral(prop, scope));
  65710. } else {
  65711. _props.push(prop);
  65712. }
  65713. }
  65714. push(_props, nodes);
  65715. return nodes;
  65716. }
  65717. return {
  65718. name: "transform-spread",
  65719. visitor: {
  65720. ArrayExpression: function ArrayExpression$1(path) {
  65721. var node = path.node,
  65722. scope = path.scope;
  65723. var elements = node.elements;
  65724. if (!hasSpread(elements)) return;
  65725. var nodes = build(elements, scope);
  65726. var first = nodes[0];
  65727. if (nodes.length === 1 && first !== elements[0].argument) {
  65728. path.replaceWith(first);
  65729. return;
  65730. }
  65731. if (!isArrayExpression(first)) {
  65732. first = ArrayExpression([]);
  65733. } else {
  65734. nodes.shift();
  65735. }
  65736. path.replaceWith(CallExpression(MemberExpression(first, Identifier("concat")), nodes));
  65737. },
  65738. CallExpression: function CallExpression$1(path) {
  65739. var node = path.node,
  65740. scope = path.scope;
  65741. var args = node.arguments;
  65742. if (!hasSpread(args)) return;
  65743. var calleePath = path.get("callee");
  65744. if (calleePath.isSuper()) return;
  65745. var contextLiteral = scope.buildUndefinedNode();
  65746. node.arguments = [];
  65747. var nodes;
  65748. if (args.length === 1 && args[0].argument.name === "arguments") {
  65749. nodes = [args[0].argument];
  65750. } else {
  65751. nodes = build(args, scope);
  65752. }
  65753. var first = nodes.shift();
  65754. if (nodes.length) {
  65755. node.arguments.push(CallExpression(MemberExpression(first, Identifier("concat")), nodes));
  65756. } else {
  65757. node.arguments.push(first);
  65758. }
  65759. var callee = node.callee;
  65760. if (calleePath.isMemberExpression()) {
  65761. var temp = scope.maybeGenerateMemoised(callee.object);
  65762. if (temp) {
  65763. callee.object = AssignmentExpression("=", temp, callee.object);
  65764. contextLiteral = temp;
  65765. } else {
  65766. contextLiteral = cloneNode(callee.object);
  65767. }
  65768. appendToMemberExpression(callee, Identifier("apply"));
  65769. } else {
  65770. node.callee = MemberExpression(node.callee, Identifier("apply"));
  65771. }
  65772. if (isSuper(contextLiteral)) {
  65773. contextLiteral = ThisExpression();
  65774. }
  65775. node.arguments.unshift(cloneNode(contextLiteral));
  65776. },
  65777. NewExpression: function NewExpression(path) {
  65778. var node = path.node,
  65779. scope = path.scope;
  65780. var args = node.arguments;
  65781. if (!hasSpread(args)) return;
  65782. var nodes = build(args, scope);
  65783. var first = nodes.shift();
  65784. if (nodes.length) {
  65785. args = CallExpression(MemberExpression(first, Identifier("concat")), nodes);
  65786. } else {
  65787. args = first;
  65788. }
  65789. path.replaceWith(CallExpression(path.hub.addHelper("construct"), [node.callee, args]));
  65790. }
  65791. }
  65792. };
  65793. });
  65794. var transformStickyRegex = declare(function (api) {
  65795. api.assertVersion(7);
  65796. return {
  65797. name: "transform-sticky-regex",
  65798. visitor: {
  65799. RegExpLiteral: function RegExpLiteral(path) {
  65800. var node = path.node;
  65801. if (!is$2(node, "y")) return;
  65802. path.replaceWith(NewExpression(Identifier("RegExp"), [StringLiteral(node.pattern), StringLiteral(node.flags)]));
  65803. }
  65804. }
  65805. };
  65806. });
  65807. var transformStrictMode = declare(function (api) {
  65808. api.assertVersion(7);
  65809. return {
  65810. name: "transform-strict-mode",
  65811. visitor: {
  65812. Program: function Program(path) {
  65813. var node = path.node;
  65814. for (var _i = 0, _arr = node.directives; _i < _arr.length; _i++) {
  65815. var directive = _arr[_i];
  65816. if (directive.value.value === "use strict") return;
  65817. }
  65818. path.unshiftContainer("directives", Directive(DirectiveLiteral("use strict")));
  65819. }
  65820. }
  65821. };
  65822. });
  65823. function _templateObject$b() {
  65824. var data = _taggedTemplateLiteralLoose(["\n function ", "() {\n const data = ", ";\n ", " = function() { return data };\n return data;\n } \n "]);
  65825. _templateObject$b = function _templateObject() {
  65826. return data;
  65827. };
  65828. return data;
  65829. }
  65830. var transformTemplateLiterals = declare(function (api, options) {
  65831. api.assertVersion(7);
  65832. var loose = options.loose;
  65833. var helperName = "taggedTemplateLiteral";
  65834. if (loose) helperName += "Loose";
  65835. function buildConcatCallExpressions(items) {
  65836. var avail = true;
  65837. return items.reduce(function (left, right) {
  65838. var canBeInserted = isLiteral(right);
  65839. if (!canBeInserted && avail) {
  65840. canBeInserted = true;
  65841. avail = false;
  65842. }
  65843. if (canBeInserted && isCallExpression(left)) {
  65844. left.arguments.push(right);
  65845. return left;
  65846. }
  65847. return CallExpression(MemberExpression(left, Identifier("concat")), [right]);
  65848. });
  65849. }
  65850. return {
  65851. name: "transform-template-literals",
  65852. visitor: {
  65853. TaggedTemplateExpression: function TaggedTemplateExpression(path) {
  65854. var node = path.node;
  65855. var quasi = node.quasi;
  65856. var strings = [];
  65857. var raws = [];
  65858. var isStringsRawEqual = true;
  65859. for (var _i = 0, _arr = quasi.quasis; _i < _arr.length; _i++) {
  65860. var elem = _arr[_i];
  65861. var _elem$value = elem.value,
  65862. raw = _elem$value.raw,
  65863. cooked = _elem$value.cooked;
  65864. var value = cooked == null ? path.scope.buildUndefinedNode() : StringLiteral(cooked);
  65865. strings.push(value);
  65866. raws.push(StringLiteral(raw));
  65867. if (raw !== cooked) {
  65868. isStringsRawEqual = false;
  65869. }
  65870. }
  65871. var scope = path.scope.getProgramParent();
  65872. var templateObject = scope.generateUidIdentifier("templateObject");
  65873. var helperId = this.addHelper(helperName);
  65874. var callExpressionInput = [ArrayExpression(strings)];
  65875. if (!isStringsRawEqual) {
  65876. callExpressionInput.push(ArrayExpression(raws));
  65877. }
  65878. var lazyLoad = template.ast(_templateObject$b(), templateObject, CallExpression(helperId, callExpressionInput), templateObject);
  65879. scope.path.unshiftContainer("body", lazyLoad);
  65880. path.replaceWith(CallExpression(node.tag, [CallExpression(cloneNode(templateObject), [])].concat(quasi.expressions)));
  65881. },
  65882. TemplateLiteral: function TemplateLiteral(path) {
  65883. var nodes = [];
  65884. var expressions = path.get("expressions");
  65885. var index = 0;
  65886. for (var _i2 = 0, _arr2 = path.node.quasis; _i2 < _arr2.length; _i2++) {
  65887. var elem = _arr2[_i2];
  65888. if (elem.value.cooked) {
  65889. nodes.push(StringLiteral(elem.value.cooked));
  65890. }
  65891. if (index < expressions.length) {
  65892. var expr = expressions[index++];
  65893. var node = expr.node;
  65894. if (!isStringLiteral(node, {
  65895. value: ""
  65896. })) {
  65897. nodes.push(node);
  65898. }
  65899. }
  65900. }
  65901. var considerSecondNode = !loose || !isStringLiteral(nodes[1]);
  65902. if (!isStringLiteral(nodes[0]) && considerSecondNode) {
  65903. nodes.unshift(StringLiteral(""));
  65904. }
  65905. var root = nodes[0];
  65906. if (loose) {
  65907. for (var i = 1; i < nodes.length; i++) {
  65908. root = BinaryExpression("+", root, nodes[i]);
  65909. }
  65910. } else if (nodes.length > 1) {
  65911. root = buildConcatCallExpressions(nodes);
  65912. }
  65913. path.replaceWith(root);
  65914. }
  65915. }
  65916. };
  65917. });
  65918. var transformTypeofSymbol = declare(function (api) {
  65919. api.assertVersion(7);
  65920. return {
  65921. name: "transform-typeof-symbol",
  65922. visitor: {
  65923. Scope: function Scope(_ref) {
  65924. var scope = _ref.scope;
  65925. if (!scope.getBinding("Symbol")) {
  65926. return;
  65927. }
  65928. scope.rename("Symbol");
  65929. },
  65930. UnaryExpression: function UnaryExpression$1(path) {
  65931. var node = path.node,
  65932. parent = path.parent;
  65933. if (node.operator !== "typeof") return;
  65934. if (path.parentPath.isBinaryExpression() && EQUALITY_BINARY_OPERATORS.indexOf(parent.operator) >= 0) {
  65935. var opposite = path.getOpposite();
  65936. if (opposite.isLiteral() && opposite.node.value !== "symbol" && opposite.node.value !== "object") {
  65937. return;
  65938. }
  65939. }
  65940. var helper = this.addHelper("typeof");
  65941. var isUnderHelper = path.findParent(function (path) {
  65942. return path.isVariableDeclarator() && path.node.id === helper || path.isFunctionDeclaration() && path.node.id && path.node.id.name === helper.name;
  65943. });
  65944. if (isUnderHelper) {
  65945. return;
  65946. }
  65947. var call = CallExpression(helper, [node.argument]);
  65948. var arg = path.get("argument");
  65949. if (arg.isIdentifier() && !path.scope.hasBinding(arg.node.name, true)) {
  65950. var unary = UnaryExpression("typeof", cloneNode(node.argument));
  65951. path.replaceWith(ConditionalExpression(BinaryExpression("===", unary, StringLiteral("undefined")), StringLiteral("undefined"), call));
  65952. } else {
  65953. path.replaceWith(call);
  65954. }
  65955. }
  65956. }
  65957. };
  65958. });
  65959. function transpileEnum(path, t) {
  65960. var node = path.node;
  65961. if (node.declare) {
  65962. path.remove();
  65963. return;
  65964. }
  65965. if (node["const"]) {
  65966. throw path.buildCodeFrameError("'const' enums are not supported.");
  65967. }
  65968. var name = node.id.name;
  65969. var fill = enumFill(path, t, node.id);
  65970. switch (path.parent.type) {
  65971. case "BlockStatement":
  65972. case "ExportNamedDeclaration":
  65973. case "Program":
  65974. {
  65975. path.insertAfter(fill);
  65976. if (seen(path.parentPath)) {
  65977. path.remove();
  65978. } else {
  65979. var isGlobal = t.isProgram(path.parent);
  65980. path.scope.registerDeclaration(path.replaceWith(makeVar(node.id, t, isGlobal ? "var" : "let"))[0]);
  65981. }
  65982. break;
  65983. }
  65984. default:
  65985. throw new Error("Unexpected enum parent '" + path.parent.type);
  65986. }
  65987. function seen(parentPath) {
  65988. if (parentPath.isExportDeclaration()) {
  65989. return seen(parentPath.parentPath);
  65990. }
  65991. if (parentPath.getData(name)) {
  65992. return true;
  65993. } else {
  65994. parentPath.setData(name, true);
  65995. return false;
  65996. }
  65997. }
  65998. }
  65999. function makeVar(id, t, kind) {
  66000. return t.variableDeclaration(kind, [t.variableDeclarator(id)]);
  66001. }
  66002. var buildEnumWrapper = template("\n (function (ID) {\n ASSIGNMENTS;\n })(ID || (ID = {}));\n");
  66003. var buildStringAssignment = template("\n ENUM[\"NAME\"] = VALUE;\n");
  66004. var buildNumericAssignment = template("\n ENUM[ENUM[\"NAME\"] = VALUE] = \"NAME\";\n");
  66005. var buildEnumMember = function buildEnumMember(isString, options) {
  66006. return (isString ? buildStringAssignment : buildNumericAssignment)(options);
  66007. };
  66008. function enumFill(path, t, id) {
  66009. var x = translateEnumValues(path, t);
  66010. var assignments = x.map(function (_ref) {
  66011. var memberName = _ref[0],
  66012. memberValue = _ref[1];
  66013. return buildEnumMember(t.isStringLiteral(memberValue), {
  66014. ENUM: t.cloneNode(id),
  66015. NAME: memberName,
  66016. VALUE: memberValue
  66017. });
  66018. });
  66019. return buildEnumWrapper({
  66020. ID: t.cloneNode(id),
  66021. ASSIGNMENTS: assignments
  66022. });
  66023. }
  66024. function translateEnumValues(path, t) {
  66025. var seen = Object.create(null);
  66026. var prev = -1;
  66027. return path.node.members.map(function (member) {
  66028. var name = t.isIdentifier(member.id) ? member.id.name : member.id.value;
  66029. var initializer = member.initializer;
  66030. var value;
  66031. if (initializer) {
  66032. var constValue = evaluate$1(initializer, seen);
  66033. if (constValue !== undefined) {
  66034. seen[name] = constValue;
  66035. if (typeof constValue === "number") {
  66036. value = t.numericLiteral(constValue);
  66037. prev = constValue;
  66038. } else {
  66039. assert$2(typeof constValue === "string");
  66040. value = t.stringLiteral(constValue);
  66041. prev = undefined;
  66042. }
  66043. } else {
  66044. value = initializer;
  66045. prev = undefined;
  66046. }
  66047. } else {
  66048. if (prev !== undefined) {
  66049. prev++;
  66050. value = t.numericLiteral(prev);
  66051. seen[name] = prev;
  66052. } else {
  66053. throw path.buildCodeFrameError("Enum member must have initializer.");
  66054. }
  66055. }
  66056. return [name, value];
  66057. });
  66058. }
  66059. function evaluate$1(expr, seen) {
  66060. return evalConstant(expr);
  66061. function evalConstant(expr) {
  66062. switch (expr.type) {
  66063. case "StringLiteral":
  66064. return expr.value;
  66065. case "UnaryExpression":
  66066. return evalUnaryExpression(expr);
  66067. case "BinaryExpression":
  66068. return evalBinaryExpression(expr);
  66069. case "NumericLiteral":
  66070. return expr.value;
  66071. case "ParenthesizedExpression":
  66072. return evalConstant(expr.expression);
  66073. case "Identifier":
  66074. return seen[expr.name];
  66075. case "TemplateLiteral":
  66076. if (expr.quasis.length === 1) {
  66077. return expr.quasis[0].value.cooked;
  66078. }
  66079. default:
  66080. return undefined;
  66081. }
  66082. }
  66083. function evalUnaryExpression(_ref2) {
  66084. var argument = _ref2.argument,
  66085. operator = _ref2.operator;
  66086. var value = evalConstant(argument);
  66087. if (value === undefined) {
  66088. return undefined;
  66089. }
  66090. switch (operator) {
  66091. case "+":
  66092. return value;
  66093. case "-":
  66094. return -value;
  66095. case "~":
  66096. return ~value;
  66097. default:
  66098. return undefined;
  66099. }
  66100. }
  66101. function evalBinaryExpression(expr) {
  66102. var left = evalConstant(expr.left);
  66103. if (left === undefined) {
  66104. return undefined;
  66105. }
  66106. var right = evalConstant(expr.right);
  66107. if (right === undefined) {
  66108. return undefined;
  66109. }
  66110. switch (expr.operator) {
  66111. case "|":
  66112. return left | right;
  66113. case "&":
  66114. return left & right;
  66115. case ">>":
  66116. return left >> right;
  66117. case ">>>":
  66118. return left >>> right;
  66119. case "<<":
  66120. return left << right;
  66121. case "^":
  66122. return left ^ right;
  66123. case "*":
  66124. return left * right;
  66125. case "/":
  66126. return left / right;
  66127. case "+":
  66128. return left + right;
  66129. case "-":
  66130. return left - right;
  66131. case "%":
  66132. return left % right;
  66133. default:
  66134. return undefined;
  66135. }
  66136. }
  66137. }
  66138. function _templateObject2$5() {
  66139. var data = _taggedTemplateLiteralLoose(["\n (function (", ") {\n ", "\n })(", " || (", " = ", "));\n "]);
  66140. _templateObject2$5 = function _templateObject2() {
  66141. return data;
  66142. };
  66143. return data;
  66144. }
  66145. function _templateObject$c() {
  66146. var data = _taggedTemplateLiteralLoose(["\n ", ".", " || (\n ", ".", " = ", "\n )\n "]);
  66147. _templateObject$c = function _templateObject() {
  66148. return data;
  66149. };
  66150. return data;
  66151. }
  66152. function transpileNamespace(path, t, allowNamespaces) {
  66153. if (path.node.declare || path.node.id.type === "StringLiteral") {
  66154. path.remove();
  66155. return;
  66156. }
  66157. if (!allowNamespaces) {
  66158. 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");
  66159. }
  66160. var name = path.node.id.name;
  66161. var value = handleNested(path, t, t.cloneDeep(path.node));
  66162. var bound = path.scope.hasOwnBinding(name);
  66163. if (path.parent.type === "ExportNamedDeclaration") {
  66164. if (!bound) {
  66165. path.parentPath.insertAfter(value);
  66166. path.replaceWith(getDeclaration(t, name));
  66167. path.scope.registerDeclaration(path.parentPath);
  66168. } else {
  66169. path.parentPath.replaceWith(value);
  66170. }
  66171. } else if (bound) {
  66172. path.replaceWith(value);
  66173. } else {
  66174. path.scope.registerDeclaration(path.replaceWithMultiple([getDeclaration(t, name), value])[0]);
  66175. }
  66176. }
  66177. function getDeclaration(t, name) {
  66178. return t.variableDeclaration("let", [t.variableDeclarator(t.identifier(name))]);
  66179. }
  66180. function getMemberExpression(t, name, itemName) {
  66181. return t.memberExpression(t.identifier(name), t.identifier(itemName));
  66182. }
  66183. function handleNested(path, t, node, parentExport) {
  66184. var names = new Set();
  66185. var realName = node.id;
  66186. var name = path.scope.generateUid(realName.name);
  66187. var namespaceTopLevel = node.body.body;
  66188. for (var i = 0; i < namespaceTopLevel.length; i++) {
  66189. var subNode = namespaceTopLevel[i];
  66190. switch (subNode.type) {
  66191. case "TSModuleDeclaration":
  66192. {
  66193. var transformed = handleNested(path, t, subNode);
  66194. var moduleName = subNode.id.name;
  66195. if (names.has(moduleName)) {
  66196. namespaceTopLevel[i] = transformed;
  66197. } else {
  66198. names.add(moduleName);
  66199. namespaceTopLevel.splice(i++, 1, getDeclaration(t, moduleName), transformed);
  66200. }
  66201. continue;
  66202. }
  66203. case "TSEnumDeclaration":
  66204. case "FunctionDeclaration":
  66205. case "ClassDeclaration":
  66206. names.add(subNode.id.name);
  66207. continue;
  66208. case "VariableDeclaration":
  66209. for (var _iterator = subNode.declarations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  66210. var _ref;
  66211. if (_isArray) {
  66212. if (_i >= _iterator.length) break;
  66213. _ref = _iterator[_i++];
  66214. } else {
  66215. _i = _iterator.next();
  66216. if (_i.done) break;
  66217. _ref = _i.value;
  66218. }
  66219. var variable = _ref;
  66220. names.add(variable.id.name);
  66221. }
  66222. continue;
  66223. default:
  66224. continue;
  66225. case "ExportNamedDeclaration":
  66226. }
  66227. switch (subNode.declaration.type) {
  66228. case "TSEnumDeclaration":
  66229. case "FunctionDeclaration":
  66230. case "ClassDeclaration":
  66231. {
  66232. var itemName = subNode.declaration.id.name;
  66233. names.add(itemName);
  66234. namespaceTopLevel.splice(i++, 1, subNode.declaration, t.expressionStatement(t.assignmentExpression("=", getMemberExpression(t, name, itemName), t.identifier(itemName))));
  66235. break;
  66236. }
  66237. case "VariableDeclaration":
  66238. if (subNode.declaration.kind !== "const") {
  66239. throw path.hub.file.buildCodeFrameError(subNode.declaration, "Namespaces exporting non-const are not supported by Babel." + " Change to const or see:" + " https://babeljs.io/docs/en/babel-plugin-transform-typescript");
  66240. }
  66241. for (var _iterator2 = subNode.declaration.declarations, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  66242. var _ref2;
  66243. if (_isArray2) {
  66244. if (_i2 >= _iterator2.length) break;
  66245. _ref2 = _iterator2[_i2++];
  66246. } else {
  66247. _i2 = _iterator2.next();
  66248. if (_i2.done) break;
  66249. _ref2 = _i2.value;
  66250. }
  66251. var _variable = _ref2;
  66252. _variable.init = t.assignmentExpression("=", getMemberExpression(t, name, _variable.id.name), _variable.init);
  66253. }
  66254. namespaceTopLevel[i] = subNode.declaration;
  66255. break;
  66256. case "TSModuleDeclaration":
  66257. {
  66258. var _transformed = handleNested(path, t, subNode.declaration, t.identifier(name));
  66259. var _moduleName = subNode.declaration.id.name;
  66260. if (names.has(_moduleName)) {
  66261. namespaceTopLevel[i] = _transformed;
  66262. } else {
  66263. names.add(_moduleName);
  66264. namespaceTopLevel.splice(i++, 1, getDeclaration(t, _moduleName), _transformed);
  66265. }
  66266. }
  66267. }
  66268. }
  66269. var fallthroughValue = t.objectExpression([]);
  66270. if (parentExport) {
  66271. fallthroughValue = template.expression.ast(_templateObject$c(), parentExport, realName, parentExport, realName, fallthroughValue);
  66272. }
  66273. return template.statement.ast(_templateObject2$5(), t.identifier(name), namespaceTopLevel, realName, realName, fallthroughValue);
  66274. }
  66275. function _templateObject$d() {
  66276. var data = _taggedTemplateLiteralLoose(["this.", " = ", ""]);
  66277. _templateObject$d = function _templateObject() {
  66278. return data;
  66279. };
  66280. return data;
  66281. }
  66282. function isInType(path) {
  66283. switch (path.parent.type) {
  66284. case "TSTypeReference":
  66285. case "TSQualifiedName":
  66286. case "TSExpressionWithTypeArguments":
  66287. case "TSTypeQuery":
  66288. return true;
  66289. default:
  66290. return false;
  66291. }
  66292. }
  66293. var PARSED_PARAMS = new WeakSet();
  66294. var GLOBAL_TYPES = new WeakMap();
  66295. function isGlobalType(path, name) {
  66296. var program = path.find(function (path) {
  66297. return path.isProgram();
  66298. }).node;
  66299. if (path.scope.hasOwnBinding(name)) return false;
  66300. if (GLOBAL_TYPES.get(program).has(name)) return true;
  66301. 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)\".");
  66302. return false;
  66303. }
  66304. function registerGlobalType(programScope, name) {
  66305. GLOBAL_TYPES.get(programScope.path.node).add(name);
  66306. }
  66307. var transformTypeScript = declare(function (api, _ref) {
  66308. var _ref$jsxPragma = _ref.jsxPragma,
  66309. jsxPragma = _ref$jsxPragma === void 0 ? "React" : _ref$jsxPragma,
  66310. _ref$allowNamespaces = _ref.allowNamespaces,
  66311. allowNamespaces = _ref$allowNamespaces === void 0 ? false : _ref$allowNamespaces,
  66312. _ref$allowDeclareFiel = _ref.allowDeclareFields,
  66313. allowDeclareFields = _ref$allowDeclareFiel === void 0 ? false : _ref$allowDeclareFiel;
  66314. api.assertVersion(7);
  66315. var JSX_ANNOTATION_REGEX = /\*?\s*@jsx\s+([^\s]+)/;
  66316. var classMemberVisitors = {
  66317. field: function field(path) {
  66318. var node = path.node;
  66319. if (!allowDeclareFields && node.declare) {
  66320. throw path.buildCodeFrameError("The 'declare' modifier is only allowed when the 'allowDeclareFields' option of " + "@babel/plugin-transform-typescript or @babel/preset-typescript is enabled.");
  66321. }
  66322. if (node.definite || node.declare) {
  66323. if (node.value) {
  66324. throw path.buildCodeFrameError("Definietly assigned fields and fields with the 'declare' modifier cannot" + " be initialized here, but only in the constructor");
  66325. }
  66326. path.remove();
  66327. } else if (!allowDeclareFields && !node.value && !node.decorators) {
  66328. path.remove();
  66329. }
  66330. if (node.accessibility) node.accessibility = null;
  66331. if (node["abstract"]) node["abstract"] = null;
  66332. if (node.readonly) node.readonly = null;
  66333. if (node.optional) node.optional = null;
  66334. if (node.typeAnnotation) node.typeAnnotation = null;
  66335. },
  66336. method: function method(_ref2) {
  66337. var node = _ref2.node;
  66338. if (node.accessibility) node.accessibility = null;
  66339. if (node["abstract"]) node["abstract"] = null;
  66340. if (node.optional) node.optional = null;
  66341. },
  66342. constructor: function constructor(path, classPath) {
  66343. if (path.node.accessibility) path.node.accessibility = null;
  66344. var parameterProperties = [];
  66345. for (var _iterator = path.node.params, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  66346. var _ref3;
  66347. if (_isArray) {
  66348. if (_i >= _iterator.length) break;
  66349. _ref3 = _iterator[_i++];
  66350. } else {
  66351. _i = _iterator.next();
  66352. if (_i.done) break;
  66353. _ref3 = _i.value;
  66354. }
  66355. var param = _ref3;
  66356. if (param.type === "TSParameterProperty" && !PARSED_PARAMS.has(param.parameter)) {
  66357. PARSED_PARAMS.add(param.parameter);
  66358. parameterProperties.push(param.parameter);
  66359. }
  66360. }
  66361. if (parameterProperties.length) {
  66362. var assigns = parameterProperties.map(function (p) {
  66363. var id;
  66364. if (isIdentifier(p)) {
  66365. id = p;
  66366. } else if (isAssignmentPattern(p) && isIdentifier(p.left)) {
  66367. id = p.left;
  66368. } else {
  66369. throw path.buildCodeFrameError("Parameter properties can not be destructuring patterns.");
  66370. }
  66371. return template.statement.ast(_templateObject$d(), id, id);
  66372. });
  66373. injectInitialization(classPath, path, assigns);
  66374. }
  66375. }
  66376. };
  66377. return {
  66378. name: "transform-typescript",
  66379. inherits: syntaxTypescript,
  66380. visitor: {
  66381. Pattern: visitPattern,
  66382. Identifier: visitPattern,
  66383. RestElement: visitPattern,
  66384. Program: function Program(path, state) {
  66385. var file = state.file;
  66386. var fileJsxPragma = null;
  66387. if (!GLOBAL_TYPES.has(path.node)) {
  66388. GLOBAL_TYPES.set(path.node, new Set());
  66389. }
  66390. if (file.ast.comments) {
  66391. for (var _i2 = 0, _arr = file.ast.comments; _i2 < _arr.length; _i2++) {
  66392. var comment = _arr[_i2];
  66393. var jsxMatches = JSX_ANNOTATION_REGEX.exec(comment.value);
  66394. if (jsxMatches) {
  66395. fileJsxPragma = jsxMatches[1];
  66396. }
  66397. }
  66398. }
  66399. for (var _iterator2 = path.get("body"), _isArray2 = Array.isArray(_iterator2), _i3 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  66400. var _ref4;
  66401. if (_isArray2) {
  66402. if (_i3 >= _iterator2.length) break;
  66403. _ref4 = _iterator2[_i3++];
  66404. } else {
  66405. _i3 = _iterator2.next();
  66406. if (_i3.done) break;
  66407. _ref4 = _i3.value;
  66408. }
  66409. var stmt = _ref4;
  66410. if (isImportDeclaration(stmt)) {
  66411. if (stmt.node.specifiers.length === 0) {
  66412. continue;
  66413. }
  66414. var allElided = true;
  66415. var importsToRemove = [];
  66416. for (var _iterator3 = stmt.node.specifiers, _isArray3 = Array.isArray(_iterator3), _i4 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
  66417. var _ref5;
  66418. if (_isArray3) {
  66419. if (_i4 >= _iterator3.length) break;
  66420. _ref5 = _iterator3[_i4++];
  66421. } else {
  66422. _i4 = _iterator3.next();
  66423. if (_i4.done) break;
  66424. _ref5 = _i4.value;
  66425. }
  66426. var specifier = _ref5;
  66427. var binding = stmt.scope.getBinding(specifier.local.name);
  66428. if (binding && isImportTypeOnly({
  66429. binding: binding,
  66430. programPath: path,
  66431. jsxPragma: fileJsxPragma || jsxPragma
  66432. })) {
  66433. importsToRemove.push(binding.path);
  66434. } else {
  66435. allElided = false;
  66436. }
  66437. }
  66438. if (allElided) {
  66439. stmt.remove();
  66440. } else {
  66441. for (var _iterator4 = importsToRemove, _isArray4 = Array.isArray(_iterator4), _i5 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
  66442. var _ref6;
  66443. if (_isArray4) {
  66444. if (_i5 >= _iterator4.length) break;
  66445. _ref6 = _iterator4[_i5++];
  66446. } else {
  66447. _i5 = _iterator4.next();
  66448. if (_i5.done) break;
  66449. _ref6 = _i5.value;
  66450. }
  66451. var importPath = _ref6;
  66452. importPath.remove();
  66453. }
  66454. }
  66455. continue;
  66456. }
  66457. if (stmt.isExportDeclaration()) {
  66458. stmt = stmt.get("declaration");
  66459. }
  66460. if (stmt.isVariableDeclaration({
  66461. declare: true
  66462. })) {
  66463. for (var _i6 = 0, _Object$keys = Object.keys(stmt.getBindingIdentifiers()); _i6 < _Object$keys.length; _i6++) {
  66464. var name = _Object$keys[_i6];
  66465. registerGlobalType(path.scope, name);
  66466. }
  66467. } else if (stmt.isTSTypeAliasDeclaration() || stmt.isTSDeclareFunction() || stmt.isTSInterfaceDeclaration() || stmt.isClassDeclaration({
  66468. declare: true
  66469. }) || stmt.isTSEnumDeclaration({
  66470. declare: true
  66471. }) || stmt.isTSModuleDeclaration({
  66472. declare: true
  66473. }) && stmt.get("id").isIdentifier()) {
  66474. registerGlobalType(path.scope, stmt.node.id.name);
  66475. }
  66476. }
  66477. },
  66478. ExportNamedDeclaration: function ExportNamedDeclaration(path) {
  66479. if (!path.node.source && path.node.specifiers.length > 0 && path.node.specifiers.every(function (_ref7) {
  66480. var local = _ref7.local;
  66481. return isGlobalType(path, local.name);
  66482. })) {
  66483. path.remove();
  66484. }
  66485. },
  66486. ExportSpecifier: function ExportSpecifier(path) {
  66487. if (!path.parent.source && isGlobalType(path, path.node.local.name)) {
  66488. path.remove();
  66489. }
  66490. },
  66491. ExportDefaultDeclaration: function ExportDefaultDeclaration(path) {
  66492. if (isIdentifier(path.node.declaration) && isGlobalType(path, path.node.declaration.name)) {
  66493. path.remove();
  66494. }
  66495. },
  66496. TSDeclareFunction: function TSDeclareFunction(path) {
  66497. path.remove();
  66498. },
  66499. TSDeclareMethod: function TSDeclareMethod(path) {
  66500. path.remove();
  66501. },
  66502. VariableDeclaration: function VariableDeclaration(path) {
  66503. if (path.node.declare) {
  66504. path.remove();
  66505. }
  66506. },
  66507. VariableDeclarator: function VariableDeclarator(_ref8) {
  66508. var node = _ref8.node;
  66509. if (node.definite) node.definite = null;
  66510. },
  66511. TSIndexSignature: function TSIndexSignature(path) {
  66512. path.remove();
  66513. },
  66514. ClassDeclaration: function ClassDeclaration(path) {
  66515. var node = path.node;
  66516. if (node.declare) {
  66517. path.remove();
  66518. return;
  66519. }
  66520. },
  66521. Class: function Class(path) {
  66522. var node = path.node;
  66523. if (node.typeParameters) node.typeParameters = null;
  66524. if (node.superTypeParameters) node.superTypeParameters = null;
  66525. if (node["implements"]) node["implements"] = null;
  66526. if (node["abstract"]) node["abstract"] = null;
  66527. path.get("body.body").forEach(function (child) {
  66528. if (child.isClassMethod()) {
  66529. if (child.node.kind === "constructor") {
  66530. classMemberVisitors.constructor(child, path);
  66531. } else {
  66532. classMemberVisitors.method(child, path);
  66533. }
  66534. } else if (child.isClassProperty()) {
  66535. classMemberVisitors.field(child, path);
  66536. }
  66537. });
  66538. },
  66539. Function: function Function(_ref9) {
  66540. var node = _ref9.node;
  66541. if (node.typeParameters) node.typeParameters = null;
  66542. if (node.returnType) node.returnType = null;
  66543. var p0 = node.params[0];
  66544. if (p0 && isIdentifier(p0) && p0.name === "this") {
  66545. node.params.shift();
  66546. }
  66547. node.params = node.params.map(function (p) {
  66548. return p.type === "TSParameterProperty" ? p.parameter : p;
  66549. });
  66550. },
  66551. TSModuleDeclaration: function TSModuleDeclaration(path) {
  66552. transpileNamespace(path, t, allowNamespaces);
  66553. },
  66554. TSInterfaceDeclaration: function TSInterfaceDeclaration(path) {
  66555. path.remove();
  66556. },
  66557. TSTypeAliasDeclaration: function TSTypeAliasDeclaration(path) {
  66558. path.remove();
  66559. },
  66560. TSEnumDeclaration: function TSEnumDeclaration(path) {
  66561. transpileEnum(path, t);
  66562. },
  66563. TSImportEqualsDeclaration: function TSImportEqualsDeclaration(path) {
  66564. 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.");
  66565. },
  66566. TSExportAssignment: function TSExportAssignment(path) {
  66567. throw path.buildCodeFrameError("`export =` is not supported by @babel/plugin-transform-typescript\n" + "Please consider using `export <value>;`.");
  66568. },
  66569. TSTypeAssertion: function TSTypeAssertion(path) {
  66570. path.replaceWith(path.node.expression);
  66571. },
  66572. TSAsExpression: function TSAsExpression(path) {
  66573. var node = path.node;
  66574. do {
  66575. node = node.expression;
  66576. } while (isTSAsExpression(node));
  66577. path.replaceWith(node);
  66578. },
  66579. TSNonNullExpression: function TSNonNullExpression(path) {
  66580. path.replaceWith(path.node.expression);
  66581. },
  66582. CallExpression: function CallExpression(path) {
  66583. path.node.typeParameters = null;
  66584. },
  66585. NewExpression: function NewExpression(path) {
  66586. path.node.typeParameters = null;
  66587. },
  66588. JSXOpeningElement: function JSXOpeningElement(path) {
  66589. path.node.typeParameters = null;
  66590. },
  66591. TaggedTemplateExpression: function TaggedTemplateExpression(path) {
  66592. path.node.typeParameters = null;
  66593. }
  66594. }
  66595. };
  66596. function visitPattern(_ref10) {
  66597. var node = _ref10.node;
  66598. if (node.typeAnnotation) node.typeAnnotation = null;
  66599. if (isIdentifier(node) && node.optional) node.optional = null;
  66600. }
  66601. function isImportTypeOnly(_ref11) {
  66602. var binding = _ref11.binding,
  66603. programPath = _ref11.programPath,
  66604. jsxPragma = _ref11.jsxPragma;
  66605. for (var _iterator5 = binding.referencePaths, _isArray5 = Array.isArray(_iterator5), _i7 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) {
  66606. var _ref12;
  66607. if (_isArray5) {
  66608. if (_i7 >= _iterator5.length) break;
  66609. _ref12 = _iterator5[_i7++];
  66610. } else {
  66611. _i7 = _iterator5.next();
  66612. if (_i7.done) break;
  66613. _ref12 = _i7.value;
  66614. }
  66615. var path = _ref12;
  66616. if (!isInType(path)) {
  66617. return false;
  66618. }
  66619. }
  66620. if (binding.identifier.name !== jsxPragma) {
  66621. return true;
  66622. }
  66623. var sourceFileHasJsx = false;
  66624. programPath.traverse({
  66625. JSXElement: function JSXElement() {
  66626. sourceFileHasJsx = true;
  66627. },
  66628. JSXFragment: function JSXFragment() {
  66629. sourceFileHasJsx = true;
  66630. }
  66631. });
  66632. return !sourceFileHasJsx;
  66633. }
  66634. });
  66635. var transformUnicodeRegex = declare(function (api) {
  66636. api.assertVersion(7);
  66637. return createRegExpFeaturePlugin({
  66638. name: "transform-unicode-regex",
  66639. feature: "unicodeFlag"
  66640. });
  66641. });
  66642. var all = {
  66643. "external-helpers": externalHelpers,
  66644. "syntax-async-generators": syntaxAsyncGenerators,
  66645. "syntax-class-properties": syntaxClassProperties,
  66646. "syntax-decorators": syntaxDecorators,
  66647. "syntax-do-expressions": syntaxDoExpressions,
  66648. "syntax-dynamic-import": syntaxDynamicImport,
  66649. "syntax-export-default-from": syntaxExportDefaultFrom,
  66650. "syntax-export-namespace-from": syntaxExportNamespaceFrom,
  66651. "syntax-flow": syntaxFlow,
  66652. "syntax-function-bind": syntaxFunctionBind,
  66653. "syntax-function-sent": syntaxFunctionSent,
  66654. "syntax-import-meta": syntaxImportMeta,
  66655. "syntax-jsx": syntaxJsx,
  66656. "syntax-object-rest-spread": syntaxObjectRestSpread,
  66657. "syntax-optional-catch-binding": syntaxOptionalCatchBinding,
  66658. "syntax-pipeline-operator": syntaxPipelineOperator,
  66659. "syntax-top-level-await": syntaxTopLevelAwait,
  66660. "syntax-typescript": syntaxTypescript,
  66661. "proposal-async-generator-functions": proposalAsyncGeneratorFunctions,
  66662. "proposal-class-properties": proposalClassProperties,
  66663. "proposal-decorators": proposalDecorators,
  66664. "proposal-do-expressions": proposalDoExpressions,
  66665. "proposal-dynamic-import": proposalDynamicImport,
  66666. "proposal-export-default-from": proposalExportDefaultFrom,
  66667. "proposal-export-namespace-from": proposalExportNamespaceFrom,
  66668. "proposal-function-bind": proposalFunctionBind,
  66669. "proposal-function-sent": proposalFunctionSent,
  66670. "proposal-json-strings": proposalJsonStrings,
  66671. "proposal-logical-assignment-operators": proposalLogicalAssignmentOperators,
  66672. "proposal-nullish-coalescing-operator": proposalNullishCoalescingOperator,
  66673. "proposal-numeric-separator": proposalNumericSeparator,
  66674. "proposal-object-rest-spread": proposalObjectRestSpread,
  66675. "proposal-optional-catch-binding": proposalOptionalCatchBinding,
  66676. "proposal-optional-chaining": proposalOptionalChaining,
  66677. "proposal-pipeline-operator": proposalPipelineOperator,
  66678. "proposal-private-methods": proposalPrivateMethods,
  66679. "proposal-throw-expressions": proposalThrowExpressions,
  66680. "proposal-unicode-property-regex": proposalUnicodePropertyRegex,
  66681. "transform-async-to-generator": transformAsyncToGenerator,
  66682. "transform-arrow-functions": transformArrowFunctions,
  66683. "transform-block-scoped-functions": transformBlockScopedFunctions,
  66684. "transform-block-scoping": transformBlockScoping,
  66685. "transform-classes": transformClasses,
  66686. "transform-computed-properties": transformComputedProperties,
  66687. "transform-destructuring": transformDestructuring,
  66688. "transform-dotall-regex": transformDotallRegex,
  66689. "transform-duplicate-keys": transformDuplicateKeys,
  66690. "transform-exponentiation-operator": transformExponentialOperator,
  66691. "transform-flow-comments": transformFlowComments,
  66692. "transform-flow-strip-types": transformFlowStripTypes,
  66693. "transform-for-of": transformForOf,
  66694. "transform-function-name": transformFunctionName,
  66695. "transform-instanceof": transformInstanceof,
  66696. "transform-jscript": transformJscript,
  66697. "transform-literals": transformLiterals,
  66698. "transform-member-expression-literals": transformMemberExpressionLiterals,
  66699. "transform-modules-amd": transformModulesAmd,
  66700. "transform-modules-commonjs": transformModulesCommonjs,
  66701. "transform-modules-systemjs": transformModulesSystemjs,
  66702. "transform-modules-umd": transformModulesUmd,
  66703. "transform-named-capturing-groups-regex": transformNamedCapturingGroupsRegex,
  66704. "transform-new-target": transformNewTarget,
  66705. "transform-object-assign": transformObjectAssign,
  66706. "transform-object-super": transformObjectSuper,
  66707. "transform-object-set-prototype-of-to-assign": transformObjectSetPrototypeOfToAssign,
  66708. "transform-parameters": transformParameters,
  66709. "transform-property-literals": transformPropertyLiterals,
  66710. "transform-property-mutators": transformPropertyMutators,
  66711. "transform-proto-to-assign": transformProtoToAssign,
  66712. "transform-react-constant-elements": transformReactConstantElements,
  66713. "transform-react-display-name": transformReactDisplayName,
  66714. "transform-react-inline-elements": transformReactInlineElements,
  66715. "transform-react-jsx": transformReactJSX,
  66716. "transform-react-jsx-compat": transformReactJsxCompat,
  66717. "transform-react-jsx-self": transformReactJSXSelf,
  66718. "transform-react-jsx-source": transformReactJSXSource,
  66719. "transform-regenerator": transformRegenerator,
  66720. "transform-reserved-words": transformReservedWords,
  66721. "transform-runtime": transformRuntime,
  66722. "transform-shorthand-properties": transformShorthandProperties,
  66723. "transform-spread": transformSpread,
  66724. "transform-sticky-regex": transformStickyRegex,
  66725. "transform-strict-mode": transformStrictMode,
  66726. "transform-template-literals": transformTemplateLiterals,
  66727. "transform-typeof-symbol": transformTypeofSymbol,
  66728. "transform-typescript": transformTypeScript,
  66729. "transform-unicode-regex": transformUnicodeRegex
  66730. };
  66731. var preset2015 = (function (_, opts) {
  66732. var loose = false;
  66733. var modules = "commonjs";
  66734. var spec = false;
  66735. if (opts !== undefined) {
  66736. if (opts.loose !== undefined) loose = opts.loose;
  66737. if (opts.modules !== undefined) modules = opts.modules;
  66738. if (opts.spec !== undefined) spec = opts.spec;
  66739. }
  66740. var optsLoose = {
  66741. loose: loose
  66742. };
  66743. return {
  66744. plugins: [[transformTemplateLiterals, {
  66745. loose: loose,
  66746. spec: spec
  66747. }], transformLiterals, transformFunctionName, [transformArrowFunctions, {
  66748. spec: spec
  66749. }], transformBlockScopedFunctions, [transformClasses, optsLoose], transformObjectSuper, transformShorthandProperties, transformDuplicateKeys, [transformComputedProperties, optsLoose], [transformForOf, optsLoose], transformStickyRegex, 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, {
  66750. async: false,
  66751. asyncGenerators: false
  66752. }]].filter(Boolean)
  66753. };
  66754. });
  66755. var presetStage3 = (function (_, opts) {
  66756. var loose = false;
  66757. if (opts !== undefined) {
  66758. if (opts.loose !== undefined) loose = opts.loose;
  66759. }
  66760. return {
  66761. plugins: [syntaxDynamicImport, syntaxImportMeta, [proposalOptionalChaining, {
  66762. loose: loose
  66763. }], [proposalNullishCoalescingOperator, {
  66764. loose: loose
  66765. }], [proposalClassProperties, {
  66766. loose: loose
  66767. }], proposalJsonStrings, [proposalPrivateMethods, {
  66768. loose: loose
  66769. }]]
  66770. };
  66771. });
  66772. var presetStage2 = (function (_, opts) {
  66773. if (opts === void 0) {
  66774. opts = {};
  66775. }
  66776. var _opts = opts,
  66777. _opts$loose = _opts.loose,
  66778. loose = _opts$loose === void 0 ? false : _opts$loose,
  66779. _opts$useBuiltIns = _opts.useBuiltIns,
  66780. useBuiltIns = _opts$useBuiltIns === void 0 ? false : _opts$useBuiltIns,
  66781. _opts$decoratorsLegac = _opts.decoratorsLegacy,
  66782. decoratorsLegacy = _opts$decoratorsLegac === void 0 ? false : _opts$decoratorsLegac,
  66783. decoratorsBeforeExport = _opts.decoratorsBeforeExport;
  66784. return {
  66785. presets: [[presetStage3, {
  66786. loose: loose,
  66787. useBuiltIns: useBuiltIns
  66788. }]],
  66789. plugins: [[proposalDecorators, {
  66790. legacy: decoratorsLegacy,
  66791. decoratorsBeforeExport: decoratorsBeforeExport
  66792. }], proposalFunctionSent, proposalExportNamespaceFrom, proposalNumericSeparator, proposalThrowExpressions]
  66793. };
  66794. });
  66795. var presetStage1 = (function (_, opts) {
  66796. if (opts === void 0) {
  66797. opts = {};
  66798. }
  66799. var _opts = opts,
  66800. _opts$loose = _opts.loose,
  66801. loose = _opts$loose === void 0 ? false : _opts$loose,
  66802. _opts$useBuiltIns = _opts.useBuiltIns,
  66803. useBuiltIns = _opts$useBuiltIns === void 0 ? false : _opts$useBuiltIns,
  66804. _opts$decoratorsLegac = _opts.decoratorsLegacy,
  66805. decoratorsLegacy = _opts$decoratorsLegac === void 0 ? false : _opts$decoratorsLegac,
  66806. decoratorsBeforeExport = _opts.decoratorsBeforeExport,
  66807. _opts$pipelineProposa = _opts.pipelineProposal,
  66808. pipelineProposal = _opts$pipelineProposa === void 0 ? "minimal" : _opts$pipelineProposa;
  66809. return {
  66810. presets: [[presetStage2, {
  66811. loose: loose,
  66812. useBuiltIns: useBuiltIns,
  66813. decoratorsLegacy: decoratorsLegacy,
  66814. decoratorsBeforeExport: decoratorsBeforeExport
  66815. }]],
  66816. plugins: [proposalExportDefaultFrom, proposalLogicalAssignmentOperators, [proposalPipelineOperator, {
  66817. proposal: pipelineProposal
  66818. }], proposalDoExpressions]
  66819. };
  66820. });
  66821. var presetStage0 = (function (_, opts) {
  66822. if (opts === void 0) {
  66823. opts = {};
  66824. }
  66825. var _opts = opts,
  66826. _opts$loose = _opts.loose,
  66827. loose = _opts$loose === void 0 ? false : _opts$loose,
  66828. _opts$useBuiltIns = _opts.useBuiltIns,
  66829. useBuiltIns = _opts$useBuiltIns === void 0 ? false : _opts$useBuiltIns,
  66830. _opts$decoratorsLegac = _opts.decoratorsLegacy,
  66831. decoratorsLegacy = _opts$decoratorsLegac === void 0 ? false : _opts$decoratorsLegac,
  66832. decoratorsBeforeExport = _opts.decoratorsBeforeExport,
  66833. _opts$pipelineProposa = _opts.pipelineProposal,
  66834. pipelineProposal = _opts$pipelineProposa === void 0 ? "minimal" : _opts$pipelineProposa;
  66835. return {
  66836. presets: [[presetStage1, {
  66837. loose: loose,
  66838. useBuiltIns: useBuiltIns,
  66839. decoratorsLegacy: decoratorsLegacy,
  66840. decoratorsBeforeExport: decoratorsBeforeExport,
  66841. pipelineProposal: pipelineProposal
  66842. }]],
  66843. plugins: [proposalFunctionBind]
  66844. };
  66845. });
  66846. var envs = [
  66847. {
  66848. name: "nodejs",
  66849. version: "0.2.0",
  66850. date: "2011-08-26",
  66851. lts: false,
  66852. security: false
  66853. },
  66854. {
  66855. name: "nodejs",
  66856. version: "0.3.0",
  66857. date: "2011-08-26",
  66858. lts: false,
  66859. security: false
  66860. },
  66861. {
  66862. name: "nodejs",
  66863. version: "0.4.0",
  66864. date: "2011-08-26",
  66865. lts: false,
  66866. security: false
  66867. },
  66868. {
  66869. name: "nodejs",
  66870. version: "0.5.0",
  66871. date: "2011-08-26",
  66872. lts: false,
  66873. security: false
  66874. },
  66875. {
  66876. name: "nodejs",
  66877. version: "0.6.0",
  66878. date: "2011-11-04",
  66879. lts: false,
  66880. security: false
  66881. },
  66882. {
  66883. name: "nodejs",
  66884. version: "0.7.0",
  66885. date: "2012-01-17",
  66886. lts: false,
  66887. security: false
  66888. },
  66889. {
  66890. name: "nodejs",
  66891. version: "0.8.0",
  66892. date: "2012-06-22",
  66893. lts: false,
  66894. security: false
  66895. },
  66896. {
  66897. name: "nodejs",
  66898. version: "0.9.0",
  66899. date: "2012-07-20",
  66900. lts: false,
  66901. security: false
  66902. },
  66903. {
  66904. name: "nodejs",
  66905. version: "0.10.0",
  66906. date: "2013-03-11",
  66907. lts: false,
  66908. security: false
  66909. },
  66910. {
  66911. name: "nodejs",
  66912. version: "0.11.0",
  66913. date: "2013-03-28",
  66914. lts: false,
  66915. security: false
  66916. },
  66917. {
  66918. name: "nodejs",
  66919. version: "0.12.0",
  66920. date: "2015-02-06",
  66921. lts: false,
  66922. security: false
  66923. },
  66924. {
  66925. name: "iojs",
  66926. version: "1.0.0",
  66927. date: "2015-01-14"
  66928. },
  66929. {
  66930. name: "iojs",
  66931. version: "1.1.0",
  66932. date: "2015-02-03"
  66933. },
  66934. {
  66935. name: "iojs",
  66936. version: "1.2.0",
  66937. date: "2015-02-11"
  66938. },
  66939. {
  66940. name: "iojs",
  66941. version: "1.3.0",
  66942. date: "2015-02-20"
  66943. },
  66944. {
  66945. name: "iojs",
  66946. version: "1.5.0",
  66947. date: "2015-03-06"
  66948. },
  66949. {
  66950. name: "iojs",
  66951. version: "1.6.0",
  66952. date: "2015-03-20"
  66953. },
  66954. {
  66955. name: "iojs",
  66956. version: "2.0.0",
  66957. date: "2015-05-04"
  66958. },
  66959. {
  66960. name: "iojs",
  66961. version: "2.1.0",
  66962. date: "2015-05-24"
  66963. },
  66964. {
  66965. name: "iojs",
  66966. version: "2.2.0",
  66967. date: "2015-06-01"
  66968. },
  66969. {
  66970. name: "iojs",
  66971. version: "2.3.0",
  66972. date: "2015-06-13"
  66973. },
  66974. {
  66975. name: "iojs",
  66976. version: "2.4.0",
  66977. date: "2015-07-17"
  66978. },
  66979. {
  66980. name: "iojs",
  66981. version: "2.5.0",
  66982. date: "2015-07-28"
  66983. },
  66984. {
  66985. name: "iojs",
  66986. version: "3.0.0",
  66987. date: "2015-08-04"
  66988. },
  66989. {
  66990. name: "iojs",
  66991. version: "3.1.0",
  66992. date: "2015-08-19"
  66993. },
  66994. {
  66995. name: "iojs",
  66996. version: "3.2.0",
  66997. date: "2015-08-25"
  66998. },
  66999. {
  67000. name: "iojs",
  67001. version: "3.3.0",
  67002. date: "2015-09-02"
  67003. },
  67004. {
  67005. name: "nodejs",
  67006. version: "4.0.0",
  67007. date: "2015-09-08",
  67008. lts: false,
  67009. security: false
  67010. },
  67011. {
  67012. name: "nodejs",
  67013. version: "4.1.0",
  67014. date: "2015-09-17",
  67015. lts: false,
  67016. security: false
  67017. },
  67018. {
  67019. name: "nodejs",
  67020. version: "4.2.0",
  67021. date: "2015-10-12",
  67022. lts: "Argon",
  67023. security: false
  67024. },
  67025. {
  67026. name: "nodejs",
  67027. version: "4.3.0",
  67028. date: "2016-02-09",
  67029. lts: "Argon",
  67030. security: false
  67031. },
  67032. {
  67033. name: "nodejs",
  67034. version: "4.4.0",
  67035. date: "2016-03-08",
  67036. lts: "Argon",
  67037. security: false
  67038. },
  67039. {
  67040. name: "nodejs",
  67041. version: "4.5.0",
  67042. date: "2016-08-16",
  67043. lts: "Argon",
  67044. security: false
  67045. },
  67046. {
  67047. name: "nodejs",
  67048. version: "4.6.0",
  67049. date: "2016-09-27",
  67050. lts: "Argon",
  67051. security: true
  67052. },
  67053. {
  67054. name: "nodejs",
  67055. version: "4.7.0",
  67056. date: "2016-12-06",
  67057. lts: "Argon",
  67058. security: false
  67059. },
  67060. {
  67061. name: "nodejs",
  67062. version: "4.8.0",
  67063. date: "2017-02-21",
  67064. lts: "Argon",
  67065. security: false
  67066. },
  67067. {
  67068. name: "nodejs",
  67069. version: "4.9.0",
  67070. date: "2018-03-28",
  67071. lts: "Argon",
  67072. security: true
  67073. },
  67074. {
  67075. name: "nodejs",
  67076. version: "5.0.0",
  67077. date: "2015-10-29",
  67078. lts: false,
  67079. security: false
  67080. },
  67081. {
  67082. name: "nodejs",
  67083. version: "5.1.0",
  67084. date: "2015-11-17",
  67085. lts: false,
  67086. security: false
  67087. },
  67088. {
  67089. name: "nodejs",
  67090. version: "5.2.0",
  67091. date: "2015-12-09",
  67092. lts: false,
  67093. security: false
  67094. },
  67095. {
  67096. name: "nodejs",
  67097. version: "5.3.0",
  67098. date: "2015-12-15",
  67099. lts: false,
  67100. security: false
  67101. },
  67102. {
  67103. name: "nodejs",
  67104. version: "5.4.0",
  67105. date: "2016-01-06",
  67106. lts: false,
  67107. security: false
  67108. },
  67109. {
  67110. name: "nodejs",
  67111. version: "5.5.0",
  67112. date: "2016-01-21",
  67113. lts: false,
  67114. security: false
  67115. },
  67116. {
  67117. name: "nodejs",
  67118. version: "5.6.0",
  67119. date: "2016-02-09",
  67120. lts: false,
  67121. security: false
  67122. },
  67123. {
  67124. name: "nodejs",
  67125. version: "5.7.0",
  67126. date: "2016-02-23",
  67127. lts: false,
  67128. security: false
  67129. },
  67130. {
  67131. name: "nodejs",
  67132. version: "5.8.0",
  67133. date: "2016-03-09",
  67134. lts: false,
  67135. security: false
  67136. },
  67137. {
  67138. name: "nodejs",
  67139. version: "5.9.0",
  67140. date: "2016-03-16",
  67141. lts: false,
  67142. security: false
  67143. },
  67144. {
  67145. name: "nodejs",
  67146. version: "5.10.0",
  67147. date: "2016-04-01",
  67148. lts: false,
  67149. security: false
  67150. },
  67151. {
  67152. name: "nodejs",
  67153. version: "5.11.0",
  67154. date: "2016-04-21",
  67155. lts: false,
  67156. security: false
  67157. },
  67158. {
  67159. name: "nodejs",
  67160. version: "5.12.0",
  67161. date: "2016-06-23",
  67162. lts: false,
  67163. security: false
  67164. },
  67165. {
  67166. name: "nodejs",
  67167. version: "6.0.0",
  67168. date: "2016-04-26",
  67169. lts: false,
  67170. security: false
  67171. },
  67172. {
  67173. name: "nodejs",
  67174. version: "6.1.0",
  67175. date: "2016-05-05",
  67176. lts: false,
  67177. security: false
  67178. },
  67179. {
  67180. name: "nodejs",
  67181. version: "6.2.0",
  67182. date: "2016-05-17",
  67183. lts: false,
  67184. security: false
  67185. },
  67186. {
  67187. name: "nodejs",
  67188. version: "6.3.0",
  67189. date: "2016-07-06",
  67190. lts: false,
  67191. security: false
  67192. },
  67193. {
  67194. name: "nodejs",
  67195. version: "6.4.0",
  67196. date: "2016-08-12",
  67197. lts: false,
  67198. security: false
  67199. },
  67200. {
  67201. name: "nodejs",
  67202. version: "6.5.0",
  67203. date: "2016-08-26",
  67204. lts: false,
  67205. security: false
  67206. },
  67207. {
  67208. name: "nodejs",
  67209. version: "6.6.0",
  67210. date: "2016-09-14",
  67211. lts: false,
  67212. security: false
  67213. },
  67214. {
  67215. name: "nodejs",
  67216. version: "6.7.0",
  67217. date: "2016-09-27",
  67218. lts: false,
  67219. security: true
  67220. },
  67221. {
  67222. name: "nodejs",
  67223. version: "6.8.0",
  67224. date: "2016-10-12",
  67225. lts: false,
  67226. security: false
  67227. },
  67228. {
  67229. name: "nodejs",
  67230. version: "6.9.0",
  67231. date: "2016-10-18",
  67232. lts: "Boron",
  67233. security: false
  67234. },
  67235. {
  67236. name: "nodejs",
  67237. version: "6.10.0",
  67238. date: "2017-02-21",
  67239. lts: "Boron",
  67240. security: false
  67241. },
  67242. {
  67243. name: "nodejs",
  67244. version: "6.11.0",
  67245. date: "2017-06-06",
  67246. lts: "Boron",
  67247. security: false
  67248. },
  67249. {
  67250. name: "nodejs",
  67251. version: "6.12.0",
  67252. date: "2017-11-06",
  67253. lts: "Boron",
  67254. security: false
  67255. },
  67256. {
  67257. name: "nodejs",
  67258. version: "6.13.0",
  67259. date: "2018-02-10",
  67260. lts: "Boron",
  67261. security: false
  67262. },
  67263. {
  67264. name: "nodejs",
  67265. version: "6.14.0",
  67266. date: "2018-03-28",
  67267. lts: "Boron",
  67268. security: true
  67269. },
  67270. {
  67271. name: "nodejs",
  67272. version: "6.15.0",
  67273. date: "2018-11-27",
  67274. lts: "Boron",
  67275. security: true
  67276. },
  67277. {
  67278. name: "nodejs",
  67279. version: "6.16.0",
  67280. date: "2018-12-26",
  67281. lts: "Boron",
  67282. security: false
  67283. },
  67284. {
  67285. name: "nodejs",
  67286. version: "6.17.0",
  67287. date: "2019-02-28",
  67288. lts: "Boron",
  67289. security: true
  67290. },
  67291. {
  67292. name: "nodejs",
  67293. version: "7.0.0",
  67294. date: "2016-10-25",
  67295. lts: false,
  67296. security: false
  67297. },
  67298. {
  67299. name: "nodejs",
  67300. version: "7.1.0",
  67301. date: "2016-11-08",
  67302. lts: false,
  67303. security: false
  67304. },
  67305. {
  67306. name: "nodejs",
  67307. version: "7.2.0",
  67308. date: "2016-11-22",
  67309. lts: false,
  67310. security: false
  67311. },
  67312. {
  67313. name: "nodejs",
  67314. version: "7.3.0",
  67315. date: "2016-12-20",
  67316. lts: false,
  67317. security: false
  67318. },
  67319. {
  67320. name: "nodejs",
  67321. version: "7.4.0",
  67322. date: "2017-01-04",
  67323. lts: false,
  67324. security: false
  67325. },
  67326. {
  67327. name: "nodejs",
  67328. version: "7.5.0",
  67329. date: "2017-01-31",
  67330. lts: false,
  67331. security: false
  67332. },
  67333. {
  67334. name: "nodejs",
  67335. version: "7.6.0",
  67336. date: "2017-02-21",
  67337. lts: false,
  67338. security: false
  67339. },
  67340. {
  67341. name: "nodejs",
  67342. version: "7.7.0",
  67343. date: "2017-02-28",
  67344. lts: false,
  67345. security: false
  67346. },
  67347. {
  67348. name: "nodejs",
  67349. version: "7.8.0",
  67350. date: "2017-03-29",
  67351. lts: false,
  67352. security: false
  67353. },
  67354. {
  67355. name: "nodejs",
  67356. version: "7.9.0",
  67357. date: "2017-04-11",
  67358. lts: false,
  67359. security: false
  67360. },
  67361. {
  67362. name: "nodejs",
  67363. version: "7.10.0",
  67364. date: "2017-05-02",
  67365. lts: false,
  67366. security: false
  67367. },
  67368. {
  67369. name: "nodejs",
  67370. version: "8.0.0",
  67371. date: "2017-05-30",
  67372. lts: false,
  67373. security: false
  67374. },
  67375. {
  67376. name: "nodejs",
  67377. version: "8.1.0",
  67378. date: "2017-06-08",
  67379. lts: false,
  67380. security: false
  67381. },
  67382. {
  67383. name: "nodejs",
  67384. version: "8.2.0",
  67385. date: "2017-07-19",
  67386. lts: false,
  67387. security: false
  67388. },
  67389. {
  67390. name: "nodejs",
  67391. version: "8.3.0",
  67392. date: "2017-08-08",
  67393. lts: false,
  67394. security: false
  67395. },
  67396. {
  67397. name: "nodejs",
  67398. version: "8.4.0",
  67399. date: "2017-08-15",
  67400. lts: false,
  67401. security: false
  67402. },
  67403. {
  67404. name: "nodejs",
  67405. version: "8.5.0",
  67406. date: "2017-09-12",
  67407. lts: false,
  67408. security: false
  67409. },
  67410. {
  67411. name: "nodejs",
  67412. version: "8.6.0",
  67413. date: "2017-09-26",
  67414. lts: false,
  67415. security: false
  67416. },
  67417. {
  67418. name: "nodejs",
  67419. version: "8.7.0",
  67420. date: "2017-10-11",
  67421. lts: false,
  67422. security: false
  67423. },
  67424. {
  67425. name: "nodejs",
  67426. version: "8.8.0",
  67427. date: "2017-10-24",
  67428. lts: false,
  67429. security: false
  67430. },
  67431. {
  67432. name: "nodejs",
  67433. version: "8.9.0",
  67434. date: "2017-10-31",
  67435. lts: "Carbon",
  67436. security: false
  67437. },
  67438. {
  67439. name: "nodejs",
  67440. version: "8.10.0",
  67441. date: "2018-03-06",
  67442. lts: "Carbon",
  67443. security: false
  67444. },
  67445. {
  67446. name: "nodejs",
  67447. version: "8.11.0",
  67448. date: "2018-03-28",
  67449. lts: "Carbon",
  67450. security: true
  67451. },
  67452. {
  67453. name: "nodejs",
  67454. version: "8.12.0",
  67455. date: "2018-09-10",
  67456. lts: "Carbon",
  67457. security: false
  67458. },
  67459. {
  67460. name: "nodejs",
  67461. version: "8.13.0",
  67462. date: "2018-11-20",
  67463. lts: "Carbon",
  67464. security: false
  67465. },
  67466. {
  67467. name: "nodejs",
  67468. version: "8.14.0",
  67469. date: "2018-11-27",
  67470. lts: "Carbon",
  67471. security: true
  67472. },
  67473. {
  67474. name: "nodejs",
  67475. version: "8.15.0",
  67476. date: "2018-12-26",
  67477. lts: "Carbon",
  67478. security: false
  67479. },
  67480. {
  67481. name: "nodejs",
  67482. version: "8.16.0",
  67483. date: "2019-04-16",
  67484. lts: "Carbon",
  67485. security: false
  67486. },
  67487. {
  67488. name: "nodejs",
  67489. version: "8.17.0",
  67490. date: "2019-12-17",
  67491. lts: "Carbon",
  67492. security: true
  67493. },
  67494. {
  67495. name: "nodejs",
  67496. version: "9.0.0",
  67497. date: "2017-10-31",
  67498. lts: false,
  67499. security: false
  67500. },
  67501. {
  67502. name: "nodejs",
  67503. version: "9.1.0",
  67504. date: "2017-11-07",
  67505. lts: false,
  67506. security: false
  67507. },
  67508. {
  67509. name: "nodejs",
  67510. version: "9.2.0",
  67511. date: "2017-11-14",
  67512. lts: false,
  67513. security: false
  67514. },
  67515. {
  67516. name: "nodejs",
  67517. version: "9.3.0",
  67518. date: "2017-12-12",
  67519. lts: false,
  67520. security: false
  67521. },
  67522. {
  67523. name: "nodejs",
  67524. version: "9.4.0",
  67525. date: "2018-01-10",
  67526. lts: false,
  67527. security: false
  67528. },
  67529. {
  67530. name: "nodejs",
  67531. version: "9.5.0",
  67532. date: "2018-01-31",
  67533. lts: false,
  67534. security: false
  67535. },
  67536. {
  67537. name: "nodejs",
  67538. version: "9.6.0",
  67539. date: "2018-02-21",
  67540. lts: false,
  67541. security: false
  67542. },
  67543. {
  67544. name: "nodejs",
  67545. version: "9.7.0",
  67546. date: "2018-03-01",
  67547. lts: false,
  67548. security: false
  67549. },
  67550. {
  67551. name: "nodejs",
  67552. version: "9.8.0",
  67553. date: "2018-03-07",
  67554. lts: false,
  67555. security: false
  67556. },
  67557. {
  67558. name: "nodejs",
  67559. version: "9.9.0",
  67560. date: "2018-03-21",
  67561. lts: false,
  67562. security: false
  67563. },
  67564. {
  67565. name: "nodejs",
  67566. version: "9.10.0",
  67567. date: "2018-03-28",
  67568. lts: false,
  67569. security: true
  67570. },
  67571. {
  67572. name: "nodejs",
  67573. version: "9.11.0",
  67574. date: "2018-04-04",
  67575. lts: false,
  67576. security: false
  67577. },
  67578. {
  67579. name: "nodejs",
  67580. version: "10.0.0",
  67581. date: "2018-04-24",
  67582. lts: false,
  67583. security: false
  67584. },
  67585. {
  67586. name: "nodejs",
  67587. version: "10.1.0",
  67588. date: "2018-05-08",
  67589. lts: false,
  67590. security: false
  67591. },
  67592. {
  67593. name: "nodejs",
  67594. version: "10.2.0",
  67595. date: "2018-05-23",
  67596. lts: false,
  67597. security: false
  67598. },
  67599. {
  67600. name: "nodejs",
  67601. version: "10.3.0",
  67602. date: "2018-05-29",
  67603. lts: false,
  67604. security: false
  67605. },
  67606. {
  67607. name: "nodejs",
  67608. version: "10.4.0",
  67609. date: "2018-06-06",
  67610. lts: false,
  67611. security: false
  67612. },
  67613. {
  67614. name: "nodejs",
  67615. version: "10.5.0",
  67616. date: "2018-06-20",
  67617. lts: false,
  67618. security: false
  67619. },
  67620. {
  67621. name: "nodejs",
  67622. version: "10.6.0",
  67623. date: "2018-07-04",
  67624. lts: false,
  67625. security: false
  67626. },
  67627. {
  67628. name: "nodejs",
  67629. version: "10.7.0",
  67630. date: "2018-07-18",
  67631. lts: false,
  67632. security: false
  67633. },
  67634. {
  67635. name: "nodejs",
  67636. version: "10.8.0",
  67637. date: "2018-08-01",
  67638. lts: false,
  67639. security: false
  67640. },
  67641. {
  67642. name: "nodejs",
  67643. version: "10.9.0",
  67644. date: "2018-08-15",
  67645. lts: false,
  67646. security: false
  67647. },
  67648. {
  67649. name: "nodejs",
  67650. version: "10.10.0",
  67651. date: "2018-09-06",
  67652. lts: false,
  67653. security: false
  67654. },
  67655. {
  67656. name: "nodejs",
  67657. version: "10.11.0",
  67658. date: "2018-09-19",
  67659. lts: false,
  67660. security: false
  67661. },
  67662. {
  67663. name: "nodejs",
  67664. version: "10.12.0",
  67665. date: "2018-10-10",
  67666. lts: false,
  67667. security: false
  67668. },
  67669. {
  67670. name: "nodejs",
  67671. version: "10.13.0",
  67672. date: "2018-10-30",
  67673. lts: "Dubnium",
  67674. security: false
  67675. },
  67676. {
  67677. name: "nodejs",
  67678. version: "10.14.0",
  67679. date: "2018-11-27",
  67680. lts: "Dubnium",
  67681. security: true
  67682. },
  67683. {
  67684. name: "nodejs",
  67685. version: "10.15.0",
  67686. date: "2018-12-26",
  67687. lts: "Dubnium",
  67688. security: false
  67689. },
  67690. {
  67691. name: "nodejs",
  67692. version: "10.16.0",
  67693. date: "2019-05-28",
  67694. lts: "Dubnium",
  67695. security: false
  67696. },
  67697. {
  67698. name: "nodejs",
  67699. version: "10.17.0",
  67700. date: "2019-10-21",
  67701. lts: "Dubnium",
  67702. security: false
  67703. },
  67704. {
  67705. name: "nodejs",
  67706. version: "10.18.0",
  67707. date: "2019-12-16",
  67708. lts: "Dubnium",
  67709. security: true
  67710. },
  67711. {
  67712. name: "nodejs",
  67713. version: "11.0.0",
  67714. date: "2018-10-23",
  67715. lts: false,
  67716. security: false
  67717. },
  67718. {
  67719. name: "nodejs",
  67720. version: "11.1.0",
  67721. date: "2018-10-30",
  67722. lts: false,
  67723. security: false
  67724. },
  67725. {
  67726. name: "nodejs",
  67727. version: "11.2.0",
  67728. date: "2018-11-15",
  67729. lts: false,
  67730. security: false
  67731. },
  67732. {
  67733. name: "nodejs",
  67734. version: "11.3.0",
  67735. date: "2018-11-27",
  67736. lts: false,
  67737. security: true
  67738. },
  67739. {
  67740. name: "nodejs",
  67741. version: "11.4.0",
  67742. date: "2018-12-07",
  67743. lts: false,
  67744. security: false
  67745. },
  67746. {
  67747. name: "nodejs",
  67748. version: "11.5.0",
  67749. date: "2018-12-18",
  67750. lts: false,
  67751. security: false
  67752. },
  67753. {
  67754. name: "nodejs",
  67755. version: "11.6.0",
  67756. date: "2018-12-26",
  67757. lts: false,
  67758. security: false
  67759. },
  67760. {
  67761. name: "nodejs",
  67762. version: "11.7.0",
  67763. date: "2019-01-17",
  67764. lts: false,
  67765. security: false
  67766. },
  67767. {
  67768. name: "nodejs",
  67769. version: "11.8.0",
  67770. date: "2019-01-24",
  67771. lts: false,
  67772. security: false
  67773. },
  67774. {
  67775. name: "nodejs",
  67776. version: "11.9.0",
  67777. date: "2019-01-30",
  67778. lts: false,
  67779. security: false
  67780. },
  67781. {
  67782. name: "nodejs",
  67783. version: "11.10.0",
  67784. date: "2019-02-14",
  67785. lts: false,
  67786. security: false
  67787. },
  67788. {
  67789. name: "nodejs",
  67790. version: "11.11.0",
  67791. date: "2019-03-05",
  67792. lts: false,
  67793. security: false
  67794. },
  67795. {
  67796. name: "nodejs",
  67797. version: "11.12.0",
  67798. date: "2019-03-14",
  67799. lts: false,
  67800. security: false
  67801. },
  67802. {
  67803. name: "nodejs",
  67804. version: "11.13.0",
  67805. date: "2019-03-28",
  67806. lts: false,
  67807. security: false
  67808. },
  67809. {
  67810. name: "nodejs",
  67811. version: "11.14.0",
  67812. date: "2019-04-10",
  67813. lts: false,
  67814. security: false
  67815. },
  67816. {
  67817. name: "nodejs",
  67818. version: "11.15.0",
  67819. date: "2019-04-30",
  67820. lts: false,
  67821. security: false
  67822. },
  67823. {
  67824. name: "nodejs",
  67825. version: "12.0.0",
  67826. date: "2019-04-23",
  67827. lts: false,
  67828. security: false
  67829. },
  67830. {
  67831. name: "nodejs",
  67832. version: "12.1.0",
  67833. date: "2019-04-29",
  67834. lts: false,
  67835. security: false
  67836. },
  67837. {
  67838. name: "nodejs",
  67839. version: "12.2.0",
  67840. date: "2019-05-07",
  67841. lts: false,
  67842. security: false
  67843. },
  67844. {
  67845. name: "nodejs",
  67846. version: "12.3.0",
  67847. date: "2019-05-21",
  67848. lts: false,
  67849. security: false
  67850. },
  67851. {
  67852. name: "nodejs",
  67853. version: "12.4.0",
  67854. date: "2019-06-04",
  67855. lts: false,
  67856. security: false
  67857. },
  67858. {
  67859. name: "nodejs",
  67860. version: "12.5.0",
  67861. date: "2019-06-26",
  67862. lts: false,
  67863. security: false
  67864. },
  67865. {
  67866. name: "nodejs",
  67867. version: "12.6.0",
  67868. date: "2019-07-03",
  67869. lts: false,
  67870. security: false
  67871. },
  67872. {
  67873. name: "nodejs",
  67874. version: "12.7.0",
  67875. date: "2019-07-23",
  67876. lts: false,
  67877. security: false
  67878. },
  67879. {
  67880. name: "nodejs",
  67881. version: "12.8.0",
  67882. date: "2019-08-06",
  67883. lts: false,
  67884. security: false
  67885. },
  67886. {
  67887. name: "nodejs",
  67888. version: "12.9.0",
  67889. date: "2019-08-20",
  67890. lts: false,
  67891. security: false
  67892. },
  67893. {
  67894. name: "nodejs",
  67895. version: "12.10.0",
  67896. date: "2019-09-04",
  67897. lts: false,
  67898. security: false
  67899. },
  67900. {
  67901. name: "nodejs",
  67902. version: "12.11.0",
  67903. date: "2019-09-25",
  67904. lts: false,
  67905. security: false
  67906. },
  67907. {
  67908. name: "nodejs",
  67909. version: "12.12.0",
  67910. date: "2019-10-11",
  67911. lts: false,
  67912. security: false
  67913. },
  67914. {
  67915. name: "nodejs",
  67916. version: "12.13.0",
  67917. date: "2019-10-21",
  67918. lts: "Erbium",
  67919. security: false
  67920. },
  67921. {
  67922. name: "nodejs",
  67923. version: "12.14.0",
  67924. date: "2019-12-16",
  67925. lts: "Erbium",
  67926. security: true
  67927. },
  67928. {
  67929. name: "nodejs",
  67930. version: "13.0.0",
  67931. date: "2019-10-10",
  67932. lts: false,
  67933. security: false
  67934. },
  67935. {
  67936. name: "nodejs",
  67937. version: "13.1.0",
  67938. date: "2019-11-05",
  67939. lts: false,
  67940. security: false
  67941. },
  67942. {
  67943. name: "nodejs",
  67944. version: "13.2.0",
  67945. date: "2019-11-21",
  67946. lts: false,
  67947. security: false
  67948. },
  67949. {
  67950. name: "nodejs",
  67951. version: "13.3.0",
  67952. date: "2019-12-03",
  67953. lts: false,
  67954. security: false
  67955. },
  67956. {
  67957. name: "nodejs",
  67958. version: "13.4.0",
  67959. date: "2019-12-17",
  67960. lts: false,
  67961. security: true
  67962. },
  67963. {
  67964. name: "nodejs",
  67965. version: "13.5.0",
  67966. date: "2019-12-18",
  67967. lts: false,
  67968. security: false
  67969. },
  67970. {
  67971. name: "nodejs",
  67972. version: "13.6.0",
  67973. date: "2020-01-07",
  67974. lts: false,
  67975. security: false
  67976. }
  67977. ];
  67978. var envs$1 = /*#__PURE__*/Object.freeze({
  67979. __proto__: null,
  67980. 'default': envs
  67981. });
  67982. var browsers = {
  67983. A: "ie",
  67984. B: "edge",
  67985. C: "firefox",
  67986. D: "chrome",
  67987. E: "safari",
  67988. F: "opera",
  67989. G: "ios_saf",
  67990. H: "op_mini",
  67991. I: "android",
  67992. J: "bb",
  67993. K: "op_mob",
  67994. L: "and_chr",
  67995. M: "and_ff",
  67996. N: "ie_mob",
  67997. O: "and_uc",
  67998. P: "samsung",
  67999. Q: "and_qq",
  68000. R: "baidu",
  68001. S: "kaios"
  68002. };
  68003. var browsers_1 = createCommonjsModule(function (module, exports) {
  68004. Object.defineProperty(exports, "__esModule", {
  68005. value: true
  68006. });
  68007. var browsers$1 = exports.browsers = browsers;
  68008. });
  68009. unwrapExports(browsers_1);
  68010. var browsers_2 = browsers_1.browsers;
  68011. var browserVersions = {
  68012. "0": "56",
  68013. "1": "57",
  68014. "2": "58",
  68015. "3": "60",
  68016. "4": "62",
  68017. "5": "63",
  68018. "6": "64",
  68019. "7": "11.1",
  68020. "8": "68",
  68021. "9": "12.1",
  68022. A: "10",
  68023. B: "11",
  68024. C: "12",
  68025. D: "7",
  68026. E: "9",
  68027. F: "4",
  68028. G: "8",
  68029. H: "6",
  68030. I: "17",
  68031. J: "18",
  68032. K: "13",
  68033. L: "15",
  68034. M: "46",
  68035. N: "16",
  68036. O: "5",
  68037. P: "19",
  68038. Q: "20",
  68039. R: "21",
  68040. S: "22",
  68041. T: "23",
  68042. U: "24",
  68043. V: "25",
  68044. W: "26",
  68045. X: "27",
  68046. Y: "28",
  68047. Z: "29",
  68048. a: "30",
  68049. b: "31",
  68050. c: "32",
  68051. d: "33",
  68052. e: "34",
  68053. f: "14",
  68054. g: "36",
  68055. h: "37",
  68056. i: "38",
  68057. j: "39",
  68058. k: "40",
  68059. l: "41",
  68060. m: "42",
  68061. n: "43",
  68062. o: "44",
  68063. p: "45",
  68064. q: "76",
  68065. r: "47",
  68066. s: "48",
  68067. t: "49",
  68068. u: "50",
  68069. v: "51",
  68070. w: "52",
  68071. x: "53",
  68072. y: "54",
  68073. z: "55",
  68074. AB: "35",
  68075. BB: "66",
  68076. CB: "4.2-4.3",
  68077. DB: "65",
  68078. EB: "59",
  68079. FB: "67",
  68080. GB: "11.5",
  68081. HB: "69",
  68082. IB: "70",
  68083. JB: "71",
  68084. KB: "72",
  68085. LB: "73",
  68086. MB: "61",
  68087. NB: "3",
  68088. OB: "10.1",
  68089. PB: "3.2",
  68090. QB: "78",
  68091. RB: "9.0-9.2",
  68092. SB: "77",
  68093. TB: "80",
  68094. UB: "81",
  68095. VB: "3.1",
  68096. WB: "75",
  68097. XB: "5.1",
  68098. YB: "6.1",
  68099. ZB: "7.1",
  68100. aB: "9.1",
  68101. bB: "74",
  68102. cB: "3.6",
  68103. dB: "3.5",
  68104. eB: "TP",
  68105. fB: "9.5-9.6",
  68106. gB: "10.0-10.1",
  68107. hB: "10.5",
  68108. iB: "10.6",
  68109. jB: "2",
  68110. kB: "11.6",
  68111. lB: "4.0-4.1",
  68112. mB: "5.5",
  68113. nB: "5.0-5.1",
  68114. oB: "6.0-6.1",
  68115. pB: "7.0-7.1",
  68116. qB: "8.1-8.4",
  68117. rB: "79",
  68118. sB: "9.3",
  68119. tB: "10.0-10.2",
  68120. uB: "10.3",
  68121. vB: "11.0-11.2",
  68122. wB: "11.3-11.4",
  68123. xB: "12.0-12.1",
  68124. yB: "12.2-12.4",
  68125. zB: "13.0-13.1",
  68126. "0B": "13.2",
  68127. "1B": "13.3",
  68128. "2B": "all",
  68129. "3B": "2.1",
  68130. "4B": "2.2",
  68131. "5B": "2.3",
  68132. "6B": "4.1",
  68133. "7B": "4.4",
  68134. "8B": "4.4.3-4.4.4",
  68135. "9B": "12.12",
  68136. AC: "5.0-5.4",
  68137. BC: "6.2-6.4",
  68138. CC: "7.2-7.4",
  68139. DC: "8.2",
  68140. EC: "9.2",
  68141. FC: "1.2",
  68142. GC: "7.12",
  68143. HC: "2.5"
  68144. };
  68145. var browserVersions_1 = createCommonjsModule(function (module, exports) {
  68146. Object.defineProperty(exports, "__esModule", {
  68147. value: true
  68148. });
  68149. var browserVersions$1 = exports.browserVersions = browserVersions;
  68150. });
  68151. unwrapExports(browserVersions_1);
  68152. var browserVersions_2 = browserVersions_1.browserVersions;
  68153. var agents = {
  68154. A: {
  68155. A: {
  68156. H: 0.0092277,
  68157. D: 0.0092277,
  68158. G: 0.110732,
  68159. E: 0.0415246,
  68160. A: 0.0369108,
  68161. B: 1.43029,
  68162. mB: 0.009298
  68163. },
  68164. B: "ms",
  68165. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "mB", "H", "D", "G", "E", "A", "B", "", "", ""],
  68166. E: "IE",
  68167. F: {
  68168. mB: 962323200,
  68169. H: 998870400,
  68170. D: 1161129600,
  68171. G: 1237420800,
  68172. E: 1300060800,
  68173. A: 1346716800,
  68174. B: 1381968000
  68175. }
  68176. },
  68177. B: {
  68178. A: {
  68179. C: 0.008806,
  68180. K: 0.008806,
  68181. f: 0.017612,
  68182. L: 0.017612,
  68183. N: 0.039627,
  68184. I: 0.149702,
  68185. J: 1.79642,
  68186. q: 0
  68187. },
  68188. B: "webkit",
  68189. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "C", "K", "f", "L", "N", "I", "J", "q", "", ""],
  68190. E: "Edge",
  68191. F: {
  68192. C: 1438128000,
  68193. K: 1447286400,
  68194. f: 1470096000,
  68195. L: 1491868800,
  68196. N: 1508198400,
  68197. I: 1525046400,
  68198. J: 1542067200,
  68199. q: null
  68200. },
  68201. D: {
  68202. C: "ms",
  68203. K: "ms",
  68204. f: "ms",
  68205. L: "ms",
  68206. N: "ms",
  68207. I: "ms",
  68208. J: "ms"
  68209. }
  68210. },
  68211. C: {
  68212. A: {
  68213. "0": 0.026418,
  68214. "1": 0.013209,
  68215. "2": 0.008806,
  68216. "3": 0.039627,
  68217. "4": 0.008806,
  68218. "5": 0.017612,
  68219. "6": 0.026418,
  68220. "8": 0.13209,
  68221. jB: 0.004827,
  68222. NB: 0.00487,
  68223. F: 0.00974,
  68224. O: 0.004879,
  68225. H: 0.020136,
  68226. D: 0.005725,
  68227. G: 0.004525,
  68228. E: 0.00533,
  68229. A: 0.004283,
  68230. B: 0.009042,
  68231. C: 0.004471,
  68232. K: 0.004486,
  68233. f: 0.00453,
  68234. L: 0.004465,
  68235. N: 0.004417,
  68236. I: 0.008922,
  68237. J: 0.004393,
  68238. P: 0.004443,
  68239. Q: 0.004283,
  68240. R: 0.008806,
  68241. S: 0.004393,
  68242. T: 0.004525,
  68243. U: 0.008786,
  68244. V: 0.004403,
  68245. W: 0.004317,
  68246. X: 0.004393,
  68247. Y: 0.004418,
  68248. Z: 0.008834,
  68249. a: 0.004403,
  68250. b: 0.008928,
  68251. c: 0.004471,
  68252. d: 0.008922,
  68253. e: 0.004707,
  68254. AB: 0.022015,
  68255. g: 0.004465,
  68256. h: 0.004783,
  68257. i: 0.008806,
  68258. j: 0.004783,
  68259. k: 0.00487,
  68260. l: 0.005029,
  68261. m: 0.0047,
  68262. n: 0.008806,
  68263. o: 0.008806,
  68264. p: 0.013209,
  68265. M: 0.004525,
  68266. r: 0.022015,
  68267. s: 0.030821,
  68268. t: 0.004403,
  68269. u: 0.013209,
  68270. v: 0.008806,
  68271. w: 0.145299,
  68272. x: 0.008806,
  68273. y: 0.013209,
  68274. z: 0.008806,
  68275. EB: 0.008806,
  68276. MB: 0.013209,
  68277. DB: 0.052836,
  68278. BB: 0.04403,
  68279. FB: 0.026418,
  68280. HB: 0.074851,
  68281. IB: 0.761719,
  68282. JB: 2.42605,
  68283. KB: 0.057239,
  68284. LB: 0,
  68285. dB: 0.008786,
  68286. cB: 0.00487
  68287. },
  68288. B: "moz",
  68289. C: ["", "", "", "jB", "NB", "dB", "cB", "F", "O", "H", "D", "G", "E", "A", "B", "C", "K", "f", "L", "N", "I", "J", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "AB", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "M", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "EB", "3", "MB", "4", "5", "6", "DB", "BB", "FB", "8", "HB", "IB", "JB", "KB", "LB", ""],
  68290. E: "Firefox",
  68291. F: {
  68292. "0": 1506556800,
  68293. "1": 1510617600,
  68294. "2": 1516665600,
  68295. "3": 1525824000,
  68296. "4": 1536105600,
  68297. "5": 1540252800,
  68298. "6": 1544486400,
  68299. "8": 1562630400,
  68300. jB: 1161648000,
  68301. NB: 1213660800,
  68302. dB: 1246320000,
  68303. cB: 1264032000,
  68304. F: 1300752000,
  68305. O: 1308614400,
  68306. H: 1313452800,
  68307. D: 1317081600,
  68308. G: 1317081600,
  68309. E: 1320710400,
  68310. A: 1324339200,
  68311. B: 1327968000,
  68312. C: 1331596800,
  68313. K: 1335225600,
  68314. f: 1338854400,
  68315. L: 1342483200,
  68316. N: 1346112000,
  68317. I: 1349740800,
  68318. J: 1353628800,
  68319. P: 1357603200,
  68320. Q: 1361232000,
  68321. R: 1364860800,
  68322. S: 1368489600,
  68323. T: 1372118400,
  68324. U: 1375747200,
  68325. V: 1379376000,
  68326. W: 1386633600,
  68327. X: 1391472000,
  68328. Y: 1395100800,
  68329. Z: 1398729600,
  68330. a: 1402358400,
  68331. b: 1405987200,
  68332. c: 1409616000,
  68333. d: 1413244800,
  68334. e: 1417392000,
  68335. AB: 1421107200,
  68336. g: 1424736000,
  68337. h: 1428278400,
  68338. i: 1431475200,
  68339. j: 1435881600,
  68340. k: 1439251200,
  68341. l: 1442880000,
  68342. m: 1446508800,
  68343. n: 1450137600,
  68344. o: 1453852800,
  68345. p: 1457395200,
  68346. M: 1461628800,
  68347. r: 1465257600,
  68348. s: 1470096000,
  68349. t: 1474329600,
  68350. u: 1479168000,
  68351. v: 1485216000,
  68352. w: 1488844800,
  68353. x: 1492560000,
  68354. y: 1497312000,
  68355. z: 1502150400,
  68356. EB: 1520985600,
  68357. MB: 1529971200,
  68358. DB: 1548720000,
  68359. BB: 1552953600,
  68360. FB: 1558396800,
  68361. HB: 1567468800,
  68362. IB: 1571788800,
  68363. JB: 1575331200,
  68364. KB: null,
  68365. LB: null
  68366. }
  68367. },
  68368. D: {
  68369. A: {
  68370. "0": 0.035224,
  68371. "1": 0.066045,
  68372. "2": 0.030821,
  68373. "3": 0.030821,
  68374. "4": 0.030821,
  68375. "5": 0.277389,
  68376. "6": 0.017612,
  68377. "8": 0.061642,
  68378. F: 0.004706,
  68379. O: 0.004879,
  68380. H: 0.004879,
  68381. D: 0.005591,
  68382. G: 0.005591,
  68383. E: 0.005591,
  68384. A: 0.004534,
  68385. B: 0.004464,
  68386. C: 0.010424,
  68387. K: 0.004403,
  68388. f: 0.004706,
  68389. L: 0.015087,
  68390. N: 0.004393,
  68391. I: 0.004393,
  68392. J: 0.008652,
  68393. P: 0.004418,
  68394. Q: 0.004393,
  68395. R: 0.004317,
  68396. S: 0.004465,
  68397. T: 0.008786,
  68398. U: 0.008806,
  68399. V: 0.004461,
  68400. W: 0.004403,
  68401. X: 0.004326,
  68402. Y: 0.0047,
  68403. Z: 0.004461,
  68404. a: 0.004403,
  68405. b: 0.013209,
  68406. c: 0.004465,
  68407. d: 0.013209,
  68408. e: 0.008806,
  68409. AB: 0.008806,
  68410. g: 0.008806,
  68411. h: 0.004464,
  68412. i: 0.022015,
  68413. j: 0.004464,
  68414. k: 0.013209,
  68415. l: 0.008806,
  68416. m: 0.004403,
  68417. n: 0.017612,
  68418. o: 0.004465,
  68419. p: 0.004403,
  68420. M: 0.004403,
  68421. r: 0.008806,
  68422. s: 0.035224,
  68423. t: 0.515151,
  68424. u: 0.008806,
  68425. v: 0.013209,
  68426. w: 0.004403,
  68427. x: 0.022015,
  68428. y: 0.026418,
  68429. z: 0.04403,
  68430. EB: 0.017612,
  68431. MB: 0.035224,
  68432. DB: 0.052836,
  68433. BB: 0.035224,
  68434. FB: 0.066045,
  68435. HB: 0.184926,
  68436. IB: 0.149702,
  68437. JB: 0.198135,
  68438. KB: 0.206941,
  68439. LB: 0.184926,
  68440. bB: 0.224553,
  68441. WB: 0.268583,
  68442. q: 0.281792,
  68443. SB: 0.409479,
  68444. QB: 13.9971,
  68445. rB: 11.5006,
  68446. TB: 0.039627,
  68447. UB: 0.017612
  68448. },
  68449. B: "webkit",
  68450. C: ["F", "O", "H", "D", "G", "E", "A", "B", "C", "K", "f", "L", "N", "I", "J", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "AB", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "M", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "EB", "3", "MB", "4", "5", "6", "DB", "BB", "FB", "8", "HB", "IB", "JB", "KB", "LB", "bB", "WB", "q", "SB", "QB", "rB", "TB", "UB"],
  68451. E: "Chrome",
  68452. F: {
  68453. "0": 1485302400,
  68454. "1": 1489017600,
  68455. "2": 1492560000,
  68456. "3": 1500940800,
  68457. "4": 1508198400,
  68458. "5": 1512518400,
  68459. "6": 1516752000,
  68460. "8": 1532390400,
  68461. F: 1264377600,
  68462. O: 1274745600,
  68463. H: 1283385600,
  68464. D: 1287619200,
  68465. G: 1291248000,
  68466. E: 1296777600,
  68467. A: 1299542400,
  68468. B: 1303862400,
  68469. C: 1307404800,
  68470. K: 1312243200,
  68471. f: 1316131200,
  68472. L: 1316131200,
  68473. N: 1319500800,
  68474. I: 1323734400,
  68475. J: 1328659200,
  68476. P: 1332892800,
  68477. Q: 1337040000,
  68478. R: 1340668800,
  68479. S: 1343692800,
  68480. T: 1348531200,
  68481. U: 1352246400,
  68482. V: 1357862400,
  68483. W: 1361404800,
  68484. X: 1364428800,
  68485. Y: 1369094400,
  68486. Z: 1374105600,
  68487. a: 1376956800,
  68488. b: 1384214400,
  68489. c: 1389657600,
  68490. d: 1392940800,
  68491. e: 1397001600,
  68492. AB: 1400544000,
  68493. g: 1405468800,
  68494. h: 1409011200,
  68495. i: 1412640000,
  68496. j: 1416268800,
  68497. k: 1421798400,
  68498. l: 1425513600,
  68499. m: 1429401600,
  68500. n: 1432080000,
  68501. o: 1437523200,
  68502. p: 1441152000,
  68503. M: 1444780800,
  68504. r: 1449014400,
  68505. s: 1453248000,
  68506. t: 1456963200,
  68507. u: 1460592000,
  68508. v: 1464134400,
  68509. w: 1469059200,
  68510. x: 1472601600,
  68511. y: 1476230400,
  68512. z: 1480550400,
  68513. EB: 1496707200,
  68514. MB: 1504569600,
  68515. DB: 1520294400,
  68516. BB: 1523923200,
  68517. FB: 1527552000,
  68518. HB: 1536019200,
  68519. IB: 1539648000,
  68520. JB: 1543968000,
  68521. KB: 1548720000,
  68522. LB: 1552348800,
  68523. bB: 1555977600,
  68524. WB: 1559606400,
  68525. q: 1564444800,
  68526. SB: 1568073600,
  68527. QB: 1571702400,
  68528. rB: null,
  68529. TB: null,
  68530. UB: null
  68531. }
  68532. },
  68533. E: {
  68534. A: {
  68535. "7": 0.184926,
  68536. "9": 0.435897,
  68537. F: 0,
  68538. O: 0.004403,
  68539. H: 0.004349,
  68540. D: 0.004465,
  68541. G: 0.026418,
  68542. E: 0.013209,
  68543. A: 0.017612,
  68544. B: 0.039627,
  68545. C: 0.136493,
  68546. K: 2.29396,
  68547. VB: 0,
  68548. PB: 0.008692,
  68549. XB: 0.66045,
  68550. YB: 0.00456,
  68551. ZB: 0.004283,
  68552. aB: 0.035224,
  68553. OB: 0.096866,
  68554. eB: 0
  68555. },
  68556. B: "webkit",
  68557. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "VB", "PB", "F", "O", "XB", "H", "YB", "D", "ZB", "G", "E", "aB", "A", "OB", "B", "7", "C", "9", "K", "eB", "", ""],
  68558. E: "Safari",
  68559. F: {
  68560. "7": 1522281600,
  68561. "9": 1553472000,
  68562. VB: 1205798400,
  68563. PB: 1226534400,
  68564. F: 1244419200,
  68565. O: 1275868800,
  68566. XB: 1311120000,
  68567. H: 1343174400,
  68568. YB: 1382400000,
  68569. D: 1382400000,
  68570. ZB: 1410998400,
  68571. G: 1413417600,
  68572. E: 1443657600,
  68573. aB: 1458518400,
  68574. A: 1474329600,
  68575. OB: 1490572800,
  68576. B: 1505779200,
  68577. C: 1537142400,
  68578. K: 1568851200,
  68579. eB: null
  68580. }
  68581. },
  68582. F: {
  68583. A: {
  68584. "0": 0.008806,
  68585. "1": 0.008806,
  68586. "2": 0.013209,
  68587. "3": 0.004403,
  68588. "4": 0.004403,
  68589. "5": 0.013209,
  68590. "6": 0.070448,
  68591. "7": 0.006229,
  68592. "9": 0.008806,
  68593. E: 0.0082,
  68594. B: 0.016581,
  68595. C: 0.004317,
  68596. L: 0.00685,
  68597. N: 0.00685,
  68598. I: 0.00685,
  68599. J: 0.005014,
  68600. P: 0.006015,
  68601. Q: 0.004879,
  68602. R: 0.006597,
  68603. S: 0.006597,
  68604. T: 0.013434,
  68605. U: 0.006702,
  68606. V: 0.006015,
  68607. W: 0.005595,
  68608. X: 0.004393,
  68609. Y: 0.008652,
  68610. Z: 0.004879,
  68611. a: 0.004879,
  68612. b: 0.008806,
  68613. c: 0.005152,
  68614. d: 0.005014,
  68615. e: 0.009758,
  68616. AB: 0.004879,
  68617. g: 0.013209,
  68618. h: 0.004283,
  68619. i: 0.004367,
  68620. j: 0.004534,
  68621. k: 0.004367,
  68622. l: 0.004227,
  68623. m: 0.004418,
  68624. n: 0.009042,
  68625. o: 0.004227,
  68626. p: 0.004725,
  68627. M: 0.004417,
  68628. r: 0.008942,
  68629. s: 0.004707,
  68630. t: 0.004827,
  68631. u: 0.004707,
  68632. v: 0.004707,
  68633. w: 0.004326,
  68634. x: 0.008922,
  68635. y: 0.014349,
  68636. z: 0.004725,
  68637. fB: 0.00685,
  68638. gB: 0,
  68639. hB: 0.008392,
  68640. iB: 0.004706,
  68641. GB: 0.004879,
  68642. kB: 0.008786
  68643. },
  68644. B: "webkit",
  68645. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "E", "fB", "gB", "hB", "iB", "B", "7", "GB", "kB", "C", "9", "L", "N", "I", "J", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "AB", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "M", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "", "", ""],
  68646. E: "Opera",
  68647. F: {
  68648. "0": 1537833600,
  68649. "1": 1543363200,
  68650. "2": 1548201600,
  68651. "3": 1554768000,
  68652. "4": 1561593600,
  68653. "5": 1566259200,
  68654. "6": 1570406400,
  68655. "7": 1302566400,
  68656. "9": 1352073600,
  68657. E: 1150761600,
  68658. fB: 1223424000,
  68659. gB: 1251763200,
  68660. hB: 1267488000,
  68661. iB: 1277942400,
  68662. B: 1292457600,
  68663. GB: 1309219200,
  68664. kB: 1323129600,
  68665. C: 1323129600,
  68666. L: 1372723200,
  68667. N: 1377561600,
  68668. I: 1381104000,
  68669. J: 1386288000,
  68670. P: 1390867200,
  68671. Q: 1393891200,
  68672. R: 1399334400,
  68673. S: 1401753600,
  68674. T: 1405987200,
  68675. U: 1409616000,
  68676. V: 1413331200,
  68677. W: 1417132800,
  68678. X: 1422316800,
  68679. Y: 1425945600,
  68680. Z: 1430179200,
  68681. a: 1433808000,
  68682. b: 1438646400,
  68683. c: 1442448000,
  68684. d: 1445904000,
  68685. e: 1449100800,
  68686. AB: 1454371200,
  68687. g: 1457308800,
  68688. h: 1462320000,
  68689. i: 1465344000,
  68690. j: 1470096000,
  68691. k: 1474329600,
  68692. l: 1477267200,
  68693. m: 1481587200,
  68694. n: 1486425600,
  68695. o: 1490054400,
  68696. p: 1494374400,
  68697. M: 1498003200,
  68698. r: 1502236800,
  68699. s: 1506470400,
  68700. t: 1510099200,
  68701. u: 1515024000,
  68702. v: 1517961600,
  68703. w: 1521676800,
  68704. x: 1525910400,
  68705. y: 1530144000,
  68706. z: 1534982400
  68707. },
  68708. D: {
  68709. "7": "o",
  68710. "9": "o",
  68711. E: "o",
  68712. B: "o",
  68713. C: "o",
  68714. fB: "o",
  68715. gB: "o",
  68716. hB: "o",
  68717. iB: "o",
  68718. GB: "o",
  68719. kB: "o"
  68720. }
  68721. },
  68722. G: {
  68723. A: {
  68724. G: 0.00128072,
  68725. PB: 0.00512289,
  68726. lB: 0.00256144,
  68727. CB: 0,
  68728. nB: 0.00768433,
  68729. oB: 0.00256144,
  68730. pB: 0.00896505,
  68731. qB: 0.0166494,
  68732. RB: 0.0153687,
  68733. sB: 0.162652,
  68734. tB: 0.0563518,
  68735. uB: 0.181862,
  68736. vB: 0.153687,
  68737. wB: 0.274074,
  68738. xB: 0.391901,
  68739. yB: 2.77404,
  68740. zB: 4.02787,
  68741. "0B": 1.83399,
  68742. "1B": 2.88931
  68743. },
  68744. B: "webkit",
  68745. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "PB", "lB", "CB", "nB", "oB", "pB", "G", "qB", "RB", "sB", "tB", "uB", "vB", "wB", "xB", "yB", "zB", "0B", "1B", "", ""],
  68746. E: "iOS Safari",
  68747. F: {
  68748. PB: 1270252800,
  68749. lB: 1283904000,
  68750. CB: 1299628800,
  68751. nB: 1331078400,
  68752. oB: 1359331200,
  68753. pB: 1394409600,
  68754. G: 1410912000,
  68755. qB: 1413763200,
  68756. RB: 1442361600,
  68757. sB: 1458518400,
  68758. tB: 1473724800,
  68759. uB: 1490572800,
  68760. vB: 1505779200,
  68761. wB: 1522281600,
  68762. xB: 1537142400,
  68763. yB: 1553472000,
  68764. zB: 1568851200,
  68765. "0B": 1572220800,
  68766. "1B": null
  68767. }
  68768. },
  68769. H: {
  68770. A: {
  68771. "2B": 1.16575
  68772. },
  68773. B: "o",
  68774. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "2B", "", "", ""],
  68775. E: "Opera Mini",
  68776. F: {
  68777. "2B": 1426464000
  68778. }
  68779. },
  68780. I: {
  68781. A: {
  68782. NB: 0.000748894,
  68783. F: 0.00324521,
  68784. q: 0,
  68785. "3B": 0,
  68786. "4B": 0.000499263,
  68787. "5B": 0.000499263,
  68788. "6B": 0.00574152,
  68789. CB: 0.125565,
  68790. "7B": 0,
  68791. "8B": 0.0763872
  68792. },
  68793. B: "webkit",
  68794. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "3B", "4B", "5B", "NB", "F", "6B", "CB", "7B", "8B", "q", "", "", ""],
  68795. E: "Android Browser",
  68796. F: {
  68797. "3B": 1256515200,
  68798. "4B": 1274313600,
  68799. "5B": 1291593600,
  68800. NB: 1298332800,
  68801. F: 1318896000,
  68802. "6B": 1341792000,
  68803. CB: 1374624000,
  68804. "7B": 1386547200,
  68805. "8B": 1401667200,
  68806. q: 1566777600
  68807. }
  68808. },
  68809. J: {
  68810. A: {
  68811. D: 0,
  68812. A: 0.011194
  68813. },
  68814. B: "webkit",
  68815. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "D", "A", "", "", ""],
  68816. E: "Blackberry Browser",
  68817. F: {
  68818. D: 1325376000,
  68819. A: 1359504000
  68820. }
  68821. },
  68822. K: {
  68823. A: {
  68824. "7": 0,
  68825. "9": 0,
  68826. A: 0,
  68827. B: 0,
  68828. C: 0,
  68829. M: 0.0111391,
  68830. GB: 0
  68831. },
  68832. B: "o",
  68833. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "A", "B", "7", "GB", "C", "9", "M", "", "", ""],
  68834. E: "Opera Mobile",
  68835. F: {
  68836. "7": 1314835200,
  68837. "9": 1349740800,
  68838. A: 1287100800,
  68839. B: 1300752000,
  68840. GB: 1318291200,
  68841. C: 1330300800,
  68842. M: 1474588800
  68843. },
  68844. D: {
  68845. M: "webkit"
  68846. }
  68847. },
  68848. L: {
  68849. A: {
  68850. QB: 35.1619
  68851. },
  68852. B: "webkit",
  68853. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "QB", "", "", ""],
  68854. E: "Chrome for Android",
  68855. F: {
  68856. QB: 1571702400
  68857. }
  68858. },
  68859. M: {
  68860. A: {
  68861. "8": 0.229477
  68862. },
  68863. B: "moz",
  68864. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "8", "", "", ""],
  68865. E: "Firefox for Android",
  68866. F: {
  68867. "8": 1567468800
  68868. }
  68869. },
  68870. N: {
  68871. A: {
  68872. A: 0.0115934,
  68873. B: 0.050373
  68874. },
  68875. B: "ms",
  68876. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "A", "B", "", "", ""],
  68877. E: "IE Mobile",
  68878. F: {
  68879. A: 1340150400,
  68880. B: 1353456000
  68881. }
  68882. },
  68883. O: {
  68884. A: {
  68885. "9B": 2.88246
  68886. },
  68887. B: "webkit",
  68888. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "9B", "", "", ""],
  68889. E: "UC Browser for Android",
  68890. F: {
  68891. "9B": 1471392000
  68892. },
  68893. D: {
  68894. "9B": "webkit"
  68895. }
  68896. },
  68897. P: {
  68898. A: {
  68899. F: 0.33211,
  68900. AC: 0.0311353,
  68901. BC: 0.0207569,
  68902. CC: 0.114163,
  68903. DC: 0.0415137,
  68904. EC: 0.321732,
  68905. OB: 2.72953
  68906. },
  68907. B: "webkit",
  68908. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "F", "AC", "BC", "CC", "DC", "EC", "OB", "", "", ""],
  68909. E: "Samsung Internet",
  68910. F: {
  68911. F: 1461024000,
  68912. AC: 1481846400,
  68913. BC: 1509408000,
  68914. CC: 1528329600,
  68915. DC: 1546128000,
  68916. EC: 1554163200,
  68917. OB: 1567900800
  68918. }
  68919. },
  68920. Q: {
  68921. A: {
  68922. FC: 0.201492
  68923. },
  68924. B: "webkit",
  68925. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "FC", "", "", ""],
  68926. E: "QQ Browser",
  68927. F: {
  68928. FC: 1483228800
  68929. }
  68930. },
  68931. R: {
  68932. A: {
  68933. GC: 0
  68934. },
  68935. B: "webkit",
  68936. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "GC", "", "", ""],
  68937. E: "Baidu Browser",
  68938. F: {
  68939. GC: 1491004800
  68940. }
  68941. },
  68942. S: {
  68943. A: {
  68944. HC: 0.195895
  68945. },
  68946. B: "moz",
  68947. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "HC", "", "", ""],
  68948. E: "KaiOS Browser",
  68949. F: {
  68950. HC: 1527811200
  68951. }
  68952. }
  68953. };
  68954. var agents_1 = createCommonjsModule(function (module, exports) {
  68955. Object.defineProperty(exports, "__esModule", {
  68956. value: true
  68957. });
  68958. exports.agents = undefined;
  68959. function unpackBrowserVersions(versionsData) {
  68960. return Object.keys(versionsData).reduce(function (usage, version) {
  68961. usage[browserVersions_1.browserVersions[version]] = versionsData[version];
  68962. return usage;
  68963. }, {});
  68964. }
  68965. var agents$1 = exports.agents = Object.keys(agents).reduce(function (map, key) {
  68966. var versionsData = agents[key];
  68967. map[browsers_1.browsers[key]] = Object.keys(versionsData).reduce(function (data, entry) {
  68968. if (entry === 'A') {
  68969. data.usage_global = unpackBrowserVersions(versionsData[entry]);
  68970. } else if (entry === 'C') {
  68971. data.versions = versionsData[entry].reduce(function (list, version) {
  68972. if (version === '') {
  68973. list.push(null);
  68974. } else {
  68975. list.push(browserVersions_1.browserVersions[version]);
  68976. }
  68977. return list;
  68978. }, []);
  68979. } else if (entry === 'D') {
  68980. data.prefix_exceptions = unpackBrowserVersions(versionsData[entry]);
  68981. } else if (entry === 'E') {
  68982. data.browser = versionsData[entry];
  68983. } else if (entry === 'F') {
  68984. data.release_date = Object.keys(versionsData[entry]).reduce(function (map, key) {
  68985. map[browserVersions_1.browserVersions[key]] = versionsData[entry][key];
  68986. return map;
  68987. }, {});
  68988. } else {
  68989. data.prefix = versionsData[entry];
  68990. }
  68991. return data;
  68992. }, {});
  68993. return map;
  68994. }, {});
  68995. });
  68996. unwrapExports(agents_1);
  68997. var agents_2 = agents_1.agents;
  68998. var v4 = {
  68999. start: "2015-09-08",
  69000. lts: "2015-10-12",
  69001. maintenance: "2017-04-01",
  69002. end: "2018-04-30",
  69003. codename: "Argon"
  69004. };
  69005. var v5 = {
  69006. start: "2015-10-29",
  69007. maintenance: "2016-04-30",
  69008. end: "2016-06-30"
  69009. };
  69010. var v6 = {
  69011. start: "2016-04-26",
  69012. lts: "2016-10-18",
  69013. maintenance: "2018-04-30",
  69014. end: "2019-04-30",
  69015. codename: "Boron"
  69016. };
  69017. var v7 = {
  69018. start: "2016-10-25",
  69019. maintenance: "2017-04-30",
  69020. end: "2017-06-30"
  69021. };
  69022. var v8$1 = {
  69023. start: "2017-05-30",
  69024. lts: "2017-10-31",
  69025. maintenance: "2019-01-01",
  69026. end: "2019-12-31",
  69027. codename: "Carbon"
  69028. };
  69029. var v9 = {
  69030. start: "2017-10-01",
  69031. maintenance: "2018-04-01",
  69032. end: "2018-06-30"
  69033. };
  69034. var v10 = {
  69035. start: "2018-04-24",
  69036. lts: "2018-10-30",
  69037. maintenance: "2020-04-01",
  69038. end: "2021-04-30",
  69039. codename: "Dubnium"
  69040. };
  69041. var v11 = {
  69042. start: "2018-10-23",
  69043. maintenance: "2019-04-22",
  69044. end: "2019-06-01"
  69045. };
  69046. var v12 = {
  69047. start: "2019-04-23",
  69048. lts: "2019-10-21",
  69049. maintenance: "2020-10-21",
  69050. end: "2022-04-30",
  69051. codename: "Erbium"
  69052. };
  69053. var v13 = {
  69054. start: "2019-10-22",
  69055. maintenance: "2020-04-01",
  69056. end: "2020-06-01"
  69057. };
  69058. var v14 = {
  69059. start: "2020-04-21",
  69060. lts: "2020-10-20",
  69061. maintenance: "2021-10-20",
  69062. end: "2023-04-30",
  69063. codename: ""
  69064. };
  69065. var releaseSchedule = {
  69066. "v0.10": {
  69067. start: "2013-03-11",
  69068. end: "2016-10-31"
  69069. },
  69070. "v0.12": {
  69071. start: "2015-02-06",
  69072. end: "2016-12-31"
  69073. },
  69074. v4: v4,
  69075. v5: v5,
  69076. v6: v6,
  69077. v7: v7,
  69078. v8: v8$1,
  69079. v9: v9,
  69080. v10: v10,
  69081. v11: v11,
  69082. v12: v12,
  69083. v13: v13,
  69084. v14: v14
  69085. };
  69086. var releaseSchedule$1 = /*#__PURE__*/Object.freeze({
  69087. __proto__: null,
  69088. v4: v4,
  69089. v5: v5,
  69090. v6: v6,
  69091. v7: v7,
  69092. v8: v8$1,
  69093. v9: v9,
  69094. v10: v10,
  69095. v11: v11,
  69096. v12: v12,
  69097. v13: v13,
  69098. v14: v14,
  69099. 'default': releaseSchedule
  69100. });
  69101. var versions$1 = {
  69102. "8.0": "79",
  69103. "7.1": "78",
  69104. "7.0": "78",
  69105. "6.1": "76",
  69106. "6.0": "76",
  69107. "5.0": "72",
  69108. "4.2": "69",
  69109. "4.1": "69",
  69110. "4.0": "69",
  69111. "3.1": "66",
  69112. "3.0": "66",
  69113. "2.1": "61",
  69114. "2.0": "61",
  69115. "1.8": "59",
  69116. "1.7": "58",
  69117. "1.6": "56",
  69118. "1.5": "54",
  69119. "1.4": "53",
  69120. "1.3": "52",
  69121. "1.2": "51",
  69122. "1.1": "50",
  69123. "1.0": "49",
  69124. "0.37": "49",
  69125. "0.36": "47",
  69126. "0.35": "45",
  69127. "0.34": "45",
  69128. "0.33": "45",
  69129. "0.32": "45",
  69130. "0.31": "44",
  69131. "0.30": "44",
  69132. "0.29": "43",
  69133. "0.28": "43",
  69134. "0.27": "42",
  69135. "0.26": "42",
  69136. "0.25": "42",
  69137. "0.24": "41",
  69138. "0.23": "41",
  69139. "0.22": "41",
  69140. "0.21": "40",
  69141. "0.20": "39"
  69142. };
  69143. function BrowserslistError(message) {
  69144. this.name = 'BrowserslistError';
  69145. this.message = message;
  69146. this.browserslist = true;
  69147. if (Error.captureStackTrace) {
  69148. Error.captureStackTrace(this, BrowserslistError);
  69149. }
  69150. }
  69151. BrowserslistError.prototype = Error.prototype;
  69152. var error = BrowserslistError;
  69153. function noop$2() {}
  69154. var browser$6 = {
  69155. loadQueries: function loadQueries() {
  69156. throw new error('Sharable configs are not supported in client-side build of Browserslist');
  69157. },
  69158. getStat: function getStat(opts) {
  69159. return opts.stats;
  69160. },
  69161. loadConfig: function loadConfig(opts) {
  69162. if (opts.config) {
  69163. throw new error('Browserslist config are not supported in client-side build');
  69164. }
  69165. },
  69166. loadCountry: function loadCountry() {
  69167. throw new error('Country statistics is not supported ' + 'in client-side build of Browserslist');
  69168. },
  69169. currentNode: function currentNode(resolve, context) {
  69170. return resolve(['maintained node versions'], context)[0];
  69171. },
  69172. parseConfig: noop$2,
  69173. readConfig: noop$2,
  69174. findConfig: noop$2,
  69175. clearCaches: noop$2,
  69176. oldDataWarning: noop$2
  69177. };
  69178. var jsReleases = getCjsExportFromNamespace(envs$1);
  69179. var jsEOL = getCjsExportFromNamespace(releaseSchedule$1);
  69180. var agents$1 = agents_1.agents;
  69181. var YEAR = 365.259641 * 24 * 60 * 60 * 1000;
  69182. var ANDROID_EVERGREEN_FIRST = 37;
  69183. var QUERY_OR = 1;
  69184. var QUERY_AND = 2;
  69185. function isVersionsMatch(versionA, versionB) {
  69186. return (versionA + '.').indexOf(versionB + '.') === 0;
  69187. }
  69188. function isEolReleased(name) {
  69189. var version = name.slice(1);
  69190. return jsReleases.some(function (i) {
  69191. return isVersionsMatch(i.version, version);
  69192. });
  69193. }
  69194. function normalize$1(versions) {
  69195. return versions.filter(function (version) {
  69196. return typeof version === 'string';
  69197. });
  69198. }
  69199. function normalizeElectron(version) {
  69200. var versionToUse = version;
  69201. if (version.split('.').length === 3) {
  69202. versionToUse = version.split('.').slice(0, -1).join('.');
  69203. }
  69204. return versionToUse;
  69205. }
  69206. function nameMapper(name) {
  69207. return function mapName(version) {
  69208. return name + ' ' + version;
  69209. };
  69210. }
  69211. function getMajor(version) {
  69212. return parseInt(version.split('.')[0]);
  69213. }
  69214. function getMajorVersions(released, number) {
  69215. if (released.length === 0) return [];
  69216. var minimum = getMajor(released[released.length - 1]) - parseInt(number) + 1;
  69217. var selected = [];
  69218. for (var i = released.length - 1; i >= 0; i--) {
  69219. if (minimum > getMajor(released[i])) break;
  69220. selected.unshift(released[i]);
  69221. }
  69222. return selected;
  69223. }
  69224. function uniq$1(array) {
  69225. var filtered = [];
  69226. for (var i = 0; i < array.length; i++) {
  69227. if (filtered.indexOf(array[i]) === -1) filtered.push(array[i]);
  69228. }
  69229. return filtered;
  69230. }
  69231. function fillUsage(result, name, data) {
  69232. for (var i in data) {
  69233. result[name + ' ' + i] = data[i];
  69234. }
  69235. }
  69236. function generateFilter(sign, version) {
  69237. version = parseFloat(version);
  69238. if (sign === '>') {
  69239. return function (v) {
  69240. return parseFloat(v) > version;
  69241. };
  69242. } else if (sign === '>=') {
  69243. return function (v) {
  69244. return parseFloat(v) >= version;
  69245. };
  69246. } else if (sign === '<') {
  69247. return function (v) {
  69248. return parseFloat(v) < version;
  69249. };
  69250. } else {
  69251. return function (v) {
  69252. return parseFloat(v) <= version;
  69253. };
  69254. }
  69255. }
  69256. function generateSemverFilter(sign, version) {
  69257. version = version.split('.').map(parseSimpleInt);
  69258. version[1] = version[1] || 0;
  69259. version[2] = version[2] || 0;
  69260. if (sign === '>') {
  69261. return function (v) {
  69262. v = v.split('.').map(parseSimpleInt);
  69263. return compareSemver(v, version) > 0;
  69264. };
  69265. } else if (sign === '>=') {
  69266. return function (v) {
  69267. v = v.split('.').map(parseSimpleInt);
  69268. return compareSemver(v, version) >= 0;
  69269. };
  69270. } else if (sign === '<') {
  69271. return function (v) {
  69272. v = v.split('.').map(parseSimpleInt);
  69273. return compareSemver(version, v) > 0;
  69274. };
  69275. } else {
  69276. return function (v) {
  69277. v = v.split('.').map(parseSimpleInt);
  69278. return compareSemver(version, v) >= 0;
  69279. };
  69280. }
  69281. }
  69282. function parseSimpleInt(x) {
  69283. return parseInt(x);
  69284. }
  69285. function compare$1(a, b) {
  69286. if (a < b) return -1;
  69287. if (a > b) return +1;
  69288. return 0;
  69289. }
  69290. function compareSemver(a, b) {
  69291. return compare$1(parseInt(a[0]), parseInt(b[0])) || compare$1(parseInt(a[1] || '0'), parseInt(b[1] || '0')) || compare$1(parseInt(a[2] || '0'), parseInt(b[2] || '0'));
  69292. }
  69293. function resolveVersion(data, version) {
  69294. if (data.versions.indexOf(version) !== -1) {
  69295. return version;
  69296. } else if (browserslist.versionAliases[data.name][version]) {
  69297. return browserslist.versionAliases[data.name][version];
  69298. } else {
  69299. return false;
  69300. }
  69301. }
  69302. function normalizeVersion(data, version) {
  69303. var resolved = resolveVersion(data, version);
  69304. if (resolved) {
  69305. return resolved;
  69306. } else if (data.versions.length === 1) {
  69307. return data.versions[0];
  69308. } else {
  69309. return false;
  69310. }
  69311. }
  69312. function filterByYear(since, context) {
  69313. since = since / 1000;
  69314. return Object.keys(agents$1).reduce(function (selected, name) {
  69315. var data = byName(name, context);
  69316. if (!data) return selected;
  69317. var versions = Object.keys(data.releaseDate).filter(function (v) {
  69318. return data.releaseDate[v] >= since;
  69319. });
  69320. return selected.concat(versions.map(nameMapper(data.name)));
  69321. }, []);
  69322. }
  69323. function cloneData(data) {
  69324. return {
  69325. name: data.name,
  69326. versions: data.versions,
  69327. released: data.released,
  69328. releaseDate: data.releaseDate
  69329. };
  69330. }
  69331. function byName(name, context) {
  69332. name = name.toLowerCase();
  69333. name = browserslist.aliases[name] || name;
  69334. if (context.mobileToDesktop && browserslist.desktopNames[name]) {
  69335. var desktop = browserslist.data[browserslist.desktopNames[name]];
  69336. if (name === 'android') {
  69337. return normalizeAndroidData(cloneData(browserslist.data[name]), desktop);
  69338. } else {
  69339. var cloned = cloneData(desktop);
  69340. cloned.name = name;
  69341. return cloned;
  69342. }
  69343. }
  69344. return browserslist.data[name];
  69345. }
  69346. function normalizeAndroidVersions(androidVersions, chromeVersions) {
  69347. var firstEvergreen = ANDROID_EVERGREEN_FIRST;
  69348. var last = chromeVersions[chromeVersions.length - 1];
  69349. return androidVersions.filter(function (version) {
  69350. return /^(?:[2-4]\.|[34]$)/.test(version);
  69351. }).concat(chromeVersions.slice(firstEvergreen - last - 1));
  69352. }
  69353. function normalizeAndroidData(android, chrome) {
  69354. android.released = normalizeAndroidVersions(android.released, chrome.released);
  69355. android.versions = normalizeAndroidVersions(android.versions, chrome.versions);
  69356. return android;
  69357. }
  69358. function checkName(name, context) {
  69359. var data = byName(name, context);
  69360. if (!data) throw new error('Unknown browser ' + name);
  69361. return data;
  69362. }
  69363. function unknownQuery(query) {
  69364. return new error('Unknown browser query `' + query + '`. ' + 'Maybe you are using old Browserslist or made typo in query.');
  69365. }
  69366. function filterAndroid(list, versions, context) {
  69367. if (context.mobileToDesktop) return list;
  69368. var released = browserslist.data.android.released;
  69369. var last = released[released.length - 1];
  69370. var diff = last - ANDROID_EVERGREEN_FIRST - versions;
  69371. if (diff > 0) {
  69372. return list.slice(-1);
  69373. } else {
  69374. return list.slice(diff - 1);
  69375. }
  69376. }
  69377. function resolve$3(queries, context) {
  69378. if (Array.isArray(queries)) {
  69379. queries = flatten(queries.map(parse$6));
  69380. } else {
  69381. queries = parse$6(queries);
  69382. }
  69383. return queries.reduce(function (result, query, index) {
  69384. var selection = query.queryString;
  69385. var isExclude = selection.indexOf('not ') === 0;
  69386. if (isExclude) {
  69387. if (index === 0) {
  69388. throw new error('Write any browsers query (for instance, `defaults`) ' + 'before `' + selection + '`');
  69389. }
  69390. selection = selection.slice(4);
  69391. }
  69392. for (var i = 0; i < QUERIES.length; i++) {
  69393. var type = QUERIES[i];
  69394. var match = selection.match(type.regexp);
  69395. if (match) {
  69396. var args = [context].concat(match.slice(1));
  69397. var array = type.select.apply(browserslist, args).map(function (j) {
  69398. var parts = j.split(' ');
  69399. if (parts[1] === '0') {
  69400. return parts[0] + ' ' + byName(parts[0], context).versions[0];
  69401. } else {
  69402. return j;
  69403. }
  69404. });
  69405. switch (query.type) {
  69406. case QUERY_AND:
  69407. if (isExclude) {
  69408. return result.filter(function (j) {
  69409. return array.indexOf(j) === -1;
  69410. });
  69411. } else {
  69412. return result.filter(function (j) {
  69413. return array.indexOf(j) !== -1;
  69414. });
  69415. }
  69416. case QUERY_OR:
  69417. default:
  69418. if (isExclude) {
  69419. var filter = {};
  69420. array.forEach(function (j) {
  69421. filter[j] = true;
  69422. });
  69423. return result.filter(function (j) {
  69424. return !filter[j];
  69425. });
  69426. }
  69427. return result.concat(array);
  69428. }
  69429. }
  69430. }
  69431. throw unknownQuery(selection);
  69432. }, []);
  69433. }
  69434. var cache$1 = {};
  69435. function browserslist(queries, opts) {
  69436. if (typeof opts === 'undefined') opts = {};
  69437. if (typeof opts.path === 'undefined') {
  69438. opts.path = path$2.resolve ? path$2.resolve('.') : '.';
  69439. }
  69440. if (typeof queries === 'undefined' || queries === null) {
  69441. var config = browserslist.loadConfig(opts);
  69442. if (config) {
  69443. queries = config;
  69444. } else {
  69445. queries = browserslist.defaults;
  69446. }
  69447. }
  69448. if (!(typeof queries === 'string' || Array.isArray(queries))) {
  69449. throw new error('Browser queries must be an array or string. Got ' + typeof queries + '.');
  69450. }
  69451. var context = {
  69452. ignoreUnknownVersions: opts.ignoreUnknownVersions,
  69453. dangerousExtend: opts.dangerousExtend,
  69454. mobileToDesktop: opts.mobileToDesktop
  69455. };
  69456. browser$6.oldDataWarning(browserslist.data);
  69457. var stats = browser$6.getStat(opts, browserslist.data);
  69458. if (stats) {
  69459. context.customUsage = {};
  69460. for (var browser in stats) {
  69461. fillUsage(context.customUsage, browser, stats[browser]);
  69462. }
  69463. }
  69464. var cacheKey = JSON.stringify([queries, context]);
  69465. if (cache$1[cacheKey]) return cache$1[cacheKey];
  69466. var result = uniq$1(resolve$3(queries, context)).sort(function (name1, name2) {
  69467. name1 = name1.split(' ');
  69468. name2 = name2.split(' ');
  69469. if (name1[0] === name2[0]) {
  69470. var version1 = name1[1].split('-')[0];
  69471. var version2 = name2[1].split('-')[0];
  69472. return compareSemver(version2.split('.'), version1.split('.'));
  69473. } else {
  69474. return compare$1(name1[0], name2[0]);
  69475. }
  69476. });
  69477. if (!process.env.BROWSERSLIST_DISABLE_CACHE) {
  69478. cache$1[cacheKey] = result;
  69479. }
  69480. return result;
  69481. }
  69482. function parse$6(queries) {
  69483. var qs = [];
  69484. do {
  69485. queries = doMatch(queries, qs);
  69486. } while (queries);
  69487. return qs;
  69488. }
  69489. function doMatch(string, qs) {
  69490. var or = /^(?:,\s*|\s+or\s+)(.*)/i;
  69491. var and = /^\s+and\s+(.*)/i;
  69492. return find$2(string, function (parsed, n, max) {
  69493. if (and.test(parsed)) {
  69494. qs.unshift({
  69495. type: QUERY_AND,
  69496. queryString: parsed.match(and)[1]
  69497. });
  69498. return true;
  69499. } else if (or.test(parsed)) {
  69500. qs.unshift({
  69501. type: QUERY_OR,
  69502. queryString: parsed.match(or)[1]
  69503. });
  69504. return true;
  69505. } else if (n === max) {
  69506. qs.unshift({
  69507. type: QUERY_OR,
  69508. queryString: parsed.trim()
  69509. });
  69510. return true;
  69511. }
  69512. return false;
  69513. });
  69514. }
  69515. function find$2(string, predicate) {
  69516. for (var n = 1, max = string.length; n <= max; n++) {
  69517. var parsed = string.substr(-n, n);
  69518. if (predicate(parsed, n, max)) {
  69519. return string.slice(0, -n);
  69520. }
  69521. }
  69522. return '';
  69523. }
  69524. function flatten(array) {
  69525. if (!Array.isArray(array)) return [array];
  69526. return array.reduce(function (a, b) {
  69527. return a.concat(flatten(b));
  69528. }, []);
  69529. }
  69530. browserslist.data = {};
  69531. browserslist.usage = {
  69532. global: {},
  69533. custom: null
  69534. };
  69535. browserslist.defaults = ['> 0.5%', 'last 2 versions', 'Firefox ESR', 'not dead'];
  69536. browserslist.aliases = {
  69537. fx: 'firefox',
  69538. ff: 'firefox',
  69539. ios: 'ios_saf',
  69540. explorer: 'ie',
  69541. blackberry: 'bb',
  69542. explorermobile: 'ie_mob',
  69543. operamini: 'op_mini',
  69544. operamobile: 'op_mob',
  69545. chromeandroid: 'and_chr',
  69546. firefoxandroid: 'and_ff',
  69547. ucandroid: 'and_uc',
  69548. qqandroid: 'and_qq'
  69549. };
  69550. browserslist.desktopNames = {
  69551. and_chr: 'chrome',
  69552. and_ff: 'firefox',
  69553. ie_mob: 'ie',
  69554. op_mob: 'opera',
  69555. android: 'chrome'
  69556. };
  69557. browserslist.versionAliases = {};
  69558. browserslist.clearCaches = browser$6.clearCaches;
  69559. browserslist.parseConfig = browser$6.parseConfig;
  69560. browserslist.readConfig = browser$6.readConfig;
  69561. browserslist.findConfig = browser$6.findConfig;
  69562. browserslist.loadConfig = browser$6.loadConfig;
  69563. browserslist.coverage = function (browsers, stats) {
  69564. var data;
  69565. if (typeof stats === 'undefined') {
  69566. data = browserslist.usage.global;
  69567. } else if (stats === 'my stats') {
  69568. var opts = {};
  69569. opts.path = path$2.resolve ? path$2.resolve('.') : '.';
  69570. var customStats = browser$6.getStat(opts);
  69571. if (!customStats) {
  69572. throw new error('Custom usage statistics was not provided');
  69573. }
  69574. data = {};
  69575. for (var browser in customStats) {
  69576. fillUsage(data, browser, customStats[browser]);
  69577. }
  69578. } else if (typeof stats === 'string') {
  69579. if (stats.length > 2) {
  69580. stats = stats.toLowerCase();
  69581. } else {
  69582. stats = stats.toUpperCase();
  69583. }
  69584. browser$6.loadCountry(browserslist.usage, stats);
  69585. data = browserslist.usage[stats];
  69586. } else {
  69587. if ('dataByBrowser' in stats) {
  69588. stats = stats.dataByBrowser;
  69589. }
  69590. data = {};
  69591. for (var name in stats) {
  69592. for (var version in stats[name]) {
  69593. data[name + ' ' + version] = stats[name][version];
  69594. }
  69595. }
  69596. }
  69597. return browsers.reduce(function (all, i) {
  69598. var usage = data[i];
  69599. if (usage === undefined) {
  69600. usage = data[i.replace(/ \S+$/, ' 0')];
  69601. }
  69602. return all + (usage || 0);
  69603. }, 0);
  69604. };
  69605. var QUERIES = [{
  69606. regexp: /^last\s+(\d+)\s+major\s+versions?$/i,
  69607. select: function select(context, versions) {
  69608. return Object.keys(agents$1).reduce(function (selected, name) {
  69609. var data = byName(name, context);
  69610. if (!data) return selected;
  69611. var list = getMajorVersions(data.released, versions);
  69612. list = list.map(nameMapper(data.name));
  69613. if (data.name === 'android') {
  69614. list = filterAndroid(list, versions, context);
  69615. }
  69616. return selected.concat(list);
  69617. }, []);
  69618. }
  69619. }, {
  69620. regexp: /^last\s+(\d+)\s+versions?$/i,
  69621. select: function select(context, versions) {
  69622. return Object.keys(agents$1).reduce(function (selected, name) {
  69623. var data = byName(name, context);
  69624. if (!data) return selected;
  69625. var list = data.released.slice(-versions);
  69626. list = list.map(nameMapper(data.name));
  69627. if (data.name === 'android') {
  69628. list = filterAndroid(list, versions, context);
  69629. }
  69630. return selected.concat(list);
  69631. }, []);
  69632. }
  69633. }, {
  69634. regexp: /^last\s+(\d+)\s+electron\s+major\s+versions?$/i,
  69635. select: function select(context, versions) {
  69636. var validVersions = getMajorVersions(Object.keys(versions$1).reverse(), versions);
  69637. return validVersions.map(function (i) {
  69638. return 'chrome ' + versions$1[i];
  69639. });
  69640. }
  69641. }, {
  69642. regexp: /^last\s+(\d+)\s+(\w+)\s+major\s+versions?$/i,
  69643. select: function select(context, versions, name) {
  69644. var data = checkName(name, context);
  69645. var validVersions = getMajorVersions(data.released, versions);
  69646. var list = validVersions.map(nameMapper(data.name));
  69647. if (data.name === 'android') {
  69648. list = filterAndroid(list, versions, context);
  69649. }
  69650. return list;
  69651. }
  69652. }, {
  69653. regexp: /^last\s+(\d+)\s+electron\s+versions?$/i,
  69654. select: function select(context, versions) {
  69655. return Object.keys(versions$1).reverse().slice(-versions).map(function (i) {
  69656. return 'chrome ' + versions$1[i];
  69657. });
  69658. }
  69659. }, {
  69660. regexp: /^last\s+(\d+)\s+(\w+)\s+versions?$/i,
  69661. select: function select(context, versions, name) {
  69662. var data = checkName(name, context);
  69663. var list = data.released.slice(-versions).map(nameMapper(data.name));
  69664. if (data.name === 'android') {
  69665. list = filterAndroid(list, versions, context);
  69666. }
  69667. return list;
  69668. }
  69669. }, {
  69670. regexp: /^unreleased\s+versions$/i,
  69671. select: function select(context) {
  69672. return Object.keys(agents$1).reduce(function (selected, name) {
  69673. var data = byName(name, context);
  69674. if (!data) return selected;
  69675. var list = data.versions.filter(function (v) {
  69676. return data.released.indexOf(v) === -1;
  69677. });
  69678. list = list.map(nameMapper(data.name));
  69679. return selected.concat(list);
  69680. }, []);
  69681. }
  69682. }, {
  69683. regexp: /^unreleased\s+electron\s+versions?$/i,
  69684. select: function select() {
  69685. return [];
  69686. }
  69687. }, {
  69688. regexp: /^unreleased\s+(\w+)\s+versions?$/i,
  69689. select: function select(context, name) {
  69690. var data = checkName(name, context);
  69691. return data.versions.filter(function (v) {
  69692. return data.released.indexOf(v) === -1;
  69693. }).map(nameMapper(data.name));
  69694. }
  69695. }, {
  69696. regexp: /^last\s+(\d*.?\d+)\s+years?$/i,
  69697. select: function select(context, years) {
  69698. return filterByYear(Date.now() - YEAR * years, context);
  69699. }
  69700. }, {
  69701. regexp: /^since (\d+)(?:-(\d+))?(?:-(\d+))?$/i,
  69702. select: function select(context, year, month, date) {
  69703. year = parseInt(year);
  69704. month = parseInt(month || '01') - 1;
  69705. date = parseInt(date || '01');
  69706. return filterByYear(Date.UTC(year, month, date, 0, 0, 0), context);
  69707. }
  69708. }, {
  69709. regexp: /^(>=?|<=?)\s*(\d*\.?\d+)%$/,
  69710. select: function select(context, sign, popularity) {
  69711. popularity = parseFloat(popularity);
  69712. var usage = browserslist.usage.global;
  69713. return Object.keys(usage).reduce(function (result, version) {
  69714. if (sign === '>') {
  69715. if (usage[version] > popularity) {
  69716. result.push(version);
  69717. }
  69718. } else if (sign === '<') {
  69719. if (usage[version] < popularity) {
  69720. result.push(version);
  69721. }
  69722. } else if (sign === '<=') {
  69723. if (usage[version] <= popularity) {
  69724. result.push(version);
  69725. }
  69726. } else if (usage[version] >= popularity) {
  69727. result.push(version);
  69728. }
  69729. return result;
  69730. }, []);
  69731. }
  69732. }, {
  69733. regexp: /^(>=?|<=?)\s*(\d*\.?\d+)%\s+in\s+my\s+stats$/,
  69734. select: function select(context, sign, popularity) {
  69735. popularity = parseFloat(popularity);
  69736. if (!context.customUsage) {
  69737. throw new error('Custom usage statistics was not provided');
  69738. }
  69739. var usage = context.customUsage;
  69740. return Object.keys(usage).reduce(function (result, version) {
  69741. if (sign === '>') {
  69742. if (usage[version] > popularity) {
  69743. result.push(version);
  69744. }
  69745. } else if (sign === '<') {
  69746. if (usage[version] < popularity) {
  69747. result.push(version);
  69748. }
  69749. } else if (sign === '<=') {
  69750. if (usage[version] <= popularity) {
  69751. result.push(version);
  69752. }
  69753. } else if (usage[version] >= popularity) {
  69754. result.push(version);
  69755. }
  69756. return result;
  69757. }, []);
  69758. }
  69759. }, {
  69760. regexp: /^(>=?|<=?)\s*(\d*\.?\d+)%\s+in\s+(\S+)\s+stats$/,
  69761. select: function select(context, sign, popularity, name) {
  69762. popularity = parseFloat(popularity);
  69763. var stats = browser$6.loadStat(context, name, browserslist.data);
  69764. if (stats) {
  69765. context.customUsage = {};
  69766. for (var browser in stats) {
  69767. fillUsage(context.customUsage, browser, stats[browser]);
  69768. }
  69769. }
  69770. if (!context.customUsage) {
  69771. throw new error('Custom usage statistics was not provided');
  69772. }
  69773. var usage = context.customUsage;
  69774. return Object.keys(usage).reduce(function (result, version) {
  69775. if (sign === '>') {
  69776. if (usage[version] > popularity) {
  69777. result.push(version);
  69778. }
  69779. } else if (sign === '<') {
  69780. if (usage[version] < popularity) {
  69781. result.push(version);
  69782. }
  69783. } else if (sign === '<=') {
  69784. if (usage[version] <= popularity) {
  69785. result.push(version);
  69786. }
  69787. } else if (usage[version] >= popularity) {
  69788. result.push(version);
  69789. }
  69790. return result;
  69791. }, []);
  69792. }
  69793. }, {
  69794. regexp: /^(>=?|<=?)\s*(\d*\.?\d+)%\s+in\s+((alt-)?\w\w)$/,
  69795. select: function select(context, sign, popularity, place) {
  69796. popularity = parseFloat(popularity);
  69797. if (place.length === 2) {
  69798. place = place.toUpperCase();
  69799. } else {
  69800. place = place.toLowerCase();
  69801. }
  69802. browser$6.loadCountry(browserslist.usage, place);
  69803. var usage = browserslist.usage[place];
  69804. return Object.keys(usage).reduce(function (result, version) {
  69805. if (sign === '>') {
  69806. if (usage[version] > popularity) {
  69807. result.push(version);
  69808. }
  69809. } else if (sign === '<') {
  69810. if (usage[version] < popularity) {
  69811. result.push(version);
  69812. }
  69813. } else if (sign === '<=') {
  69814. if (usage[version] <= popularity) {
  69815. result.push(version);
  69816. }
  69817. } else if (usage[version] >= popularity) {
  69818. result.push(version);
  69819. }
  69820. return result;
  69821. }, []);
  69822. }
  69823. }, {
  69824. regexp: /^cover\s+(\d*\.?\d+)%(\s+in\s+(my\s+stats|(alt-)?\w\w))?$/,
  69825. select: function select(context, coverage, statMode) {
  69826. coverage = parseFloat(coverage);
  69827. var usage = browserslist.usage.global;
  69828. if (statMode) {
  69829. if (statMode.match(/^\s+in\s+my\s+stats$/)) {
  69830. if (!context.customUsage) {
  69831. throw new error('Custom usage statistics was not provided');
  69832. }
  69833. usage = context.customUsage;
  69834. } else {
  69835. var match = statMode.match(/\s+in\s+((alt-)?\w\w)/);
  69836. var place = match[1];
  69837. if (place.length === 2) {
  69838. place = place.toUpperCase();
  69839. } else {
  69840. place = place.toLowerCase();
  69841. }
  69842. browser$6.loadCountry(browserslist.usage, place);
  69843. usage = browserslist.usage[place];
  69844. }
  69845. }
  69846. var versions = Object.keys(usage).sort(function (a, b) {
  69847. return usage[b] - usage[a];
  69848. });
  69849. var coveraged = 0;
  69850. var result = [];
  69851. var version;
  69852. for (var i = 0; i <= versions.length; i++) {
  69853. version = versions[i];
  69854. if (usage[version] === 0) break;
  69855. coveraged += usage[version];
  69856. result.push(version);
  69857. if (coveraged >= coverage) break;
  69858. }
  69859. return result;
  69860. }
  69861. }, {
  69862. regexp: /^electron\s+([\d.]+)\s*-\s*([\d.]+)$/i,
  69863. select: function select(context, from, to) {
  69864. var fromToUse = normalizeElectron(from);
  69865. var toToUse = normalizeElectron(to);
  69866. if (!versions$1[fromToUse]) {
  69867. throw new error('Unknown version ' + from + ' of electron');
  69868. }
  69869. if (!versions$1[toToUse]) {
  69870. throw new error('Unknown version ' + to + ' of electron');
  69871. }
  69872. from = parseFloat(from);
  69873. to = parseFloat(to);
  69874. return Object.keys(versions$1).filter(function (i) {
  69875. var parsed = parseFloat(i);
  69876. return parsed >= from && parsed <= to;
  69877. }).map(function (i) {
  69878. return 'chrome ' + versions$1[i];
  69879. });
  69880. }
  69881. }, {
  69882. regexp: /^(\w+)\s+([\d.]+)\s*-\s*([\d.]+)$/i,
  69883. select: function select(context, name, from, to) {
  69884. var data = checkName(name, context);
  69885. from = parseFloat(normalizeVersion(data, from) || from);
  69886. to = parseFloat(normalizeVersion(data, to) || to);
  69887. function filter(v) {
  69888. var parsed = parseFloat(v);
  69889. return parsed >= from && parsed <= to;
  69890. }
  69891. return data.released.filter(filter).map(nameMapper(data.name));
  69892. }
  69893. }, {
  69894. regexp: /^electron\s*(>=?|<=?)\s*([\d.]+)$/i,
  69895. select: function select(context, sign, version) {
  69896. var versionToUse = normalizeElectron(version);
  69897. return Object.keys(versions$1).filter(generateFilter(sign, versionToUse)).map(function (i) {
  69898. return 'chrome ' + versions$1[i];
  69899. });
  69900. }
  69901. }, {
  69902. regexp: /^node\s*(>=?|<=?)\s*([\d.]+)$/i,
  69903. select: function select(context, sign, version) {
  69904. var nodeVersions = jsReleases.filter(function (i) {
  69905. return i.name === 'nodejs';
  69906. }).map(function (i) {
  69907. return i.version;
  69908. });
  69909. return nodeVersions.filter(generateSemverFilter(sign, version)).map(function (v) {
  69910. return 'node ' + v;
  69911. });
  69912. }
  69913. }, {
  69914. regexp: /^(\w+)\s*(>=?|<=?)\s*([\d.]+)$/,
  69915. select: function select(context, name, sign, version) {
  69916. var data = checkName(name, context);
  69917. var alias = browserslist.versionAliases[data.name][version];
  69918. if (alias) {
  69919. version = alias;
  69920. }
  69921. return data.released.filter(generateFilter(sign, version)).map(function (v) {
  69922. return data.name + ' ' + v;
  69923. });
  69924. }
  69925. }, {
  69926. regexp: /^(firefox|ff|fx)\s+esr$/i,
  69927. select: function select() {
  69928. return ['firefox 68'];
  69929. }
  69930. }, {
  69931. regexp: /(operamini|op_mini)\s+all/i,
  69932. select: function select() {
  69933. return ['op_mini all'];
  69934. }
  69935. }, {
  69936. regexp: /^electron\s+([\d.]+)$/i,
  69937. select: function select(context, version) {
  69938. var versionToUse = normalizeElectron(version);
  69939. var chrome = versions$1[versionToUse];
  69940. if (!chrome) {
  69941. throw new error('Unknown version ' + version + ' of electron');
  69942. }
  69943. return ['chrome ' + chrome];
  69944. }
  69945. }, {
  69946. regexp: /^node\s+(\d+(\.\d+)?(\.\d+)?)$/i,
  69947. select: function select(context, version) {
  69948. var nodeReleases = jsReleases.filter(function (i) {
  69949. return i.name === 'nodejs';
  69950. });
  69951. var matched = nodeReleases.filter(function (i) {
  69952. return isVersionsMatch(i.version, version);
  69953. });
  69954. if (matched.length === 0) {
  69955. if (context.ignoreUnknownVersions) {
  69956. return [];
  69957. } else {
  69958. throw new error('Unknown version ' + version + ' of Node.js');
  69959. }
  69960. }
  69961. return ['node ' + matched[matched.length - 1].version];
  69962. }
  69963. }, {
  69964. regexp: /^current\s+node$/i,
  69965. select: function select(context) {
  69966. return [browser$6.currentNode(resolve$3, context)];
  69967. }
  69968. }, {
  69969. regexp: /^maintained\s+node\s+versions$/i,
  69970. select: function select(context) {
  69971. var now = Date.now();
  69972. var queries = Object.keys(jsEOL).filter(function (key) {
  69973. return now < Date.parse(jsEOL[key].end) && now > Date.parse(jsEOL[key].start) && isEolReleased(key);
  69974. }).map(function (key) {
  69975. return 'node ' + key.slice(1);
  69976. });
  69977. return resolve$3(queries, context);
  69978. }
  69979. }, {
  69980. regexp: /^phantomjs\s+1.9$/i,
  69981. select: function select() {
  69982. return ['safari 5'];
  69983. }
  69984. }, {
  69985. regexp: /^phantomjs\s+2.1$/i,
  69986. select: function select() {
  69987. return ['safari 6'];
  69988. }
  69989. }, {
  69990. regexp: /^(\w+)\s+(tp|[\d.]+)$/i,
  69991. select: function select(context, name, version) {
  69992. if (/^tp$/i.test(version)) version = 'TP';
  69993. var data = checkName(name, context);
  69994. var alias = normalizeVersion(data, version);
  69995. if (alias) {
  69996. version = alias;
  69997. } else {
  69998. if (version.indexOf('.') === -1) {
  69999. alias = version + '.0';
  70000. } else {
  70001. alias = version.replace(/\.0$/, '');
  70002. }
  70003. alias = normalizeVersion(data, alias);
  70004. if (alias) {
  70005. version = alias;
  70006. } else if (context.ignoreUnknownVersions) {
  70007. return [];
  70008. } else {
  70009. throw new error('Unknown version ' + version + ' of ' + name);
  70010. }
  70011. }
  70012. return [data.name + ' ' + version];
  70013. }
  70014. }, {
  70015. regexp: /^extends (.+)$/i,
  70016. select: function select(context, name) {
  70017. return resolve$3(browser$6.loadQueries(context, name), context);
  70018. }
  70019. }, {
  70020. regexp: /^defaults$/i,
  70021. select: function select(context) {
  70022. return resolve$3(browserslist.defaults, context);
  70023. }
  70024. }, {
  70025. regexp: /^dead$/i,
  70026. select: function select(context) {
  70027. var dead = ['ie <= 10', 'ie_mob <= 10', 'bb <= 10', 'op_mob <= 12.1', 'samsung 4'];
  70028. return resolve$3(dead, context);
  70029. }
  70030. }, {
  70031. regexp: /^(\w+)$/i,
  70032. select: function select(context, name) {
  70033. if (byName(name, context)) {
  70034. throw new error('Specify versions in Browserslist query for browser ' + name);
  70035. } else {
  70036. throw unknownQuery(name);
  70037. }
  70038. }
  70039. }];
  70040. (function () {
  70041. for (var name in agents$1) {
  70042. var browser = agents$1[name];
  70043. browserslist.data[name] = {
  70044. name: name,
  70045. versions: normalize$1(agents$1[name].versions),
  70046. released: normalize$1(agents$1[name].versions.slice(0, -3)),
  70047. releaseDate: agents$1[name].release_date
  70048. };
  70049. fillUsage(browserslist.usage.global, name, browser.usage_global);
  70050. browserslist.versionAliases[name] = {};
  70051. for (var i = 0; i < browser.versions.length; i++) {
  70052. var full = browser.versions[i];
  70053. if (!full) continue;
  70054. if (full.indexOf('-') !== -1) {
  70055. var interval = full.split('-');
  70056. for (var j = 0; j < interval.length; j++) {
  70057. browserslist.versionAliases[name][interval[j]] = full;
  70058. }
  70059. }
  70060. }
  70061. }
  70062. })();
  70063. var browserslist_1 = browserslist;
  70064. var leven_1 = createCommonjsModule(function (module) {
  70065. var array = [];
  70066. var charCodeCache = [];
  70067. var leven = function leven(left, right) {
  70068. if (left === right) {
  70069. return 0;
  70070. }
  70071. var swap = left;
  70072. if (left.length > right.length) {
  70073. left = right;
  70074. right = swap;
  70075. }
  70076. var leftLength = left.length;
  70077. var rightLength = right.length;
  70078. while (leftLength > 0 && left.charCodeAt(~-leftLength) === right.charCodeAt(~-rightLength)) {
  70079. leftLength--;
  70080. rightLength--;
  70081. }
  70082. var start = 0;
  70083. while (start < leftLength && left.charCodeAt(start) === right.charCodeAt(start)) {
  70084. start++;
  70085. }
  70086. leftLength -= start;
  70087. rightLength -= start;
  70088. if (leftLength === 0) {
  70089. return rightLength;
  70090. }
  70091. var bCharCode;
  70092. var result;
  70093. var temp;
  70094. var temp2;
  70095. var i = 0;
  70096. var j = 0;
  70097. while (i < leftLength) {
  70098. charCodeCache[i] = left.charCodeAt(start + i);
  70099. array[i] = ++i;
  70100. }
  70101. while (j < rightLength) {
  70102. bCharCode = right.charCodeAt(start + j);
  70103. temp = j++;
  70104. result = j;
  70105. for (i = 0; i < leftLength; i++) {
  70106. temp2 = bCharCode === charCodeCache[i] ? temp : temp + 1;
  70107. temp = array[i];
  70108. result = array[i] = temp > result ? temp2 > result ? result + 1 : temp2 : temp2 > temp ? temp + 1 : temp2;
  70109. }
  70110. }
  70111. return result;
  70112. };
  70113. module.exports = leven;
  70114. module.exports["default"] = leven;
  70115. });
  70116. function levenArray(str, array) {
  70117. var minLeven = Number.POSITIVE_INFINITY;
  70118. var result = undefined;
  70119. for (var _iterator = array, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  70120. var _ref;
  70121. if (_isArray) {
  70122. if (_i >= _iterator.length) break;
  70123. _ref = _iterator[_i++];
  70124. } else {
  70125. _i = _iterator.next();
  70126. if (_i.done) break;
  70127. _ref = _i.value;
  70128. }
  70129. var item = _ref;
  70130. var distance = leven_1(str, item);
  70131. if (distance < minLeven) {
  70132. minLeven = distance;
  70133. result = item;
  70134. }
  70135. }
  70136. return result;
  70137. }
  70138. var invariant = function invariant(condition, format, a, b, c, d, e, f) {
  70139. {
  70140. if (format === undefined) {
  70141. throw new Error('invariant requires an error message argument');
  70142. }
  70143. }
  70144. if (!condition) {
  70145. var error;
  70146. if (format === undefined) {
  70147. error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
  70148. } else {
  70149. var args = [a, b, c, d, e, f];
  70150. var argIndex = 0;
  70151. error = new Error(format.replace(/%s/g, function () {
  70152. return args[argIndex++];
  70153. }));
  70154. error.name = 'Invariant Violation';
  70155. }
  70156. error.framesToPop = 1;
  70157. throw error;
  70158. }
  70159. };
  70160. var browser$7 = invariant;
  70161. var nativeModules = {
  70162. "es6.module": {
  70163. edge: "16",
  70164. firefox: "60",
  70165. chrome: "61",
  70166. safari: "10.1",
  70167. opera: "48",
  70168. ios_saf: "10.3",
  70169. and_chr: "74",
  70170. and_ff: "66"
  70171. }
  70172. };
  70173. var nativeModules$1 = /*#__PURE__*/Object.freeze({
  70174. __proto__: null,
  70175. 'default': nativeModules
  70176. });
  70177. var require$$0$2 = getCjsExportFromNamespace(nativeModules$1);
  70178. var nativeModules$2 = require$$0$2;
  70179. var unreleasedLabels = {
  70180. safari: "tp"
  70181. };
  70182. var browserNameMap = {
  70183. and_chr: "chrome",
  70184. and_ff: "firefox",
  70185. android: "android",
  70186. chrome: "chrome",
  70187. edge: "edge",
  70188. firefox: "firefox",
  70189. ie: "ie",
  70190. ie_mob: "ie",
  70191. ios_saf: "ios",
  70192. node: "node",
  70193. op_mob: "opera",
  70194. opera: "opera",
  70195. safari: "safari",
  70196. samsung: "samsung"
  70197. };
  70198. var versionRegExp = /^(\d+|\d+.\d+)$/;
  70199. function semverMin(first, second) {
  70200. return first && semver.lt(first, second) ? first : second;
  70201. }
  70202. function semverify(version) {
  70203. if (typeof version === "string" && semver.valid(version)) {
  70204. return version;
  70205. }
  70206. browser$7(typeof version === "number" || typeof version === "string" && versionRegExp.test(version), "'" + version + "' is not a valid version");
  70207. var split = version.toString().split(".");
  70208. while (split.length < 3) {
  70209. split.push("0");
  70210. }
  70211. return split.join(".");
  70212. }
  70213. function isUnreleasedVersion(version, env) {
  70214. var unreleasedLabel = unreleasedLabels[env];
  70215. return !!unreleasedLabel && unreleasedLabel === version.toString().toLowerCase();
  70216. }
  70217. function getLowestUnreleased(a, b, env) {
  70218. var unreleasedLabel = unreleasedLabels[env];
  70219. var hasUnreleased = [a, b].some(function (item) {
  70220. return item === unreleasedLabel;
  70221. });
  70222. if (hasUnreleased) {
  70223. return a === hasUnreleased ? b : a || b;
  70224. }
  70225. return semverMin(a, b);
  70226. }
  70227. function getLowestImplementedVersion(plugin, environment) {
  70228. var result = plugin[environment];
  70229. if (!result && environment === "android") {
  70230. return plugin.chrome;
  70231. }
  70232. return result;
  70233. }
  70234. var TargetNames = {
  70235. esmodules: "esmodules",
  70236. node: "node",
  70237. browsers: "browsers",
  70238. chrome: "chrome",
  70239. opera: "opera",
  70240. edge: "edge",
  70241. firefox: "firefox",
  70242. safari: "safari",
  70243. ie: "ie",
  70244. ios: "ios",
  70245. android: "android",
  70246. electron: "electron",
  70247. samsung: "samsung",
  70248. uglify: "uglify"
  70249. };
  70250. function prettifyVersion(version) {
  70251. if (typeof version !== "string") {
  70252. return version;
  70253. }
  70254. var parts = [semver.major(version)];
  70255. var minor = semver.minor(version);
  70256. var patch = semver.patch(version);
  70257. if (minor || patch) {
  70258. parts.push(minor);
  70259. }
  70260. if (patch) {
  70261. parts.push(patch);
  70262. }
  70263. return parts.join(".");
  70264. }
  70265. function prettifyTargets(targets) {
  70266. return Object.keys(targets).reduce(function (results, target) {
  70267. var value = targets[target];
  70268. var unreleasedLabel = unreleasedLabels[target];
  70269. if (typeof value === "string" && unreleasedLabel !== value) {
  70270. value = prettifyVersion(value);
  70271. }
  70272. results[target] = value;
  70273. return results;
  70274. }, {});
  70275. }
  70276. function getInclusionReasons(item, targetVersions, list) {
  70277. var minVersions = list[item] || {};
  70278. return Object.keys(targetVersions).reduce(function (result, env) {
  70279. var minVersion = getLowestImplementedVersion(minVersions, env);
  70280. var targetVersion = targetVersions[env];
  70281. if (!minVersion) {
  70282. result[env] = prettifyVersion(targetVersion);
  70283. } else {
  70284. var minIsUnreleased = isUnreleasedVersion(minVersion, env);
  70285. var targetIsUnreleased = isUnreleasedVersion(targetVersion, env);
  70286. if (!targetIsUnreleased && (minIsUnreleased || semver.lt(targetVersion.toString(), semverify(minVersion)))) {
  70287. result[env] = prettifyVersion(targetVersion);
  70288. }
  70289. }
  70290. return result;
  70291. }, {});
  70292. }
  70293. var plugins = {
  70294. "transform-template-literals": {
  70295. chrome: "41",
  70296. edge: "13",
  70297. firefox: "34",
  70298. safari: "13",
  70299. node: "4",
  70300. ios: "13",
  70301. samsung: "3.4",
  70302. opera: "28",
  70303. electron: "0.24"
  70304. },
  70305. "transform-literals": {
  70306. chrome: "44",
  70307. edge: "12",
  70308. firefox: "53",
  70309. safari: "9",
  70310. node: "4",
  70311. ios: "9",
  70312. samsung: "4",
  70313. opera: "31",
  70314. electron: "0.31"
  70315. },
  70316. "transform-function-name": {
  70317. chrome: "51",
  70318. firefox: "53",
  70319. safari: "10",
  70320. node: "6.5",
  70321. ios: "10",
  70322. samsung: "5",
  70323. opera: "38",
  70324. electron: "1.2"
  70325. },
  70326. "transform-arrow-functions": {
  70327. chrome: "47",
  70328. edge: "13",
  70329. firefox: "45",
  70330. safari: "10",
  70331. node: "6",
  70332. ios: "10",
  70333. samsung: "5",
  70334. opera: "34",
  70335. electron: "0.36"
  70336. },
  70337. "transform-block-scoped-functions": {
  70338. chrome: "41",
  70339. edge: "12",
  70340. firefox: "46",
  70341. safari: "10",
  70342. node: "4",
  70343. ie: "11",
  70344. ios: "10",
  70345. samsung: "3.4",
  70346. opera: "28",
  70347. electron: "0.24"
  70348. },
  70349. "transform-classes": {
  70350. chrome: "46",
  70351. edge: "13",
  70352. firefox: "45",
  70353. safari: "10",
  70354. node: "5",
  70355. ios: "10",
  70356. samsung: "5",
  70357. opera: "33",
  70358. electron: "0.36"
  70359. },
  70360. "transform-object-super": {
  70361. chrome: "46",
  70362. edge: "13",
  70363. firefox: "45",
  70364. safari: "10",
  70365. node: "5",
  70366. ios: "10",
  70367. samsung: "5",
  70368. opera: "33",
  70369. electron: "0.36"
  70370. },
  70371. "transform-shorthand-properties": {
  70372. chrome: "43",
  70373. edge: "12",
  70374. firefox: "33",
  70375. safari: "9",
  70376. node: "4",
  70377. ios: "9",
  70378. samsung: "4",
  70379. opera: "30",
  70380. electron: "0.29"
  70381. },
  70382. "transform-duplicate-keys": {
  70383. chrome: "42",
  70384. edge: "12",
  70385. firefox: "34",
  70386. safari: "9",
  70387. node: "4",
  70388. ios: "9",
  70389. samsung: "3.4",
  70390. opera: "29",
  70391. electron: "0.27"
  70392. },
  70393. "transform-computed-properties": {
  70394. chrome: "44",
  70395. edge: "12",
  70396. firefox: "34",
  70397. safari: "7.1",
  70398. node: "4",
  70399. ios: "8",
  70400. samsung: "4",
  70401. opera: "31",
  70402. electron: "0.31"
  70403. },
  70404. "transform-for-of": {
  70405. chrome: "51",
  70406. edge: "15",
  70407. firefox: "53",
  70408. safari: "10",
  70409. node: "6.5",
  70410. ios: "10",
  70411. samsung: "5",
  70412. opera: "38",
  70413. electron: "1.2"
  70414. },
  70415. "transform-sticky-regex": {
  70416. chrome: "49",
  70417. edge: "13",
  70418. firefox: "3",
  70419. safari: "10",
  70420. node: "6",
  70421. ios: "10",
  70422. samsung: "5",
  70423. opera: "36",
  70424. electron: "1"
  70425. },
  70426. "transform-dotall-regex": {
  70427. chrome: "62",
  70428. safari: "11.1",
  70429. node: "8.10",
  70430. ios: "11.3",
  70431. samsung: "8.2",
  70432. opera: "49",
  70433. electron: "3.1"
  70434. },
  70435. "transform-unicode-regex": {
  70436. chrome: "50",
  70437. edge: "13",
  70438. firefox: "46",
  70439. safari: "12",
  70440. node: "6",
  70441. ios: "12",
  70442. samsung: "5",
  70443. opera: "37",
  70444. electron: "1.1"
  70445. },
  70446. "transform-spread": {
  70447. chrome: "46",
  70448. edge: "13",
  70449. firefox: "36",
  70450. safari: "10",
  70451. node: "5",
  70452. ios: "10",
  70453. samsung: "5",
  70454. opera: "33",
  70455. electron: "0.36"
  70456. },
  70457. "transform-parameters": {
  70458. chrome: "49",
  70459. edge: "18",
  70460. firefox: "53",
  70461. safari: "10",
  70462. node: "6",
  70463. ios: "10",
  70464. samsung: "5",
  70465. opera: "36",
  70466. electron: "1"
  70467. },
  70468. "transform-destructuring": {
  70469. chrome: "51",
  70470. edge: "15",
  70471. firefox: "53",
  70472. safari: "10",
  70473. node: "6.5",
  70474. ios: "10",
  70475. samsung: "5",
  70476. opera: "38",
  70477. electron: "1.2"
  70478. },
  70479. "transform-block-scoping": {
  70480. chrome: "49",
  70481. edge: "14",
  70482. firefox: "51",
  70483. safari: "11",
  70484. node: "6",
  70485. ios: "11",
  70486. samsung: "5",
  70487. opera: "36",
  70488. electron: "1"
  70489. },
  70490. "transform-typeof-symbol": {
  70491. chrome: "38",
  70492. edge: "12",
  70493. firefox: "36",
  70494. safari: "9",
  70495. node: "0.12",
  70496. ios: "9",
  70497. samsung: "3",
  70498. opera: "25",
  70499. electron: "0.2"
  70500. },
  70501. "transform-new-target": {
  70502. chrome: "46",
  70503. edge: "14",
  70504. firefox: "41",
  70505. safari: "10",
  70506. node: "5",
  70507. ios: "10",
  70508. samsung: "5",
  70509. opera: "33",
  70510. electron: "0.36"
  70511. },
  70512. "transform-regenerator": {
  70513. chrome: "50",
  70514. edge: "13",
  70515. firefox: "53",
  70516. safari: "10",
  70517. node: "6",
  70518. ios: "10",
  70519. samsung: "5",
  70520. opera: "37",
  70521. electron: "1.1"
  70522. },
  70523. "transform-exponentiation-operator": {
  70524. chrome: "52",
  70525. edge: "14",
  70526. firefox: "52",
  70527. safari: "10.1",
  70528. node: "7",
  70529. ios: "10.3",
  70530. samsung: "6.2",
  70531. opera: "39",
  70532. electron: "1.3"
  70533. },
  70534. "transform-async-to-generator": {
  70535. chrome: "55",
  70536. edge: "15",
  70537. firefox: "52",
  70538. safari: "11",
  70539. node: "7.6",
  70540. ios: "11",
  70541. samsung: "6.2",
  70542. opera: "42",
  70543. electron: "1.6"
  70544. },
  70545. "proposal-async-generator-functions": {
  70546. chrome: "63",
  70547. firefox: "57",
  70548. safari: "12",
  70549. node: "10",
  70550. ios: "12",
  70551. samsung: "8.2",
  70552. opera: "50",
  70553. electron: "3.1"
  70554. },
  70555. "proposal-object-rest-spread": {
  70556. chrome: "60",
  70557. firefox: "55",
  70558. safari: "11.1",
  70559. node: "8.3",
  70560. ios: "11.3",
  70561. samsung: "8.2",
  70562. opera: "47",
  70563. electron: "2.1"
  70564. },
  70565. "proposal-unicode-property-regex": {
  70566. chrome: "64",
  70567. safari: "11.1",
  70568. node: "10",
  70569. ios: "11.3",
  70570. samsung: "9.2",
  70571. opera: "51",
  70572. electron: "3.1"
  70573. },
  70574. "proposal-json-strings": {
  70575. chrome: "66",
  70576. firefox: "62",
  70577. safari: "12",
  70578. node: "10",
  70579. ios: "12",
  70580. samsung: "9.2",
  70581. opera: "53",
  70582. electron: "3.1"
  70583. },
  70584. "proposal-optional-catch-binding": {
  70585. chrome: "66",
  70586. firefox: "58",
  70587. safari: "11.1",
  70588. node: "10",
  70589. ios: "11.3",
  70590. samsung: "9.2",
  70591. opera: "53",
  70592. electron: "3.1"
  70593. },
  70594. "proposal-optional-chaining": {
  70595. chrome: "80",
  70596. opera: "67"
  70597. },
  70598. "transform-named-capturing-groups-regex": {
  70599. chrome: "64",
  70600. safari: "11.1",
  70601. node: "10",
  70602. ios: "11.3",
  70603. samsung: "9.2",
  70604. opera: "51",
  70605. electron: "3.1"
  70606. },
  70607. "transform-member-expression-literals": {
  70608. chrome: "7",
  70609. opera: "12",
  70610. edge: "12",
  70611. firefox: "2",
  70612. safari: "5.1",
  70613. node: "0.10",
  70614. ie: "9",
  70615. android: "4",
  70616. ios: "6",
  70617. phantom: "2",
  70618. samsung: "2.1",
  70619. electron: "5"
  70620. },
  70621. "transform-property-literals": {
  70622. chrome: "7",
  70623. opera: "12",
  70624. edge: "12",
  70625. firefox: "2",
  70626. safari: "5.1",
  70627. node: "0.10",
  70628. ie: "9",
  70629. android: "4",
  70630. ios: "6",
  70631. phantom: "2",
  70632. samsung: "2.1",
  70633. electron: "5"
  70634. },
  70635. "transform-reserved-words": {
  70636. chrome: "13",
  70637. opera: "10.50",
  70638. edge: "12",
  70639. firefox: "2",
  70640. safari: "3.1",
  70641. node: "0.10",
  70642. ie: "9",
  70643. android: "4.4",
  70644. ios: "6",
  70645. phantom: "2",
  70646. samsung: "2.1",
  70647. electron: "0.2"
  70648. },
  70649. "proposal-nullish-coalescing-operator": {
  70650. chrome: "80",
  70651. firefox: "72",
  70652. opera: "67"
  70653. }
  70654. };
  70655. var plugins$1 = /*#__PURE__*/Object.freeze({
  70656. __proto__: null,
  70657. 'default': plugins
  70658. });
  70659. var require$$0$3 = getCjsExportFromNamespace(plugins$1);
  70660. var plugins$2 = require$$0$3;
  70661. function targetsSupported(target, support) {
  70662. var targetEnvironments = Object.keys(target);
  70663. if (targetEnvironments.length === 0) {
  70664. return false;
  70665. }
  70666. var unsupportedEnvironments = targetEnvironments.filter(function (environment) {
  70667. var lowestImplementedVersion = getLowestImplementedVersion(support, environment);
  70668. if (!lowestImplementedVersion) {
  70669. return true;
  70670. }
  70671. var lowestTargetedVersion = target[environment];
  70672. if (isUnreleasedVersion(lowestTargetedVersion, environment)) {
  70673. return false;
  70674. }
  70675. if (isUnreleasedVersion(lowestImplementedVersion, environment)) {
  70676. return true;
  70677. }
  70678. if (!semver.valid(lowestTargetedVersion.toString())) {
  70679. throw new Error("Invalid version passed for target \"" + environment + "\": \"" + lowestTargetedVersion + "\". " + "Versions must be in semver format (major.minor.patch)");
  70680. }
  70681. return semver.gt(semverify(lowestImplementedVersion), lowestTargetedVersion.toString());
  70682. });
  70683. return unsupportedEnvironments.length === 0;
  70684. }
  70685. function isRequired(name, targets, _temp) {
  70686. var _ref = _temp === void 0 ? {} : _temp,
  70687. _ref$compatData = _ref.compatData,
  70688. compatData = _ref$compatData === void 0 ? plugins$2 : _ref$compatData,
  70689. includes = _ref.includes,
  70690. excludes = _ref.excludes;
  70691. if (excludes && excludes.has(name)) return false;
  70692. if (includes && includes.has(name)) return true;
  70693. return !targetsSupported(targets, compatData[name]);
  70694. }
  70695. function filterItems(list, includes, excludes, targets, defaultIncludes, defaultExcludes, pluginSyntaxMap) {
  70696. var result = new Set();
  70697. var options = {
  70698. compatData: list,
  70699. includes: includes,
  70700. excludes: excludes
  70701. };
  70702. for (var item in list) {
  70703. if (isRequired(item, targets, options)) {
  70704. result.add(item);
  70705. } else if (pluginSyntaxMap) {
  70706. var shippedProposalsSyntax = pluginSyntaxMap.get(item);
  70707. if (shippedProposalsSyntax) {
  70708. result.add(shippedProposalsSyntax);
  70709. }
  70710. }
  70711. }
  70712. if (defaultIncludes) {
  70713. defaultIncludes.forEach(function (item) {
  70714. return !excludes.has(item) && result.add(item);
  70715. });
  70716. }
  70717. if (defaultExcludes) {
  70718. defaultExcludes.forEach(function (item) {
  70719. return !includes.has(item) && result["delete"](item);
  70720. });
  70721. }
  70722. return result;
  70723. }
  70724. var browserslistDefaults = browserslist_1.defaults;
  70725. var validBrowserslistTargets = [].concat(Object.keys(browserslist_1.data), Object.keys(browserslist_1.aliases));
  70726. function objectToBrowserslist(object) {
  70727. return Object.keys(object).reduce(function (list, targetName) {
  70728. if (validBrowserslistTargets.indexOf(targetName) >= 0) {
  70729. var targetVersion = object[targetName];
  70730. return list.concat(targetName + " " + targetVersion);
  70731. }
  70732. return list;
  70733. }, []);
  70734. }
  70735. function validateTargetNames(targets) {
  70736. var validTargets = Object.keys(TargetNames);
  70737. for (var target in targets) {
  70738. if (!TargetNames[target]) {
  70739. throw new Error("Invalid Option: '" + target + "' is not a valid target\n Maybe you meant to use '" + levenArray(target, validTargets) + "'?");
  70740. }
  70741. }
  70742. }
  70743. function isBrowsersQueryValid(browsers) {
  70744. return typeof browsers === "string" || Array.isArray(browsers);
  70745. }
  70746. function validateBrowsers(browsers) {
  70747. browser$7(typeof browsers === "undefined" || isBrowsersQueryValid(browsers), "Invalid Option: '" + browsers + "' is not a valid browserslist query");
  70748. return browsers;
  70749. }
  70750. function mergeBrowsers(fromQuery, fromTarget) {
  70751. return Object.keys(fromTarget).reduce(function (queryObj, targKey) {
  70752. if (targKey !== TargetNames.browsers) {
  70753. queryObj[targKey] = fromTarget[targKey];
  70754. }
  70755. return queryObj;
  70756. }, fromQuery);
  70757. }
  70758. function getLowestVersions(browsers) {
  70759. return browsers.reduce(function (all, browser) {
  70760. var _browser$split = browser.split(" "),
  70761. browserName = _browser$split[0],
  70762. browserVersion = _browser$split[1];
  70763. var normalizedBrowserName = browserNameMap[browserName];
  70764. if (!normalizedBrowserName) {
  70765. return all;
  70766. }
  70767. try {
  70768. var splitVersion = browserVersion.split("-")[0].toLowerCase();
  70769. var isSplitUnreleased = isUnreleasedVersion(splitVersion, browserName);
  70770. if (!all[normalizedBrowserName]) {
  70771. all[normalizedBrowserName] = isSplitUnreleased ? splitVersion : semverify(splitVersion);
  70772. return all;
  70773. }
  70774. var version = all[normalizedBrowserName];
  70775. var isUnreleased = isUnreleasedVersion(version, browserName);
  70776. if (isUnreleased && isSplitUnreleased) {
  70777. all[normalizedBrowserName] = getLowestUnreleased(version, splitVersion, browserName);
  70778. } else if (isUnreleased) {
  70779. all[normalizedBrowserName] = semverify(splitVersion);
  70780. } else if (!isUnreleased && !isSplitUnreleased) {
  70781. var parsedBrowserVersion = semverify(splitVersion);
  70782. all[normalizedBrowserName] = semverMin(version, parsedBrowserVersion);
  70783. }
  70784. } catch (e) {}
  70785. return all;
  70786. }, {});
  70787. }
  70788. function outputDecimalWarning(decimalTargets) {
  70789. if (!decimalTargets || !decimalTargets.length) {
  70790. return;
  70791. }
  70792. console.log("Warning, the following targets are using a decimal version:");
  70793. console.log("");
  70794. decimalTargets.forEach(function (_ref) {
  70795. var target = _ref.target,
  70796. value = _ref.value;
  70797. return console.log(" " + target + ": " + value);
  70798. });
  70799. console.log("");
  70800. console.log("We recommend using a string for minor/patch versions to avoid numbers like 6.10");
  70801. console.log("getting parsed as 6.1, which can lead to unexpected behavior.");
  70802. console.log("");
  70803. }
  70804. function semverifyTarget(target, value) {
  70805. try {
  70806. return semverify(value);
  70807. } catch (error) {
  70808. throw new Error("Invalid Option: '" + value + "' is not a valid value for 'targets." + target + "'.");
  70809. }
  70810. }
  70811. var targetParserMap = {
  70812. __default: function __default(target, value) {
  70813. var version = isUnreleasedVersion(value, target) ? value.toLowerCase() : semverifyTarget(target, value);
  70814. return [target, version];
  70815. },
  70816. node: function node(target, value) {
  70817. var parsed = value === true || value === "current" ? process.versions.node : semverifyTarget(target, value);
  70818. return [target, parsed];
  70819. }
  70820. };
  70821. function getTargets(targets, options) {
  70822. if (targets === void 0) {
  70823. targets = {};
  70824. }
  70825. if (options === void 0) {
  70826. options = {};
  70827. }
  70828. var targetOpts = {};
  70829. validateTargetNames(targets);
  70830. if (targets.esmodules) {
  70831. var supportsESModules = nativeModules$2["es6.module"];
  70832. targets.browsers = Object.keys(supportsESModules).map(function (browser) {
  70833. return browser + " " + supportsESModules[browser];
  70834. }).join(", ");
  70835. }
  70836. var browsersquery = validateBrowsers(targets.browsers);
  70837. var hasTargets = Object.keys(targets).length > 0;
  70838. var shouldParseBrowsers = !!targets.browsers;
  70839. var shouldSearchForConfig = !options.ignoreBrowserslistConfig && !hasTargets;
  70840. if (shouldParseBrowsers || shouldSearchForConfig) {
  70841. if (!hasTargets) {
  70842. browserslist_1.defaults = objectToBrowserslist(targets);
  70843. }
  70844. var browsers = browserslist_1(browsersquery, {
  70845. path: options.configPath,
  70846. mobileToDesktop: true
  70847. });
  70848. var queryBrowsers = getLowestVersions(browsers);
  70849. targets = mergeBrowsers(queryBrowsers, targets);
  70850. browserslist_1.defaults = browserslistDefaults;
  70851. }
  70852. var parsed = Object.keys(targets).filter(function (value) {
  70853. return value !== TargetNames.esmodules;
  70854. }).sort().reduce(function (results, target) {
  70855. if (target !== TargetNames.browsers) {
  70856. var value = targets[target];
  70857. if (typeof value === "number" && value % 1 !== 0) {
  70858. results.decimalWarnings.push({
  70859. target: target,
  70860. value: value
  70861. });
  70862. }
  70863. var parser = targetParserMap[target] || targetParserMap.__default;
  70864. var _parser = parser(target, value),
  70865. parsedTarget = _parser[0],
  70866. parsedValue = _parser[1];
  70867. if (parsedValue) {
  70868. results.targets[parsedTarget] = parsedValue;
  70869. }
  70870. }
  70871. return results;
  70872. }, {
  70873. targets: targetOpts,
  70874. decimalWarnings: []
  70875. });
  70876. outputDecimalWarning(parsed.decimalWarnings);
  70877. return parsed.targets;
  70878. }
  70879. var wordEnds = function wordEnds(size) {
  70880. return size > 1 ? "s" : "";
  70881. };
  70882. var logPluginOrPolyfill = function logPluginOrPolyfill(item, targetVersions, list) {
  70883. var filteredList = getInclusionReasons(item, targetVersions, list);
  70884. var formattedTargets = JSON.stringify(filteredList).replace(/,/g, ", ").replace(/^\{"/, '{ "').replace(/"\}$/, '" }');
  70885. console.log(" " + item + " " + formattedTargets);
  70886. };
  70887. var logEntryPolyfills = function logEntryPolyfills(polyfillName, importPolyfillIncluded, polyfills, filename, polyfillTargets, allBuiltInsList) {
  70888. if (process.env.BABEL_ENV === "test") {
  70889. filename = filename.replace(/\\/g, "/");
  70890. }
  70891. if (!importPolyfillIncluded) {
  70892. console.log("\n[" + filename + "] Import of " + polyfillName + " was not found.");
  70893. return;
  70894. }
  70895. if (!polyfills.size) {
  70896. console.log("\n[" + filename + "] Based on your targets, polyfills were not added.");
  70897. return;
  70898. }
  70899. console.log("\n[" + filename + "] Replaced " + polyfillName + " entries with the following polyfill" + wordEnds(polyfills.size) + ":");
  70900. for (var _iterator = polyfills, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  70901. var _ref;
  70902. if (_isArray) {
  70903. if (_i >= _iterator.length) break;
  70904. _ref = _iterator[_i++];
  70905. } else {
  70906. _i = _iterator.next();
  70907. if (_i.done) break;
  70908. _ref = _i.value;
  70909. }
  70910. var polyfill = _ref;
  70911. logPluginOrPolyfill(polyfill, polyfillTargets, allBuiltInsList);
  70912. }
  70913. };
  70914. var logUsagePolyfills = function logUsagePolyfills(polyfills, filename, polyfillTargets, allBuiltInsList) {
  70915. if (process.env.BABEL_ENV === "test") {
  70916. filename = filename.replace(/\\/g, "/");
  70917. }
  70918. if (!polyfills.size) {
  70919. console.log("\n[" + filename + "] Based on your code and targets, core-js polyfills were not added.");
  70920. return;
  70921. }
  70922. console.log("\n[" + filename + "] Added following core-js polyfill" + wordEnds(polyfills.size) + ":");
  70923. for (var _iterator2 = polyfills, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  70924. var _ref2;
  70925. if (_isArray2) {
  70926. if (_i2 >= _iterator2.length) break;
  70927. _ref2 = _iterator2[_i2++];
  70928. } else {
  70929. _i2 = _iterator2.next();
  70930. if (_i2.done) break;
  70931. _ref2 = _i2.value;
  70932. }
  70933. var polyfill = _ref2;
  70934. logPluginOrPolyfill(polyfill, polyfillTargets, allBuiltInsList);
  70935. }
  70936. };
  70937. var defaultExcludesForLooseMode = ["transform-typeof-symbol"];
  70938. function getOptionSpecificExcludesFor (_ref) {
  70939. var loose = _ref.loose;
  70940. return loose ? defaultExcludesForLooseMode : null;
  70941. }
  70942. function removeUnnecessaryItems(items, overlapping) {
  70943. items.forEach(function (item) {
  70944. var _overlapping$item;
  70945. (_overlapping$item = overlapping[item]) == null ? void 0 : _overlapping$item.forEach(function (name) {
  70946. return items["delete"](name);
  70947. });
  70948. });
  70949. }
  70950. var moduleTransformations = {
  70951. auto: "transform-modules-commonjs",
  70952. amd: "transform-modules-amd",
  70953. commonjs: "transform-modules-commonjs",
  70954. cjs: "transform-modules-commonjs",
  70955. systemjs: "transform-modules-systemjs",
  70956. umd: "transform-modules-umd"
  70957. };
  70958. var corejs3Polyfills = {
  70959. "es.symbol": {
  70960. chrome: "49",
  70961. edge: "15",
  70962. electron: "0.37",
  70963. firefox: "51",
  70964. ios: "10.0",
  70965. node: "6.0",
  70966. opera: "36",
  70967. opera_mobile: "36",
  70968. safari: "10.0",
  70969. samsung: "5.0"
  70970. },
  70971. "es.symbol.description": {
  70972. chrome: "70",
  70973. edge: "74",
  70974. electron: "5.0",
  70975. firefox: "63",
  70976. ios: "12.2",
  70977. node: "11.0",
  70978. opera: "57",
  70979. opera_mobile: "49",
  70980. safari: "12.1",
  70981. samsung: "10.0"
  70982. },
  70983. "es.symbol.async-iterator": {
  70984. chrome: "63",
  70985. edge: "74",
  70986. electron: "3.0",
  70987. firefox: "55",
  70988. ios: "12.0",
  70989. node: "10.0",
  70990. opera: "50",
  70991. opera_mobile: "46",
  70992. safari: "12.0",
  70993. samsung: "8.0"
  70994. },
  70995. "es.symbol.has-instance": {
  70996. chrome: "50",
  70997. edge: "15",
  70998. electron: "1.1",
  70999. firefox: "49",
  71000. ios: "10.0",
  71001. node: "6.0",
  71002. opera: "37",
  71003. opera_mobile: "37",
  71004. safari: "10.0",
  71005. samsung: "5.0"
  71006. },
  71007. "es.symbol.is-concat-spreadable": {
  71008. chrome: "48",
  71009. edge: "15",
  71010. electron: "0.37",
  71011. firefox: "48",
  71012. ios: "10.0",
  71013. node: "6.0",
  71014. opera: "35",
  71015. opera_mobile: "35",
  71016. safari: "10.0",
  71017. samsung: "5.0"
  71018. },
  71019. "es.symbol.iterator": {
  71020. chrome: "39",
  71021. edge: "13",
  71022. electron: "0.20",
  71023. firefox: "36",
  71024. ios: "9.0",
  71025. node: "1.0",
  71026. opera: "26",
  71027. opera_mobile: "26",
  71028. safari: "9.0",
  71029. samsung: "3.4"
  71030. },
  71031. "es.symbol.match": {
  71032. chrome: "50",
  71033. edge: "74",
  71034. electron: "1.1",
  71035. firefox: "40",
  71036. ios: "10.0",
  71037. node: "6.0",
  71038. opera: "37",
  71039. opera_mobile: "37",
  71040. safari: "10.0",
  71041. samsung: "5.0"
  71042. },
  71043. "es.symbol.match-all": {
  71044. chrome: "73",
  71045. edge: "74",
  71046. electron: "5.0",
  71047. firefox: "67",
  71048. ios: "13.0",
  71049. node: "12.0",
  71050. opera: "60",
  71051. opera_mobile: "52",
  71052. safari: "13",
  71053. samsung: "11.0"
  71054. },
  71055. "es.symbol.replace": {
  71056. chrome: "50",
  71057. edge: "74",
  71058. electron: "1.1",
  71059. firefox: "49",
  71060. ios: "10.0",
  71061. node: "6.0",
  71062. opera: "37",
  71063. opera_mobile: "37",
  71064. safari: "10.0",
  71065. samsung: "5.0"
  71066. },
  71067. "es.symbol.search": {
  71068. chrome: "50",
  71069. edge: "74",
  71070. electron: "1.1",
  71071. firefox: "49",
  71072. ios: "10.0",
  71073. node: "6.0",
  71074. opera: "37",
  71075. opera_mobile: "37",
  71076. safari: "10.0",
  71077. samsung: "5.0"
  71078. },
  71079. "es.symbol.species": {
  71080. chrome: "51",
  71081. edge: "13",
  71082. electron: "1.2",
  71083. firefox: "41",
  71084. ios: "10.0",
  71085. node: "6.5",
  71086. opera: "38",
  71087. opera_mobile: "38",
  71088. safari: "10.0",
  71089. samsung: "5.0"
  71090. },
  71091. "es.symbol.split": {
  71092. chrome: "50",
  71093. edge: "74",
  71094. electron: "1.1",
  71095. firefox: "49",
  71096. ios: "10.0",
  71097. node: "6.0",
  71098. opera: "37",
  71099. opera_mobile: "37",
  71100. safari: "10.0",
  71101. samsung: "5.0"
  71102. },
  71103. "es.symbol.to-primitive": {
  71104. chrome: "47",
  71105. edge: "15",
  71106. electron: "0.36",
  71107. firefox: "44",
  71108. ios: "10.0",
  71109. node: "6.0",
  71110. opera: "34",
  71111. opera_mobile: "34",
  71112. safari: "10.0",
  71113. samsung: "5.0"
  71114. },
  71115. "es.symbol.to-string-tag": {
  71116. chrome: "49",
  71117. edge: "15",
  71118. electron: "0.37",
  71119. firefox: "51",
  71120. ios: "10.0",
  71121. node: "6.0",
  71122. opera: "36",
  71123. opera_mobile: "36",
  71124. safari: "10.0",
  71125. samsung: "5.0"
  71126. },
  71127. "es.symbol.unscopables": {
  71128. chrome: "39",
  71129. edge: "13",
  71130. electron: "0.20",
  71131. firefox: "48",
  71132. ios: "9.0",
  71133. node: "1.0",
  71134. opera: "26",
  71135. opera_mobile: "26",
  71136. safari: "9.0",
  71137. samsung: "3.4"
  71138. },
  71139. "es.array.concat": {
  71140. chrome: "51",
  71141. edge: "15",
  71142. electron: "1.2",
  71143. firefox: "48",
  71144. ios: "10.0",
  71145. node: "6.5",
  71146. opera: "38",
  71147. opera_mobile: "38",
  71148. safari: "10.0",
  71149. samsung: "5.0"
  71150. },
  71151. "es.array.copy-within": {
  71152. chrome: "45",
  71153. edge: "12",
  71154. electron: "0.31",
  71155. firefox: "48",
  71156. ios: "9.0",
  71157. node: "4.0",
  71158. opera: "32",
  71159. opera_mobile: "32",
  71160. safari: "9.0",
  71161. samsung: "5.0"
  71162. },
  71163. "es.array.every": {
  71164. chrome: "48",
  71165. edge: "15",
  71166. electron: "0.37",
  71167. firefox: "50",
  71168. ios: "9.0",
  71169. node: "6.0",
  71170. opera: "35",
  71171. opera_mobile: "35",
  71172. safari: "9.0",
  71173. samsung: "5.0"
  71174. },
  71175. "es.array.fill": {
  71176. chrome: "45",
  71177. edge: "12",
  71178. electron: "0.31",
  71179. firefox: "48",
  71180. ios: "9.0",
  71181. node: "4.0",
  71182. opera: "32",
  71183. opera_mobile: "32",
  71184. safari: "9.0",
  71185. samsung: "5.0"
  71186. },
  71187. "es.array.filter": {
  71188. chrome: "51",
  71189. edge: "15",
  71190. electron: "1.2",
  71191. firefox: "48",
  71192. ios: "10.0",
  71193. node: "6.5",
  71194. opera: "38",
  71195. opera_mobile: "38",
  71196. safari: "10.0",
  71197. samsung: "5.0"
  71198. },
  71199. "es.array.find": {
  71200. chrome: "45",
  71201. edge: "13",
  71202. electron: "0.31",
  71203. firefox: "48",
  71204. ios: "9.0",
  71205. node: "4.0",
  71206. opera: "32",
  71207. opera_mobile: "32",
  71208. safari: "9.0",
  71209. samsung: "5.0"
  71210. },
  71211. "es.array.find-index": {
  71212. chrome: "45",
  71213. edge: "13",
  71214. electron: "0.31",
  71215. firefox: "48",
  71216. ios: "9.0",
  71217. node: "4.0",
  71218. opera: "32",
  71219. opera_mobile: "32",
  71220. safari: "9.0",
  71221. samsung: "5.0"
  71222. },
  71223. "es.array.flat": {
  71224. chrome: "69",
  71225. edge: "74",
  71226. electron: "4.0",
  71227. firefox: "62",
  71228. ios: "12.0",
  71229. node: "11.0",
  71230. opera: "56",
  71231. opera_mobile: "48",
  71232. safari: "12.0",
  71233. samsung: "10.0"
  71234. },
  71235. "es.array.flat-map": {
  71236. chrome: "69",
  71237. edge: "74",
  71238. electron: "4.0",
  71239. firefox: "62",
  71240. ios: "12.0",
  71241. node: "11.0",
  71242. opera: "56",
  71243. opera_mobile: "48",
  71244. safari: "12.0",
  71245. samsung: "10.0"
  71246. },
  71247. "es.array.for-each": {
  71248. chrome: "48",
  71249. edge: "15",
  71250. electron: "0.37",
  71251. firefox: "50",
  71252. ios: "9.0",
  71253. node: "6.0",
  71254. opera: "35",
  71255. opera_mobile: "35",
  71256. safari: "9.0",
  71257. samsung: "5.0"
  71258. },
  71259. "es.array.from": {
  71260. chrome: "51",
  71261. edge: "15",
  71262. electron: "1.2",
  71263. firefox: "53",
  71264. ios: "9.0",
  71265. node: "6.5",
  71266. opera: "38",
  71267. opera_mobile: "38",
  71268. safari: "9.0",
  71269. samsung: "5.0"
  71270. },
  71271. "es.array.includes": {
  71272. chrome: "53",
  71273. edge: "15",
  71274. electron: "1.4",
  71275. firefox: "48",
  71276. ios: "10.0",
  71277. node: "7.0",
  71278. opera: "40",
  71279. opera_mobile: "40",
  71280. safari: "10.0",
  71281. samsung: "6.0"
  71282. },
  71283. "es.array.index-of": {
  71284. chrome: "51",
  71285. edge: "15",
  71286. electron: "1.2",
  71287. firefox: "50",
  71288. ios: "11.0",
  71289. node: "6.5",
  71290. opera: "38",
  71291. opera_mobile: "38",
  71292. safari: "11.0",
  71293. samsung: "5.0"
  71294. },
  71295. "es.array.is-array": {
  71296. android: "3.0",
  71297. chrome: "5",
  71298. edge: "12",
  71299. electron: "0.20",
  71300. firefox: "4",
  71301. ie: "9",
  71302. ios: "3.2",
  71303. node: "0.1.27",
  71304. opera: "10.50",
  71305. opera_mobile: "10.50",
  71306. phantom: "1.9",
  71307. safari: "4.0",
  71308. samsung: "1.0"
  71309. },
  71310. "es.array.iterator": {
  71311. chrome: "66",
  71312. edge: "15",
  71313. electron: "3.0",
  71314. firefox: "60",
  71315. ios: "10.0",
  71316. node: "10.0",
  71317. opera: "53",
  71318. opera_mobile: "47",
  71319. safari: "10.0",
  71320. samsung: "9.0"
  71321. },
  71322. "es.array.join": {
  71323. android: "4.4",
  71324. chrome: "26",
  71325. edge: "13",
  71326. electron: "0.20",
  71327. firefox: "4",
  71328. ios: "8.0",
  71329. node: "0.11.0",
  71330. opera: "16",
  71331. opera_mobile: "16",
  71332. safari: "7.1",
  71333. samsung: "1.5"
  71334. },
  71335. "es.array.last-index-of": {
  71336. chrome: "51",
  71337. edge: "13",
  71338. electron: "1.2",
  71339. firefox: "50",
  71340. ios: "11.0",
  71341. node: "6.5",
  71342. opera: "38",
  71343. opera_mobile: "38",
  71344. safari: "11.0",
  71345. samsung: "5.0"
  71346. },
  71347. "es.array.map": {
  71348. chrome: "51",
  71349. edge: "13",
  71350. electron: "1.2",
  71351. firefox: "50",
  71352. ios: "10.0",
  71353. node: "6.5",
  71354. opera: "38",
  71355. opera_mobile: "38",
  71356. safari: "10.0",
  71357. samsung: "5.0"
  71358. },
  71359. "es.array.of": {
  71360. chrome: "45",
  71361. edge: "13",
  71362. electron: "0.31",
  71363. firefox: "25",
  71364. ios: "9.0",
  71365. node: "4.0",
  71366. opera: "32",
  71367. opera_mobile: "32",
  71368. safari: "9.0",
  71369. samsung: "5.0"
  71370. },
  71371. "es.array.reduce": {
  71372. chrome: "48",
  71373. edge: "15",
  71374. electron: "0.37",
  71375. firefox: "50",
  71376. ios: "9.0",
  71377. node: "6.0",
  71378. opera: "35",
  71379. opera_mobile: "35",
  71380. safari: "9.0",
  71381. samsung: "5.0"
  71382. },
  71383. "es.array.reduce-right": {
  71384. chrome: "48",
  71385. edge: "15",
  71386. electron: "0.37",
  71387. firefox: "50",
  71388. ios: "9.0",
  71389. node: "6.0",
  71390. opera: "35",
  71391. opera_mobile: "35",
  71392. safari: "9.0",
  71393. samsung: "5.0"
  71394. },
  71395. "es.array.reverse": {
  71396. android: "3.0",
  71397. chrome: "1",
  71398. edge: "12",
  71399. electron: "0.20",
  71400. firefox: "1",
  71401. ie: "5.5",
  71402. ios: "12.2",
  71403. node: "0.0.3",
  71404. opera: "10.50",
  71405. opera_mobile: "10.50",
  71406. safari: "12.0.2",
  71407. samsung: "1.0"
  71408. },
  71409. "es.array.slice": {
  71410. chrome: "51",
  71411. edge: "15",
  71412. electron: "1.2",
  71413. firefox: "48",
  71414. ios: "11.0",
  71415. node: "6.5",
  71416. opera: "38",
  71417. opera_mobile: "38",
  71418. safari: "11.0",
  71419. samsung: "5.0"
  71420. },
  71421. "es.array.some": {
  71422. chrome: "48",
  71423. edge: "15",
  71424. electron: "0.37",
  71425. firefox: "50",
  71426. ios: "9.0",
  71427. node: "6.0",
  71428. opera: "35",
  71429. opera_mobile: "35",
  71430. safari: "9.0",
  71431. samsung: "5.0"
  71432. },
  71433. "es.array.sort": {
  71434. chrome: "63",
  71435. edge: "12",
  71436. electron: "3.0",
  71437. firefox: "4",
  71438. ie: "9",
  71439. ios: "12.0",
  71440. node: "10.0",
  71441. opera: "50",
  71442. opera_mobile: "46",
  71443. safari: "12.0",
  71444. samsung: "8.0"
  71445. },
  71446. "es.array.species": {
  71447. chrome: "51",
  71448. edge: "13",
  71449. electron: "1.2",
  71450. firefox: "48",
  71451. ios: "10.0",
  71452. node: "6.5",
  71453. opera: "38",
  71454. opera_mobile: "38",
  71455. safari: "10.0",
  71456. samsung: "5.0"
  71457. },
  71458. "es.array.splice": {
  71459. chrome: "51",
  71460. edge: "15",
  71461. electron: "1.2",
  71462. firefox: "49",
  71463. ios: "11.0",
  71464. node: "6.5",
  71465. opera: "38",
  71466. opera_mobile: "38",
  71467. safari: "11.0",
  71468. samsung: "5.0"
  71469. },
  71470. "es.array.unscopables.flat": {
  71471. chrome: "73",
  71472. edge: "74",
  71473. electron: "5.0",
  71474. firefox: "67",
  71475. ios: "13.0",
  71476. node: "12.0",
  71477. opera: "60",
  71478. opera_mobile: "52",
  71479. safari: "13",
  71480. samsung: "11.0"
  71481. },
  71482. "es.array.unscopables.flat-map": {
  71483. chrome: "73",
  71484. edge: "74",
  71485. electron: "5.0",
  71486. firefox: "67",
  71487. ios: "13.0",
  71488. node: "12.0",
  71489. opera: "60",
  71490. opera_mobile: "52",
  71491. safari: "13",
  71492. samsung: "11.0"
  71493. },
  71494. "es.array-buffer.constructor": {
  71495. android: "4.4",
  71496. chrome: "26",
  71497. edge: "14",
  71498. electron: "0.20",
  71499. firefox: "44",
  71500. ios: "12.0",
  71501. node: "0.11.0",
  71502. opera: "16",
  71503. opera_mobile: "16",
  71504. safari: "12.0",
  71505. samsung: "1.5"
  71506. },
  71507. "es.array-buffer.is-view": {
  71508. android: "4.4.3",
  71509. chrome: "32",
  71510. edge: "12",
  71511. electron: "0.20",
  71512. firefox: "29",
  71513. ie: "11",
  71514. ios: "8.0",
  71515. node: "0.11.9",
  71516. opera: "19",
  71517. opera_mobile: "19",
  71518. safari: "7.1",
  71519. samsung: "2.0"
  71520. },
  71521. "es.array-buffer.slice": {
  71522. android: "4.4.3",
  71523. chrome: "31",
  71524. edge: "12",
  71525. electron: "0.20",
  71526. firefox: "46",
  71527. ie: "11",
  71528. ios: "12.2",
  71529. node: "0.11.8",
  71530. opera: "18",
  71531. opera_mobile: "18",
  71532. safari: "12.1",
  71533. samsung: "2.0"
  71534. },
  71535. "es.data-view": {
  71536. android: "4.4",
  71537. chrome: "26",
  71538. edge: "12",
  71539. electron: "0.20",
  71540. firefox: "15",
  71541. ie: "10",
  71542. ios: "8.0",
  71543. node: "0.11.0",
  71544. opera: "16",
  71545. opera_mobile: "16",
  71546. safari: "7.1",
  71547. samsung: "1.5"
  71548. },
  71549. "es.date.now": {
  71550. android: "3.0",
  71551. chrome: "5",
  71552. edge: "12",
  71553. electron: "0.20",
  71554. firefox: "2",
  71555. ie: "9",
  71556. ios: "3.2",
  71557. node: "0.1.27",
  71558. opera: "10.50",
  71559. opera_mobile: "10.50",
  71560. phantom: "1.9",
  71561. safari: "4.0",
  71562. samsung: "1.0"
  71563. },
  71564. "es.date.to-iso-string": {
  71565. android: "4.4",
  71566. chrome: "26",
  71567. edge: "12",
  71568. electron: "0.20",
  71569. firefox: "7",
  71570. ie: "9",
  71571. ios: "8.0",
  71572. node: "0.11.0",
  71573. opera: "16",
  71574. opera_mobile: "16",
  71575. safari: "7.1",
  71576. samsung: "1.5"
  71577. },
  71578. "es.date.to-json": {
  71579. android: "4.4",
  71580. chrome: "26",
  71581. edge: "12",
  71582. electron: "0.20",
  71583. firefox: "4",
  71584. ie: "9",
  71585. ios: "10.0",
  71586. node: "0.11.0",
  71587. opera: "16",
  71588. opera_mobile: "16",
  71589. safari: "10.0",
  71590. samsung: "1.5"
  71591. },
  71592. "es.date.to-primitive": {
  71593. chrome: "47",
  71594. edge: "15",
  71595. electron: "0.36",
  71596. firefox: "44",
  71597. ios: "10.0",
  71598. node: "6.0",
  71599. opera: "34",
  71600. opera_mobile: "34",
  71601. safari: "10.0",
  71602. samsung: "5.0"
  71603. },
  71604. "es.date.to-string": {
  71605. android: "3.0",
  71606. chrome: "5",
  71607. edge: "12",
  71608. electron: "0.20",
  71609. firefox: "2",
  71610. ie: "9",
  71611. ios: "2.0",
  71612. node: "0.1.27",
  71613. opera: "10.50",
  71614. opera_mobile: "10.50",
  71615. phantom: "1.9",
  71616. safari: "3.1",
  71617. samsung: "1.0"
  71618. },
  71619. "es.function.bind": {
  71620. android: "3.0",
  71621. chrome: "7",
  71622. edge: "12",
  71623. electron: "0.20",
  71624. firefox: "4",
  71625. ie: "9",
  71626. ios: "5.1",
  71627. node: "0.1.101",
  71628. opera: "12",
  71629. opera_mobile: "12",
  71630. phantom: "2.0",
  71631. safari: "5.1",
  71632. samsung: "1.0"
  71633. },
  71634. "es.function.has-instance": {
  71635. chrome: "51",
  71636. edge: "15",
  71637. electron: "1.2",
  71638. firefox: "50",
  71639. ios: "10.0",
  71640. node: "6.5",
  71641. opera: "38",
  71642. opera_mobile: "38",
  71643. safari: "10.0",
  71644. samsung: "5.0"
  71645. },
  71646. "es.function.name": {
  71647. android: "3.0",
  71648. chrome: "5",
  71649. edge: "12",
  71650. electron: "0.20",
  71651. firefox: "2",
  71652. ios: "3.2",
  71653. node: "0.1.27",
  71654. opera: "10.50",
  71655. opera_mobile: "10.50",
  71656. phantom: "1.9",
  71657. safari: "4.0",
  71658. samsung: "1.0"
  71659. },
  71660. "es.global-this": {
  71661. chrome: "71",
  71662. edge: "74",
  71663. electron: "5.0",
  71664. firefox: "65",
  71665. ios: "12.2",
  71666. node: "12.0",
  71667. opera: "58",
  71668. opera_mobile: "50",
  71669. safari: "12.1",
  71670. samsung: "10.0"
  71671. },
  71672. "es.json.stringify": {
  71673. chrome: "72",
  71674. edge: "74",
  71675. electron: "5.0",
  71676. firefox: "64",
  71677. ios: "12.2",
  71678. node: "12.0",
  71679. opera: "59",
  71680. opera_mobile: "51",
  71681. safari: "12.1",
  71682. samsung: "11.0"
  71683. },
  71684. "es.json.to-string-tag": {
  71685. chrome: "50",
  71686. edge: "15",
  71687. electron: "1.1",
  71688. firefox: "51",
  71689. ios: "10.0",
  71690. node: "6.0",
  71691. opera: "37",
  71692. opera_mobile: "37",
  71693. safari: "10.0",
  71694. samsung: "5.0"
  71695. },
  71696. "es.map": {
  71697. chrome: "51",
  71698. edge: "15",
  71699. electron: "1.2",
  71700. firefox: "53",
  71701. ios: "10.0",
  71702. node: "6.5",
  71703. opera: "38",
  71704. opera_mobile: "38",
  71705. safari: "10.0",
  71706. samsung: "5.0"
  71707. },
  71708. "es.math.acosh": {
  71709. chrome: "54",
  71710. edge: "13",
  71711. electron: "1.4",
  71712. firefox: "25",
  71713. ios: "8.0",
  71714. node: "7.0",
  71715. opera: "41",
  71716. opera_mobile: "41",
  71717. safari: "7.1",
  71718. samsung: "6.0"
  71719. },
  71720. "es.math.asinh": {
  71721. chrome: "38",
  71722. edge: "13",
  71723. electron: "0.20",
  71724. firefox: "25",
  71725. ios: "8.0",
  71726. node: "0.11.15",
  71727. opera: "25",
  71728. opera_mobile: "25",
  71729. safari: "7.1",
  71730. samsung: "3.0"
  71731. },
  71732. "es.math.atanh": {
  71733. chrome: "38",
  71734. edge: "13",
  71735. electron: "0.20",
  71736. firefox: "25",
  71737. ios: "8.0",
  71738. node: "0.11.15",
  71739. opera: "25",
  71740. opera_mobile: "25",
  71741. safari: "7.1",
  71742. samsung: "3.0"
  71743. },
  71744. "es.math.cbrt": {
  71745. chrome: "38",
  71746. edge: "12",
  71747. electron: "0.20",
  71748. firefox: "25",
  71749. ios: "8.0",
  71750. node: "0.11.15",
  71751. opera: "25",
  71752. opera_mobile: "25",
  71753. safari: "7.1",
  71754. samsung: "3.0"
  71755. },
  71756. "es.math.clz32": {
  71757. chrome: "38",
  71758. edge: "12",
  71759. electron: "0.20",
  71760. firefox: "31",
  71761. ios: "9.0",
  71762. node: "0.11.15",
  71763. opera: "25",
  71764. opera_mobile: "25",
  71765. safari: "9.0",
  71766. samsung: "3.0"
  71767. },
  71768. "es.math.cosh": {
  71769. chrome: "39",
  71770. edge: "13",
  71771. electron: "0.20",
  71772. firefox: "25",
  71773. ios: "8.0",
  71774. node: "1.0",
  71775. opera: "26",
  71776. opera_mobile: "26",
  71777. safari: "7.1",
  71778. samsung: "3.4"
  71779. },
  71780. "es.math.expm1": {
  71781. chrome: "39",
  71782. edge: "13",
  71783. electron: "0.20",
  71784. firefox: "46",
  71785. ios: "8.0",
  71786. node: "1.0",
  71787. opera: "26",
  71788. opera_mobile: "26",
  71789. safari: "7.1",
  71790. samsung: "3.4"
  71791. },
  71792. "es.math.fround": {
  71793. chrome: "38",
  71794. edge: "12",
  71795. electron: "0.20",
  71796. firefox: "26",
  71797. ios: "8.0",
  71798. node: "0.11.15",
  71799. opera: "25",
  71800. opera_mobile: "25",
  71801. safari: "7.1",
  71802. samsung: "3.0"
  71803. },
  71804. "es.math.hypot": {
  71805. chrome: "78",
  71806. edge: "12",
  71807. electron: "7.0",
  71808. firefox: "27",
  71809. ios: "8.0",
  71810. node: "13.0",
  71811. opera: "65",
  71812. safari: "7.1"
  71813. },
  71814. "es.math.imul": {
  71815. android: "4.4",
  71816. chrome: "28",
  71817. edge: "13",
  71818. electron: "0.20",
  71819. firefox: "20",
  71820. ios: "9.0",
  71821. node: "0.11.1",
  71822. opera: "16",
  71823. opera_mobile: "16",
  71824. safari: "9.0",
  71825. samsung: "1.5"
  71826. },
  71827. "es.math.log10": {
  71828. chrome: "38",
  71829. edge: "12",
  71830. electron: "0.20",
  71831. firefox: "25",
  71832. ios: "8.0",
  71833. node: "0.11.15",
  71834. opera: "25",
  71835. opera_mobile: "25",
  71836. safari: "7.1",
  71837. samsung: "3.0"
  71838. },
  71839. "es.math.log1p": {
  71840. chrome: "38",
  71841. edge: "12",
  71842. electron: "0.20",
  71843. firefox: "25",
  71844. ios: "8.0",
  71845. node: "0.11.15",
  71846. opera: "25",
  71847. opera_mobile: "25",
  71848. safari: "7.1",
  71849. samsung: "3.0"
  71850. },
  71851. "es.math.log2": {
  71852. chrome: "38",
  71853. edge: "12",
  71854. electron: "0.20",
  71855. firefox: "25",
  71856. ios: "8.0",
  71857. node: "0.11.15",
  71858. opera: "25",
  71859. opera_mobile: "25",
  71860. safari: "7.1",
  71861. samsung: "3.0"
  71862. },
  71863. "es.math.sign": {
  71864. chrome: "38",
  71865. edge: "12",
  71866. electron: "0.20",
  71867. firefox: "25",
  71868. ios: "9.0",
  71869. node: "0.11.15",
  71870. opera: "25",
  71871. opera_mobile: "25",
  71872. safari: "9.0",
  71873. samsung: "3.0"
  71874. },
  71875. "es.math.sinh": {
  71876. chrome: "39",
  71877. edge: "13",
  71878. electron: "0.20",
  71879. firefox: "25",
  71880. ios: "8.0",
  71881. node: "1.0",
  71882. opera: "26",
  71883. opera_mobile: "26",
  71884. safari: "7.1",
  71885. samsung: "3.4"
  71886. },
  71887. "es.math.tanh": {
  71888. chrome: "38",
  71889. edge: "12",
  71890. electron: "0.20",
  71891. firefox: "25",
  71892. ios: "8.0",
  71893. node: "0.11.15",
  71894. opera: "25",
  71895. opera_mobile: "25",
  71896. safari: "7.1",
  71897. samsung: "3.0"
  71898. },
  71899. "es.math.to-string-tag": {
  71900. chrome: "50",
  71901. edge: "15",
  71902. electron: "1.1",
  71903. firefox: "51",
  71904. ios: "10.0",
  71905. node: "6.0",
  71906. opera: "37",
  71907. opera_mobile: "37",
  71908. safari: "10.0",
  71909. samsung: "5.0"
  71910. },
  71911. "es.math.trunc": {
  71912. chrome: "38",
  71913. edge: "12",
  71914. electron: "0.20",
  71915. firefox: "25",
  71916. ios: "8.0",
  71917. node: "0.11.15",
  71918. opera: "25",
  71919. opera_mobile: "25",
  71920. safari: "7.1",
  71921. samsung: "3.0"
  71922. },
  71923. "es.number.constructor": {
  71924. chrome: "41",
  71925. edge: "13",
  71926. electron: "0.21",
  71927. firefox: "46",
  71928. ios: "9.0",
  71929. node: "1.0",
  71930. opera: "28",
  71931. opera_mobile: "28",
  71932. safari: "9.0",
  71933. samsung: "3.4"
  71934. },
  71935. "es.number.epsilon": {
  71936. chrome: "34",
  71937. edge: "12",
  71938. electron: "0.20",
  71939. firefox: "25",
  71940. ios: "9.0",
  71941. node: "0.11.13",
  71942. opera: "21",
  71943. opera_mobile: "21",
  71944. safari: "9.0",
  71945. samsung: "2.0"
  71946. },
  71947. "es.number.is-finite": {
  71948. android: "4.1",
  71949. chrome: "19",
  71950. edge: "12",
  71951. electron: "0.20",
  71952. firefox: "16",
  71953. ios: "9.0",
  71954. node: "0.7.3",
  71955. opera: "15",
  71956. opera_mobile: "15",
  71957. safari: "9.0",
  71958. samsung: "1.5"
  71959. },
  71960. "es.number.is-integer": {
  71961. chrome: "34",
  71962. edge: "12",
  71963. electron: "0.20",
  71964. firefox: "16",
  71965. ios: "9.0",
  71966. node: "0.11.13",
  71967. opera: "21",
  71968. opera_mobile: "21",
  71969. safari: "9.0",
  71970. samsung: "2.0"
  71971. },
  71972. "es.number.is-nan": {
  71973. android: "4.1",
  71974. chrome: "19",
  71975. edge: "12",
  71976. electron: "0.20",
  71977. firefox: "15",
  71978. ios: "9.0",
  71979. node: "0.7.3",
  71980. opera: "15",
  71981. opera_mobile: "15",
  71982. safari: "9.0",
  71983. samsung: "1.5"
  71984. },
  71985. "es.number.is-safe-integer": {
  71986. chrome: "34",
  71987. edge: "12",
  71988. electron: "0.20",
  71989. firefox: "32",
  71990. ios: "9.0",
  71991. node: "0.11.13",
  71992. opera: "21",
  71993. opera_mobile: "21",
  71994. safari: "9.0",
  71995. samsung: "2.0"
  71996. },
  71997. "es.number.max-safe-integer": {
  71998. chrome: "34",
  71999. edge: "12",
  72000. electron: "0.20",
  72001. firefox: "31",
  72002. ios: "9.0",
  72003. node: "0.11.13",
  72004. opera: "21",
  72005. opera_mobile: "21",
  72006. safari: "9.0",
  72007. samsung: "2.0"
  72008. },
  72009. "es.number.min-safe-integer": {
  72010. chrome: "34",
  72011. edge: "12",
  72012. electron: "0.20",
  72013. firefox: "31",
  72014. ios: "9.0",
  72015. node: "0.11.13",
  72016. opera: "21",
  72017. opera_mobile: "21",
  72018. safari: "9.0",
  72019. samsung: "2.0"
  72020. },
  72021. "es.number.parse-float": {
  72022. chrome: "35",
  72023. edge: "13",
  72024. electron: "0.20",
  72025. firefox: "39",
  72026. ios: "11.0",
  72027. node: "0.11.13",
  72028. opera: "22",
  72029. opera_mobile: "22",
  72030. safari: "11.0",
  72031. samsung: "3.0"
  72032. },
  72033. "es.number.parse-int": {
  72034. chrome: "35",
  72035. edge: "13",
  72036. electron: "0.20",
  72037. firefox: "39",
  72038. ios: "9.0",
  72039. node: "0.11.13",
  72040. opera: "22",
  72041. opera_mobile: "22",
  72042. safari: "9.0",
  72043. samsung: "3.0"
  72044. },
  72045. "es.number.to-fixed": {
  72046. android: "4.4",
  72047. chrome: "26",
  72048. edge: "74",
  72049. electron: "0.20",
  72050. firefox: "4",
  72051. ios: "8.0",
  72052. node: "0.11.0",
  72053. opera: "16",
  72054. opera_mobile: "16",
  72055. safari: "7.1",
  72056. samsung: "1.5"
  72057. },
  72058. "es.number.to-precision": {
  72059. android: "4.4",
  72060. chrome: "26",
  72061. edge: "12",
  72062. electron: "0.20",
  72063. firefox: "4",
  72064. ie: "8",
  72065. ios: "8.0",
  72066. node: "0.11.0",
  72067. opera: "16",
  72068. opera_mobile: "16",
  72069. safari: "7.1",
  72070. samsung: "1.5"
  72071. },
  72072. "es.object.assign": {
  72073. chrome: "49",
  72074. edge: "74",
  72075. electron: "0.37",
  72076. firefox: "36",
  72077. ios: "9.0",
  72078. node: "6.0",
  72079. opera: "36",
  72080. opera_mobile: "36",
  72081. safari: "9.0",
  72082. samsung: "5.0"
  72083. },
  72084. "es.object.create": {
  72085. android: "3.0",
  72086. chrome: "5",
  72087. edge: "12",
  72088. electron: "0.20",
  72089. firefox: "4",
  72090. ie: "9",
  72091. ios: "3.2",
  72092. node: "0.1.27",
  72093. opera: "12",
  72094. opera_mobile: "12",
  72095. phantom: "1.9",
  72096. safari: "4.0",
  72097. samsung: "1.0"
  72098. },
  72099. "es.object.define-getter": {
  72100. chrome: "62",
  72101. edge: "16",
  72102. electron: "3.0",
  72103. firefox: "48",
  72104. ios: "8.0",
  72105. node: "8.10",
  72106. opera: "49",
  72107. opera_mobile: "46",
  72108. safari: "7.1",
  72109. samsung: "8.0"
  72110. },
  72111. "es.object.define-properties": {
  72112. android: "3.0",
  72113. chrome: "5",
  72114. edge: "12",
  72115. electron: "0.20",
  72116. firefox: "4",
  72117. ie: "9",
  72118. ios: "5.1",
  72119. node: "0.1.27",
  72120. opera: "12",
  72121. opera_mobile: "12",
  72122. phantom: "2.0",
  72123. safari: "5.1",
  72124. samsung: "1.0"
  72125. },
  72126. "es.object.define-property": {
  72127. android: "3.0",
  72128. chrome: "5",
  72129. edge: "12",
  72130. electron: "0.20",
  72131. firefox: "4",
  72132. ie: "9",
  72133. ios: "5.1",
  72134. node: "0.1.27",
  72135. opera: "12",
  72136. opera_mobile: "12",
  72137. phantom: "2.0",
  72138. safari: "5.1",
  72139. samsung: "1.0"
  72140. },
  72141. "es.object.define-setter": {
  72142. chrome: "62",
  72143. edge: "16",
  72144. electron: "3.0",
  72145. firefox: "48",
  72146. ios: "8.0",
  72147. node: "8.10",
  72148. opera: "49",
  72149. opera_mobile: "46",
  72150. safari: "7.1",
  72151. samsung: "8.0"
  72152. },
  72153. "es.object.entries": {
  72154. chrome: "54",
  72155. edge: "14",
  72156. electron: "1.4",
  72157. firefox: "47",
  72158. ios: "10.3",
  72159. node: "7.0",
  72160. opera: "41",
  72161. opera_mobile: "41",
  72162. safari: "10.1",
  72163. samsung: "6.0"
  72164. },
  72165. "es.object.freeze": {
  72166. chrome: "44",
  72167. edge: "13",
  72168. electron: "0.30",
  72169. firefox: "35",
  72170. ios: "9.0",
  72171. node: "3.0",
  72172. opera: "31",
  72173. opera_mobile: "31",
  72174. safari: "9.0",
  72175. samsung: "4.0"
  72176. },
  72177. "es.object.from-entries": {
  72178. chrome: "73",
  72179. edge: "74",
  72180. electron: "5.0",
  72181. firefox: "63",
  72182. ios: "12.2",
  72183. node: "12.0",
  72184. opera: "60",
  72185. opera_mobile: "52",
  72186. safari: "12.1",
  72187. samsung: "11.0"
  72188. },
  72189. "es.object.get-own-property-descriptor": {
  72190. chrome: "44",
  72191. edge: "13",
  72192. electron: "0.30",
  72193. firefox: "35",
  72194. ios: "9.0",
  72195. node: "3.0",
  72196. opera: "31",
  72197. opera_mobile: "31",
  72198. safari: "9.0",
  72199. samsung: "4.0"
  72200. },
  72201. "es.object.get-own-property-descriptors": {
  72202. chrome: "54",
  72203. edge: "15",
  72204. electron: "1.4",
  72205. firefox: "50",
  72206. ios: "10.0",
  72207. node: "7.0",
  72208. opera: "41",
  72209. opera_mobile: "41",
  72210. safari: "10.0",
  72211. samsung: "6.0"
  72212. },
  72213. "es.object.get-own-property-names": {
  72214. chrome: "40",
  72215. edge: "13",
  72216. electron: "0.21",
  72217. firefox: "34",
  72218. ios: "9.0",
  72219. node: "1.0",
  72220. opera: "27",
  72221. opera_mobile: "27",
  72222. safari: "9.0",
  72223. samsung: "3.4"
  72224. },
  72225. "es.object.get-prototype-of": {
  72226. chrome: "44",
  72227. edge: "13",
  72228. electron: "0.30",
  72229. firefox: "35",
  72230. ios: "9.0",
  72231. node: "3.0",
  72232. opera: "31",
  72233. opera_mobile: "31",
  72234. safari: "9.0",
  72235. samsung: "4.0"
  72236. },
  72237. "es.object.is": {
  72238. android: "4.1",
  72239. chrome: "19",
  72240. edge: "12",
  72241. electron: "0.20",
  72242. firefox: "22",
  72243. ios: "9.0",
  72244. node: "0.7.3",
  72245. opera: "15",
  72246. opera_mobile: "15",
  72247. safari: "9.0",
  72248. samsung: "1.5"
  72249. },
  72250. "es.object.is-extensible": {
  72251. chrome: "44",
  72252. edge: "13",
  72253. electron: "0.30",
  72254. firefox: "35",
  72255. ios: "9.0",
  72256. node: "3.0",
  72257. opera: "31",
  72258. opera_mobile: "31",
  72259. safari: "9.0",
  72260. samsung: "4.0"
  72261. },
  72262. "es.object.is-frozen": {
  72263. chrome: "44",
  72264. edge: "13",
  72265. electron: "0.30",
  72266. firefox: "35",
  72267. ios: "9.0",
  72268. node: "3.0",
  72269. opera: "31",
  72270. opera_mobile: "31",
  72271. safari: "9.0",
  72272. samsung: "4.0"
  72273. },
  72274. "es.object.is-sealed": {
  72275. chrome: "44",
  72276. edge: "13",
  72277. electron: "0.30",
  72278. firefox: "35",
  72279. ios: "9.0",
  72280. node: "3.0",
  72281. opera: "31",
  72282. opera_mobile: "31",
  72283. safari: "9.0",
  72284. samsung: "4.0"
  72285. },
  72286. "es.object.keys": {
  72287. chrome: "40",
  72288. edge: "13",
  72289. electron: "0.21",
  72290. firefox: "35",
  72291. ios: "9.0",
  72292. node: "1.0",
  72293. opera: "27",
  72294. opera_mobile: "27",
  72295. safari: "9.0",
  72296. samsung: "3.4"
  72297. },
  72298. "es.object.lookup-getter": {
  72299. chrome: "62",
  72300. edge: "16",
  72301. electron: "3.0",
  72302. firefox: "48",
  72303. ios: "8.0",
  72304. node: "8.10",
  72305. opera: "49",
  72306. opera_mobile: "46",
  72307. safari: "7.1",
  72308. samsung: "8.0"
  72309. },
  72310. "es.object.lookup-setter": {
  72311. chrome: "62",
  72312. edge: "16",
  72313. electron: "3.0",
  72314. firefox: "48",
  72315. ios: "8.0",
  72316. node: "8.10",
  72317. opera: "49",
  72318. opera_mobile: "46",
  72319. safari: "7.1",
  72320. samsung: "8.0"
  72321. },
  72322. "es.object.prevent-extensions": {
  72323. chrome: "44",
  72324. edge: "13",
  72325. electron: "0.30",
  72326. firefox: "35",
  72327. ios: "9.0",
  72328. node: "3.0",
  72329. opera: "31",
  72330. opera_mobile: "31",
  72331. safari: "9.0",
  72332. samsung: "4.0"
  72333. },
  72334. "es.object.seal": {
  72335. chrome: "44",
  72336. edge: "13",
  72337. electron: "0.30",
  72338. firefox: "35",
  72339. ios: "9.0",
  72340. node: "3.0",
  72341. opera: "31",
  72342. opera_mobile: "31",
  72343. safari: "9.0",
  72344. samsung: "4.0"
  72345. },
  72346. "es.object.set-prototype-of": {
  72347. chrome: "34",
  72348. edge: "12",
  72349. electron: "0.20",
  72350. firefox: "31",
  72351. ie: "11",
  72352. ios: "9.0",
  72353. node: "0.11.13",
  72354. opera: "21",
  72355. opera_mobile: "21",
  72356. safari: "9.0",
  72357. samsung: "2.0"
  72358. },
  72359. "es.object.to-string": {
  72360. chrome: "49",
  72361. edge: "15",
  72362. electron: "0.37",
  72363. firefox: "51",
  72364. ios: "10.0",
  72365. node: "6.0",
  72366. opera: "36",
  72367. opera_mobile: "36",
  72368. safari: "10.0",
  72369. samsung: "5.0"
  72370. },
  72371. "es.object.values": {
  72372. chrome: "54",
  72373. edge: "14",
  72374. electron: "1.4",
  72375. firefox: "47",
  72376. ios: "10.3",
  72377. node: "7.0",
  72378. opera: "41",
  72379. opera_mobile: "41",
  72380. safari: "10.1",
  72381. samsung: "6.0"
  72382. },
  72383. "es.parse-float": {
  72384. chrome: "35",
  72385. edge: "12",
  72386. electron: "0.20",
  72387. firefox: "8",
  72388. ie: "8",
  72389. ios: "8.0",
  72390. node: "0.11.13",
  72391. opera: "22",
  72392. opera_mobile: "22",
  72393. safari: "7.1",
  72394. samsung: "3.0"
  72395. },
  72396. "es.parse-int": {
  72397. chrome: "35",
  72398. edge: "12",
  72399. electron: "0.20",
  72400. firefox: "21",
  72401. ie: "9",
  72402. ios: "8.0",
  72403. node: "0.11.13",
  72404. opera: "22",
  72405. opera_mobile: "22",
  72406. safari: "7.1",
  72407. samsung: "3.0"
  72408. },
  72409. "es.promise": {
  72410. chrome: "67",
  72411. edge: "74",
  72412. electron: "4.0",
  72413. firefox: "69",
  72414. ios: "11.0",
  72415. node: "10.4",
  72416. opera: "54",
  72417. opera_mobile: "48",
  72418. safari: "11.0",
  72419. samsung: "9.0"
  72420. },
  72421. "es.promise.all-settled": {
  72422. chrome: "76",
  72423. edge: "76",
  72424. electron: "6.0",
  72425. firefox: "71",
  72426. ios: "13.0",
  72427. node: "12.9",
  72428. opera: "63",
  72429. opera_mobile: "54",
  72430. safari: "13"
  72431. },
  72432. "es.promise.finally": {
  72433. chrome: "67",
  72434. edge: "74",
  72435. electron: "4.0",
  72436. firefox: "69",
  72437. ios: "13.2.3",
  72438. node: "10.4",
  72439. opera: "54",
  72440. opera_mobile: "48",
  72441. safari: "13.0.3",
  72442. samsung: "9.0"
  72443. },
  72444. "es.reflect.apply": {
  72445. chrome: "49",
  72446. edge: "15",
  72447. electron: "0.37",
  72448. firefox: "42",
  72449. ios: "10.0",
  72450. node: "6.0",
  72451. opera: "36",
  72452. opera_mobile: "36",
  72453. safari: "10.0",
  72454. samsung: "5.0"
  72455. },
  72456. "es.reflect.construct": {
  72457. chrome: "49",
  72458. edge: "15",
  72459. electron: "0.37",
  72460. firefox: "44",
  72461. ios: "10.0",
  72462. node: "6.0",
  72463. opera: "36",
  72464. opera_mobile: "36",
  72465. safari: "10.0",
  72466. samsung: "5.0"
  72467. },
  72468. "es.reflect.define-property": {
  72469. chrome: "49",
  72470. edge: "13",
  72471. electron: "0.37",
  72472. firefox: "42",
  72473. ios: "10.0",
  72474. node: "6.0",
  72475. opera: "36",
  72476. opera_mobile: "36",
  72477. safari: "10.0",
  72478. samsung: "5.0"
  72479. },
  72480. "es.reflect.delete-property": {
  72481. chrome: "49",
  72482. edge: "12",
  72483. electron: "0.37",
  72484. firefox: "42",
  72485. ios: "10.0",
  72486. node: "6.0",
  72487. opera: "36",
  72488. opera_mobile: "36",
  72489. safari: "10.0",
  72490. samsung: "5.0"
  72491. },
  72492. "es.reflect.get": {
  72493. chrome: "49",
  72494. edge: "12",
  72495. electron: "0.37",
  72496. firefox: "42",
  72497. ios: "10.0",
  72498. node: "6.0",
  72499. opera: "36",
  72500. opera_mobile: "36",
  72501. safari: "10.0",
  72502. samsung: "5.0"
  72503. },
  72504. "es.reflect.get-own-property-descriptor": {
  72505. chrome: "49",
  72506. edge: "12",
  72507. electron: "0.37",
  72508. firefox: "42",
  72509. ios: "10.0",
  72510. node: "6.0",
  72511. opera: "36",
  72512. opera_mobile: "36",
  72513. safari: "10.0",
  72514. samsung: "5.0"
  72515. },
  72516. "es.reflect.get-prototype-of": {
  72517. chrome: "49",
  72518. edge: "12",
  72519. electron: "0.37",
  72520. firefox: "42",
  72521. ios: "10.0",
  72522. node: "6.0",
  72523. opera: "36",
  72524. opera_mobile: "36",
  72525. safari: "10.0",
  72526. samsung: "5.0"
  72527. },
  72528. "es.reflect.has": {
  72529. chrome: "49",
  72530. edge: "12",
  72531. electron: "0.37",
  72532. firefox: "42",
  72533. ios: "10.0",
  72534. node: "6.0",
  72535. opera: "36",
  72536. opera_mobile: "36",
  72537. safari: "10.0",
  72538. samsung: "5.0"
  72539. },
  72540. "es.reflect.is-extensible": {
  72541. chrome: "49",
  72542. edge: "12",
  72543. electron: "0.37",
  72544. firefox: "42",
  72545. ios: "10.0",
  72546. node: "6.0",
  72547. opera: "36",
  72548. opera_mobile: "36",
  72549. safari: "10.0",
  72550. samsung: "5.0"
  72551. },
  72552. "es.reflect.own-keys": {
  72553. chrome: "49",
  72554. edge: "12",
  72555. electron: "0.37",
  72556. firefox: "42",
  72557. ios: "10.0",
  72558. node: "6.0",
  72559. opera: "36",
  72560. opera_mobile: "36",
  72561. safari: "10.0",
  72562. samsung: "5.0"
  72563. },
  72564. "es.reflect.prevent-extensions": {
  72565. chrome: "49",
  72566. edge: "12",
  72567. electron: "0.37",
  72568. firefox: "42",
  72569. ios: "10.0",
  72570. node: "6.0",
  72571. opera: "36",
  72572. opera_mobile: "36",
  72573. safari: "10.0",
  72574. samsung: "5.0"
  72575. },
  72576. "es.reflect.set": {
  72577. chrome: "49",
  72578. edge: "74",
  72579. electron: "0.37",
  72580. firefox: "42",
  72581. ios: "10.0",
  72582. node: "6.0",
  72583. opera: "36",
  72584. opera_mobile: "36",
  72585. safari: "10.0",
  72586. samsung: "5.0"
  72587. },
  72588. "es.reflect.set-prototype-of": {
  72589. chrome: "49",
  72590. edge: "12",
  72591. electron: "0.37",
  72592. firefox: "42",
  72593. ios: "10.0",
  72594. node: "6.0",
  72595. opera: "36",
  72596. opera_mobile: "36",
  72597. safari: "10.0",
  72598. samsung: "5.0"
  72599. },
  72600. "es.regexp.constructor": {
  72601. chrome: "51",
  72602. edge: "74",
  72603. electron: "1.2",
  72604. firefox: "49",
  72605. ios: "10.0",
  72606. node: "6.5",
  72607. opera: "38",
  72608. opera_mobile: "38",
  72609. safari: "10.0",
  72610. samsung: "5.0"
  72611. },
  72612. "es.regexp.exec": {
  72613. android: "4.4",
  72614. chrome: "26",
  72615. edge: "13",
  72616. electron: "0.20",
  72617. firefox: "44",
  72618. ios: "10.0",
  72619. node: "0.11.0",
  72620. opera: "16",
  72621. opera_mobile: "16",
  72622. safari: "10.0",
  72623. samsung: "1.5"
  72624. },
  72625. "es.regexp.flags": {
  72626. chrome: "49",
  72627. edge: "74",
  72628. electron: "0.37",
  72629. firefox: "37",
  72630. ios: "9.0",
  72631. node: "6.0",
  72632. opera: "36",
  72633. opera_mobile: "36",
  72634. safari: "9.0",
  72635. samsung: "5.0"
  72636. },
  72637. "es.regexp.sticky": {
  72638. chrome: "49",
  72639. edge: "13",
  72640. electron: "0.37",
  72641. firefox: "3",
  72642. ios: "10.0",
  72643. node: "6.0",
  72644. opera: "36",
  72645. opera_mobile: "36",
  72646. safari: "10.0",
  72647. samsung: "5.0"
  72648. },
  72649. "es.regexp.test": {
  72650. chrome: "51",
  72651. edge: "74",
  72652. electron: "1.2",
  72653. firefox: "46",
  72654. ios: "10.0",
  72655. node: "6.5",
  72656. opera: "38",
  72657. opera_mobile: "38",
  72658. safari: "10.0",
  72659. samsung: "5.0"
  72660. },
  72661. "es.regexp.to-string": {
  72662. chrome: "50",
  72663. edge: "74",
  72664. electron: "1.1",
  72665. firefox: "46",
  72666. ios: "10.0",
  72667. node: "6.0",
  72668. opera: "37",
  72669. opera_mobile: "37",
  72670. safari: "10.0",
  72671. samsung: "5.0"
  72672. },
  72673. "es.set": {
  72674. chrome: "51",
  72675. edge: "15",
  72676. electron: "1.2",
  72677. firefox: "53",
  72678. ios: "10.0",
  72679. node: "6.5",
  72680. opera: "38",
  72681. opera_mobile: "38",
  72682. safari: "10.0",
  72683. samsung: "5.0"
  72684. },
  72685. "es.string.code-point-at": {
  72686. chrome: "41",
  72687. edge: "13",
  72688. electron: "0.21",
  72689. firefox: "29",
  72690. ios: "9.0",
  72691. node: "1.0",
  72692. opera: "28",
  72693. opera_mobile: "28",
  72694. safari: "9.0",
  72695. samsung: "3.4"
  72696. },
  72697. "es.string.ends-with": {
  72698. chrome: "51",
  72699. edge: "74",
  72700. electron: "1.2",
  72701. firefox: "40",
  72702. ios: "10.0",
  72703. node: "6.5",
  72704. opera: "38",
  72705. opera_mobile: "38",
  72706. safari: "10.0",
  72707. samsung: "5.0"
  72708. },
  72709. "es.string.from-code-point": {
  72710. chrome: "41",
  72711. edge: "13",
  72712. electron: "0.21",
  72713. firefox: "29",
  72714. ios: "9.0",
  72715. node: "1.0",
  72716. opera: "28",
  72717. opera_mobile: "28",
  72718. safari: "9.0",
  72719. samsung: "3.4"
  72720. },
  72721. "es.string.includes": {
  72722. chrome: "51",
  72723. edge: "74",
  72724. electron: "1.2",
  72725. firefox: "40",
  72726. ios: "10.0",
  72727. node: "6.5",
  72728. opera: "38",
  72729. opera_mobile: "38",
  72730. safari: "10.0",
  72731. samsung: "5.0"
  72732. },
  72733. "es.string.iterator": {
  72734. chrome: "39",
  72735. edge: "13",
  72736. electron: "0.20",
  72737. firefox: "36",
  72738. ios: "9.0",
  72739. node: "1.0",
  72740. opera: "26",
  72741. opera_mobile: "26",
  72742. safari: "9.0",
  72743. samsung: "3.4"
  72744. },
  72745. "es.string.match": {
  72746. chrome: "51",
  72747. edge: "74",
  72748. electron: "1.2",
  72749. firefox: "49",
  72750. ios: "10.0",
  72751. node: "6.5",
  72752. opera: "38",
  72753. opera_mobile: "38",
  72754. safari: "10.0",
  72755. samsung: "5.0"
  72756. },
  72757. "es.string.match-all": {
  72758. chrome: "80",
  72759. edge: "80",
  72760. electron: "8.0",
  72761. firefox: "73",
  72762. opera: "67",
  72763. safari: "13.1"
  72764. },
  72765. "es.string.pad-end": {
  72766. chrome: "57",
  72767. edge: "15",
  72768. electron: "1.7",
  72769. firefox: "48",
  72770. ios: "11.0",
  72771. node: "8.0",
  72772. opera: "44",
  72773. opera_mobile: "43",
  72774. safari: "11.0",
  72775. samsung: "7.0"
  72776. },
  72777. "es.string.pad-start": {
  72778. chrome: "57",
  72779. edge: "15",
  72780. electron: "1.7",
  72781. firefox: "48",
  72782. ios: "11.0",
  72783. node: "8.0",
  72784. opera: "44",
  72785. opera_mobile: "43",
  72786. safari: "11.0",
  72787. samsung: "7.0"
  72788. },
  72789. "es.string.raw": {
  72790. chrome: "41",
  72791. edge: "13",
  72792. electron: "0.21",
  72793. firefox: "34",
  72794. ios: "9.0",
  72795. node: "1.0",
  72796. opera: "28",
  72797. opera_mobile: "28",
  72798. safari: "9.0",
  72799. samsung: "3.4"
  72800. },
  72801. "es.string.repeat": {
  72802. chrome: "41",
  72803. edge: "13",
  72804. electron: "0.21",
  72805. firefox: "24",
  72806. ios: "9.0",
  72807. node: "1.0",
  72808. opera: "28",
  72809. opera_mobile: "28",
  72810. safari: "9.0",
  72811. samsung: "3.4"
  72812. },
  72813. "es.string.replace": {
  72814. chrome: "64",
  72815. edge: "74",
  72816. electron: "3.0",
  72817. node: "10.0",
  72818. opera: "51",
  72819. opera_mobile: "47",
  72820. samsung: "9.0"
  72821. },
  72822. "es.string.search": {
  72823. chrome: "51",
  72824. edge: "74",
  72825. electron: "1.2",
  72826. firefox: "49",
  72827. ios: "10.0",
  72828. node: "6.5",
  72829. opera: "38",
  72830. opera_mobile: "38",
  72831. safari: "10.0",
  72832. samsung: "5.0"
  72833. },
  72834. "es.string.split": {
  72835. chrome: "54",
  72836. edge: "74",
  72837. electron: "1.4",
  72838. firefox: "49",
  72839. ios: "10.0",
  72840. node: "7.0",
  72841. opera: "41",
  72842. opera_mobile: "41",
  72843. safari: "10.0",
  72844. samsung: "6.0"
  72845. },
  72846. "es.string.starts-with": {
  72847. chrome: "51",
  72848. edge: "74",
  72849. electron: "1.2",
  72850. firefox: "40",
  72851. ios: "10.0",
  72852. node: "6.5",
  72853. opera: "38",
  72854. opera_mobile: "38",
  72855. safari: "10.0",
  72856. samsung: "5.0"
  72857. },
  72858. "es.string.trim": {
  72859. chrome: "59",
  72860. edge: "15",
  72861. electron: "1.8",
  72862. firefox: "52",
  72863. ios: "12.2",
  72864. node: "8.3",
  72865. opera: "46",
  72866. opera_mobile: "43",
  72867. safari: "12.1",
  72868. samsung: "7.0"
  72869. },
  72870. "es.string.trim-end": {
  72871. chrome: "66",
  72872. edge: "74",
  72873. electron: "3.0",
  72874. firefox: "61",
  72875. ios: "12.2",
  72876. node: "10.0",
  72877. opera: "53",
  72878. opera_mobile: "47",
  72879. safari: "12.1",
  72880. samsung: "9.0"
  72881. },
  72882. "es.string.trim-start": {
  72883. chrome: "66",
  72884. edge: "74",
  72885. electron: "3.0",
  72886. firefox: "61",
  72887. ios: "12.0",
  72888. node: "10.0",
  72889. opera: "53",
  72890. opera_mobile: "47",
  72891. safari: "12.0",
  72892. samsung: "9.0"
  72893. },
  72894. "es.string.anchor": {
  72895. android: "3.0",
  72896. chrome: "5",
  72897. edge: "12",
  72898. electron: "0.20",
  72899. firefox: "17",
  72900. ios: "6.0",
  72901. node: "0.1.27",
  72902. opera: "15",
  72903. opera_mobile: "15",
  72904. phantom: "2.0",
  72905. safari: "6.0",
  72906. samsung: "1.0"
  72907. },
  72908. "es.string.big": {
  72909. android: "3.0",
  72910. chrome: "5",
  72911. edge: "12",
  72912. electron: "0.20",
  72913. firefox: "2",
  72914. ios: "2.0",
  72915. node: "0.1.27",
  72916. opera: "10.50",
  72917. opera_mobile: "10.50",
  72918. phantom: "1.9",
  72919. safari: "3.1",
  72920. samsung: "1.0"
  72921. },
  72922. "es.string.blink": {
  72923. android: "3.0",
  72924. chrome: "5",
  72925. edge: "12",
  72926. electron: "0.20",
  72927. firefox: "2",
  72928. ios: "2.0",
  72929. node: "0.1.27",
  72930. opera: "10.50",
  72931. opera_mobile: "10.50",
  72932. phantom: "1.9",
  72933. safari: "3.1",
  72934. samsung: "1.0"
  72935. },
  72936. "es.string.bold": {
  72937. android: "3.0",
  72938. chrome: "5",
  72939. edge: "12",
  72940. electron: "0.20",
  72941. firefox: "2",
  72942. ios: "2.0",
  72943. node: "0.1.27",
  72944. opera: "10.50",
  72945. opera_mobile: "10.50",
  72946. phantom: "1.9",
  72947. safari: "3.1",
  72948. samsung: "1.0"
  72949. },
  72950. "es.string.fixed": {
  72951. android: "3.0",
  72952. chrome: "5",
  72953. edge: "12",
  72954. electron: "0.20",
  72955. firefox: "2",
  72956. ios: "2.0",
  72957. node: "0.1.27",
  72958. opera: "10.50",
  72959. opera_mobile: "10.50",
  72960. phantom: "1.9",
  72961. safari: "3.1",
  72962. samsung: "1.0"
  72963. },
  72964. "es.string.fontcolor": {
  72965. android: "3.0",
  72966. chrome: "5",
  72967. edge: "12",
  72968. electron: "0.20",
  72969. firefox: "17",
  72970. ios: "6.0",
  72971. node: "0.1.27",
  72972. opera: "15",
  72973. opera_mobile: "15",
  72974. phantom: "2.0",
  72975. safari: "6.0",
  72976. samsung: "1.0"
  72977. },
  72978. "es.string.fontsize": {
  72979. android: "3.0",
  72980. chrome: "5",
  72981. edge: "12",
  72982. electron: "0.20",
  72983. firefox: "17",
  72984. ios: "6.0",
  72985. node: "0.1.27",
  72986. opera: "15",
  72987. opera_mobile: "15",
  72988. phantom: "2.0",
  72989. safari: "6.0",
  72990. samsung: "1.0"
  72991. },
  72992. "es.string.italics": {
  72993. android: "3.0",
  72994. chrome: "5",
  72995. edge: "12",
  72996. electron: "0.20",
  72997. firefox: "2",
  72998. ios: "2.0",
  72999. node: "0.1.27",
  73000. opera: "10.50",
  73001. opera_mobile: "10.50",
  73002. phantom: "1.9",
  73003. safari: "3.1",
  73004. samsung: "1.0"
  73005. },
  73006. "es.string.link": {
  73007. android: "3.0",
  73008. chrome: "5",
  73009. edge: "12",
  73010. electron: "0.20",
  73011. firefox: "17",
  73012. ios: "6.0",
  73013. node: "0.1.27",
  73014. opera: "15",
  73015. opera_mobile: "15",
  73016. phantom: "2.0",
  73017. safari: "6.0",
  73018. samsung: "1.0"
  73019. },
  73020. "es.string.small": {
  73021. android: "3.0",
  73022. chrome: "5",
  73023. edge: "12",
  73024. electron: "0.20",
  73025. firefox: "2",
  73026. ios: "2.0",
  73027. node: "0.1.27",
  73028. opera: "10.50",
  73029. opera_mobile: "10.50",
  73030. phantom: "1.9",
  73031. safari: "3.1",
  73032. samsung: "1.0"
  73033. },
  73034. "es.string.strike": {
  73035. android: "3.0",
  73036. chrome: "5",
  73037. edge: "12",
  73038. electron: "0.20",
  73039. firefox: "2",
  73040. ios: "2.0",
  73041. node: "0.1.27",
  73042. opera: "10.50",
  73043. opera_mobile: "10.50",
  73044. phantom: "1.9",
  73045. safari: "3.1",
  73046. samsung: "1.0"
  73047. },
  73048. "es.string.sub": {
  73049. android: "3.0",
  73050. chrome: "5",
  73051. edge: "12",
  73052. electron: "0.20",
  73053. firefox: "2",
  73054. ios: "2.0",
  73055. node: "0.1.27",
  73056. opera: "10.50",
  73057. opera_mobile: "10.50",
  73058. phantom: "1.9",
  73059. safari: "3.1",
  73060. samsung: "1.0"
  73061. },
  73062. "es.string.sup": {
  73063. android: "3.0",
  73064. chrome: "5",
  73065. edge: "12",
  73066. electron: "0.20",
  73067. firefox: "2",
  73068. ios: "2.0",
  73069. node: "0.1.27",
  73070. opera: "10.50",
  73071. opera_mobile: "10.50",
  73072. phantom: "1.9",
  73073. safari: "3.1",
  73074. samsung: "1.0"
  73075. },
  73076. "es.typed-array.float32-array": {
  73077. chrome: "54",
  73078. edge: "15",
  73079. electron: "1.4",
  73080. firefox: "55",
  73081. node: "7.0",
  73082. opera: "41",
  73083. opera_mobile: "41",
  73084. samsung: "6.0"
  73085. },
  73086. "es.typed-array.float64-array": {
  73087. chrome: "54",
  73088. edge: "15",
  73089. electron: "1.4",
  73090. firefox: "55",
  73091. node: "7.0",
  73092. opera: "41",
  73093. opera_mobile: "41",
  73094. samsung: "6.0"
  73095. },
  73096. "es.typed-array.int8-array": {
  73097. chrome: "54",
  73098. edge: "15",
  73099. electron: "1.4",
  73100. firefox: "55",
  73101. node: "7.0",
  73102. opera: "41",
  73103. opera_mobile: "41",
  73104. samsung: "6.0"
  73105. },
  73106. "es.typed-array.int16-array": {
  73107. chrome: "54",
  73108. edge: "15",
  73109. electron: "1.4",
  73110. firefox: "55",
  73111. node: "7.0",
  73112. opera: "41",
  73113. opera_mobile: "41",
  73114. samsung: "6.0"
  73115. },
  73116. "es.typed-array.int32-array": {
  73117. chrome: "54",
  73118. edge: "15",
  73119. electron: "1.4",
  73120. firefox: "55",
  73121. node: "7.0",
  73122. opera: "41",
  73123. opera_mobile: "41",
  73124. samsung: "6.0"
  73125. },
  73126. "es.typed-array.uint8-array": {
  73127. chrome: "54",
  73128. edge: "15",
  73129. electron: "1.4",
  73130. firefox: "55",
  73131. node: "7.0",
  73132. opera: "41",
  73133. opera_mobile: "41",
  73134. samsung: "6.0"
  73135. },
  73136. "es.typed-array.uint8-clamped-array": {
  73137. chrome: "54",
  73138. edge: "15",
  73139. electron: "1.4",
  73140. firefox: "55",
  73141. node: "7.0",
  73142. opera: "41",
  73143. opera_mobile: "41",
  73144. samsung: "6.0"
  73145. },
  73146. "es.typed-array.uint16-array": {
  73147. chrome: "54",
  73148. edge: "15",
  73149. electron: "1.4",
  73150. firefox: "55",
  73151. node: "7.0",
  73152. opera: "41",
  73153. opera_mobile: "41",
  73154. samsung: "6.0"
  73155. },
  73156. "es.typed-array.uint32-array": {
  73157. chrome: "54",
  73158. edge: "15",
  73159. electron: "1.4",
  73160. firefox: "55",
  73161. node: "7.0",
  73162. opera: "41",
  73163. opera_mobile: "41",
  73164. samsung: "6.0"
  73165. },
  73166. "es.typed-array.copy-within": {
  73167. chrome: "45",
  73168. edge: "13",
  73169. electron: "0.31",
  73170. firefox: "34",
  73171. ios: "10.0",
  73172. node: "4.0",
  73173. opera: "32",
  73174. opera_mobile: "32",
  73175. safari: "10.0",
  73176. samsung: "5.0"
  73177. },
  73178. "es.typed-array.every": {
  73179. chrome: "45",
  73180. edge: "13",
  73181. electron: "0.31",
  73182. firefox: "37",
  73183. ios: "10.0",
  73184. node: "4.0",
  73185. opera: "32",
  73186. opera_mobile: "32",
  73187. safari: "10.0",
  73188. samsung: "5.0"
  73189. },
  73190. "es.typed-array.fill": {
  73191. chrome: "45",
  73192. edge: "13",
  73193. electron: "0.31",
  73194. firefox: "37",
  73195. ios: "10.0",
  73196. node: "4.0",
  73197. opera: "32",
  73198. opera_mobile: "32",
  73199. safari: "10.0",
  73200. samsung: "5.0"
  73201. },
  73202. "es.typed-array.filter": {
  73203. chrome: "45",
  73204. edge: "13",
  73205. electron: "0.31",
  73206. firefox: "38",
  73207. ios: "10.0",
  73208. node: "4.0",
  73209. opera: "32",
  73210. opera_mobile: "32",
  73211. safari: "10.0",
  73212. samsung: "5.0"
  73213. },
  73214. "es.typed-array.find": {
  73215. chrome: "45",
  73216. edge: "13",
  73217. electron: "0.31",
  73218. firefox: "37",
  73219. ios: "10.0",
  73220. node: "4.0",
  73221. opera: "32",
  73222. opera_mobile: "32",
  73223. safari: "10.0",
  73224. samsung: "5.0"
  73225. },
  73226. "es.typed-array.find-index": {
  73227. chrome: "45",
  73228. edge: "13",
  73229. electron: "0.31",
  73230. firefox: "37",
  73231. ios: "10.0",
  73232. node: "4.0",
  73233. opera: "32",
  73234. opera_mobile: "32",
  73235. safari: "10.0",
  73236. samsung: "5.0"
  73237. },
  73238. "es.typed-array.for-each": {
  73239. chrome: "45",
  73240. edge: "13",
  73241. electron: "0.31",
  73242. firefox: "38",
  73243. ios: "10.0",
  73244. node: "4.0",
  73245. opera: "32",
  73246. opera_mobile: "32",
  73247. safari: "10.0",
  73248. samsung: "5.0"
  73249. },
  73250. "es.typed-array.from": {
  73251. chrome: "54",
  73252. edge: "15",
  73253. electron: "1.4",
  73254. firefox: "55",
  73255. node: "7.0",
  73256. opera: "41",
  73257. opera_mobile: "41",
  73258. samsung: "6.0"
  73259. },
  73260. "es.typed-array.includes": {
  73261. chrome: "49",
  73262. edge: "14",
  73263. electron: "0.37",
  73264. firefox: "43",
  73265. ios: "10.0",
  73266. node: "6.0",
  73267. opera: "36",
  73268. opera_mobile: "36",
  73269. safari: "10.0",
  73270. samsung: "5.0"
  73271. },
  73272. "es.typed-array.index-of": {
  73273. chrome: "45",
  73274. edge: "13",
  73275. electron: "0.31",
  73276. firefox: "37",
  73277. ios: "10.0",
  73278. node: "4.0",
  73279. opera: "32",
  73280. opera_mobile: "32",
  73281. safari: "10.0",
  73282. samsung: "5.0"
  73283. },
  73284. "es.typed-array.iterator": {
  73285. chrome: "47",
  73286. edge: "13",
  73287. electron: "0.36",
  73288. firefox: "37",
  73289. ios: "10.0",
  73290. node: "6.0",
  73291. opera: "34",
  73292. opera_mobile: "34",
  73293. safari: "10.0",
  73294. samsung: "5.0"
  73295. },
  73296. "es.typed-array.join": {
  73297. chrome: "45",
  73298. edge: "13",
  73299. electron: "0.31",
  73300. firefox: "37",
  73301. ios: "10.0",
  73302. node: "4.0",
  73303. opera: "32",
  73304. opera_mobile: "32",
  73305. safari: "10.0",
  73306. samsung: "5.0"
  73307. },
  73308. "es.typed-array.last-index-of": {
  73309. chrome: "45",
  73310. edge: "13",
  73311. electron: "0.31",
  73312. firefox: "37",
  73313. ios: "10.0",
  73314. node: "4.0",
  73315. opera: "32",
  73316. opera_mobile: "32",
  73317. safari: "10.0",
  73318. samsung: "5.0"
  73319. },
  73320. "es.typed-array.map": {
  73321. chrome: "45",
  73322. edge: "13",
  73323. electron: "0.31",
  73324. firefox: "38",
  73325. ios: "10.0",
  73326. node: "4.0",
  73327. opera: "32",
  73328. opera_mobile: "32",
  73329. safari: "10.0",
  73330. samsung: "5.0"
  73331. },
  73332. "es.typed-array.of": {
  73333. chrome: "54",
  73334. edge: "15",
  73335. electron: "1.4",
  73336. firefox: "55",
  73337. node: "7.0",
  73338. opera: "41",
  73339. opera_mobile: "41",
  73340. samsung: "6.0"
  73341. },
  73342. "es.typed-array.reduce": {
  73343. chrome: "45",
  73344. edge: "13",
  73345. electron: "0.31",
  73346. firefox: "37",
  73347. ios: "10.0",
  73348. node: "4.0",
  73349. opera: "32",
  73350. opera_mobile: "32",
  73351. safari: "10.0",
  73352. samsung: "5.0"
  73353. },
  73354. "es.typed-array.reduce-right": {
  73355. chrome: "45",
  73356. edge: "13",
  73357. electron: "0.31",
  73358. firefox: "37",
  73359. ios: "10.0",
  73360. node: "4.0",
  73361. opera: "32",
  73362. opera_mobile: "32",
  73363. safari: "10.0",
  73364. samsung: "5.0"
  73365. },
  73366. "es.typed-array.reverse": {
  73367. chrome: "45",
  73368. edge: "13",
  73369. electron: "0.31",
  73370. firefox: "37",
  73371. ios: "10.0",
  73372. node: "4.0",
  73373. opera: "32",
  73374. opera_mobile: "32",
  73375. safari: "10.0",
  73376. samsung: "5.0"
  73377. },
  73378. "es.typed-array.set": {
  73379. android: "4.4",
  73380. chrome: "26",
  73381. edge: "13",
  73382. electron: "0.20",
  73383. firefox: "15",
  73384. ios: "8.0",
  73385. node: "0.11.0",
  73386. opera: "16",
  73387. opera_mobile: "16",
  73388. safari: "7.1",
  73389. samsung: "1.5"
  73390. },
  73391. "es.typed-array.slice": {
  73392. chrome: "45",
  73393. edge: "13",
  73394. electron: "0.31",
  73395. firefox: "38",
  73396. ios: "10.0",
  73397. node: "4.0",
  73398. opera: "32",
  73399. opera_mobile: "32",
  73400. safari: "10.0",
  73401. samsung: "5.0"
  73402. },
  73403. "es.typed-array.some": {
  73404. chrome: "45",
  73405. edge: "13",
  73406. electron: "0.31",
  73407. firefox: "37",
  73408. ios: "10.0",
  73409. node: "4.0",
  73410. opera: "32",
  73411. opera_mobile: "32",
  73412. safari: "10.0",
  73413. samsung: "5.0"
  73414. },
  73415. "es.typed-array.sort": {
  73416. chrome: "45",
  73417. edge: "13",
  73418. electron: "0.31",
  73419. firefox: "46",
  73420. ios: "10.0",
  73421. node: "4.0",
  73422. opera: "32",
  73423. opera_mobile: "32",
  73424. safari: "10.0",
  73425. samsung: "5.0"
  73426. },
  73427. "es.typed-array.subarray": {
  73428. android: "4.4",
  73429. chrome: "26",
  73430. edge: "13",
  73431. electron: "0.20",
  73432. firefox: "15",
  73433. ios: "8.0",
  73434. node: "0.11.0",
  73435. opera: "16",
  73436. opera_mobile: "16",
  73437. safari: "7.1",
  73438. samsung: "1.5"
  73439. },
  73440. "es.typed-array.to-locale-string": {
  73441. chrome: "45",
  73442. edge: "74",
  73443. electron: "0.31",
  73444. firefox: "51",
  73445. ios: "10.0",
  73446. node: "4.0",
  73447. opera: "32",
  73448. opera_mobile: "32",
  73449. safari: "10.0",
  73450. samsung: "5.0"
  73451. },
  73452. "es.typed-array.to-string": {
  73453. chrome: "51",
  73454. edge: "13",
  73455. electron: "1.2",
  73456. firefox: "51",
  73457. ios: "10.0",
  73458. node: "6.5",
  73459. opera: "38",
  73460. opera_mobile: "38",
  73461. safari: "10.0",
  73462. samsung: "5.0"
  73463. },
  73464. "es.weak-map": {
  73465. chrome: "51",
  73466. edge: "15",
  73467. electron: "1.2",
  73468. firefox: "53",
  73469. ios: "10.0",
  73470. node: "6.5",
  73471. opera: "38",
  73472. opera_mobile: "38",
  73473. safari: "10.0",
  73474. samsung: "5.0"
  73475. },
  73476. "es.weak-set": {
  73477. chrome: "51",
  73478. edge: "15",
  73479. electron: "1.2",
  73480. firefox: "53",
  73481. ios: "10.0",
  73482. node: "6.5",
  73483. opera: "38",
  73484. opera_mobile: "38",
  73485. safari: "10.0",
  73486. samsung: "5.0"
  73487. },
  73488. "esnext.aggregate-error": {
  73489. },
  73490. "esnext.array.is-template-object": {
  73491. },
  73492. "esnext.array.last-index": {
  73493. },
  73494. "esnext.array.last-item": {
  73495. },
  73496. "esnext.async-iterator.constructor": {
  73497. },
  73498. "esnext.async-iterator.as-indexed-pairs": {
  73499. },
  73500. "esnext.async-iterator.drop": {
  73501. },
  73502. "esnext.async-iterator.every": {
  73503. },
  73504. "esnext.async-iterator.filter": {
  73505. },
  73506. "esnext.async-iterator.find": {
  73507. },
  73508. "esnext.async-iterator.flat-map": {
  73509. },
  73510. "esnext.async-iterator.for-each": {
  73511. },
  73512. "esnext.async-iterator.from": {
  73513. },
  73514. "esnext.async-iterator.map": {
  73515. },
  73516. "esnext.async-iterator.reduce": {
  73517. },
  73518. "esnext.async-iterator.some": {
  73519. },
  73520. "esnext.async-iterator.take": {
  73521. },
  73522. "esnext.async-iterator.to-array": {
  73523. },
  73524. "esnext.composite-key": {
  73525. },
  73526. "esnext.composite-symbol": {
  73527. },
  73528. "esnext.global-this": {
  73529. chrome: "71",
  73530. edge: "74",
  73531. electron: "5.0",
  73532. firefox: "65",
  73533. ios: "12.2",
  73534. node: "12.0",
  73535. opera: "58",
  73536. opera_mobile: "50",
  73537. safari: "12.1",
  73538. samsung: "10.0"
  73539. },
  73540. "esnext.iterator.constructor": {
  73541. },
  73542. "esnext.iterator.as-indexed-pairs": {
  73543. },
  73544. "esnext.iterator.drop": {
  73545. },
  73546. "esnext.iterator.every": {
  73547. },
  73548. "esnext.iterator.filter": {
  73549. },
  73550. "esnext.iterator.find": {
  73551. },
  73552. "esnext.iterator.flat-map": {
  73553. },
  73554. "esnext.iterator.for-each": {
  73555. },
  73556. "esnext.iterator.from": {
  73557. },
  73558. "esnext.iterator.map": {
  73559. },
  73560. "esnext.iterator.reduce": {
  73561. },
  73562. "esnext.iterator.some": {
  73563. },
  73564. "esnext.iterator.take": {
  73565. },
  73566. "esnext.iterator.to-array": {
  73567. },
  73568. "esnext.map.delete-all": {
  73569. },
  73570. "esnext.map.every": {
  73571. },
  73572. "esnext.map.filter": {
  73573. },
  73574. "esnext.map.find": {
  73575. },
  73576. "esnext.map.find-key": {
  73577. },
  73578. "esnext.map.from": {
  73579. },
  73580. "esnext.map.group-by": {
  73581. },
  73582. "esnext.map.includes": {
  73583. },
  73584. "esnext.map.key-by": {
  73585. },
  73586. "esnext.map.key-of": {
  73587. },
  73588. "esnext.map.map-keys": {
  73589. },
  73590. "esnext.map.map-values": {
  73591. },
  73592. "esnext.map.merge": {
  73593. },
  73594. "esnext.map.of": {
  73595. },
  73596. "esnext.map.reduce": {
  73597. },
  73598. "esnext.map.some": {
  73599. },
  73600. "esnext.map.update": {
  73601. },
  73602. "esnext.map.update-or-insert": {
  73603. },
  73604. "esnext.map.upsert": {
  73605. },
  73606. "esnext.math.clamp": {
  73607. },
  73608. "esnext.math.deg-per-rad": {
  73609. },
  73610. "esnext.math.degrees": {
  73611. },
  73612. "esnext.math.fscale": {
  73613. },
  73614. "esnext.math.iaddh": {
  73615. },
  73616. "esnext.math.imulh": {
  73617. },
  73618. "esnext.math.isubh": {
  73619. },
  73620. "esnext.math.rad-per-deg": {
  73621. },
  73622. "esnext.math.radians": {
  73623. },
  73624. "esnext.math.scale": {
  73625. },
  73626. "esnext.math.seeded-prng": {
  73627. },
  73628. "esnext.math.signbit": {
  73629. },
  73630. "esnext.math.umulh": {
  73631. },
  73632. "esnext.number.from-string": {
  73633. },
  73634. "esnext.object.iterate-entries": {
  73635. },
  73636. "esnext.object.iterate-keys": {
  73637. },
  73638. "esnext.object.iterate-values": {
  73639. },
  73640. "esnext.observable": {
  73641. },
  73642. "esnext.promise.all-settled": {
  73643. chrome: "76",
  73644. edge: "76",
  73645. electron: "6.0",
  73646. firefox: "71",
  73647. ios: "13.0",
  73648. node: "12.9",
  73649. opera: "63",
  73650. opera_mobile: "54",
  73651. safari: "13"
  73652. },
  73653. "esnext.promise.any": {
  73654. },
  73655. "esnext.promise.try": {
  73656. },
  73657. "esnext.reflect.define-metadata": {
  73658. },
  73659. "esnext.reflect.delete-metadata": {
  73660. },
  73661. "esnext.reflect.get-metadata": {
  73662. },
  73663. "esnext.reflect.get-metadata-keys": {
  73664. },
  73665. "esnext.reflect.get-own-metadata": {
  73666. },
  73667. "esnext.reflect.get-own-metadata-keys": {
  73668. },
  73669. "esnext.reflect.has-metadata": {
  73670. },
  73671. "esnext.reflect.has-own-metadata": {
  73672. },
  73673. "esnext.reflect.metadata": {
  73674. },
  73675. "esnext.set.add-all": {
  73676. },
  73677. "esnext.set.delete-all": {
  73678. },
  73679. "esnext.set.difference": {
  73680. },
  73681. "esnext.set.every": {
  73682. },
  73683. "esnext.set.filter": {
  73684. },
  73685. "esnext.set.find": {
  73686. },
  73687. "esnext.set.from": {
  73688. },
  73689. "esnext.set.intersection": {
  73690. },
  73691. "esnext.set.is-disjoint-from": {
  73692. },
  73693. "esnext.set.is-subset-of": {
  73694. },
  73695. "esnext.set.is-superset-of": {
  73696. },
  73697. "esnext.set.join": {
  73698. },
  73699. "esnext.set.map": {
  73700. },
  73701. "esnext.set.of": {
  73702. },
  73703. "esnext.set.reduce": {
  73704. },
  73705. "esnext.set.some": {
  73706. },
  73707. "esnext.set.symmetric-difference": {
  73708. },
  73709. "esnext.set.union": {
  73710. },
  73711. "esnext.string.at": {
  73712. },
  73713. "esnext.string.code-points": {
  73714. },
  73715. "esnext.string.match-all": {
  73716. chrome: "80",
  73717. edge: "80",
  73718. electron: "8.0",
  73719. firefox: "73",
  73720. opera: "67",
  73721. safari: "13.1"
  73722. },
  73723. "esnext.string.replace-all": {
  73724. },
  73725. "esnext.symbol.async-dispose": {
  73726. },
  73727. "esnext.symbol.dispose": {
  73728. },
  73729. "esnext.symbol.observable": {
  73730. },
  73731. "esnext.symbol.pattern-match": {
  73732. },
  73733. "esnext.symbol.replace-all": {
  73734. },
  73735. "esnext.weak-map.delete-all": {
  73736. },
  73737. "esnext.weak-map.from": {
  73738. },
  73739. "esnext.weak-map.of": {
  73740. },
  73741. "esnext.weak-map.upsert": {
  73742. },
  73743. "esnext.weak-set.add-all": {
  73744. },
  73745. "esnext.weak-set.delete-all": {
  73746. },
  73747. "esnext.weak-set.from": {
  73748. },
  73749. "esnext.weak-set.of": {
  73750. },
  73751. "web.dom-collections.for-each": {
  73752. chrome: "58",
  73753. edge: "16",
  73754. electron: "1.7",
  73755. firefox: "50",
  73756. ios: "10.0",
  73757. node: "0.0.1",
  73758. opera: "45",
  73759. opera_mobile: "43",
  73760. safari: "10.0",
  73761. samsung: "7.0"
  73762. },
  73763. "web.dom-collections.iterator": {
  73764. chrome: "66",
  73765. edge: "74",
  73766. electron: "3.0",
  73767. firefox: "60",
  73768. node: "0.0.1",
  73769. opera: "53",
  73770. opera_mobile: "47",
  73771. safari: "13.1",
  73772. samsung: "9.0"
  73773. },
  73774. "web.immediate": {
  73775. ie: "10",
  73776. node: "0.9.1"
  73777. },
  73778. "web.queue-microtask": {
  73779. chrome: "71",
  73780. edge: "74",
  73781. electron: "5.0",
  73782. firefox: "69",
  73783. ios: "12.2",
  73784. node: "12.0",
  73785. opera: "58",
  73786. opera_mobile: "50",
  73787. safari: "12.1",
  73788. samsung: "10.0"
  73789. },
  73790. "web.timers": {
  73791. android: "1.5",
  73792. chrome: "1",
  73793. edge: "12",
  73794. electron: "0.20",
  73795. firefox: "1",
  73796. ie: "10",
  73797. ios: "1.0",
  73798. node: "0.0.1",
  73799. opera: "7",
  73800. opera_mobile: "7",
  73801. phantom: "1.9",
  73802. safari: "1.0",
  73803. samsung: "1.0"
  73804. },
  73805. "web.url": {
  73806. chrome: "67",
  73807. edge: "74",
  73808. electron: "4.0",
  73809. firefox: "57",
  73810. node: "10.0",
  73811. opera: "54",
  73812. opera_mobile: "48",
  73813. samsung: "9.0"
  73814. },
  73815. "web.url.to-json": {
  73816. chrome: "71",
  73817. edge: "74",
  73818. electron: "5.0",
  73819. firefox: "57",
  73820. node: "10.0",
  73821. opera: "58",
  73822. opera_mobile: "50",
  73823. samsung: "10.0"
  73824. },
  73825. "web.url-search-params": {
  73826. chrome: "67",
  73827. edge: "74",
  73828. electron: "4.0",
  73829. firefox: "57",
  73830. node: "10.0",
  73831. opera: "54",
  73832. opera_mobile: "48",
  73833. samsung: "9.0"
  73834. }
  73835. };
  73836. var leven_1$1 = createCommonjsModule(function (module) {
  73837. var array = [];
  73838. var charCodeCache = [];
  73839. var leven = function leven(left, right) {
  73840. if (left === right) {
  73841. return 0;
  73842. }
  73843. var swap = left;
  73844. if (left.length > right.length) {
  73845. left = right;
  73846. right = swap;
  73847. }
  73848. var leftLength = left.length;
  73849. var rightLength = right.length;
  73850. while (leftLength > 0 && left.charCodeAt(~-leftLength) === right.charCodeAt(~-rightLength)) {
  73851. leftLength--;
  73852. rightLength--;
  73853. }
  73854. var start = 0;
  73855. while (start < leftLength && left.charCodeAt(start) === right.charCodeAt(start)) {
  73856. start++;
  73857. }
  73858. leftLength -= start;
  73859. rightLength -= start;
  73860. if (leftLength === 0) {
  73861. return rightLength;
  73862. }
  73863. var bCharCode;
  73864. var result;
  73865. var temp;
  73866. var temp2;
  73867. var i = 0;
  73868. var j = 0;
  73869. while (i < leftLength) {
  73870. charCodeCache[i] = left.charCodeAt(start + i);
  73871. array[i] = ++i;
  73872. }
  73873. while (j < rightLength) {
  73874. bCharCode = right.charCodeAt(start + j);
  73875. temp = j++;
  73876. result = j;
  73877. for (i = 0; i < leftLength; i++) {
  73878. temp2 = bCharCode === charCodeCache[i] ? temp : temp + 1;
  73879. temp = array[i];
  73880. result = array[i] = temp > result ? temp2 > result ? result + 1 : temp2 : temp2 > temp ? temp + 1 : temp2;
  73881. }
  73882. }
  73883. return result;
  73884. };
  73885. module.exports = leven;
  73886. module.exports["default"] = leven;
  73887. });
  73888. function levenArray$1(str, array) {
  73889. var minLeven = Number.POSITIVE_INFINITY;
  73890. var result = undefined;
  73891. for (var _iterator = array, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  73892. var _ref;
  73893. if (_isArray) {
  73894. if (_i >= _iterator.length) break;
  73895. _ref = _iterator[_i++];
  73896. } else {
  73897. _i = _iterator.next();
  73898. if (_i.done) break;
  73899. _ref = _i.value;
  73900. }
  73901. var item = _ref;
  73902. var distance = leven_1$1(str, item);
  73903. if (distance < minLeven) {
  73904. minLeven = distance;
  73905. result = item;
  73906. }
  73907. }
  73908. return result;
  73909. }
  73910. var invariant$1 = function invariant(condition, format, a, b, c, d, e, f) {
  73911. {
  73912. if (format === undefined) {
  73913. throw new Error('invariant requires an error message argument');
  73914. }
  73915. }
  73916. if (!condition) {
  73917. var error;
  73918. if (format === undefined) {
  73919. error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
  73920. } else {
  73921. var args = [a, b, c, d, e, f];
  73922. var argIndex = 0;
  73923. error = new Error(format.replace(/%s/g, function () {
  73924. return args[argIndex++];
  73925. }));
  73926. error.name = 'Invariant Violation';
  73927. }
  73928. error.framesToPop = 1;
  73929. throw error;
  73930. }
  73931. };
  73932. var browser$8 = invariant$1;
  73933. var corejs2BuiltIns = {
  73934. "es6.array.copy-within": {
  73935. chrome: "45",
  73936. edge: "12",
  73937. firefox: "32",
  73938. safari: "9",
  73939. node: "4",
  73940. ios: "9",
  73941. samsung: "5",
  73942. opera: "32",
  73943. electron: "0.35"
  73944. },
  73945. "es6.array.every": {
  73946. chrome: "5",
  73947. opera: "10.10",
  73948. edge: "12",
  73949. firefox: "2",
  73950. safari: "3.1",
  73951. node: "0.10",
  73952. ie: "9",
  73953. android: "4",
  73954. ios: "6",
  73955. phantom: "2",
  73956. samsung: "2.1",
  73957. electron: "1.1"
  73958. },
  73959. "es6.array.fill": {
  73960. chrome: "45",
  73961. edge: "12",
  73962. firefox: "31",
  73963. safari: "7.1",
  73964. node: "4",
  73965. ios: "8",
  73966. samsung: "5",
  73967. opera: "32",
  73968. electron: "0.35"
  73969. },
  73970. "es6.array.filter": {
  73971. chrome: "5",
  73972. opera: "10.10",
  73973. edge: "12",
  73974. firefox: "2",
  73975. safari: "3.1",
  73976. node: "0.10",
  73977. ie: "9",
  73978. android: "4",
  73979. ios: "6",
  73980. phantom: "2",
  73981. samsung: "2.1",
  73982. electron: "1.1"
  73983. },
  73984. "es6.array.find": {
  73985. chrome: "45",
  73986. edge: "12",
  73987. firefox: "25",
  73988. safari: "7.1",
  73989. node: "4",
  73990. ios: "8",
  73991. samsung: "5",
  73992. opera: "32",
  73993. electron: "0.35"
  73994. },
  73995. "es6.array.find-index": {
  73996. chrome: "45",
  73997. edge: "12",
  73998. firefox: "25",
  73999. safari: "7.1",
  74000. node: "4",
  74001. ios: "8",
  74002. samsung: "5",
  74003. opera: "32",
  74004. electron: "0.35"
  74005. },
  74006. "es7.array.flat-map": {
  74007. chrome: "69",
  74008. firefox: "62",
  74009. safari: "12",
  74010. node: "11",
  74011. ios: "12",
  74012. samsung: "10.2",
  74013. opera: "56",
  74014. electron: "4"
  74015. },
  74016. "es6.array.for-each": {
  74017. chrome: "5",
  74018. opera: "10.10",
  74019. edge: "12",
  74020. firefox: "2",
  74021. safari: "3.1",
  74022. node: "0.10",
  74023. ie: "9",
  74024. android: "4",
  74025. ios: "6",
  74026. phantom: "2",
  74027. samsung: "2.1",
  74028. electron: "1.1"
  74029. },
  74030. "es6.array.from": {
  74031. chrome: "51",
  74032. edge: "15",
  74033. firefox: "36",
  74034. safari: "10",
  74035. node: "6.5",
  74036. ios: "10",
  74037. samsung: "5",
  74038. opera: "38",
  74039. electron: "1.2"
  74040. },
  74041. "es7.array.includes": {
  74042. chrome: "47",
  74043. edge: "14",
  74044. firefox: "43",
  74045. safari: "10",
  74046. node: "6",
  74047. ios: "10",
  74048. samsung: "5",
  74049. opera: "34",
  74050. electron: "0.36"
  74051. },
  74052. "es6.array.index-of": {
  74053. chrome: "5",
  74054. opera: "10.10",
  74055. edge: "12",
  74056. firefox: "2",
  74057. safari: "3.1",
  74058. node: "0.10",
  74059. ie: "9",
  74060. android: "4",
  74061. ios: "6",
  74062. phantom: "2",
  74063. samsung: "2.1",
  74064. electron: "1.1"
  74065. },
  74066. "es6.array.is-array": {
  74067. chrome: "5",
  74068. opera: "10.50",
  74069. edge: "12",
  74070. firefox: "4",
  74071. safari: "4",
  74072. node: "0.10",
  74073. ie: "9",
  74074. android: "4",
  74075. ios: "6",
  74076. phantom: "2",
  74077. samsung: "2.1",
  74078. electron: "1.1"
  74079. },
  74080. "es6.array.iterator": {
  74081. chrome: "38",
  74082. edge: "12",
  74083. firefox: "28",
  74084. safari: "7.1",
  74085. node: "0.12",
  74086. ios: "8",
  74087. samsung: "3",
  74088. opera: "25",
  74089. electron: "0.2"
  74090. },
  74091. "es6.array.last-index-of": {
  74092. chrome: "5",
  74093. opera: "10.10",
  74094. edge: "12",
  74095. firefox: "2",
  74096. safari: "3.1",
  74097. node: "0.10",
  74098. ie: "9",
  74099. android: "4",
  74100. ios: "6",
  74101. phantom: "2",
  74102. samsung: "2.1",
  74103. electron: "1.1"
  74104. },
  74105. "es6.array.map": {
  74106. chrome: "5",
  74107. opera: "10.10",
  74108. edge: "12",
  74109. firefox: "2",
  74110. safari: "3.1",
  74111. node: "0.10",
  74112. ie: "9",
  74113. android: "4",
  74114. ios: "6",
  74115. phantom: "2",
  74116. samsung: "2.1",
  74117. electron: "1.1"
  74118. },
  74119. "es6.array.of": {
  74120. chrome: "45",
  74121. edge: "12",
  74122. firefox: "25",
  74123. safari: "9",
  74124. node: "4",
  74125. ios: "9",
  74126. samsung: "5",
  74127. opera: "32",
  74128. electron: "0.35"
  74129. },
  74130. "es6.array.reduce": {
  74131. chrome: "5",
  74132. opera: "10.50",
  74133. edge: "12",
  74134. firefox: "3",
  74135. safari: "4",
  74136. node: "0.10",
  74137. ie: "9",
  74138. android: "4",
  74139. ios: "6",
  74140. phantom: "2",
  74141. samsung: "2.1",
  74142. electron: "1.1"
  74143. },
  74144. "es6.array.reduce-right": {
  74145. chrome: "5",
  74146. opera: "10.50",
  74147. edge: "12",
  74148. firefox: "3",
  74149. safari: "4",
  74150. node: "0.10",
  74151. ie: "9",
  74152. android: "4",
  74153. ios: "6",
  74154. phantom: "2",
  74155. samsung: "2.1",
  74156. electron: "1.1"
  74157. },
  74158. "es6.array.some": {
  74159. chrome: "5",
  74160. opera: "10.10",
  74161. edge: "12",
  74162. firefox: "2",
  74163. safari: "3.1",
  74164. node: "0.10",
  74165. ie: "9",
  74166. android: "4",
  74167. ios: "6",
  74168. phantom: "2",
  74169. samsung: "2.1",
  74170. electron: "1.1"
  74171. },
  74172. "es6.array.sort": {
  74173. chrome: "63",
  74174. opera: "50",
  74175. edge: "12",
  74176. firefox: "5",
  74177. safari: "12",
  74178. node: "10",
  74179. ie: "9",
  74180. ios: "12",
  74181. samsung: "8.2",
  74182. electron: "3.1"
  74183. },
  74184. "es6.array.species": {
  74185. chrome: "51",
  74186. edge: "13",
  74187. firefox: "48",
  74188. safari: "10",
  74189. node: "6.5",
  74190. ios: "10",
  74191. samsung: "5",
  74192. opera: "38",
  74193. electron: "1.2"
  74194. },
  74195. "es6.date.now": {
  74196. chrome: "5",
  74197. opera: "10.50",
  74198. edge: "12",
  74199. firefox: "2",
  74200. safari: "4",
  74201. node: "0.10",
  74202. ie: "9",
  74203. android: "4",
  74204. ios: "6",
  74205. phantom: "2",
  74206. samsung: "2.1",
  74207. electron: "1.1"
  74208. },
  74209. "es6.date.to-iso-string": {
  74210. chrome: "5",
  74211. opera: "10.50",
  74212. edge: "12",
  74213. firefox: "3.5",
  74214. safari: "4",
  74215. node: "0.10",
  74216. ie: "9",
  74217. android: "4",
  74218. ios: "6",
  74219. phantom: "2",
  74220. samsung: "2.1",
  74221. electron: "1.1"
  74222. },
  74223. "es6.date.to-json": {
  74224. chrome: "5",
  74225. opera: "12.10",
  74226. edge: "12",
  74227. firefox: "4",
  74228. safari: "10",
  74229. node: "0.10",
  74230. ie: "9",
  74231. android: "4",
  74232. ios: "10",
  74233. samsung: "2.1",
  74234. electron: "1.1"
  74235. },
  74236. "es6.date.to-primitive": {
  74237. chrome: "47",
  74238. edge: "15",
  74239. firefox: "44",
  74240. safari: "10",
  74241. node: "6",
  74242. ios: "10",
  74243. samsung: "5",
  74244. opera: "34",
  74245. electron: "0.36"
  74246. },
  74247. "es6.date.to-string": {
  74248. chrome: "5",
  74249. opera: "10.50",
  74250. edge: "12",
  74251. firefox: "2",
  74252. safari: "3.1",
  74253. node: "0.10",
  74254. ie: "10",
  74255. android: "4",
  74256. ios: "6",
  74257. phantom: "2",
  74258. samsung: "2.1",
  74259. electron: "1.1"
  74260. },
  74261. "es6.function.bind": {
  74262. chrome: "7",
  74263. opera: "12",
  74264. edge: "12",
  74265. firefox: "4",
  74266. safari: "5.1",
  74267. node: "0.10",
  74268. ie: "9",
  74269. android: "4",
  74270. ios: "6",
  74271. phantom: "2",
  74272. samsung: "2.1",
  74273. electron: "5"
  74274. },
  74275. "es6.function.has-instance": {
  74276. chrome: "51",
  74277. edge: "15",
  74278. firefox: "50",
  74279. safari: "10",
  74280. node: "6.5",
  74281. ios: "10",
  74282. samsung: "5",
  74283. opera: "38",
  74284. electron: "1.2"
  74285. },
  74286. "es6.function.name": {
  74287. chrome: "5",
  74288. opera: "10.50",
  74289. edge: "14",
  74290. firefox: "2",
  74291. safari: "4",
  74292. node: "0.10",
  74293. android: "4",
  74294. ios: "6",
  74295. phantom: "2",
  74296. samsung: "2.1",
  74297. electron: "1.1"
  74298. },
  74299. "es6.map": {
  74300. chrome: "51",
  74301. edge: "15",
  74302. firefox: "53",
  74303. safari: "10",
  74304. node: "6.5",
  74305. ios: "10",
  74306. samsung: "5",
  74307. opera: "38",
  74308. electron: "1.2"
  74309. },
  74310. "es6.math.acosh": {
  74311. chrome: "38",
  74312. edge: "12",
  74313. firefox: "25",
  74314. safari: "7.1",
  74315. node: "0.12",
  74316. ios: "8",
  74317. samsung: "3",
  74318. opera: "25",
  74319. electron: "0.2"
  74320. },
  74321. "es6.math.asinh": {
  74322. chrome: "38",
  74323. edge: "12",
  74324. firefox: "25",
  74325. safari: "7.1",
  74326. node: "0.12",
  74327. ios: "8",
  74328. samsung: "3",
  74329. opera: "25",
  74330. electron: "0.2"
  74331. },
  74332. "es6.math.atanh": {
  74333. chrome: "38",
  74334. edge: "12",
  74335. firefox: "25",
  74336. safari: "7.1",
  74337. node: "0.12",
  74338. ios: "8",
  74339. samsung: "3",
  74340. opera: "25",
  74341. electron: "0.2"
  74342. },
  74343. "es6.math.cbrt": {
  74344. chrome: "38",
  74345. edge: "12",
  74346. firefox: "25",
  74347. safari: "7.1",
  74348. node: "0.12",
  74349. ios: "8",
  74350. samsung: "3",
  74351. opera: "25",
  74352. electron: "0.2"
  74353. },
  74354. "es6.math.clz32": {
  74355. chrome: "38",
  74356. edge: "12",
  74357. firefox: "31",
  74358. safari: "9",
  74359. node: "0.12",
  74360. ios: "9",
  74361. samsung: "3",
  74362. opera: "25",
  74363. electron: "0.2"
  74364. },
  74365. "es6.math.cosh": {
  74366. chrome: "38",
  74367. edge: "12",
  74368. firefox: "25",
  74369. safari: "7.1",
  74370. node: "0.12",
  74371. ios: "8",
  74372. samsung: "3",
  74373. opera: "25",
  74374. electron: "0.2"
  74375. },
  74376. "es6.math.expm1": {
  74377. chrome: "38",
  74378. edge: "12",
  74379. firefox: "25",
  74380. safari: "7.1",
  74381. node: "0.12",
  74382. ios: "8",
  74383. samsung: "3",
  74384. opera: "25",
  74385. electron: "0.2"
  74386. },
  74387. "es6.math.fround": {
  74388. chrome: "38",
  74389. edge: "12",
  74390. firefox: "26",
  74391. safari: "7.1",
  74392. node: "0.12",
  74393. ios: "8",
  74394. samsung: "3",
  74395. opera: "25",
  74396. electron: "0.2"
  74397. },
  74398. "es6.math.hypot": {
  74399. chrome: "38",
  74400. edge: "12",
  74401. firefox: "27",
  74402. safari: "7.1",
  74403. node: "0.12",
  74404. ios: "8",
  74405. samsung: "3",
  74406. opera: "25",
  74407. electron: "0.2"
  74408. },
  74409. "es6.math.imul": {
  74410. chrome: "30",
  74411. edge: "12",
  74412. firefox: "23",
  74413. safari: "7",
  74414. node: "0.12",
  74415. android: "4.4",
  74416. ios: "7",
  74417. samsung: "2.1",
  74418. opera: "17",
  74419. electron: "0.2"
  74420. },
  74421. "es6.math.log1p": {
  74422. chrome: "38",
  74423. edge: "12",
  74424. firefox: "25",
  74425. safari: "7.1",
  74426. node: "0.12",
  74427. ios: "8",
  74428. samsung: "3",
  74429. opera: "25",
  74430. electron: "0.2"
  74431. },
  74432. "es6.math.log10": {
  74433. chrome: "38",
  74434. edge: "12",
  74435. firefox: "25",
  74436. safari: "7.1",
  74437. node: "0.12",
  74438. ios: "8",
  74439. samsung: "3",
  74440. opera: "25",
  74441. electron: "0.2"
  74442. },
  74443. "es6.math.log2": {
  74444. chrome: "38",
  74445. edge: "12",
  74446. firefox: "25",
  74447. safari: "7.1",
  74448. node: "0.12",
  74449. ios: "8",
  74450. samsung: "3",
  74451. opera: "25",
  74452. electron: "0.2"
  74453. },
  74454. "es6.math.sign": {
  74455. chrome: "38",
  74456. edge: "12",
  74457. firefox: "25",
  74458. safari: "9",
  74459. node: "0.12",
  74460. ios: "9",
  74461. samsung: "3",
  74462. opera: "25",
  74463. electron: "0.2"
  74464. },
  74465. "es6.math.sinh": {
  74466. chrome: "38",
  74467. edge: "12",
  74468. firefox: "25",
  74469. safari: "7.1",
  74470. node: "0.12",
  74471. ios: "8",
  74472. samsung: "3",
  74473. opera: "25",
  74474. electron: "0.2"
  74475. },
  74476. "es6.math.tanh": {
  74477. chrome: "38",
  74478. edge: "12",
  74479. firefox: "25",
  74480. safari: "7.1",
  74481. node: "0.12",
  74482. ios: "8",
  74483. samsung: "3",
  74484. opera: "25",
  74485. electron: "0.2"
  74486. },
  74487. "es6.math.trunc": {
  74488. chrome: "38",
  74489. edge: "12",
  74490. firefox: "25",
  74491. safari: "7.1",
  74492. node: "0.12",
  74493. ios: "8",
  74494. samsung: "3",
  74495. opera: "25",
  74496. electron: "0.2"
  74497. },
  74498. "es6.number.constructor": {
  74499. chrome: "41",
  74500. edge: "12",
  74501. firefox: "36",
  74502. safari: "9",
  74503. node: "4",
  74504. ios: "9",
  74505. samsung: "3.4",
  74506. opera: "28",
  74507. electron: "0.24"
  74508. },
  74509. "es6.number.epsilon": {
  74510. chrome: "34",
  74511. edge: "12",
  74512. firefox: "25",
  74513. safari: "9",
  74514. node: "0.12",
  74515. ios: "9",
  74516. samsung: "2.1",
  74517. opera: "21",
  74518. electron: "0.2"
  74519. },
  74520. "es6.number.is-finite": {
  74521. chrome: "19",
  74522. edge: "12",
  74523. firefox: "16",
  74524. safari: "9",
  74525. node: "0.12",
  74526. android: "4.1",
  74527. ios: "9",
  74528. samsung: "2.1",
  74529. electron: "0.2"
  74530. },
  74531. "es6.number.is-integer": {
  74532. chrome: "34",
  74533. edge: "12",
  74534. firefox: "16",
  74535. safari: "9",
  74536. node: "0.12",
  74537. ios: "9",
  74538. samsung: "2.1",
  74539. opera: "21",
  74540. electron: "0.2"
  74541. },
  74542. "es6.number.is-nan": {
  74543. chrome: "19",
  74544. edge: "12",
  74545. firefox: "15",
  74546. safari: "9",
  74547. node: "0.12",
  74548. android: "4.1",
  74549. ios: "9",
  74550. samsung: "2.1",
  74551. electron: "0.2"
  74552. },
  74553. "es6.number.is-safe-integer": {
  74554. chrome: "34",
  74555. edge: "12",
  74556. firefox: "32",
  74557. safari: "9",
  74558. node: "0.12",
  74559. ios: "9",
  74560. samsung: "2.1",
  74561. opera: "21",
  74562. electron: "0.2"
  74563. },
  74564. "es6.number.max-safe-integer": {
  74565. chrome: "34",
  74566. edge: "12",
  74567. firefox: "31",
  74568. safari: "9",
  74569. node: "0.12",
  74570. ios: "9",
  74571. samsung: "2.1",
  74572. opera: "21",
  74573. electron: "0.2"
  74574. },
  74575. "es6.number.min-safe-integer": {
  74576. chrome: "34",
  74577. edge: "12",
  74578. firefox: "31",
  74579. safari: "9",
  74580. node: "0.12",
  74581. ios: "9",
  74582. samsung: "2.1",
  74583. opera: "21",
  74584. electron: "0.2"
  74585. },
  74586. "es6.number.parse-float": {
  74587. chrome: "34",
  74588. edge: "12",
  74589. firefox: "25",
  74590. safari: "9",
  74591. node: "0.12",
  74592. ios: "9",
  74593. samsung: "2.1",
  74594. opera: "21",
  74595. electron: "0.2"
  74596. },
  74597. "es6.number.parse-int": {
  74598. chrome: "34",
  74599. edge: "12",
  74600. firefox: "25",
  74601. safari: "9",
  74602. node: "0.12",
  74603. ios: "9",
  74604. samsung: "2.1",
  74605. opera: "21",
  74606. electron: "0.2"
  74607. },
  74608. "es6.object.assign": {
  74609. chrome: "49",
  74610. edge: "13",
  74611. firefox: "36",
  74612. safari: "10",
  74613. node: "6",
  74614. ios: "10",
  74615. samsung: "5",
  74616. opera: "36",
  74617. electron: "1"
  74618. },
  74619. "es6.object.create": {
  74620. chrome: "5",
  74621. opera: "12",
  74622. edge: "12",
  74623. firefox: "4",
  74624. safari: "4",
  74625. node: "0.10",
  74626. ie: "9",
  74627. android: "4",
  74628. ios: "6",
  74629. phantom: "2",
  74630. samsung: "2.1",
  74631. electron: "1.1"
  74632. },
  74633. "es7.object.define-getter": {
  74634. chrome: "62",
  74635. edge: "16",
  74636. firefox: "48",
  74637. safari: "9",
  74638. node: "8.10",
  74639. ios: "9",
  74640. samsung: "8.2",
  74641. opera: "49",
  74642. electron: "3.1"
  74643. },
  74644. "es7.object.define-setter": {
  74645. chrome: "62",
  74646. edge: "16",
  74647. firefox: "48",
  74648. safari: "9",
  74649. node: "8.10",
  74650. ios: "9",
  74651. samsung: "8.2",
  74652. opera: "49",
  74653. electron: "3.1"
  74654. },
  74655. "es6.object.define-property": {
  74656. chrome: "5",
  74657. opera: "12",
  74658. edge: "12",
  74659. firefox: "4",
  74660. safari: "5.1",
  74661. node: "0.10",
  74662. ie: "9",
  74663. android: "4",
  74664. ios: "6",
  74665. phantom: "2",
  74666. samsung: "2.1",
  74667. electron: "1.1"
  74668. },
  74669. "es6.object.define-properties": {
  74670. chrome: "5",
  74671. opera: "12",
  74672. edge: "12",
  74673. firefox: "4",
  74674. safari: "4",
  74675. node: "0.10",
  74676. ie: "9",
  74677. android: "4",
  74678. ios: "6",
  74679. phantom: "2",
  74680. samsung: "2.1",
  74681. electron: "1.1"
  74682. },
  74683. "es7.object.entries": {
  74684. chrome: "54",
  74685. edge: "14",
  74686. firefox: "47",
  74687. safari: "10.1",
  74688. node: "7",
  74689. ios: "10.3",
  74690. samsung: "6.2",
  74691. opera: "41",
  74692. electron: "1.5"
  74693. },
  74694. "es6.object.freeze": {
  74695. chrome: "44",
  74696. edge: "12",
  74697. firefox: "35",
  74698. safari: "9",
  74699. node: "4",
  74700. ios: "9",
  74701. samsung: "4",
  74702. opera: "31",
  74703. electron: "0.31"
  74704. },
  74705. "es6.object.get-own-property-descriptor": {
  74706. chrome: "44",
  74707. edge: "12",
  74708. firefox: "35",
  74709. safari: "9",
  74710. node: "4",
  74711. ios: "9",
  74712. samsung: "4",
  74713. opera: "31",
  74714. electron: "0.31"
  74715. },
  74716. "es7.object.get-own-property-descriptors": {
  74717. chrome: "54",
  74718. edge: "15",
  74719. firefox: "50",
  74720. safari: "10.1",
  74721. node: "7",
  74722. ios: "10.3",
  74723. samsung: "6.2",
  74724. opera: "41",
  74725. electron: "1.5"
  74726. },
  74727. "es6.object.get-own-property-names": {
  74728. chrome: "40",
  74729. edge: "12",
  74730. firefox: "33",
  74731. safari: "9",
  74732. node: "4",
  74733. ios: "9",
  74734. samsung: "3.4",
  74735. opera: "27",
  74736. electron: "0.21"
  74737. },
  74738. "es6.object.get-prototype-of": {
  74739. chrome: "44",
  74740. edge: "12",
  74741. firefox: "35",
  74742. safari: "9",
  74743. node: "4",
  74744. ios: "9",
  74745. samsung: "4",
  74746. opera: "31",
  74747. electron: "0.31"
  74748. },
  74749. "es7.object.lookup-getter": {
  74750. chrome: "62",
  74751. firefox: "36",
  74752. safari: "9",
  74753. node: "8.10",
  74754. ios: "9",
  74755. samsung: "8.2",
  74756. opera: "49",
  74757. electron: "3.1"
  74758. },
  74759. "es7.object.lookup-setter": {
  74760. chrome: "62",
  74761. firefox: "36",
  74762. safari: "9",
  74763. node: "8.10",
  74764. ios: "9",
  74765. samsung: "8.2",
  74766. opera: "49",
  74767. electron: "3.1"
  74768. },
  74769. "es6.object.prevent-extensions": {
  74770. chrome: "44",
  74771. edge: "12",
  74772. firefox: "35",
  74773. safari: "9",
  74774. node: "4",
  74775. ios: "9",
  74776. samsung: "4",
  74777. opera: "31",
  74778. electron: "0.31"
  74779. },
  74780. "es6.object.to-string": {
  74781. chrome: "57",
  74782. edge: "15",
  74783. firefox: "51",
  74784. safari: "10",
  74785. node: "8",
  74786. ios: "10",
  74787. samsung: "7.2",
  74788. opera: "44",
  74789. electron: "1.7"
  74790. },
  74791. "es6.object.is": {
  74792. chrome: "19",
  74793. edge: "12",
  74794. firefox: "22",
  74795. safari: "9",
  74796. node: "0.12",
  74797. android: "4.1",
  74798. ios: "9",
  74799. samsung: "2.1",
  74800. electron: "0.2"
  74801. },
  74802. "es6.object.is-frozen": {
  74803. chrome: "44",
  74804. edge: "12",
  74805. firefox: "35",
  74806. safari: "9",
  74807. node: "4",
  74808. ios: "9",
  74809. samsung: "4",
  74810. opera: "31",
  74811. electron: "0.31"
  74812. },
  74813. "es6.object.is-sealed": {
  74814. chrome: "44",
  74815. edge: "12",
  74816. firefox: "35",
  74817. safari: "9",
  74818. node: "4",
  74819. ios: "9",
  74820. samsung: "4",
  74821. opera: "31",
  74822. electron: "0.31"
  74823. },
  74824. "es6.object.is-extensible": {
  74825. chrome: "44",
  74826. edge: "12",
  74827. firefox: "35",
  74828. safari: "9",
  74829. node: "4",
  74830. ios: "9",
  74831. samsung: "4",
  74832. opera: "31",
  74833. electron: "0.31"
  74834. },
  74835. "es6.object.keys": {
  74836. chrome: "40",
  74837. edge: "12",
  74838. firefox: "35",
  74839. safari: "9",
  74840. node: "4",
  74841. ios: "9",
  74842. samsung: "3.4",
  74843. opera: "27",
  74844. electron: "0.21"
  74845. },
  74846. "es6.object.seal": {
  74847. chrome: "44",
  74848. edge: "12",
  74849. firefox: "35",
  74850. safari: "9",
  74851. node: "4",
  74852. ios: "9",
  74853. samsung: "4",
  74854. opera: "31",
  74855. electron: "0.31"
  74856. },
  74857. "es6.object.set-prototype-of": {
  74858. chrome: "34",
  74859. edge: "12",
  74860. firefox: "31",
  74861. safari: "9",
  74862. node: "0.12",
  74863. ie: "11",
  74864. ios: "9",
  74865. samsung: "2.1",
  74866. opera: "21",
  74867. electron: "0.2"
  74868. },
  74869. "es7.object.values": {
  74870. chrome: "54",
  74871. edge: "14",
  74872. firefox: "47",
  74873. safari: "10.1",
  74874. node: "7",
  74875. ios: "10.3",
  74876. samsung: "6.2",
  74877. opera: "41",
  74878. electron: "1.5"
  74879. },
  74880. "es6.promise": {
  74881. chrome: "51",
  74882. edge: "14",
  74883. firefox: "45",
  74884. safari: "10",
  74885. node: "6.5",
  74886. ios: "10",
  74887. samsung: "5",
  74888. opera: "38",
  74889. electron: "1.2"
  74890. },
  74891. "es7.promise.finally": {
  74892. chrome: "63",
  74893. edge: "18",
  74894. firefox: "58",
  74895. safari: "11.1",
  74896. node: "10",
  74897. ios: "11.3",
  74898. samsung: "8.2",
  74899. opera: "50",
  74900. electron: "3.1"
  74901. },
  74902. "es6.reflect.apply": {
  74903. chrome: "49",
  74904. edge: "12",
  74905. firefox: "42",
  74906. safari: "10",
  74907. node: "6",
  74908. ios: "10",
  74909. samsung: "5",
  74910. opera: "36",
  74911. electron: "1"
  74912. },
  74913. "es6.reflect.construct": {
  74914. chrome: "49",
  74915. edge: "13",
  74916. firefox: "49",
  74917. safari: "10",
  74918. node: "6",
  74919. ios: "10",
  74920. samsung: "5",
  74921. opera: "36",
  74922. electron: "1"
  74923. },
  74924. "es6.reflect.define-property": {
  74925. chrome: "49",
  74926. edge: "13",
  74927. firefox: "42",
  74928. safari: "10",
  74929. node: "6",
  74930. ios: "10",
  74931. samsung: "5",
  74932. opera: "36",
  74933. electron: "1"
  74934. },
  74935. "es6.reflect.delete-property": {
  74936. chrome: "49",
  74937. edge: "12",
  74938. firefox: "42",
  74939. safari: "10",
  74940. node: "6",
  74941. ios: "10",
  74942. samsung: "5",
  74943. opera: "36",
  74944. electron: "1"
  74945. },
  74946. "es6.reflect.get": {
  74947. chrome: "49",
  74948. edge: "12",
  74949. firefox: "42",
  74950. safari: "10",
  74951. node: "6",
  74952. ios: "10",
  74953. samsung: "5",
  74954. opera: "36",
  74955. electron: "1"
  74956. },
  74957. "es6.reflect.get-own-property-descriptor": {
  74958. chrome: "49",
  74959. edge: "12",
  74960. firefox: "42",
  74961. safari: "10",
  74962. node: "6",
  74963. ios: "10",
  74964. samsung: "5",
  74965. opera: "36",
  74966. electron: "1"
  74967. },
  74968. "es6.reflect.get-prototype-of": {
  74969. chrome: "49",
  74970. edge: "12",
  74971. firefox: "42",
  74972. safari: "10",
  74973. node: "6",
  74974. ios: "10",
  74975. samsung: "5",
  74976. opera: "36",
  74977. electron: "1"
  74978. },
  74979. "es6.reflect.has": {
  74980. chrome: "49",
  74981. edge: "12",
  74982. firefox: "42",
  74983. safari: "10",
  74984. node: "6",
  74985. ios: "10",
  74986. samsung: "5",
  74987. opera: "36",
  74988. electron: "1"
  74989. },
  74990. "es6.reflect.is-extensible": {
  74991. chrome: "49",
  74992. edge: "12",
  74993. firefox: "42",
  74994. safari: "10",
  74995. node: "6",
  74996. ios: "10",
  74997. samsung: "5",
  74998. opera: "36",
  74999. electron: "1"
  75000. },
  75001. "es6.reflect.own-keys": {
  75002. chrome: "49",
  75003. edge: "12",
  75004. firefox: "42",
  75005. safari: "10",
  75006. node: "6",
  75007. ios: "10",
  75008. samsung: "5",
  75009. opera: "36",
  75010. electron: "1"
  75011. },
  75012. "es6.reflect.prevent-extensions": {
  75013. chrome: "49",
  75014. edge: "12",
  75015. firefox: "42",
  75016. safari: "10",
  75017. node: "6",
  75018. ios: "10",
  75019. samsung: "5",
  75020. opera: "36",
  75021. electron: "1"
  75022. },
  75023. "es6.reflect.set": {
  75024. chrome: "49",
  75025. edge: "12",
  75026. firefox: "42",
  75027. safari: "10",
  75028. node: "6",
  75029. ios: "10",
  75030. samsung: "5",
  75031. opera: "36",
  75032. electron: "1"
  75033. },
  75034. "es6.reflect.set-prototype-of": {
  75035. chrome: "49",
  75036. edge: "12",
  75037. firefox: "42",
  75038. safari: "10",
  75039. node: "6",
  75040. ios: "10",
  75041. samsung: "5",
  75042. opera: "36",
  75043. electron: "1"
  75044. },
  75045. "es6.regexp.constructor": {
  75046. chrome: "50",
  75047. firefox: "40",
  75048. safari: "10",
  75049. node: "6",
  75050. ios: "10",
  75051. samsung: "5",
  75052. opera: "37",
  75053. electron: "1.1"
  75054. },
  75055. "es6.regexp.flags": {
  75056. chrome: "49",
  75057. firefox: "37",
  75058. safari: "9",
  75059. node: "6",
  75060. ios: "9",
  75061. samsung: "5",
  75062. opera: "36",
  75063. electron: "1"
  75064. },
  75065. "es6.regexp.match": {
  75066. chrome: "50",
  75067. firefox: "49",
  75068. safari: "10",
  75069. node: "6",
  75070. ios: "10",
  75071. samsung: "5",
  75072. opera: "37",
  75073. electron: "1.1"
  75074. },
  75075. "es6.regexp.replace": {
  75076. chrome: "50",
  75077. firefox: "49",
  75078. safari: "10",
  75079. node: "6",
  75080. ios: "10",
  75081. samsung: "5",
  75082. opera: "37",
  75083. electron: "1.1"
  75084. },
  75085. "es6.regexp.split": {
  75086. chrome: "50",
  75087. firefox: "49",
  75088. safari: "10",
  75089. node: "6",
  75090. ios: "10",
  75091. samsung: "5",
  75092. opera: "37",
  75093. electron: "1.1"
  75094. },
  75095. "es6.regexp.search": {
  75096. chrome: "50",
  75097. firefox: "49",
  75098. safari: "10",
  75099. node: "6",
  75100. ios: "10",
  75101. samsung: "5",
  75102. opera: "37",
  75103. electron: "1.1"
  75104. },
  75105. "es6.regexp.to-string": {
  75106. chrome: "50",
  75107. firefox: "39",
  75108. safari: "10",
  75109. node: "6",
  75110. ios: "10",
  75111. samsung: "5",
  75112. opera: "37",
  75113. electron: "1.1"
  75114. },
  75115. "es6.set": {
  75116. chrome: "51",
  75117. edge: "15",
  75118. firefox: "53",
  75119. safari: "10",
  75120. node: "6.5",
  75121. ios: "10",
  75122. samsung: "5",
  75123. opera: "38",
  75124. electron: "1.2"
  75125. },
  75126. "es6.symbol": {
  75127. chrome: "51",
  75128. firefox: "51",
  75129. safari: "10",
  75130. node: "6.5",
  75131. ios: "10",
  75132. samsung: "5",
  75133. opera: "38",
  75134. electron: "1.2"
  75135. },
  75136. "es7.symbol.async-iterator": {
  75137. chrome: "63",
  75138. firefox: "57",
  75139. safari: "12",
  75140. node: "10",
  75141. ios: "12",
  75142. samsung: "8.2",
  75143. opera: "50",
  75144. electron: "3.1"
  75145. },
  75146. "es6.string.anchor": {
  75147. chrome: "5",
  75148. edge: "12",
  75149. firefox: "17",
  75150. safari: "6",
  75151. node: "0.10",
  75152. android: "4",
  75153. ios: "7",
  75154. phantom: "2",
  75155. samsung: "2.1",
  75156. electron: "1.1"
  75157. },
  75158. "es6.string.big": {
  75159. chrome: "5",
  75160. edge: "12",
  75161. firefox: "17",
  75162. safari: "6",
  75163. node: "0.10",
  75164. android: "4",
  75165. ios: "7",
  75166. phantom: "2",
  75167. samsung: "2.1",
  75168. electron: "1.1"
  75169. },
  75170. "es6.string.blink": {
  75171. chrome: "5",
  75172. edge: "12",
  75173. firefox: "17",
  75174. safari: "6",
  75175. node: "0.10",
  75176. android: "4",
  75177. ios: "7",
  75178. phantom: "2",
  75179. samsung: "2.1",
  75180. electron: "1.1"
  75181. },
  75182. "es6.string.bold": {
  75183. chrome: "5",
  75184. edge: "12",
  75185. firefox: "17",
  75186. safari: "6",
  75187. node: "0.10",
  75188. android: "4",
  75189. ios: "7",
  75190. phantom: "2",
  75191. samsung: "2.1",
  75192. electron: "1.1"
  75193. },
  75194. "es6.string.code-point-at": {
  75195. chrome: "41",
  75196. edge: "12",
  75197. firefox: "29",
  75198. safari: "9",
  75199. node: "4",
  75200. ios: "9",
  75201. samsung: "3.4",
  75202. opera: "28",
  75203. electron: "0.24"
  75204. },
  75205. "es6.string.ends-with": {
  75206. chrome: "41",
  75207. edge: "12",
  75208. firefox: "29",
  75209. safari: "9",
  75210. node: "4",
  75211. ios: "9",
  75212. samsung: "3.4",
  75213. opera: "28",
  75214. electron: "0.24"
  75215. },
  75216. "es6.string.fixed": {
  75217. chrome: "5",
  75218. edge: "12",
  75219. firefox: "17",
  75220. safari: "6",
  75221. node: "0.10",
  75222. android: "4",
  75223. ios: "7",
  75224. phantom: "2",
  75225. samsung: "2.1",
  75226. electron: "1.1"
  75227. },
  75228. "es6.string.fontcolor": {
  75229. chrome: "5",
  75230. edge: "12",
  75231. firefox: "17",
  75232. safari: "6",
  75233. node: "0.10",
  75234. android: "4",
  75235. ios: "7",
  75236. phantom: "2",
  75237. samsung: "2.1",
  75238. electron: "1.1"
  75239. },
  75240. "es6.string.fontsize": {
  75241. chrome: "5",
  75242. edge: "12",
  75243. firefox: "17",
  75244. safari: "6",
  75245. node: "0.10",
  75246. android: "4",
  75247. ios: "7",
  75248. phantom: "2",
  75249. samsung: "2.1",
  75250. electron: "1.1"
  75251. },
  75252. "es6.string.from-code-point": {
  75253. chrome: "41",
  75254. edge: "12",
  75255. firefox: "29",
  75256. safari: "9",
  75257. node: "4",
  75258. ios: "9",
  75259. samsung: "3.4",
  75260. opera: "28",
  75261. electron: "0.24"
  75262. },
  75263. "es6.string.includes": {
  75264. chrome: "41",
  75265. edge: "12",
  75266. firefox: "40",
  75267. safari: "9",
  75268. node: "4",
  75269. ios: "9",
  75270. samsung: "3.4",
  75271. opera: "28",
  75272. electron: "0.24"
  75273. },
  75274. "es6.string.italics": {
  75275. chrome: "5",
  75276. edge: "12",
  75277. firefox: "17",
  75278. safari: "6",
  75279. node: "0.10",
  75280. android: "4",
  75281. ios: "7",
  75282. phantom: "2",
  75283. samsung: "2.1",
  75284. electron: "1.1"
  75285. },
  75286. "es6.string.iterator": {
  75287. chrome: "38",
  75288. edge: "12",
  75289. firefox: "36",
  75290. safari: "9",
  75291. node: "0.12",
  75292. ios: "9",
  75293. samsung: "3",
  75294. opera: "25",
  75295. electron: "0.2"
  75296. },
  75297. "es6.string.link": {
  75298. chrome: "5",
  75299. edge: "12",
  75300. firefox: "17",
  75301. safari: "6",
  75302. node: "0.10",
  75303. android: "4",
  75304. ios: "7",
  75305. phantom: "2",
  75306. samsung: "2.1",
  75307. electron: "1.1"
  75308. },
  75309. "es7.string.pad-start": {
  75310. chrome: "57",
  75311. edge: "15",
  75312. firefox: "48",
  75313. safari: "10",
  75314. node: "8",
  75315. ios: "10",
  75316. samsung: "7.2",
  75317. opera: "44",
  75318. electron: "1.7"
  75319. },
  75320. "es7.string.pad-end": {
  75321. chrome: "57",
  75322. edge: "15",
  75323. firefox: "48",
  75324. safari: "10",
  75325. node: "8",
  75326. ios: "10",
  75327. samsung: "7.2",
  75328. opera: "44",
  75329. electron: "1.7"
  75330. },
  75331. "es6.string.raw": {
  75332. chrome: "41",
  75333. edge: "12",
  75334. firefox: "34",
  75335. safari: "9",
  75336. node: "4",
  75337. ios: "9",
  75338. samsung: "3.4",
  75339. opera: "28",
  75340. electron: "0.24"
  75341. },
  75342. "es6.string.repeat": {
  75343. chrome: "41",
  75344. edge: "12",
  75345. firefox: "24",
  75346. safari: "9",
  75347. node: "4",
  75348. ios: "9",
  75349. samsung: "3.4",
  75350. opera: "28",
  75351. electron: "0.24"
  75352. },
  75353. "es6.string.small": {
  75354. chrome: "5",
  75355. edge: "12",
  75356. firefox: "17",
  75357. safari: "6",
  75358. node: "0.10",
  75359. android: "4",
  75360. ios: "7",
  75361. phantom: "2",
  75362. samsung: "2.1",
  75363. electron: "1.1"
  75364. },
  75365. "es6.string.starts-with": {
  75366. chrome: "41",
  75367. edge: "12",
  75368. firefox: "29",
  75369. safari: "9",
  75370. node: "4",
  75371. ios: "9",
  75372. samsung: "3.4",
  75373. opera: "28",
  75374. electron: "0.24"
  75375. },
  75376. "es6.string.strike": {
  75377. chrome: "5",
  75378. edge: "12",
  75379. firefox: "17",
  75380. safari: "6",
  75381. node: "0.10",
  75382. android: "4",
  75383. ios: "7",
  75384. phantom: "2",
  75385. samsung: "2.1",
  75386. electron: "1.1"
  75387. },
  75388. "es6.string.sub": {
  75389. chrome: "5",
  75390. edge: "12",
  75391. firefox: "17",
  75392. safari: "6",
  75393. node: "0.10",
  75394. android: "4",
  75395. ios: "7",
  75396. phantom: "2",
  75397. samsung: "2.1",
  75398. electron: "1.1"
  75399. },
  75400. "es6.string.sup": {
  75401. chrome: "5",
  75402. edge: "12",
  75403. firefox: "17",
  75404. safari: "6",
  75405. node: "0.10",
  75406. android: "4",
  75407. ios: "7",
  75408. phantom: "2",
  75409. samsung: "2.1",
  75410. electron: "1.1"
  75411. },
  75412. "es6.string.trim": {
  75413. chrome: "5",
  75414. opera: "10.50",
  75415. edge: "12",
  75416. firefox: "3.5",
  75417. safari: "4",
  75418. node: "0.10",
  75419. ie: "9",
  75420. android: "4",
  75421. ios: "6",
  75422. phantom: "2",
  75423. samsung: "2.1",
  75424. electron: "1.1"
  75425. },
  75426. "es7.string.trim-left": {
  75427. chrome: "66",
  75428. firefox: "61",
  75429. safari: "12",
  75430. node: "10",
  75431. ios: "12",
  75432. samsung: "9.2",
  75433. opera: "53",
  75434. electron: "3.1"
  75435. },
  75436. "es7.string.trim-right": {
  75437. chrome: "66",
  75438. firefox: "61",
  75439. safari: "12",
  75440. node: "10",
  75441. ios: "12",
  75442. samsung: "9.2",
  75443. opera: "53",
  75444. electron: "3.1"
  75445. },
  75446. "es6.typed.array-buffer": {
  75447. chrome: "51",
  75448. edge: "13",
  75449. firefox: "48",
  75450. safari: "10",
  75451. node: "6.5",
  75452. ios: "10",
  75453. samsung: "5",
  75454. opera: "38",
  75455. electron: "1.2"
  75456. },
  75457. "es6.typed.data-view": {
  75458. chrome: "5",
  75459. opera: "12",
  75460. edge: "12",
  75461. firefox: "15",
  75462. safari: "5.1",
  75463. node: "0.10",
  75464. ie: "10",
  75465. android: "4",
  75466. ios: "6",
  75467. phantom: "2",
  75468. samsung: "2.1",
  75469. electron: "1.1"
  75470. },
  75471. "es6.typed.int8-array": {
  75472. chrome: "51",
  75473. edge: "13",
  75474. firefox: "48",
  75475. safari: "10",
  75476. node: "6.5",
  75477. ios: "10",
  75478. samsung: "5",
  75479. opera: "38",
  75480. electron: "1.2"
  75481. },
  75482. "es6.typed.uint8-array": {
  75483. chrome: "51",
  75484. edge: "13",
  75485. firefox: "48",
  75486. safari: "10",
  75487. node: "6.5",
  75488. ios: "10",
  75489. samsung: "5",
  75490. opera: "38",
  75491. electron: "1.2"
  75492. },
  75493. "es6.typed.uint8-clamped-array": {
  75494. chrome: "51",
  75495. edge: "13",
  75496. firefox: "48",
  75497. safari: "10",
  75498. node: "6.5",
  75499. ios: "10",
  75500. samsung: "5",
  75501. opera: "38",
  75502. electron: "1.2"
  75503. },
  75504. "es6.typed.int16-array": {
  75505. chrome: "51",
  75506. edge: "13",
  75507. firefox: "48",
  75508. safari: "10",
  75509. node: "6.5",
  75510. ios: "10",
  75511. samsung: "5",
  75512. opera: "38",
  75513. electron: "1.2"
  75514. },
  75515. "es6.typed.uint16-array": {
  75516. chrome: "51",
  75517. edge: "13",
  75518. firefox: "48",
  75519. safari: "10",
  75520. node: "6.5",
  75521. ios: "10",
  75522. samsung: "5",
  75523. opera: "38",
  75524. electron: "1.2"
  75525. },
  75526. "es6.typed.int32-array": {
  75527. chrome: "51",
  75528. edge: "13",
  75529. firefox: "48",
  75530. safari: "10",
  75531. node: "6.5",
  75532. ios: "10",
  75533. samsung: "5",
  75534. opera: "38",
  75535. electron: "1.2"
  75536. },
  75537. "es6.typed.uint32-array": {
  75538. chrome: "51",
  75539. edge: "13",
  75540. firefox: "48",
  75541. safari: "10",
  75542. node: "6.5",
  75543. ios: "10",
  75544. samsung: "5",
  75545. opera: "38",
  75546. electron: "1.2"
  75547. },
  75548. "es6.typed.float32-array": {
  75549. chrome: "51",
  75550. edge: "13",
  75551. firefox: "48",
  75552. safari: "10",
  75553. node: "6.5",
  75554. ios: "10",
  75555. samsung: "5",
  75556. opera: "38",
  75557. electron: "1.2"
  75558. },
  75559. "es6.typed.float64-array": {
  75560. chrome: "51",
  75561. edge: "13",
  75562. firefox: "48",
  75563. safari: "10",
  75564. node: "6.5",
  75565. ios: "10",
  75566. samsung: "5",
  75567. opera: "38",
  75568. electron: "1.2"
  75569. },
  75570. "es6.weak-map": {
  75571. chrome: "51",
  75572. edge: "15",
  75573. firefox: "53",
  75574. safari: "9",
  75575. node: "6.5",
  75576. ios: "9",
  75577. samsung: "5",
  75578. opera: "38",
  75579. electron: "1.2"
  75580. },
  75581. "es6.weak-set": {
  75582. chrome: "51",
  75583. edge: "15",
  75584. firefox: "53",
  75585. safari: "9",
  75586. node: "6.5",
  75587. ios: "9",
  75588. samsung: "5",
  75589. opera: "38",
  75590. electron: "1.2"
  75591. }
  75592. };
  75593. var corejs2BuiltIns$1 = /*#__PURE__*/Object.freeze({
  75594. __proto__: null,
  75595. 'default': corejs2BuiltIns
  75596. });
  75597. var require$$0$4 = getCjsExportFromNamespace(corejs2BuiltIns$1);
  75598. var corejs2BuiltIns$2 = require$$0$4;
  75599. var TopLevelOptions = {
  75600. configPath: "configPath",
  75601. corejs: "corejs",
  75602. debug: "debug",
  75603. exclude: "exclude",
  75604. forceAllTransforms: "forceAllTransforms",
  75605. ignoreBrowserslistConfig: "ignoreBrowserslistConfig",
  75606. include: "include",
  75607. loose: "loose",
  75608. modules: "modules",
  75609. shippedProposals: "shippedProposals",
  75610. spec: "spec",
  75611. targets: "targets",
  75612. useBuiltIns: "useBuiltIns"
  75613. };
  75614. var ModulesOption = {
  75615. "false": false,
  75616. auto: "auto",
  75617. amd: "amd",
  75618. commonjs: "commonjs",
  75619. cjs: "cjs",
  75620. systemjs: "systemjs",
  75621. umd: "umd"
  75622. };
  75623. var UseBuiltInsOption = {
  75624. "false": false,
  75625. entry: "entry",
  75626. usage: "usage"
  75627. };
  75628. var defaultWebIncludes = ["web.timers", "web.immediate", "web.dom.iterable"];
  75629. function getPlatformSpecificDefaultFor (targets) {
  75630. var targetNames = Object.keys(targets);
  75631. var isAnyTarget = !targetNames.length;
  75632. var isWebTarget = targetNames.some(function (name) {
  75633. return name !== "node";
  75634. });
  75635. return isAnyTarget || isWebTarget ? defaultWebIncludes : null;
  75636. }
  75637. var validateTopLevelOptions = function validateTopLevelOptions(options) {
  75638. var validOptions = Object.keys(TopLevelOptions);
  75639. for (var option in options) {
  75640. if (!TopLevelOptions[option]) {
  75641. throw new Error("Invalid Option: " + option + " is not a valid top-level option.\n Maybe you meant to use '" + levenArray$1(option, validOptions) + "'?");
  75642. }
  75643. }
  75644. };
  75645. var allPluginsList = Object.keys(plugins$2);
  75646. var modulePlugins = ["proposal-dynamic-import"].concat(Object.keys(moduleTransformations).map(function (m) {
  75647. return moduleTransformations[m];
  75648. }));
  75649. var getValidIncludesAndExcludes = function getValidIncludesAndExcludes(type, corejs) {
  75650. return new Set([].concat(allPluginsList, type === "exclude" ? modulePlugins : [], corejs ? corejs == 2 ? [].concat(Object.keys(corejs2BuiltIns$2), defaultWebIncludes) : Object.keys(corejs3Polyfills) : []));
  75651. };
  75652. var pluginToRegExp = function pluginToRegExp(plugin) {
  75653. if (plugin instanceof RegExp) return plugin;
  75654. try {
  75655. return new RegExp("^" + normalizePluginName(plugin) + "$");
  75656. } catch (e) {
  75657. return null;
  75658. }
  75659. };
  75660. var selectPlugins = function selectPlugins(regexp, type, corejs) {
  75661. return Array.from(getValidIncludesAndExcludes(type, corejs)).filter(function (item) {
  75662. return regexp instanceof RegExp && regexp.test(item);
  75663. });
  75664. };
  75665. var flatten$1 = function flatten(array) {
  75666. var _ref;
  75667. return (_ref = []).concat.apply(_ref, array);
  75668. };
  75669. var expandIncludesAndExcludes = function expandIncludesAndExcludes(plugins, type, corejs) {
  75670. if (plugins === void 0) {
  75671. plugins = [];
  75672. }
  75673. if (plugins.length === 0) return [];
  75674. var selectedPlugins = plugins.map(function (plugin) {
  75675. return selectPlugins(pluginToRegExp(plugin), type, corejs);
  75676. });
  75677. var invalidRegExpList = plugins.filter(function (p, i) {
  75678. return selectedPlugins[i].length === 0;
  75679. });
  75680. browser$8(invalidRegExpList.length === 0, "Invalid Option: 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");
  75681. return flatten$1(selectedPlugins);
  75682. };
  75683. var normalizePluginName = function normalizePluginName(plugin) {
  75684. return plugin.replace(/^(@babel\/|babel-)(plugin-)?/, "");
  75685. };
  75686. var checkDuplicateIncludeExcludes = function checkDuplicateIncludeExcludes(include, exclude) {
  75687. if (include === void 0) {
  75688. include = [];
  75689. }
  75690. if (exclude === void 0) {
  75691. exclude = [];
  75692. }
  75693. var duplicates = include.filter(function (opt) {
  75694. return exclude.indexOf(opt) >= 0;
  75695. });
  75696. browser$8(duplicates.length === 0, "Invalid Option: The plugins/built-ins '" + duplicates.join(", ") + "' were found in both the \"include\" and\n \"exclude\" options.");
  75697. };
  75698. var normalizeTargets = function normalizeTargets(targets) {
  75699. if (typeof targets === "string" || Array.isArray(targets)) {
  75700. return {
  75701. browsers: targets
  75702. };
  75703. }
  75704. return Object.assign({}, targets);
  75705. };
  75706. var validateConfigPathOption = function validateConfigPathOption(configPath) {
  75707. if (configPath === void 0) {
  75708. configPath = process.cwd();
  75709. }
  75710. browser$8(typeof configPath === "string", "Invalid Option: The configPath option '" + configPath + "' is invalid, only strings are allowed.");
  75711. return configPath;
  75712. };
  75713. var validateBoolOption = function validateBoolOption(name, value, defaultValue) {
  75714. if (typeof value === "undefined") {
  75715. value = defaultValue;
  75716. }
  75717. if (typeof value !== "boolean") {
  75718. throw new Error("Preset env: '" + name + "' option must be a boolean.");
  75719. }
  75720. return value;
  75721. };
  75722. var validateIgnoreBrowserslistConfig = function validateIgnoreBrowserslistConfig(ignoreBrowserslistConfig) {
  75723. return validateBoolOption(TopLevelOptions.ignoreBrowserslistConfig, ignoreBrowserslistConfig, false);
  75724. };
  75725. var validateModulesOption = function validateModulesOption(modulesOpt) {
  75726. if (modulesOpt === void 0) {
  75727. modulesOpt = ModulesOption.auto;
  75728. }
  75729. browser$8(ModulesOption[modulesOpt.toString()] || ModulesOption[modulesOpt.toString()] === ModulesOption["false"], "Invalid Option: 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");
  75730. return modulesOpt;
  75731. };
  75732. var validateUseBuiltInsOption = function validateUseBuiltInsOption(builtInsOpt) {
  75733. if (builtInsOpt === void 0) {
  75734. builtInsOpt = false;
  75735. }
  75736. browser$8(UseBuiltInsOption[builtInsOpt.toString()] || UseBuiltInsOption[builtInsOpt.toString()] === UseBuiltInsOption["false"], "Invalid Option: 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");
  75737. return builtInsOpt;
  75738. };
  75739. function normalizeCoreJSOption(corejs, useBuiltIns) {
  75740. var proposals = false;
  75741. var rawVersion;
  75742. if (useBuiltIns && corejs === undefined) {
  75743. rawVersion = 2;
  75744. console.warn("\nWARNING: 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");
  75745. } else if (typeof corejs === "object" && corejs !== null) {
  75746. rawVersion = corejs.version;
  75747. proposals = Boolean(corejs.proposals);
  75748. } else {
  75749. rawVersion = corejs;
  75750. }
  75751. var version = rawVersion ? semver_42(String(rawVersion)) : false;
  75752. if (!useBuiltIns && version) {
  75753. console.log("\nThe `corejs` option only has an effect when the `useBuiltIns` option is not `false`\n");
  75754. }
  75755. if (useBuiltIns && (!version || version.major < 2 || version.major > 3)) {
  75756. throw new RangeError("Invalid Option: The version passed to `corejs` is invalid. Currently, " + "only core-js@2 and core-js@3 are supported.");
  75757. }
  75758. return {
  75759. version: version,
  75760. proposals: proposals
  75761. };
  75762. }
  75763. function normalizeOptions$4(opts) {
  75764. validateTopLevelOptions(opts);
  75765. var useBuiltIns = validateUseBuiltInsOption(opts.useBuiltIns);
  75766. var corejs = normalizeCoreJSOption(opts.corejs, useBuiltIns);
  75767. var include = expandIncludesAndExcludes(opts.include, TopLevelOptions.include, !!corejs.version && corejs.version.major);
  75768. var exclude = expandIncludesAndExcludes(opts.exclude, TopLevelOptions.exclude, !!corejs.version && corejs.version.major);
  75769. checkDuplicateIncludeExcludes(include, exclude);
  75770. var shippedProposals = validateBoolOption(TopLevelOptions.shippedProposals, opts.shippedProposals, false) || corejs.proposals;
  75771. return {
  75772. configPath: validateConfigPathOption(opts.configPath),
  75773. corejs: corejs,
  75774. debug: validateBoolOption(TopLevelOptions.debug, opts.debug, false),
  75775. include: include,
  75776. exclude: exclude,
  75777. forceAllTransforms: validateBoolOption(TopLevelOptions.forceAllTransforms, opts.forceAllTransforms, false),
  75778. ignoreBrowserslistConfig: validateIgnoreBrowserslistConfig(opts.ignoreBrowserslistConfig),
  75779. loose: validateBoolOption(TopLevelOptions.loose, opts.loose, false),
  75780. modules: validateModulesOption(opts.modules),
  75781. shippedProposals: shippedProposals,
  75782. spec: validateBoolOption(TopLevelOptions.spec, opts.spec, false),
  75783. targets: normalizeTargets(opts.targets),
  75784. useBuiltIns: useBuiltIns
  75785. };
  75786. }
  75787. var proposalPlugins = {};
  75788. var pluginSyntaxObject = {
  75789. "proposal-async-generator-functions": "syntax-async-generators",
  75790. "proposal-json-strings": "syntax-json-strings",
  75791. "proposal-nullish-coalescing-operator": "syntax-nullish-coalescing-operator",
  75792. "proposal-object-rest-spread": "syntax-object-rest-spread",
  75793. "proposal-optional-catch-binding": "syntax-optional-catch-binding",
  75794. "proposal-optional-chaining": "syntax-optional-chaining",
  75795. "proposal-unicode-property-regex": null
  75796. };
  75797. var pluginSyntaxEntries = Object.keys(pluginSyntaxObject).map(function (key) {
  75798. return [key, pluginSyntaxObject[key]];
  75799. });
  75800. var pluginSyntaxMap = new Map(pluginSyntaxEntries);
  75801. var shippedProposals = {
  75802. pluginSyntaxMap: pluginSyntaxMap,
  75803. proposalPlugins: proposalPlugins
  75804. };
  75805. var shippedProposals_1 = shippedProposals.pluginSyntaxMap;
  75806. var shippedProposals_2 = shippedProposals.proposalPlugins;
  75807. var overlappingPlugins = {
  75808. "transform-regenerator": [
  75809. ]
  75810. };
  75811. var overlappingPlugins$1 = /*#__PURE__*/Object.freeze({
  75812. __proto__: null,
  75813. 'default': overlappingPlugins
  75814. });
  75815. var require$$0$5 = getCjsExportFromNamespace(overlappingPlugins$1);
  75816. var overlappingPlugins$2 = require$$0$5;
  75817. var ArrayNatureIterators = ["es6.object.to-string", "es6.array.iterator", "web.dom.iterable"];
  75818. var CommonIterators = ["es6.string.iterator"].concat(ArrayNatureIterators);
  75819. var PromiseDependencies = ["es6.object.to-string", "es6.promise"];
  75820. var BuiltIns = {
  75821. DataView: "es6.typed.data-view",
  75822. Float32Array: "es6.typed.float32-array",
  75823. Float64Array: "es6.typed.float64-array",
  75824. Int8Array: "es6.typed.int8-array",
  75825. Int16Array: "es6.typed.int16-array",
  75826. Int32Array: "es6.typed.int32-array",
  75827. Map: ["es6.map"].concat(CommonIterators),
  75828. Number: "es6.number.constructor",
  75829. Promise: PromiseDependencies,
  75830. RegExp: ["es6.regexp.constructor"],
  75831. Set: ["es6.set"].concat(CommonIterators),
  75832. Symbol: ["es6.symbol", "es7.symbol.async-iterator"],
  75833. Uint8Array: "es6.typed.uint8-array",
  75834. Uint8ClampedArray: "es6.typed.uint8-clamped-array",
  75835. Uint16Array: "es6.typed.uint16-array",
  75836. Uint32Array: "es6.typed.uint32-array",
  75837. WeakMap: ["es6.weak-map"].concat(CommonIterators),
  75838. WeakSet: ["es6.weak-set"].concat(CommonIterators)
  75839. };
  75840. var InstanceProperties = {
  75841. __defineGetter__: ["es7.object.define-getter"],
  75842. __defineSetter__: ["es7.object.define-setter"],
  75843. __lookupGetter__: ["es7.object.lookup-getter"],
  75844. __lookupSetter__: ["es7.object.lookup-setter"],
  75845. anchor: ["es6.string.anchor"],
  75846. big: ["es6.string.big"],
  75847. bind: ["es6.function.bind"],
  75848. blink: ["es6.string.blink"],
  75849. bold: ["es6.string.bold"],
  75850. codePointAt: ["es6.string.code-point-at"],
  75851. copyWithin: ["es6.array.copy-within"],
  75852. endsWith: ["es6.string.ends-with"],
  75853. entries: ArrayNatureIterators,
  75854. every: ["es6.array.is-array"],
  75855. fill: ["es6.array.fill"],
  75856. filter: ["es6.array.filter"],
  75857. "finally": ["es7.promise.finally"].concat(PromiseDependencies),
  75858. find: ["es6.array.find"],
  75859. findIndex: ["es6.array.find-index"],
  75860. fixed: ["es6.string.fixed"],
  75861. flags: ["es6.regexp.flags"],
  75862. flatMap: ["es7.array.flat-map"],
  75863. fontcolor: ["es6.string.fontcolor"],
  75864. fontsize: ["es6.string.fontsize"],
  75865. forEach: ["es6.array.for-each"],
  75866. includes: ["es6.string.includes", "es7.array.includes"],
  75867. indexOf: ["es6.array.index-of"],
  75868. italics: ["es6.string.italics"],
  75869. keys: ArrayNatureIterators,
  75870. lastIndexOf: ["es6.array.last-index-of"],
  75871. link: ["es6.string.link"],
  75872. map: ["es6.array.map"],
  75873. match: ["es6.regexp.match"],
  75874. name: ["es6.function.name"],
  75875. padStart: ["es7.string.pad-start"],
  75876. padEnd: ["es7.string.pad-end"],
  75877. reduce: ["es6.array.reduce"],
  75878. reduceRight: ["es6.array.reduce-right"],
  75879. repeat: ["es6.string.repeat"],
  75880. replace: ["es6.regexp.replace"],
  75881. search: ["es6.regexp.search"],
  75882. slice: ["es6.array.slice"],
  75883. small: ["es6.string.small"],
  75884. some: ["es6.array.some"],
  75885. sort: ["es6.array.sort"],
  75886. split: ["es6.regexp.split"],
  75887. startsWith: ["es6.string.starts-with"],
  75888. strike: ["es6.string.strike"],
  75889. sub: ["es6.string.sub"],
  75890. sup: ["es6.string.sup"],
  75891. toISOString: ["es6.date.to-iso-string"],
  75892. toJSON: ["es6.date.to-json"],
  75893. toString: ["es6.object.to-string", "es6.date.to-string", "es6.regexp.to-string"],
  75894. trim: ["es6.string.trim"],
  75895. trimEnd: ["es7.string.trim-right"],
  75896. trimLeft: ["es7.string.trim-left"],
  75897. trimRight: ["es7.string.trim-right"],
  75898. trimStart: ["es7.string.trim-left"],
  75899. values: ArrayNatureIterators
  75900. };
  75901. var StaticProperties = {
  75902. Array: {
  75903. from: ["es6.array.from", "es6.string.iterator"],
  75904. isArray: "es6.array.is-array",
  75905. of: "es6.array.of"
  75906. },
  75907. Date: {
  75908. now: "es6.date.now"
  75909. },
  75910. Object: {
  75911. assign: "es6.object.assign",
  75912. create: "es6.object.create",
  75913. defineProperty: "es6.object.define-property",
  75914. defineProperties: "es6.object.define-properties",
  75915. entries: "es7.object.entries",
  75916. freeze: "es6.object.freeze",
  75917. getOwnPropertyDescriptors: "es7.object.get-own-property-descriptors",
  75918. getOwnPropertySymbols: "es6.symbol",
  75919. is: "es6.object.is",
  75920. isExtensible: "es6.object.is-extensible",
  75921. isFrozen: "es6.object.is-frozen",
  75922. isSealed: "es6.object.is-sealed",
  75923. keys: "es6.object.keys",
  75924. preventExtensions: "es6.object.prevent-extensions",
  75925. seal: "es6.object.seal",
  75926. setPrototypeOf: "es6.object.set-prototype-of",
  75927. values: "es7.object.values"
  75928. },
  75929. Math: {
  75930. acosh: "es6.math.acosh",
  75931. asinh: "es6.math.asinh",
  75932. atanh: "es6.math.atanh",
  75933. cbrt: "es6.math.cbrt",
  75934. clz32: "es6.math.clz32",
  75935. cosh: "es6.math.cosh",
  75936. expm1: "es6.math.expm1",
  75937. fround: "es6.math.fround",
  75938. hypot: "es6.math.hypot",
  75939. imul: "es6.math.imul",
  75940. log1p: "es6.math.log1p",
  75941. log10: "es6.math.log10",
  75942. log2: "es6.math.log2",
  75943. sign: "es6.math.sign",
  75944. sinh: "es6.math.sinh",
  75945. tanh: "es6.math.tanh",
  75946. trunc: "es6.math.trunc"
  75947. },
  75948. String: {
  75949. fromCodePoint: "es6.string.from-code-point",
  75950. raw: "es6.string.raw"
  75951. },
  75952. Number: {
  75953. EPSILON: "es6.number.epsilon",
  75954. MIN_SAFE_INTEGER: "es6.number.min-safe-integer",
  75955. MAX_SAFE_INTEGER: "es6.number.max-safe-integer",
  75956. isFinite: "es6.number.is-finite",
  75957. isInteger: "es6.number.is-integer",
  75958. isSafeInteger: "es6.number.is-safe-integer",
  75959. isNaN: "es6.number.is-nan",
  75960. parseFloat: "es6.number.parse-float",
  75961. parseInt: "es6.number.parse-int"
  75962. },
  75963. Promise: {
  75964. all: CommonIterators,
  75965. race: CommonIterators
  75966. },
  75967. Reflect: {
  75968. apply: "es6.reflect.apply",
  75969. construct: "es6.reflect.construct",
  75970. defineProperty: "es6.reflect.define-property",
  75971. deleteProperty: "es6.reflect.delete-property",
  75972. get: "es6.reflect.get",
  75973. getOwnPropertyDescriptor: "es6.reflect.get-own-property-descriptor",
  75974. getPrototypeOf: "es6.reflect.get-prototype-of",
  75975. has: "es6.reflect.has",
  75976. isExtensible: "es6.reflect.is-extensible",
  75977. ownKeys: "es6.reflect.own-keys",
  75978. preventExtensions: "es6.reflect.prevent-extensions",
  75979. set: "es6.reflect.set",
  75980. setPrototypeOf: "es6.reflect.set-prototype-of"
  75981. }
  75982. };
  75983. var has$6 = Object.hasOwnProperty.call.bind(Object.hasOwnProperty);
  75984. function getType$1(target) {
  75985. return Object.prototype.toString.call(target).slice(8, -1).toLowerCase();
  75986. }
  75987. function intersection(first, second, third) {
  75988. var result = new Set();
  75989. for (var _iterator = first, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  75990. var _ref;
  75991. if (_isArray) {
  75992. if (_i >= _iterator.length) break;
  75993. _ref = _iterator[_i++];
  75994. } else {
  75995. _i = _iterator.next();
  75996. if (_i.done) break;
  75997. _ref = _i.value;
  75998. }
  75999. var el = _ref;
  76000. if (second.has(el) && third.has(el)) result.add(el);
  76001. }
  76002. return result;
  76003. }
  76004. function filterStageFromList(list, stageList) {
  76005. return Object.keys(list).reduce(function (result, item) {
  76006. if (!stageList[item]) {
  76007. result[item] = list[item];
  76008. }
  76009. return result;
  76010. }, {});
  76011. }
  76012. function getImportSource(_ref2) {
  76013. var node = _ref2.node;
  76014. if (node.specifiers.length === 0) return node.source.value;
  76015. }
  76016. function getRequireSource(_ref3) {
  76017. var node = _ref3.node;
  76018. if (!isExpressionStatement(node)) return;
  76019. var expression = node.expression;
  76020. var isRequire = isCallExpression(expression) && isIdentifier(expression.callee) && expression.callee.name === "require" && expression.arguments.length === 1 && isStringLiteral(expression.arguments[0]);
  76021. if (isRequire) return expression.arguments[0].value;
  76022. }
  76023. function isPolyfillSource(source) {
  76024. return source === "@babel/polyfill" || source === "core-js";
  76025. }
  76026. var modulePathMap = {
  76027. "regenerator-runtime": "regenerator-runtime/runtime"
  76028. };
  76029. function getModulePath(mod) {
  76030. return modulePathMap[mod] || "core-js/modules/" + mod;
  76031. }
  76032. function createImport(path, mod) {
  76033. return addSideEffect(path, getModulePath(mod));
  76034. }
  76035. function isNamespaced(path) {
  76036. if (!path.node) return false;
  76037. var binding = path.scope.getBinding(path.node.name);
  76038. if (!binding) return false;
  76039. return binding.path.isImportNamespaceSpecifier();
  76040. }
  76041. var NO_DIRECT_POLYFILL_IMPORT = "\n When setting `useBuiltIns: 'usage'`, polyfills are automatically imported when needed.\n Please remove the `import '@babel/polyfill'` call or use `useBuiltIns: 'entry'` instead.";
  76042. function addCoreJS2UsagePlugin (_ref, _ref2) {
  76043. var t = _ref.types;
  76044. var include = _ref2.include,
  76045. exclude = _ref2.exclude,
  76046. polyfillTargets = _ref2.polyfillTargets,
  76047. debug = _ref2.debug;
  76048. var polyfills = filterItems(corejs2BuiltIns$2, include, exclude, polyfillTargets, getPlatformSpecificDefaultFor(polyfillTargets));
  76049. var addAndRemovePolyfillImports = {
  76050. ImportDeclaration: function ImportDeclaration(path) {
  76051. if (isPolyfillSource(getImportSource(path))) {
  76052. console.warn(NO_DIRECT_POLYFILL_IMPORT);
  76053. path.remove();
  76054. }
  76055. },
  76056. Program: function Program(path) {
  76057. path.get("body").forEach(function (bodyPath) {
  76058. if (isPolyfillSource(getRequireSource(bodyPath))) {
  76059. console.warn(NO_DIRECT_POLYFILL_IMPORT);
  76060. bodyPath.remove();
  76061. }
  76062. });
  76063. },
  76064. ReferencedIdentifier: function ReferencedIdentifier(_ref3) {
  76065. var name = _ref3.node.name,
  76066. parent = _ref3.parent,
  76067. scope = _ref3.scope;
  76068. if (t.isMemberExpression(parent)) return;
  76069. if (!has$6(BuiltIns, name)) return;
  76070. if (scope.getBindingIdentifier(name)) return;
  76071. var BuiltInDependencies = BuiltIns[name];
  76072. this.addUnsupported(BuiltInDependencies);
  76073. },
  76074. CallExpression: function CallExpression(path) {
  76075. if (path.node.arguments.length) return;
  76076. var callee = path.node.callee;
  76077. if (!t.isMemberExpression(callee)) return;
  76078. if (!callee.computed) return;
  76079. if (!path.get("callee.property").matchesPattern("Symbol.iterator")) {
  76080. return;
  76081. }
  76082. this.addImport("web.dom.iterable");
  76083. },
  76084. BinaryExpression: function BinaryExpression(path) {
  76085. if (path.node.operator !== "in") return;
  76086. if (!path.get("left").matchesPattern("Symbol.iterator")) return;
  76087. this.addImport("web.dom.iterable");
  76088. },
  76089. YieldExpression: function YieldExpression(path) {
  76090. if (path.node.delegate) {
  76091. this.addImport("web.dom.iterable");
  76092. }
  76093. },
  76094. MemberExpression: {
  76095. enter: function enter(path) {
  76096. var node = path.node;
  76097. var object = node.object,
  76098. property = node.property;
  76099. if (isNamespaced(path.get("object"))) return;
  76100. var evaluatedPropType = object.name;
  76101. var propertyName = "";
  76102. var instanceType = "";
  76103. if (node.computed) {
  76104. if (t.isStringLiteral(property)) {
  76105. propertyName = property.value;
  76106. } else {
  76107. var result = path.get("property").evaluate();
  76108. if (result.confident && result.value) {
  76109. propertyName = result.value;
  76110. }
  76111. }
  76112. } else {
  76113. propertyName = property.name;
  76114. }
  76115. if (path.scope.getBindingIdentifier(object.name)) {
  76116. var _result = path.get("object").evaluate();
  76117. if (_result.value) {
  76118. instanceType = getType$1(_result.value);
  76119. } else if (_result.deopt && _result.deopt.isIdentifier()) {
  76120. evaluatedPropType = _result.deopt.node.name;
  76121. }
  76122. }
  76123. if (has$6(StaticProperties, evaluatedPropType)) {
  76124. var BuiltInProperties = StaticProperties[evaluatedPropType];
  76125. if (has$6(BuiltInProperties, propertyName)) {
  76126. var StaticPropertyDependencies = BuiltInProperties[propertyName];
  76127. this.addUnsupported(StaticPropertyDependencies);
  76128. }
  76129. }
  76130. if (has$6(InstanceProperties, propertyName)) {
  76131. var InstancePropertyDependencies = InstanceProperties[propertyName];
  76132. if (instanceType) {
  76133. InstancePropertyDependencies = InstancePropertyDependencies.filter(function (module) {
  76134. return module.includes(instanceType);
  76135. });
  76136. }
  76137. this.addUnsupported(InstancePropertyDependencies);
  76138. }
  76139. },
  76140. exit: function exit(path) {
  76141. var name = path.node.object.name;
  76142. if (!has$6(BuiltIns, name)) return;
  76143. if (path.scope.getBindingIdentifier(name)) return;
  76144. var BuiltInDependencies = BuiltIns[name];
  76145. this.addUnsupported(BuiltInDependencies);
  76146. }
  76147. },
  76148. VariableDeclarator: function VariableDeclarator(path) {
  76149. var node = path.node;
  76150. var id = node.id,
  76151. init = node.init;
  76152. if (!t.isObjectPattern(id)) return;
  76153. if (init && path.scope.getBindingIdentifier(init.name)) return;
  76154. for (var _iterator = id.properties, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  76155. var _ref4;
  76156. if (_isArray) {
  76157. if (_i >= _iterator.length) break;
  76158. _ref4 = _iterator[_i++];
  76159. } else {
  76160. _i = _iterator.next();
  76161. if (_i.done) break;
  76162. _ref4 = _i.value;
  76163. }
  76164. var _ref5 = _ref4,
  76165. key = _ref5.key;
  76166. if (!node.computed && t.isIdentifier(key) && has$6(InstanceProperties, key.name)) {
  76167. var InstancePropertyDependencies = InstanceProperties[key.name];
  76168. this.addUnsupported(InstancePropertyDependencies);
  76169. }
  76170. }
  76171. }
  76172. };
  76173. return {
  76174. name: "corejs2-usage",
  76175. pre: function pre(_ref6) {
  76176. var path = _ref6.path;
  76177. this.polyfillsSet = new Set();
  76178. this.addImport = function (builtIn) {
  76179. if (!this.polyfillsSet.has(builtIn)) {
  76180. this.polyfillsSet.add(builtIn);
  76181. createImport(path, builtIn);
  76182. }
  76183. };
  76184. this.addUnsupported = function (builtIn) {
  76185. var modules = Array.isArray(builtIn) ? builtIn : [builtIn];
  76186. for (var _iterator2 = modules, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  76187. var _ref7;
  76188. if (_isArray2) {
  76189. if (_i2 >= _iterator2.length) break;
  76190. _ref7 = _iterator2[_i2++];
  76191. } else {
  76192. _i2 = _iterator2.next();
  76193. if (_i2.done) break;
  76194. _ref7 = _i2.value;
  76195. }
  76196. var module = _ref7;
  76197. if (polyfills.has(module)) {
  76198. this.addImport(module);
  76199. }
  76200. }
  76201. };
  76202. },
  76203. post: function post() {
  76204. if (debug) {
  76205. logUsagePolyfills(this.polyfillsSet, this.file.opts.filename, polyfillTargets, corejs2BuiltIns$2);
  76206. }
  76207. },
  76208. visitor: addAndRemovePolyfillImports
  76209. };
  76210. }
  76211. var corejs3ShippedProposalsList = ["esnext.global-this", "esnext.string.match-all"];
  76212. var debug$2 = typeof process === 'object' && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? function () {
  76213. var _console;
  76214. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  76215. args[_key] = arguments[_key];
  76216. }
  76217. return (_console = console).error.apply(_console, ['SEMVER'].concat(args));
  76218. } : function () {};
  76219. var debug_1 = debug$2;
  76220. var SEMVER_SPEC_VERSION = '2.0.0';
  76221. var MAX_LENGTH = 256;
  76222. var MAX_SAFE_INTEGER$3 = Number.MAX_SAFE_INTEGER || 9007199254740991;
  76223. var MAX_SAFE_COMPONENT_LENGTH = 16;
  76224. var constants$1 = {
  76225. SEMVER_SPEC_VERSION: SEMVER_SPEC_VERSION,
  76226. MAX_LENGTH: MAX_LENGTH,
  76227. MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$3,
  76228. MAX_SAFE_COMPONENT_LENGTH: MAX_SAFE_COMPONENT_LENGTH
  76229. };
  76230. var re_1 = createCommonjsModule(function (module, exports) {
  76231. var MAX_SAFE_COMPONENT_LENGTH = constants$1.MAX_SAFE_COMPONENT_LENGTH;
  76232. exports = module.exports = {};
  76233. var re = exports.re = [];
  76234. var src = exports.src = [];
  76235. var t = exports.t = {};
  76236. var R = 0;
  76237. var createToken = function createToken(name, value, isGlobal) {
  76238. var index = R++;
  76239. debug_1(index, value);
  76240. t[name] = index;
  76241. src[index] = value;
  76242. re[index] = new RegExp(value, isGlobal ? 'g' : undefined);
  76243. };
  76244. createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*');
  76245. createToken('NUMERICIDENTIFIERLOOSE', '[0-9]+');
  76246. createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*');
  76247. createToken('MAINVERSION', "(" + src[t.NUMERICIDENTIFIER] + ")\\." + ("(" + src[t.NUMERICIDENTIFIER] + ")\\.") + ("(" + src[t.NUMERICIDENTIFIER] + ")"));
  76248. createToken('MAINVERSIONLOOSE', "(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\." + ("(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.") + ("(" + src[t.NUMERICIDENTIFIERLOOSE] + ")"));
  76249. createToken('PRERELEASEIDENTIFIER', "(?:" + src[t.NUMERICIDENTIFIER] + "|" + src[t.NONNUMERICIDENTIFIER] + ")");
  76250. createToken('PRERELEASEIDENTIFIERLOOSE', "(?:" + src[t.NUMERICIDENTIFIERLOOSE] + "|" + src[t.NONNUMERICIDENTIFIER] + ")");
  76251. createToken('PRERELEASE', "(?:-(" + src[t.PRERELEASEIDENTIFIER] + "(?:\\." + src[t.PRERELEASEIDENTIFIER] + ")*))");
  76252. createToken('PRERELEASELOOSE', "(?:-?(" + src[t.PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[t.PRERELEASEIDENTIFIERLOOSE] + ")*))");
  76253. createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+');
  76254. createToken('BUILD', "(?:\\+(" + src[t.BUILDIDENTIFIER] + "(?:\\." + src[t.BUILDIDENTIFIER] + ")*))");
  76255. createToken('FULLPLAIN', "v?" + src[t.MAINVERSION] + src[t.PRERELEASE] + "?" + src[t.BUILD] + "?");
  76256. createToken('FULL', "^" + src[t.FULLPLAIN] + "$");
  76257. createToken('LOOSEPLAIN', "[v=\\s]*" + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + "?" + src[t.BUILD] + "?");
  76258. createToken('LOOSE', "^" + src[t.LOOSEPLAIN] + "$");
  76259. createToken('GTLT', '((?:<|>)?=?)');
  76260. createToken('XRANGEIDENTIFIERLOOSE', src[t.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*");
  76261. createToken('XRANGEIDENTIFIER', src[t.NUMERICIDENTIFIER] + "|x|X|\\*");
  76262. createToken('XRANGEPLAIN', "[v=\\s]*(" + src[t.XRANGEIDENTIFIER] + ")" + ("(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")") + ("(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")") + ("(?:" + src[t.PRERELEASE] + ")?" + src[t.BUILD] + "?") + ")?)?");
  76263. createToken('XRANGEPLAINLOOSE', "[v=\\s]*(" + src[t.XRANGEIDENTIFIERLOOSE] + ")" + ("(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")") + ("(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")") + ("(?:" + src[t.PRERELEASELOOSE] + ")?" + src[t.BUILD] + "?") + ")?)?");
  76264. createToken('XRANGE', "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAIN] + "$");
  76265. createToken('XRANGELOOSE', "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAINLOOSE] + "$");
  76266. createToken('COERCE', "" + ('(^|[^\\d])' + '(\\d{1,') + MAX_SAFE_COMPONENT_LENGTH + "})" + ("(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?") + ("(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?") + "(?:$|[^\\d])");
  76267. createToken('COERCERTL', src[t.COERCE], true);
  76268. createToken('LONETILDE', '(?:~>?)');
  76269. createToken('TILDETRIM', "(\\s*)" + src[t.LONETILDE] + "\\s+", true);
  76270. exports.tildeTrimReplace = '$1~';
  76271. createToken('TILDE', "^" + src[t.LONETILDE] + src[t.XRANGEPLAIN] + "$");
  76272. createToken('TILDELOOSE', "^" + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + "$");
  76273. createToken('LONECARET', '(?:\\^)');
  76274. createToken('CARETTRIM', "(\\s*)" + src[t.LONECARET] + "\\s+", true);
  76275. exports.caretTrimReplace = '$1^';
  76276. createToken('CARET', "^" + src[t.LONECARET] + src[t.XRANGEPLAIN] + "$");
  76277. createToken('CARETLOOSE', "^" + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + "$");
  76278. createToken('COMPARATORLOOSE', "^" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + ")$|^$");
  76279. createToken('COMPARATOR', "^" + src[t.GTLT] + "\\s*(" + src[t.FULLPLAIN] + ")$|^$");
  76280. createToken('COMPARATORTRIM', "(\\s*)" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + "|" + src[t.XRANGEPLAIN] + ")", true);
  76281. exports.comparatorTrimReplace = '$1$2$3';
  76282. createToken('HYPHENRANGE', "^\\s*(" + src[t.XRANGEPLAIN] + ")" + "\\s+-\\s+" + ("(" + src[t.XRANGEPLAIN] + ")") + "\\s*$");
  76283. createToken('HYPHENRANGELOOSE', "^\\s*(" + src[t.XRANGEPLAINLOOSE] + ")" + "\\s+-\\s+" + ("(" + src[t.XRANGEPLAINLOOSE] + ")") + "\\s*$");
  76284. createToken('STAR', '(<|>)?=?\\s*\\*');
  76285. });
  76286. var re_2 = re_1.re;
  76287. var re_3 = re_1.src;
  76288. var re_4 = re_1.t;
  76289. var re_5 = re_1.tildeTrimReplace;
  76290. var re_6 = re_1.caretTrimReplace;
  76291. var re_7 = re_1.comparatorTrimReplace;
  76292. var numeric = /^[0-9]+$/;
  76293. var compareIdentifiers = function compareIdentifiers(a, b) {
  76294. var anum = numeric.test(a);
  76295. var bnum = numeric.test(b);
  76296. if (anum && bnum) {
  76297. a = +a;
  76298. b = +b;
  76299. }
  76300. return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
  76301. };
  76302. var rcompareIdentifiers = function rcompareIdentifiers(a, b) {
  76303. return compareIdentifiers(b, a);
  76304. };
  76305. var identifiers = {
  76306. compareIdentifiers: compareIdentifiers,
  76307. rcompareIdentifiers: rcompareIdentifiers
  76308. };
  76309. var MAX_LENGTH$1 = constants$1.MAX_LENGTH,
  76310. MAX_SAFE_INTEGER$4 = constants$1.MAX_SAFE_INTEGER;
  76311. var re = re_1.re,
  76312. t$1 = re_1.t;
  76313. var compareIdentifiers$1 = identifiers.compareIdentifiers;
  76314. var SemVer = function () {
  76315. function SemVer(version, options) {
  76316. if (!options || typeof options !== 'object') {
  76317. options = {
  76318. loose: !!options,
  76319. includePrerelease: false
  76320. };
  76321. }
  76322. if (version instanceof SemVer) {
  76323. if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
  76324. return version;
  76325. } else {
  76326. version = version.version;
  76327. }
  76328. } else if (typeof version !== 'string') {
  76329. throw new TypeError("Invalid Version: " + version);
  76330. }
  76331. if (version.length > MAX_LENGTH$1) {
  76332. throw new TypeError("version is longer than " + MAX_LENGTH$1 + " characters");
  76333. }
  76334. debug_1('SemVer', version, options);
  76335. this.options = options;
  76336. this.loose = !!options.loose;
  76337. this.includePrerelease = !!options.includePrerelease;
  76338. var m = version.trim().match(options.loose ? re[t$1.LOOSE] : re[t$1.FULL]);
  76339. if (!m) {
  76340. throw new TypeError("Invalid Version: " + version);
  76341. }
  76342. this.raw = version;
  76343. this.major = +m[1];
  76344. this.minor = +m[2];
  76345. this.patch = +m[3];
  76346. if (this.major > MAX_SAFE_INTEGER$4 || this.major < 0) {
  76347. throw new TypeError('Invalid major version');
  76348. }
  76349. if (this.minor > MAX_SAFE_INTEGER$4 || this.minor < 0) {
  76350. throw new TypeError('Invalid minor version');
  76351. }
  76352. if (this.patch > MAX_SAFE_INTEGER$4 || this.patch < 0) {
  76353. throw new TypeError('Invalid patch version');
  76354. }
  76355. if (!m[4]) {
  76356. this.prerelease = [];
  76357. } else {
  76358. this.prerelease = m[4].split('.').map(function (id) {
  76359. if (/^[0-9]+$/.test(id)) {
  76360. var num = +id;
  76361. if (num >= 0 && num < MAX_SAFE_INTEGER$4) {
  76362. return num;
  76363. }
  76364. }
  76365. return id;
  76366. });
  76367. }
  76368. this.build = m[5] ? m[5].split('.') : [];
  76369. this.format();
  76370. }
  76371. var _proto = SemVer.prototype;
  76372. _proto.format = function format() {
  76373. this.version = this.major + "." + this.minor + "." + this.patch;
  76374. if (this.prerelease.length) {
  76375. this.version += "-" + this.prerelease.join('.');
  76376. }
  76377. return this.version;
  76378. };
  76379. _proto.toString = function toString() {
  76380. return this.version;
  76381. };
  76382. _proto.compare = function compare(other) {
  76383. debug_1('SemVer.compare', this.version, this.options, other);
  76384. if (!(other instanceof SemVer)) {
  76385. if (typeof other === 'string' && other === this.version) {
  76386. return 0;
  76387. }
  76388. other = new SemVer(other, this.options);
  76389. }
  76390. if (other.version === this.version) {
  76391. return 0;
  76392. }
  76393. return this.compareMain(other) || this.comparePre(other);
  76394. };
  76395. _proto.compareMain = function compareMain(other) {
  76396. if (!(other instanceof SemVer)) {
  76397. other = new SemVer(other, this.options);
  76398. }
  76399. return compareIdentifiers$1(this.major, other.major) || compareIdentifiers$1(this.minor, other.minor) || compareIdentifiers$1(this.patch, other.patch);
  76400. };
  76401. _proto.comparePre = function comparePre(other) {
  76402. if (!(other instanceof SemVer)) {
  76403. other = new SemVer(other, this.options);
  76404. }
  76405. if (this.prerelease.length && !other.prerelease.length) {
  76406. return -1;
  76407. } else if (!this.prerelease.length && other.prerelease.length) {
  76408. return 1;
  76409. } else if (!this.prerelease.length && !other.prerelease.length) {
  76410. return 0;
  76411. }
  76412. var i = 0;
  76413. do {
  76414. var a = this.prerelease[i];
  76415. var b = other.prerelease[i];
  76416. debug_1('prerelease compare', i, a, b);
  76417. if (a === undefined && b === undefined) {
  76418. return 0;
  76419. } else if (b === undefined) {
  76420. return 1;
  76421. } else if (a === undefined) {
  76422. return -1;
  76423. } else if (a === b) {
  76424. continue;
  76425. } else {
  76426. return compareIdentifiers$1(a, b);
  76427. }
  76428. } while (++i);
  76429. };
  76430. _proto.compareBuild = function compareBuild(other) {
  76431. if (!(other instanceof SemVer)) {
  76432. other = new SemVer(other, this.options);
  76433. }
  76434. var i = 0;
  76435. do {
  76436. var a = this.build[i];
  76437. var b = other.build[i];
  76438. debug_1('prerelease compare', i, a, b);
  76439. if (a === undefined && b === undefined) {
  76440. return 0;
  76441. } else if (b === undefined) {
  76442. return 1;
  76443. } else if (a === undefined) {
  76444. return -1;
  76445. } else if (a === b) {
  76446. continue;
  76447. } else {
  76448. return compareIdentifiers$1(a, b);
  76449. }
  76450. } while (++i);
  76451. };
  76452. _proto.inc = function inc(release, identifier) {
  76453. switch (release) {
  76454. case 'premajor':
  76455. this.prerelease.length = 0;
  76456. this.patch = 0;
  76457. this.minor = 0;
  76458. this.major++;
  76459. this.inc('pre', identifier);
  76460. break;
  76461. case 'preminor':
  76462. this.prerelease.length = 0;
  76463. this.patch = 0;
  76464. this.minor++;
  76465. this.inc('pre', identifier);
  76466. break;
  76467. case 'prepatch':
  76468. this.prerelease.length = 0;
  76469. this.inc('patch', identifier);
  76470. this.inc('pre', identifier);
  76471. break;
  76472. case 'prerelease':
  76473. if (this.prerelease.length === 0) {
  76474. this.inc('patch', identifier);
  76475. }
  76476. this.inc('pre', identifier);
  76477. break;
  76478. case 'major':
  76479. if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
  76480. this.major++;
  76481. }
  76482. this.minor = 0;
  76483. this.patch = 0;
  76484. this.prerelease = [];
  76485. break;
  76486. case 'minor':
  76487. if (this.patch !== 0 || this.prerelease.length === 0) {
  76488. this.minor++;
  76489. }
  76490. this.patch = 0;
  76491. this.prerelease = [];
  76492. break;
  76493. case 'patch':
  76494. if (this.prerelease.length === 0) {
  76495. this.patch++;
  76496. }
  76497. this.prerelease = [];
  76498. break;
  76499. case 'pre':
  76500. if (this.prerelease.length === 0) {
  76501. this.prerelease = [0];
  76502. } else {
  76503. var i = this.prerelease.length;
  76504. while (--i >= 0) {
  76505. if (typeof this.prerelease[i] === 'number') {
  76506. this.prerelease[i]++;
  76507. i = -2;
  76508. }
  76509. }
  76510. if (i === -1) {
  76511. this.prerelease.push(0);
  76512. }
  76513. }
  76514. if (identifier) {
  76515. if (this.prerelease[0] === identifier) {
  76516. if (isNaN(this.prerelease[1])) {
  76517. this.prerelease = [identifier, 0];
  76518. }
  76519. } else {
  76520. this.prerelease = [identifier, 0];
  76521. }
  76522. }
  76523. break;
  76524. default:
  76525. throw new Error("invalid increment argument: " + release);
  76526. }
  76527. this.format();
  76528. this.raw = this.version;
  76529. return this;
  76530. };
  76531. return SemVer;
  76532. }();
  76533. var semver$1 = SemVer;
  76534. var compare$2 = function compare(a, b, loose) {
  76535. return new semver$1(a, loose).compare(new semver$1(b, loose));
  76536. };
  76537. var compare_1 = compare$2;
  76538. var eq$1 = function eq(a, b, loose) {
  76539. return compare_1(a, b, loose) === 0;
  76540. };
  76541. var eq_1$1 = eq$1;
  76542. var neq = function neq(a, b, loose) {
  76543. return compare_1(a, b, loose) !== 0;
  76544. };
  76545. var neq_1 = neq;
  76546. var gt = function gt(a, b, loose) {
  76547. return compare_1(a, b, loose) > 0;
  76548. };
  76549. var gt_1 = gt;
  76550. var gte = function gte(a, b, loose) {
  76551. return compare_1(a, b, loose) >= 0;
  76552. };
  76553. var gte_1 = gte;
  76554. var lt = function lt(a, b, loose) {
  76555. return compare_1(a, b, loose) < 0;
  76556. };
  76557. var lt_1 = lt;
  76558. var lte = function lte(a, b, loose) {
  76559. return compare_1(a, b, loose) <= 0;
  76560. };
  76561. var lte_1 = lte;
  76562. var cmp = function cmp(a, op, b, loose) {
  76563. switch (op) {
  76564. case '===':
  76565. if (typeof a === 'object') a = a.version;
  76566. if (typeof b === 'object') b = b.version;
  76567. return a === b;
  76568. case '!==':
  76569. if (typeof a === 'object') a = a.version;
  76570. if (typeof b === 'object') b = b.version;
  76571. return a !== b;
  76572. case '':
  76573. case '=':
  76574. case '==':
  76575. return eq_1$1(a, b, loose);
  76576. case '!=':
  76577. return neq_1(a, b, loose);
  76578. case '>':
  76579. return gt_1(a, b, loose);
  76580. case '>=':
  76581. return gte_1(a, b, loose);
  76582. case '<':
  76583. return lt_1(a, b, loose);
  76584. case '<=':
  76585. return lte_1(a, b, loose);
  76586. default:
  76587. throw new TypeError("Invalid operator: " + op);
  76588. }
  76589. };
  76590. var cmp_1 = cmp;
  76591. var MAX_LENGTH$2 = constants$1.MAX_LENGTH;
  76592. var re$1 = re_1.re,
  76593. t$2 = re_1.t;
  76594. var parse$7 = function parse(version, options) {
  76595. if (!options || typeof options !== 'object') {
  76596. options = {
  76597. loose: !!options,
  76598. includePrerelease: false
  76599. };
  76600. }
  76601. if (version instanceof semver$1) {
  76602. return version;
  76603. }
  76604. if (typeof version !== 'string') {
  76605. return null;
  76606. }
  76607. if (version.length > MAX_LENGTH$2) {
  76608. return null;
  76609. }
  76610. var r = options.loose ? re$1[t$2.LOOSE] : re$1[t$2.FULL];
  76611. if (!r.test(version)) {
  76612. return null;
  76613. }
  76614. try {
  76615. return new semver$1(version, options);
  76616. } catch (er) {
  76617. return null;
  76618. }
  76619. };
  76620. var parse_1 = parse$7;
  76621. var re$2 = re_1.re,
  76622. t$3 = re_1.t;
  76623. var coerce = function coerce(version, options) {
  76624. if (version instanceof semver$1) {
  76625. return version;
  76626. }
  76627. if (typeof version === 'number') {
  76628. version = String(version);
  76629. }
  76630. if (typeof version !== 'string') {
  76631. return null;
  76632. }
  76633. options = options || {};
  76634. var match = null;
  76635. if (!options.rtl) {
  76636. match = version.match(re$2[t$3.COERCE]);
  76637. } else {
  76638. var next;
  76639. while ((next = re$2[t$3.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) {
  76640. if (!match || next.index + next[0].length !== match.index + match[0].length) {
  76641. match = next;
  76642. }
  76643. re$2[t$3.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
  76644. }
  76645. re$2[t$3.COERCERTL].lastIndex = -1;
  76646. }
  76647. if (match === null) return null;
  76648. return parse_1(match[2] + "." + (match[3] || '0') + "." + (match[4] || '0'), options);
  76649. };
  76650. var coerce_1 = coerce;
  76651. var has$7 = Function.call.bind({}.hasOwnProperty);
  76652. function compare$3(a, operator, b) {
  76653. return cmp_1(coerce_1(a), operator, coerce_1(b));
  76654. }
  76655. function intersection$1(list, order) {
  76656. var set = list instanceof Set ? list : new Set(list);
  76657. return order.filter(function (name) {
  76658. return set.has(name);
  76659. });
  76660. }
  76661. function sortObjectByKey(object, fn) {
  76662. return Object.keys(object).sort(fn).reduce(function (memo, key) {
  76663. memo[key] = object[key];
  76664. return memo;
  76665. }, {});
  76666. }
  76667. var helpers$1 = {
  76668. compare: compare$3,
  76669. has: has$7,
  76670. intersection: intersection$1,
  76671. semver: coerce_1,
  76672. sortObjectByKey: sortObjectByKey
  76673. };
  76674. var modulesByVersions = {
  76675. "3.0": [
  76676. "es.symbol",
  76677. "es.symbol.description",
  76678. "es.symbol.async-iterator",
  76679. "es.symbol.has-instance",
  76680. "es.symbol.is-concat-spreadable",
  76681. "es.symbol.iterator",
  76682. "es.symbol.match",
  76683. "es.symbol.replace",
  76684. "es.symbol.search",
  76685. "es.symbol.species",
  76686. "es.symbol.split",
  76687. "es.symbol.to-primitive",
  76688. "es.symbol.to-string-tag",
  76689. "es.symbol.unscopables",
  76690. "es.array.concat",
  76691. "es.array.copy-within",
  76692. "es.array.every",
  76693. "es.array.fill",
  76694. "es.array.filter",
  76695. "es.array.find",
  76696. "es.array.find-index",
  76697. "es.array.flat",
  76698. "es.array.flat-map",
  76699. "es.array.for-each",
  76700. "es.array.from",
  76701. "es.array.includes",
  76702. "es.array.index-of",
  76703. "es.array.is-array",
  76704. "es.array.iterator",
  76705. "es.array.join",
  76706. "es.array.last-index-of",
  76707. "es.array.map",
  76708. "es.array.of",
  76709. "es.array.reduce",
  76710. "es.array.reduce-right",
  76711. "es.array.reverse",
  76712. "es.array.slice",
  76713. "es.array.some",
  76714. "es.array.sort",
  76715. "es.array.species",
  76716. "es.array.splice",
  76717. "es.array.unscopables.flat",
  76718. "es.array.unscopables.flat-map",
  76719. "es.array-buffer.constructor",
  76720. "es.array-buffer.is-view",
  76721. "es.array-buffer.slice",
  76722. "es.data-view",
  76723. "es.date.now",
  76724. "es.date.to-iso-string",
  76725. "es.date.to-json",
  76726. "es.date.to-primitive",
  76727. "es.date.to-string",
  76728. "es.function.bind",
  76729. "es.function.has-instance",
  76730. "es.function.name",
  76731. "es.json.to-string-tag",
  76732. "es.map",
  76733. "es.math.acosh",
  76734. "es.math.asinh",
  76735. "es.math.atanh",
  76736. "es.math.cbrt",
  76737. "es.math.clz32",
  76738. "es.math.cosh",
  76739. "es.math.expm1",
  76740. "es.math.fround",
  76741. "es.math.hypot",
  76742. "es.math.imul",
  76743. "es.math.log10",
  76744. "es.math.log1p",
  76745. "es.math.log2",
  76746. "es.math.sign",
  76747. "es.math.sinh",
  76748. "es.math.tanh",
  76749. "es.math.to-string-tag",
  76750. "es.math.trunc",
  76751. "es.number.constructor",
  76752. "es.number.epsilon",
  76753. "es.number.is-finite",
  76754. "es.number.is-integer",
  76755. "es.number.is-nan",
  76756. "es.number.is-safe-integer",
  76757. "es.number.max-safe-integer",
  76758. "es.number.min-safe-integer",
  76759. "es.number.parse-float",
  76760. "es.number.parse-int",
  76761. "es.number.to-fixed",
  76762. "es.number.to-precision",
  76763. "es.object.assign",
  76764. "es.object.create",
  76765. "es.object.define-getter",
  76766. "es.object.define-properties",
  76767. "es.object.define-property",
  76768. "es.object.define-setter",
  76769. "es.object.entries",
  76770. "es.object.freeze",
  76771. "es.object.from-entries",
  76772. "es.object.get-own-property-descriptor",
  76773. "es.object.get-own-property-descriptors",
  76774. "es.object.get-own-property-names",
  76775. "es.object.get-prototype-of",
  76776. "es.object.is",
  76777. "es.object.is-extensible",
  76778. "es.object.is-frozen",
  76779. "es.object.is-sealed",
  76780. "es.object.keys",
  76781. "es.object.lookup-getter",
  76782. "es.object.lookup-setter",
  76783. "es.object.prevent-extensions",
  76784. "es.object.seal",
  76785. "es.object.set-prototype-of",
  76786. "es.object.to-string",
  76787. "es.object.values",
  76788. "es.parse-float",
  76789. "es.parse-int",
  76790. "es.promise",
  76791. "es.promise.finally",
  76792. "es.reflect.apply",
  76793. "es.reflect.construct",
  76794. "es.reflect.define-property",
  76795. "es.reflect.delete-property",
  76796. "es.reflect.get",
  76797. "es.reflect.get-own-property-descriptor",
  76798. "es.reflect.get-prototype-of",
  76799. "es.reflect.has",
  76800. "es.reflect.is-extensible",
  76801. "es.reflect.own-keys",
  76802. "es.reflect.prevent-extensions",
  76803. "es.reflect.set",
  76804. "es.reflect.set-prototype-of",
  76805. "es.regexp.constructor",
  76806. "es.regexp.exec",
  76807. "es.regexp.flags",
  76808. "es.regexp.to-string",
  76809. "es.set",
  76810. "es.string.code-point-at",
  76811. "es.string.ends-with",
  76812. "es.string.from-code-point",
  76813. "es.string.includes",
  76814. "es.string.iterator",
  76815. "es.string.match",
  76816. "es.string.pad-end",
  76817. "es.string.pad-start",
  76818. "es.string.raw",
  76819. "es.string.repeat",
  76820. "es.string.replace",
  76821. "es.string.search",
  76822. "es.string.split",
  76823. "es.string.starts-with",
  76824. "es.string.trim",
  76825. "es.string.trim-end",
  76826. "es.string.trim-start",
  76827. "es.string.anchor",
  76828. "es.string.big",
  76829. "es.string.blink",
  76830. "es.string.bold",
  76831. "es.string.fixed",
  76832. "es.string.fontcolor",
  76833. "es.string.fontsize",
  76834. "es.string.italics",
  76835. "es.string.link",
  76836. "es.string.small",
  76837. "es.string.strike",
  76838. "es.string.sub",
  76839. "es.string.sup",
  76840. "es.typed-array.float32-array",
  76841. "es.typed-array.float64-array",
  76842. "es.typed-array.int8-array",
  76843. "es.typed-array.int16-array",
  76844. "es.typed-array.int32-array",
  76845. "es.typed-array.uint8-array",
  76846. "es.typed-array.uint8-clamped-array",
  76847. "es.typed-array.uint16-array",
  76848. "es.typed-array.uint32-array",
  76849. "es.typed-array.copy-within",
  76850. "es.typed-array.every",
  76851. "es.typed-array.fill",
  76852. "es.typed-array.filter",
  76853. "es.typed-array.find",
  76854. "es.typed-array.find-index",
  76855. "es.typed-array.for-each",
  76856. "es.typed-array.from",
  76857. "es.typed-array.includes",
  76858. "es.typed-array.index-of",
  76859. "es.typed-array.iterator",
  76860. "es.typed-array.join",
  76861. "es.typed-array.last-index-of",
  76862. "es.typed-array.map",
  76863. "es.typed-array.of",
  76864. "es.typed-array.reduce",
  76865. "es.typed-array.reduce-right",
  76866. "es.typed-array.reverse",
  76867. "es.typed-array.set",
  76868. "es.typed-array.slice",
  76869. "es.typed-array.some",
  76870. "es.typed-array.sort",
  76871. "es.typed-array.subarray",
  76872. "es.typed-array.to-locale-string",
  76873. "es.typed-array.to-string",
  76874. "es.weak-map",
  76875. "es.weak-set",
  76876. "esnext.aggregate-error",
  76877. "esnext.array.last-index",
  76878. "esnext.array.last-item",
  76879. "esnext.composite-key",
  76880. "esnext.composite-symbol",
  76881. "esnext.global-this",
  76882. "esnext.map.delete-all",
  76883. "esnext.map.every",
  76884. "esnext.map.filter",
  76885. "esnext.map.find",
  76886. "esnext.map.find-key",
  76887. "esnext.map.from",
  76888. "esnext.map.group-by",
  76889. "esnext.map.includes",
  76890. "esnext.map.key-by",
  76891. "esnext.map.key-of",
  76892. "esnext.map.map-keys",
  76893. "esnext.map.map-values",
  76894. "esnext.map.merge",
  76895. "esnext.map.of",
  76896. "esnext.map.reduce",
  76897. "esnext.map.some",
  76898. "esnext.map.update",
  76899. "esnext.math.clamp",
  76900. "esnext.math.deg-per-rad",
  76901. "esnext.math.degrees",
  76902. "esnext.math.fscale",
  76903. "esnext.math.iaddh",
  76904. "esnext.math.imulh",
  76905. "esnext.math.isubh",
  76906. "esnext.math.rad-per-deg",
  76907. "esnext.math.radians",
  76908. "esnext.math.scale",
  76909. "esnext.math.seeded-prng",
  76910. "esnext.math.signbit",
  76911. "esnext.math.umulh",
  76912. "esnext.number.from-string",
  76913. "esnext.observable",
  76914. "esnext.promise.all-settled",
  76915. "esnext.promise.any",
  76916. "esnext.promise.try",
  76917. "esnext.reflect.define-metadata",
  76918. "esnext.reflect.delete-metadata",
  76919. "esnext.reflect.get-metadata",
  76920. "esnext.reflect.get-metadata-keys",
  76921. "esnext.reflect.get-own-metadata",
  76922. "esnext.reflect.get-own-metadata-keys",
  76923. "esnext.reflect.has-metadata",
  76924. "esnext.reflect.has-own-metadata",
  76925. "esnext.reflect.metadata",
  76926. "esnext.set.add-all",
  76927. "esnext.set.delete-all",
  76928. "esnext.set.difference",
  76929. "esnext.set.every",
  76930. "esnext.set.filter",
  76931. "esnext.set.find",
  76932. "esnext.set.from",
  76933. "esnext.set.intersection",
  76934. "esnext.set.is-disjoint-from",
  76935. "esnext.set.is-subset-of",
  76936. "esnext.set.is-superset-of",
  76937. "esnext.set.join",
  76938. "esnext.set.map",
  76939. "esnext.set.of",
  76940. "esnext.set.reduce",
  76941. "esnext.set.some",
  76942. "esnext.set.symmetric-difference",
  76943. "esnext.set.union",
  76944. "esnext.string.at",
  76945. "esnext.string.code-points",
  76946. "esnext.string.match-all",
  76947. "esnext.string.replace-all",
  76948. "esnext.symbol.dispose",
  76949. "esnext.symbol.observable",
  76950. "esnext.symbol.pattern-match",
  76951. "esnext.weak-map.delete-all",
  76952. "esnext.weak-map.from",
  76953. "esnext.weak-map.of",
  76954. "esnext.weak-set.add-all",
  76955. "esnext.weak-set.delete-all",
  76956. "esnext.weak-set.from",
  76957. "esnext.weak-set.of",
  76958. "web.dom-collections.for-each",
  76959. "web.dom-collections.iterator",
  76960. "web.immediate",
  76961. "web.queue-microtask",
  76962. "web.timers",
  76963. "web.url",
  76964. "web.url.to-json",
  76965. "web.url-search-params"
  76966. ],
  76967. "3.1": [
  76968. "es.string.match-all",
  76969. "es.symbol.match-all",
  76970. "esnext.symbol.replace-all"
  76971. ],
  76972. "3.2": [
  76973. "es.promise.all-settled",
  76974. "esnext.array.is-template-object",
  76975. "esnext.map.update-or-insert",
  76976. "esnext.symbol.async-dispose"
  76977. ],
  76978. "3.3": [
  76979. "es.global-this",
  76980. "esnext.async-iterator.constructor",
  76981. "esnext.async-iterator.as-indexed-pairs",
  76982. "esnext.async-iterator.drop",
  76983. "esnext.async-iterator.every",
  76984. "esnext.async-iterator.filter",
  76985. "esnext.async-iterator.find",
  76986. "esnext.async-iterator.flat-map",
  76987. "esnext.async-iterator.for-each",
  76988. "esnext.async-iterator.from",
  76989. "esnext.async-iterator.map",
  76990. "esnext.async-iterator.reduce",
  76991. "esnext.async-iterator.some",
  76992. "esnext.async-iterator.take",
  76993. "esnext.async-iterator.to-array",
  76994. "esnext.iterator.constructor",
  76995. "esnext.iterator.as-indexed-pairs",
  76996. "esnext.iterator.drop",
  76997. "esnext.iterator.every",
  76998. "esnext.iterator.filter",
  76999. "esnext.iterator.find",
  77000. "esnext.iterator.flat-map",
  77001. "esnext.iterator.for-each",
  77002. "esnext.iterator.from",
  77003. "esnext.iterator.map",
  77004. "esnext.iterator.reduce",
  77005. "esnext.iterator.some",
  77006. "esnext.iterator.take",
  77007. "esnext.iterator.to-array",
  77008. "esnext.map.upsert",
  77009. "esnext.weak-map.upsert"
  77010. ],
  77011. "3.4": [
  77012. "es.json.stringify"
  77013. ],
  77014. "3.5": [
  77015. "esnext.object.iterate-entries",
  77016. "esnext.object.iterate-keys",
  77017. "esnext.object.iterate-values"
  77018. ],
  77019. "3.6": [
  77020. "es.regexp.sticky",
  77021. "es.regexp.test"
  77022. ]
  77023. };
  77024. var modulesByVersions$1 = /*#__PURE__*/Object.freeze({
  77025. __proto__: null,
  77026. 'default': modulesByVersions
  77027. });
  77028. var modules = [
  77029. "es.symbol",
  77030. "es.symbol.description",
  77031. "es.symbol.async-iterator",
  77032. "es.symbol.has-instance",
  77033. "es.symbol.is-concat-spreadable",
  77034. "es.symbol.iterator",
  77035. "es.symbol.match",
  77036. "es.symbol.match-all",
  77037. "es.symbol.replace",
  77038. "es.symbol.search",
  77039. "es.symbol.species",
  77040. "es.symbol.split",
  77041. "es.symbol.to-primitive",
  77042. "es.symbol.to-string-tag",
  77043. "es.symbol.unscopables",
  77044. "es.array.concat",
  77045. "es.array.copy-within",
  77046. "es.array.every",
  77047. "es.array.fill",
  77048. "es.array.filter",
  77049. "es.array.find",
  77050. "es.array.find-index",
  77051. "es.array.flat",
  77052. "es.array.flat-map",
  77053. "es.array.for-each",
  77054. "es.array.from",
  77055. "es.array.includes",
  77056. "es.array.index-of",
  77057. "es.array.is-array",
  77058. "es.array.iterator",
  77059. "es.array.join",
  77060. "es.array.last-index-of",
  77061. "es.array.map",
  77062. "es.array.of",
  77063. "es.array.reduce",
  77064. "es.array.reduce-right",
  77065. "es.array.reverse",
  77066. "es.array.slice",
  77067. "es.array.some",
  77068. "es.array.sort",
  77069. "es.array.species",
  77070. "es.array.splice",
  77071. "es.array.unscopables.flat",
  77072. "es.array.unscopables.flat-map",
  77073. "es.array-buffer.constructor",
  77074. "es.array-buffer.is-view",
  77075. "es.array-buffer.slice",
  77076. "es.data-view",
  77077. "es.date.now",
  77078. "es.date.to-iso-string",
  77079. "es.date.to-json",
  77080. "es.date.to-primitive",
  77081. "es.date.to-string",
  77082. "es.function.bind",
  77083. "es.function.has-instance",
  77084. "es.function.name",
  77085. "es.global-this",
  77086. "es.json.stringify",
  77087. "es.json.to-string-tag",
  77088. "es.map",
  77089. "es.math.acosh",
  77090. "es.math.asinh",
  77091. "es.math.atanh",
  77092. "es.math.cbrt",
  77093. "es.math.clz32",
  77094. "es.math.cosh",
  77095. "es.math.expm1",
  77096. "es.math.fround",
  77097. "es.math.hypot",
  77098. "es.math.imul",
  77099. "es.math.log10",
  77100. "es.math.log1p",
  77101. "es.math.log2",
  77102. "es.math.sign",
  77103. "es.math.sinh",
  77104. "es.math.tanh",
  77105. "es.math.to-string-tag",
  77106. "es.math.trunc",
  77107. "es.number.constructor",
  77108. "es.number.epsilon",
  77109. "es.number.is-finite",
  77110. "es.number.is-integer",
  77111. "es.number.is-nan",
  77112. "es.number.is-safe-integer",
  77113. "es.number.max-safe-integer",
  77114. "es.number.min-safe-integer",
  77115. "es.number.parse-float",
  77116. "es.number.parse-int",
  77117. "es.number.to-fixed",
  77118. "es.number.to-precision",
  77119. "es.object.assign",
  77120. "es.object.create",
  77121. "es.object.define-getter",
  77122. "es.object.define-properties",
  77123. "es.object.define-property",
  77124. "es.object.define-setter",
  77125. "es.object.entries",
  77126. "es.object.freeze",
  77127. "es.object.from-entries",
  77128. "es.object.get-own-property-descriptor",
  77129. "es.object.get-own-property-descriptors",
  77130. "es.object.get-own-property-names",
  77131. "es.object.get-prototype-of",
  77132. "es.object.is",
  77133. "es.object.is-extensible",
  77134. "es.object.is-frozen",
  77135. "es.object.is-sealed",
  77136. "es.object.keys",
  77137. "es.object.lookup-getter",
  77138. "es.object.lookup-setter",
  77139. "es.object.prevent-extensions",
  77140. "es.object.seal",
  77141. "es.object.set-prototype-of",
  77142. "es.object.to-string",
  77143. "es.object.values",
  77144. "es.parse-float",
  77145. "es.parse-int",
  77146. "es.promise",
  77147. "es.promise.all-settled",
  77148. "es.promise.finally",
  77149. "es.reflect.apply",
  77150. "es.reflect.construct",
  77151. "es.reflect.define-property",
  77152. "es.reflect.delete-property",
  77153. "es.reflect.get",
  77154. "es.reflect.get-own-property-descriptor",
  77155. "es.reflect.get-prototype-of",
  77156. "es.reflect.has",
  77157. "es.reflect.is-extensible",
  77158. "es.reflect.own-keys",
  77159. "es.reflect.prevent-extensions",
  77160. "es.reflect.set",
  77161. "es.reflect.set-prototype-of",
  77162. "es.regexp.constructor",
  77163. "es.regexp.exec",
  77164. "es.regexp.flags",
  77165. "es.regexp.sticky",
  77166. "es.regexp.test",
  77167. "es.regexp.to-string",
  77168. "es.set",
  77169. "es.string.code-point-at",
  77170. "es.string.ends-with",
  77171. "es.string.from-code-point",
  77172. "es.string.includes",
  77173. "es.string.iterator",
  77174. "es.string.match",
  77175. "es.string.match-all",
  77176. "es.string.pad-end",
  77177. "es.string.pad-start",
  77178. "es.string.raw",
  77179. "es.string.repeat",
  77180. "es.string.replace",
  77181. "es.string.search",
  77182. "es.string.split",
  77183. "es.string.starts-with",
  77184. "es.string.trim",
  77185. "es.string.trim-end",
  77186. "es.string.trim-start",
  77187. "es.string.anchor",
  77188. "es.string.big",
  77189. "es.string.blink",
  77190. "es.string.bold",
  77191. "es.string.fixed",
  77192. "es.string.fontcolor",
  77193. "es.string.fontsize",
  77194. "es.string.italics",
  77195. "es.string.link",
  77196. "es.string.small",
  77197. "es.string.strike",
  77198. "es.string.sub",
  77199. "es.string.sup",
  77200. "es.typed-array.float32-array",
  77201. "es.typed-array.float64-array",
  77202. "es.typed-array.int8-array",
  77203. "es.typed-array.int16-array",
  77204. "es.typed-array.int32-array",
  77205. "es.typed-array.uint8-array",
  77206. "es.typed-array.uint8-clamped-array",
  77207. "es.typed-array.uint16-array",
  77208. "es.typed-array.uint32-array",
  77209. "es.typed-array.copy-within",
  77210. "es.typed-array.every",
  77211. "es.typed-array.fill",
  77212. "es.typed-array.filter",
  77213. "es.typed-array.find",
  77214. "es.typed-array.find-index",
  77215. "es.typed-array.for-each",
  77216. "es.typed-array.from",
  77217. "es.typed-array.includes",
  77218. "es.typed-array.index-of",
  77219. "es.typed-array.iterator",
  77220. "es.typed-array.join",
  77221. "es.typed-array.last-index-of",
  77222. "es.typed-array.map",
  77223. "es.typed-array.of",
  77224. "es.typed-array.reduce",
  77225. "es.typed-array.reduce-right",
  77226. "es.typed-array.reverse",
  77227. "es.typed-array.set",
  77228. "es.typed-array.slice",
  77229. "es.typed-array.some",
  77230. "es.typed-array.sort",
  77231. "es.typed-array.subarray",
  77232. "es.typed-array.to-locale-string",
  77233. "es.typed-array.to-string",
  77234. "es.weak-map",
  77235. "es.weak-set",
  77236. "esnext.aggregate-error",
  77237. "esnext.array.is-template-object",
  77238. "esnext.array.last-index",
  77239. "esnext.array.last-item",
  77240. "esnext.async-iterator.constructor",
  77241. "esnext.async-iterator.as-indexed-pairs",
  77242. "esnext.async-iterator.drop",
  77243. "esnext.async-iterator.every",
  77244. "esnext.async-iterator.filter",
  77245. "esnext.async-iterator.find",
  77246. "esnext.async-iterator.flat-map",
  77247. "esnext.async-iterator.for-each",
  77248. "esnext.async-iterator.from",
  77249. "esnext.async-iterator.map",
  77250. "esnext.async-iterator.reduce",
  77251. "esnext.async-iterator.some",
  77252. "esnext.async-iterator.take",
  77253. "esnext.async-iterator.to-array",
  77254. "esnext.composite-key",
  77255. "esnext.composite-symbol",
  77256. "esnext.global-this",
  77257. "esnext.iterator.constructor",
  77258. "esnext.iterator.as-indexed-pairs",
  77259. "esnext.iterator.drop",
  77260. "esnext.iterator.every",
  77261. "esnext.iterator.filter",
  77262. "esnext.iterator.find",
  77263. "esnext.iterator.flat-map",
  77264. "esnext.iterator.for-each",
  77265. "esnext.iterator.from",
  77266. "esnext.iterator.map",
  77267. "esnext.iterator.reduce",
  77268. "esnext.iterator.some",
  77269. "esnext.iterator.take",
  77270. "esnext.iterator.to-array",
  77271. "esnext.map.delete-all",
  77272. "esnext.map.every",
  77273. "esnext.map.filter",
  77274. "esnext.map.find",
  77275. "esnext.map.find-key",
  77276. "esnext.map.from",
  77277. "esnext.map.group-by",
  77278. "esnext.map.includes",
  77279. "esnext.map.key-by",
  77280. "esnext.map.key-of",
  77281. "esnext.map.map-keys",
  77282. "esnext.map.map-values",
  77283. "esnext.map.merge",
  77284. "esnext.map.of",
  77285. "esnext.map.reduce",
  77286. "esnext.map.some",
  77287. "esnext.map.update",
  77288. "esnext.map.update-or-insert",
  77289. "esnext.map.upsert",
  77290. "esnext.math.clamp",
  77291. "esnext.math.deg-per-rad",
  77292. "esnext.math.degrees",
  77293. "esnext.math.fscale",
  77294. "esnext.math.iaddh",
  77295. "esnext.math.imulh",
  77296. "esnext.math.isubh",
  77297. "esnext.math.rad-per-deg",
  77298. "esnext.math.radians",
  77299. "esnext.math.scale",
  77300. "esnext.math.seeded-prng",
  77301. "esnext.math.signbit",
  77302. "esnext.math.umulh",
  77303. "esnext.number.from-string",
  77304. "esnext.object.iterate-entries",
  77305. "esnext.object.iterate-keys",
  77306. "esnext.object.iterate-values",
  77307. "esnext.observable",
  77308. "esnext.promise.all-settled",
  77309. "esnext.promise.any",
  77310. "esnext.promise.try",
  77311. "esnext.reflect.define-metadata",
  77312. "esnext.reflect.delete-metadata",
  77313. "esnext.reflect.get-metadata",
  77314. "esnext.reflect.get-metadata-keys",
  77315. "esnext.reflect.get-own-metadata",
  77316. "esnext.reflect.get-own-metadata-keys",
  77317. "esnext.reflect.has-metadata",
  77318. "esnext.reflect.has-own-metadata",
  77319. "esnext.reflect.metadata",
  77320. "esnext.set.add-all",
  77321. "esnext.set.delete-all",
  77322. "esnext.set.difference",
  77323. "esnext.set.every",
  77324. "esnext.set.filter",
  77325. "esnext.set.find",
  77326. "esnext.set.from",
  77327. "esnext.set.intersection",
  77328. "esnext.set.is-disjoint-from",
  77329. "esnext.set.is-subset-of",
  77330. "esnext.set.is-superset-of",
  77331. "esnext.set.join",
  77332. "esnext.set.map",
  77333. "esnext.set.of",
  77334. "esnext.set.reduce",
  77335. "esnext.set.some",
  77336. "esnext.set.symmetric-difference",
  77337. "esnext.set.union",
  77338. "esnext.string.at",
  77339. "esnext.string.code-points",
  77340. "esnext.string.match-all",
  77341. "esnext.string.replace-all",
  77342. "esnext.symbol.async-dispose",
  77343. "esnext.symbol.dispose",
  77344. "esnext.symbol.observable",
  77345. "esnext.symbol.pattern-match",
  77346. "esnext.symbol.replace-all",
  77347. "esnext.weak-map.delete-all",
  77348. "esnext.weak-map.from",
  77349. "esnext.weak-map.of",
  77350. "esnext.weak-map.upsert",
  77351. "esnext.weak-set.add-all",
  77352. "esnext.weak-set.delete-all",
  77353. "esnext.weak-set.from",
  77354. "esnext.weak-set.of",
  77355. "web.dom-collections.for-each",
  77356. "web.dom-collections.iterator",
  77357. "web.immediate",
  77358. "web.queue-microtask",
  77359. "web.timers",
  77360. "web.url",
  77361. "web.url.to-json",
  77362. "web.url-search-params"
  77363. ];
  77364. var modules$1 = /*#__PURE__*/Object.freeze({
  77365. __proto__: null,
  77366. 'default': modules
  77367. });
  77368. var modulesByVersions$2 = getCjsExportFromNamespace(modulesByVersions$1);
  77369. var modules$2 = getCjsExportFromNamespace(modules$1);
  77370. var compare$4 = helpers$1.compare,
  77371. intersection$2 = helpers$1.intersection,
  77372. semver$2 = helpers$1.semver;
  77373. var getModulesListForTargetVersion = function (raw) {
  77374. var corejs = semver$2(raw);
  77375. if (corejs.major !== 3) {
  77376. throw RangeError('This version of `core-js-compat` works only with `core-js@3`.');
  77377. }
  77378. var result = [];
  77379. for (var _i = 0, _Object$keys = Object.keys(modulesByVersions$2); _i < _Object$keys.length; _i++) {
  77380. var version = _Object$keys[_i];
  77381. if (compare$4(version, '<=', corejs)) {
  77382. result.push.apply(result, modulesByVersions$2[version]);
  77383. }
  77384. }
  77385. return intersection$2(result, modules$2);
  77386. };
  77387. var ArrayNatureIterators$1 = ["es.array.iterator", "web.dom-collections.iterator"];
  77388. var CommonIterators$1 = ["es.string.iterator"].concat(ArrayNatureIterators$1);
  77389. var ArrayNatureIteratorsWithTag = ["es.object.to-string"].concat(ArrayNatureIterators$1);
  77390. var CommonIteratorsWithTag = ["es.object.to-string"].concat(CommonIterators$1);
  77391. 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"];
  77392. var TypedArrayStaticMethods = {
  77393. from: "es.typed-array.from",
  77394. of: "es.typed-array.of"
  77395. };
  77396. var PromiseDependencies$1 = ["es.promise", "es.object.to-string"];
  77397. var PromiseDependenciesWithIterators = [].concat(PromiseDependencies$1, CommonIterators$1);
  77398. var SymbolDependencies = ["es.symbol", "es.symbol.description", "es.object.to-string"];
  77399. 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(CommonIteratorsWithTag);
  77400. 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(CommonIteratorsWithTag);
  77401. var WeakMapDependencies = ["es.weak-map", "esnext.weak-map.delete-all"].concat(CommonIteratorsWithTag);
  77402. var WeakSetDependencies = ["es.weak-set", "esnext.weak-set.add-all", "esnext.weak-set.delete-all"].concat(CommonIteratorsWithTag);
  77403. var URLSearchParamsDependencies = ["web.url"].concat(CommonIteratorsWithTag);
  77404. var BuiltIns$1 = {
  77405. AggregateError: ["esnext.aggregate-error"].concat(CommonIterators$1),
  77406. ArrayBuffer: ["es.array-buffer.constructor", "es.array-buffer.slice", "es.object.to-string"],
  77407. DataView: ["es.data-view", "es.array-buffer.slice", "es.object.to-string"],
  77408. Date: ["es.date.to-string"],
  77409. Float32Array: ["es.typed-array.float32-array"].concat(TypedArrayDependencies),
  77410. Float64Array: ["es.typed-array.float64-array"].concat(TypedArrayDependencies),
  77411. Int8Array: ["es.typed-array.int8-array"].concat(TypedArrayDependencies),
  77412. Int16Array: ["es.typed-array.int16-array"].concat(TypedArrayDependencies),
  77413. Int32Array: ["es.typed-array.int32-array"].concat(TypedArrayDependencies),
  77414. Uint8Array: ["es.typed-array.uint8-array"].concat(TypedArrayDependencies),
  77415. Uint8ClampedArray: ["es.typed-array.uint8-clamped-array"].concat(TypedArrayDependencies),
  77416. Uint16Array: ["es.typed-array.uint16-array"].concat(TypedArrayDependencies),
  77417. Uint32Array: ["es.typed-array.uint32-array"].concat(TypedArrayDependencies),
  77418. Map: MapDependencies,
  77419. Number: ["es.number.constructor"],
  77420. Observable: ["esnext.observable", "esnext.symbol.observable", "es.object.to-string"].concat(CommonIteratorsWithTag),
  77421. Promise: PromiseDependencies$1,
  77422. RegExp: ["es.regexp.constructor", "es.regexp.exec", "es.regexp.to-string"],
  77423. Set: SetDependencies,
  77424. Symbol: SymbolDependencies,
  77425. URL: ["web.url"].concat(URLSearchParamsDependencies),
  77426. URLSearchParams: URLSearchParamsDependencies,
  77427. WeakMap: WeakMapDependencies,
  77428. WeakSet: WeakSetDependencies,
  77429. clearImmediate: ["web.immediate"],
  77430. compositeKey: ["esnext.composite-key"],
  77431. compositeSymbol: ["esnext.composite-symbol"].concat(SymbolDependencies),
  77432. fetch: PromiseDependencies$1,
  77433. globalThis: ["esnext.global-this"],
  77434. parseFloat: ["es.parse-float"],
  77435. parseInt: ["es.parse-int"],
  77436. queueMicrotask: ["web.queue-microtask"],
  77437. setTimeout: ["web.timers"],
  77438. setInterval: ["web.timers"],
  77439. setImmediate: ["web.immediate"]
  77440. };
  77441. var InstanceProperties$1 = {
  77442. at: ["esnext.string.at"],
  77443. anchor: ["es.string.anchor"],
  77444. big: ["es.string.big"],
  77445. bind: ["es.function.bind"],
  77446. blink: ["es.string.blink"],
  77447. bold: ["es.string.bold"],
  77448. codePointAt: ["es.string.code-point-at"],
  77449. codePoints: ["esnext.string.code-points"],
  77450. concat: ["es.array.concat"],
  77451. copyWithin: ["es.array.copy-within"],
  77452. description: ["es.symbol", "es.symbol.description"],
  77453. endsWith: ["es.string.ends-with"],
  77454. entries: ArrayNatureIteratorsWithTag,
  77455. every: ["es.array.every"],
  77456. exec: ["es.regexp.exec"],
  77457. fill: ["es.array.fill"],
  77458. filter: ["es.array.filter"],
  77459. "finally": ["es.promise.finally"].concat(PromiseDependencies$1),
  77460. find: ["es.array.find"],
  77461. findIndex: ["es.array.find-index"],
  77462. fixed: ["es.string.fixed"],
  77463. flags: ["es.regexp.flags"],
  77464. flat: ["es.array.flat", "es.array.unscopables.flat"],
  77465. flatMap: ["es.array.flat-map", "es.array.unscopables.flat-map"],
  77466. fontcolor: ["es.string.fontcolor"],
  77467. fontsize: ["es.string.fontsize"],
  77468. forEach: ["es.array.for-each", "web.dom-collections.for-each"],
  77469. includes: ["es.array.includes", "es.string.includes"],
  77470. indexOf: ["es.array.index-of"],
  77471. italics: ["es.string.italics"],
  77472. join: ["es.array.join"],
  77473. keys: ArrayNatureIteratorsWithTag,
  77474. lastIndex: ["esnext.array.last-index"],
  77475. lastIndexOf: ["es.array.last-index-of"],
  77476. lastItem: ["esnext.array.last-item"],
  77477. link: ["es.string.link"],
  77478. match: ["es.string.match", "es.regexp.exec"],
  77479. matchAll: ["esnext.string.match-all"],
  77480. map: ["es.array.map"],
  77481. name: ["es.function.name"],
  77482. padEnd: ["es.string.pad-end"],
  77483. padStart: ["es.string.pad-start"],
  77484. reduce: ["es.array.reduce"],
  77485. reduceRight: ["es.array.reduce-right"],
  77486. repeat: ["es.string.repeat"],
  77487. replace: ["es.string.replace", "es.regexp.exec"],
  77488. replaceAll: ["esnext.string.replace-all"],
  77489. reverse: ["es.array.reverse"],
  77490. search: ["es.string.search", "es.regexp.exec"],
  77491. slice: ["es.array.slice"],
  77492. small: ["es.string.small"],
  77493. some: ["es.array.some"],
  77494. sort: ["es.array.sort"],
  77495. splice: ["es.array.splice"],
  77496. split: ["es.string.split", "es.regexp.exec"],
  77497. startsWith: ["es.string.starts-with"],
  77498. strike: ["es.string.strike"],
  77499. sub: ["es.string.sub"],
  77500. sup: ["es.string.sup"],
  77501. toFixed: ["es.number.to-fixed"],
  77502. toISOString: ["es.date.to-iso-string"],
  77503. toJSON: ["es.date.to-json", "web.url.to-json"],
  77504. toPrecision: ["es.number.to-precision"],
  77505. toString: ["es.object.to-string", "es.regexp.to-string", "es.date.to-string"],
  77506. trim: ["es.string.trim"],
  77507. trimEnd: ["es.string.trim-end"],
  77508. trimLeft: ["es.string.trim-start"],
  77509. trimRight: ["es.string.trim-end"],
  77510. trimStart: ["es.string.trim-start"],
  77511. values: ArrayNatureIteratorsWithTag,
  77512. __defineGetter__: ["es.object.define-getter"],
  77513. __defineSetter__: ["es.object.define-setter"],
  77514. __lookupGetter__: ["es.object.lookup-getter"],
  77515. __lookupSetter__: ["es.object.lookup-setter"]
  77516. };
  77517. var StaticProperties$1 = {
  77518. Array: {
  77519. from: ["es.array.from", "es.string.iterator"],
  77520. isArray: ["es.array.is-array"],
  77521. of: ["es.array.of"]
  77522. },
  77523. Date: {
  77524. now: "es.date.now"
  77525. },
  77526. Object: {
  77527. assign: "es.object.assign",
  77528. create: "es.object.create",
  77529. defineProperty: "es.object.define-property",
  77530. defineProperties: "es.object.define-properties",
  77531. entries: "es.object.entries",
  77532. freeze: "es.object.freeze",
  77533. fromEntries: ["es.object.from-entries", "es.array.iterator"],
  77534. getOwnPropertyDescriptor: "es.object.get-own-property-descriptor",
  77535. getOwnPropertyDescriptors: "es.object.get-own-property-descriptors",
  77536. getOwnPropertyNames: "es.object.get-own-property-names",
  77537. getOwnPropertySymbols: "es.symbol",
  77538. getPrototypeOf: "es.object.get-prototype-of",
  77539. is: "es.object.is",
  77540. isExtensible: "es.object.is-extensible",
  77541. isFrozen: "es.object.is-frozen",
  77542. isSealed: "es.object.is-sealed",
  77543. keys: "es.object.keys",
  77544. preventExtensions: "es.object.prevent-extensions",
  77545. seal: "es.object.seal",
  77546. setPrototypeOf: "es.object.set-prototype-of",
  77547. values: "es.object.values"
  77548. },
  77549. Math: {
  77550. DEG_PER_RAD: "esnext.math.deg-per-rad",
  77551. RAD_PER_DEG: "esnext.math.rad-per-deg",
  77552. acosh: "es.math.acosh",
  77553. asinh: "es.math.asinh",
  77554. atanh: "es.math.atanh",
  77555. cbrt: "es.math.cbrt",
  77556. clamp: "esnext.math.clamp",
  77557. clz32: "es.math.clz32",
  77558. cosh: "es.math.cosh",
  77559. degrees: "esnext.math.degrees",
  77560. expm1: "es.math.expm1",
  77561. fround: "es.math.fround",
  77562. fscale: "esnext.math.fscale",
  77563. hypot: "es.math.hypot",
  77564. iaddh: "esnext.math.iaddh",
  77565. imul: "es.math.imul",
  77566. imulh: "esnext.math.imulh",
  77567. isubh: "esnext.math.isubh",
  77568. log1p: "es.math.log1p",
  77569. log10: "es.math.log10",
  77570. log2: "es.math.log2",
  77571. radians: "esnext.math.radians",
  77572. scale: "esnext.math.scale",
  77573. seededPRNG: "esnext.math.seeded-prng",
  77574. sign: "es.math.sign",
  77575. signbit: "esnext.math.signbit",
  77576. sinh: "es.math.sinh",
  77577. tanh: "es.math.tanh",
  77578. trunc: "es.math.trunc",
  77579. umulh: "esnext.math.umulh"
  77580. },
  77581. String: {
  77582. fromCodePoint: "es.string.from-code-point",
  77583. raw: "es.string.raw"
  77584. },
  77585. Number: {
  77586. EPSILON: "es.number.epsilon",
  77587. MIN_SAFE_INTEGER: "es.number.min-safe-integer",
  77588. MAX_SAFE_INTEGER: "es.number.max-safe-integer",
  77589. fromString: "esnext.number.from-string",
  77590. isFinite: "es.number.is-finite",
  77591. isInteger: "es.number.is-integer",
  77592. isSafeInteger: "es.number.is-safe-integer",
  77593. isNaN: "es.number.is-nan",
  77594. parseFloat: "es.number.parse-float",
  77595. parseInt: "es.number.parse-int"
  77596. },
  77597. Map: {
  77598. from: ["esnext.map.from"].concat(MapDependencies),
  77599. groupBy: ["esnext.map.group-by"].concat(MapDependencies),
  77600. keyBy: ["esnext.map.key-by"].concat(MapDependencies),
  77601. of: ["esnext.map.of"].concat(MapDependencies)
  77602. },
  77603. Set: {
  77604. from: ["esnext.set.from"].concat(SetDependencies),
  77605. of: ["esnext.set.of"].concat(SetDependencies)
  77606. },
  77607. WeakMap: {
  77608. from: ["esnext.weak-map.from"].concat(WeakMapDependencies),
  77609. of: ["esnext.weak-map.of"].concat(WeakMapDependencies)
  77610. },
  77611. WeakSet: {
  77612. from: ["esnext.weak-set.from"].concat(WeakSetDependencies),
  77613. of: ["esnext.weak-set.of"].concat(WeakSetDependencies)
  77614. },
  77615. Promise: {
  77616. all: PromiseDependenciesWithIterators,
  77617. allSettled: ["esnext.promise.all-settled"].concat(PromiseDependenciesWithIterators),
  77618. any: ["esnext.promise.any", "esnext.aggregate-error"].concat(PromiseDependenciesWithIterators),
  77619. race: PromiseDependenciesWithIterators,
  77620. "try": ["esnext.promise.try"].concat(PromiseDependenciesWithIterators)
  77621. },
  77622. Reflect: {
  77623. apply: "es.reflect.apply",
  77624. construct: "es.reflect.construct",
  77625. defineMetadata: "esnext.reflect.define-metadata",
  77626. defineProperty: "es.reflect.define-property",
  77627. deleteMetadata: "esnext.reflect.delete-metadata",
  77628. deleteProperty: "es.reflect.delete-property",
  77629. get: "es.reflect.get",
  77630. getMetadata: "esnext.reflect.get-metadata",
  77631. getMetadataKeys: "esnext.reflect.get-metadata-keys",
  77632. getOwnMetadata: "esnext.reflect.get-own-metadata",
  77633. getOwnMetadataKeys: "esnext.reflect.get-own-metadata-keys",
  77634. getOwnPropertyDescriptor: "es.reflect.get-own-property-descriptor",
  77635. getPrototypeOf: "es.reflect.get-prototype-of",
  77636. has: "es.reflect.has",
  77637. hasMetadata: "esnext.reflect.has-metadata",
  77638. hasOwnMetadata: "esnext.reflect.has-own-metadata",
  77639. isExtensible: "es.reflect.is-extensible",
  77640. metadata: "esnext.reflect.metadata",
  77641. ownKeys: "es.reflect.own-keys",
  77642. preventExtensions: "es.reflect.prevent-extensions",
  77643. set: "es.reflect.set",
  77644. setPrototypeOf: "es.reflect.set-prototype-of"
  77645. },
  77646. Symbol: {
  77647. asyncIterator: ["es.symbol.async-iterator"],
  77648. dispose: ["esnext.symbol.dispose"],
  77649. hasInstance: ["es.symbol.has-instance", "es.function.has-instance"],
  77650. isConcatSpreadable: ["es.symbol.is-concat-spreadable", "es.array.concat"],
  77651. iterator: ["es.symbol.iterator"].concat(CommonIteratorsWithTag),
  77652. match: ["es.symbol.match", "es.string.match"],
  77653. observable: ["esnext.symbol.observable"],
  77654. patternMatch: ["esnext.symbol.pattern-match"],
  77655. replace: ["es.symbol.replace", "es.string.replace"],
  77656. search: ["es.symbol.search", "es.string.search"],
  77657. species: ["es.symbol.species", "es.array.species"],
  77658. split: ["es.symbol.split", "es.string.split"],
  77659. toPrimitive: ["es.symbol.to-primitive", "es.date.to-primitive"],
  77660. toStringTag: ["es.symbol.to-string-tag", "es.object.to-string", "es.math.to-string-tag", "es.json.to-string-tag"],
  77661. unscopables: ["es.symbol.unscopables"]
  77662. },
  77663. ArrayBuffer: {
  77664. isView: ["es.array-buffer.is-view"]
  77665. },
  77666. Int8Array: TypedArrayStaticMethods,
  77667. Uint8Array: TypedArrayStaticMethods,
  77668. Uint8ClampedArray: TypedArrayStaticMethods,
  77669. Int16Array: TypedArrayStaticMethods,
  77670. Uint16Array: TypedArrayStaticMethods,
  77671. Int32Array: TypedArrayStaticMethods,
  77672. Uint32Array: TypedArrayStaticMethods,
  77673. Float32Array: TypedArrayStaticMethods,
  77674. Float64Array: TypedArrayStaticMethods
  77675. };
  77676. 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"]);
  77677. var PossibleGlobalObjects = new Set(["global", "globalThis", "self", "window"]);
  77678. var NO_DIRECT_POLYFILL_IMPORT$1 = "\n When setting `useBuiltIns: 'usage'`, polyfills are automatically imported when needed.\n Please remove the direct import of `core-js` or use `useBuiltIns: 'entry'` instead.";
  77679. var corejs3PolyfillsWithoutProposals = Object.keys(corejs3Polyfills).filter(function (name) {
  77680. return !name.startsWith("esnext.");
  77681. }).reduce(function (memo, key) {
  77682. memo[key] = corejs3Polyfills[key];
  77683. return memo;
  77684. }, {});
  77685. var corejs3PolyfillsWithShippedProposals = corejs3ShippedProposalsList.reduce(function (memo, key) {
  77686. memo[key] = corejs3Polyfills[key];
  77687. return memo;
  77688. }, Object.assign({}, corejs3PolyfillsWithoutProposals));
  77689. function addCoreJS3UsagePlugin (_, _ref) {
  77690. var corejs = _ref.corejs,
  77691. include = _ref.include,
  77692. exclude = _ref.exclude,
  77693. polyfillTargets = _ref.polyfillTargets,
  77694. proposals = _ref.proposals,
  77695. shippedProposals = _ref.shippedProposals,
  77696. debug = _ref.debug;
  77697. var polyfills = filterItems(proposals ? corejs3Polyfills : shippedProposals ? corejs3PolyfillsWithShippedProposals : corejs3PolyfillsWithoutProposals, include, exclude, polyfillTargets, null);
  77698. var available = new Set(getModulesListForTargetVersion(corejs.version));
  77699. function resolveKey(path, computed) {
  77700. var node = path.node,
  77701. parent = path.parent,
  77702. scope = path.scope;
  77703. if (path.isStringLiteral()) return node.value;
  77704. var name = node.name;
  77705. var isIdentifier = path.isIdentifier();
  77706. if (isIdentifier && !(computed || parent.computed)) return name;
  77707. if (!isIdentifier || scope.getBindingIdentifier(name)) {
  77708. var _path$evaluate = path.evaluate(),
  77709. value = _path$evaluate.value;
  77710. if (typeof value === "string") return value;
  77711. }
  77712. }
  77713. function resolveSource(path) {
  77714. var node = path.node,
  77715. scope = path.scope;
  77716. var builtIn, instanceType;
  77717. if (node) {
  77718. builtIn = node.name;
  77719. if (!path.isIdentifier() || scope.getBindingIdentifier(builtIn)) {
  77720. var _path$evaluate2 = path.evaluate(),
  77721. deopt = _path$evaluate2.deopt,
  77722. value = _path$evaluate2.value;
  77723. if (value !== undefined) {
  77724. instanceType = getType$1(value);
  77725. } else if (deopt && deopt.isIdentifier()) {
  77726. builtIn = deopt.node.name;
  77727. }
  77728. }
  77729. }
  77730. return {
  77731. builtIn: builtIn,
  77732. instanceType: instanceType,
  77733. isNamespaced: isNamespaced(path)
  77734. };
  77735. }
  77736. var addAndRemovePolyfillImports = {
  77737. ImportDeclaration: function ImportDeclaration(path) {
  77738. if (isPolyfillSource(getImportSource(path))) {
  77739. console.warn(NO_DIRECT_POLYFILL_IMPORT$1);
  77740. path.remove();
  77741. }
  77742. },
  77743. Program: {
  77744. enter: function enter(path) {
  77745. path.get("body").forEach(function (bodyPath) {
  77746. if (isPolyfillSource(getRequireSource(bodyPath))) {
  77747. console.warn(NO_DIRECT_POLYFILL_IMPORT$1);
  77748. bodyPath.remove();
  77749. }
  77750. });
  77751. },
  77752. exit: function exit(path) {
  77753. var _this = this;
  77754. var filtered = intersection(polyfills, this.polyfillsSet, available);
  77755. var reversed = Array.from(filtered).reverse();
  77756. for (var _iterator = reversed, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  77757. var _ref2;
  77758. if (_isArray) {
  77759. if (_i >= _iterator.length) break;
  77760. _ref2 = _iterator[_i++];
  77761. } else {
  77762. _i = _iterator.next();
  77763. if (_i.done) break;
  77764. _ref2 = _i.value;
  77765. }
  77766. var module = _ref2;
  77767. if (!this.injectedPolyfills.has(module)) {
  77768. createImport(path, module);
  77769. }
  77770. }
  77771. filtered.forEach(function (module) {
  77772. return _this.injectedPolyfills.add(module);
  77773. });
  77774. }
  77775. },
  77776. Import: function Import() {
  77777. this.addUnsupported(PromiseDependencies$1);
  77778. },
  77779. Function: function Function(_ref3) {
  77780. var node = _ref3.node;
  77781. if (node.async) {
  77782. this.addUnsupported(PromiseDependencies$1);
  77783. }
  77784. },
  77785. "ForOfStatement|ArrayPattern": function ForOfStatementArrayPattern() {
  77786. this.addUnsupported(CommonIterators$1);
  77787. },
  77788. SpreadElement: function SpreadElement(_ref4) {
  77789. var parentPath = _ref4.parentPath;
  77790. if (!parentPath.isObjectExpression()) {
  77791. this.addUnsupported(CommonIterators$1);
  77792. }
  77793. },
  77794. YieldExpression: function YieldExpression(_ref5) {
  77795. var node = _ref5.node;
  77796. if (node.delegate) {
  77797. this.addUnsupported(CommonIterators$1);
  77798. }
  77799. },
  77800. ReferencedIdentifier: function ReferencedIdentifier(_ref6) {
  77801. var name = _ref6.node.name,
  77802. scope = _ref6.scope;
  77803. if (scope.getBindingIdentifier(name)) return;
  77804. this.addBuiltInDependencies(name);
  77805. },
  77806. MemberExpression: function MemberExpression(path) {
  77807. var source = resolveSource(path.get("object"));
  77808. var key = resolveKey(path.get("property"));
  77809. this.addPropertyDependencies(source, key);
  77810. },
  77811. ObjectPattern: function ObjectPattern(path) {
  77812. var parentPath = path.parentPath,
  77813. parent = path.parent,
  77814. key = path.key;
  77815. var source;
  77816. if (parentPath.isVariableDeclarator()) {
  77817. source = resolveSource(parentPath.get("init"));
  77818. } else if (parentPath.isAssignmentExpression()) {
  77819. source = resolveSource(parentPath.get("right"));
  77820. } else if (parentPath.isFunctionExpression()) {
  77821. var grand = parentPath.parentPath;
  77822. if (grand.isCallExpression() || grand.isNewExpression()) {
  77823. if (grand.node.callee === parent) {
  77824. source = resolveSource(grand.get("arguments")[key]);
  77825. }
  77826. }
  77827. }
  77828. for (var _iterator2 = path.get("properties"), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  77829. var _ref7;
  77830. if (_isArray2) {
  77831. if (_i2 >= _iterator2.length) break;
  77832. _ref7 = _iterator2[_i2++];
  77833. } else {
  77834. _i2 = _iterator2.next();
  77835. if (_i2.done) break;
  77836. _ref7 = _i2.value;
  77837. }
  77838. var property = _ref7;
  77839. if (property.isObjectProperty()) {
  77840. var _key = resolveKey(property.get("key"));
  77841. this.addPropertyDependencies(source, _key);
  77842. }
  77843. }
  77844. },
  77845. BinaryExpression: function BinaryExpression(path) {
  77846. if (path.node.operator !== "in") return;
  77847. var source = resolveSource(path.get("right"));
  77848. var key = resolveKey(path.get("left"), true);
  77849. this.addPropertyDependencies(source, key);
  77850. }
  77851. };
  77852. return {
  77853. name: "corejs3-usage",
  77854. pre: function pre() {
  77855. this.injectedPolyfills = new Set();
  77856. this.polyfillsSet = new Set();
  77857. this.addUnsupported = function (builtIn) {
  77858. var modules = Array.isArray(builtIn) ? builtIn : [builtIn];
  77859. for (var _iterator3 = modules, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
  77860. var _ref8;
  77861. if (_isArray3) {
  77862. if (_i3 >= _iterator3.length) break;
  77863. _ref8 = _iterator3[_i3++];
  77864. } else {
  77865. _i3 = _iterator3.next();
  77866. if (_i3.done) break;
  77867. _ref8 = _i3.value;
  77868. }
  77869. var module = _ref8;
  77870. this.polyfillsSet.add(module);
  77871. }
  77872. };
  77873. this.addBuiltInDependencies = function (builtIn) {
  77874. if (has$6(BuiltIns$1, builtIn)) {
  77875. var BuiltInDependencies = BuiltIns$1[builtIn];
  77876. this.addUnsupported(BuiltInDependencies);
  77877. }
  77878. };
  77879. this.addPropertyDependencies = function (source, key) {
  77880. if (source === void 0) {
  77881. source = {};
  77882. }
  77883. var _source = source,
  77884. builtIn = _source.builtIn,
  77885. instanceType = _source.instanceType,
  77886. isNamespaced = _source.isNamespaced;
  77887. if (isNamespaced) return;
  77888. if (PossibleGlobalObjects.has(builtIn)) {
  77889. this.addBuiltInDependencies(key);
  77890. } else if (has$6(StaticProperties$1, builtIn)) {
  77891. var BuiltInProperties = StaticProperties$1[builtIn];
  77892. if (has$6(BuiltInProperties, key)) {
  77893. var StaticPropertyDependencies = BuiltInProperties[key];
  77894. return this.addUnsupported(StaticPropertyDependencies);
  77895. }
  77896. }
  77897. if (!has$6(InstanceProperties$1, key)) return;
  77898. var InstancePropertyDependencies = InstanceProperties$1[key];
  77899. if (instanceType) {
  77900. InstancePropertyDependencies = InstancePropertyDependencies.filter(function (m) {
  77901. return m.includes(instanceType) || CommonInstanceDependencies.has(m);
  77902. });
  77903. }
  77904. this.addUnsupported(InstancePropertyDependencies);
  77905. };
  77906. },
  77907. post: function post() {
  77908. if (debug) {
  77909. logUsagePolyfills(this.injectedPolyfills, this.file.opts.filename, polyfillTargets, corejs3Polyfills);
  77910. }
  77911. },
  77912. visitor: addAndRemovePolyfillImports
  77913. };
  77914. }
  77915. function addRegeneratorUsagePlugin () {
  77916. return {
  77917. name: "regenerator-usage",
  77918. pre: function pre() {
  77919. this.usesRegenerator = false;
  77920. },
  77921. visitor: {
  77922. Function: function Function(path) {
  77923. var node = path.node;
  77924. if (!this.usesRegenerator && (node.generator || node.async)) {
  77925. this.usesRegenerator = true;
  77926. createImport(path, "regenerator-runtime");
  77927. }
  77928. }
  77929. },
  77930. post: function post() {
  77931. if (this.opts.debug && this.usesRegenerator) {
  77932. var filename = this.file.opts.filename;
  77933. if (process.env.BABEL_ENV === "test") {
  77934. filename = filename.replace(/\\/g, "/");
  77935. }
  77936. console.log("\n[" + filename + "] Based on your code and targets, added regenerator-runtime.");
  77937. }
  77938. }
  77939. };
  77940. }
  77941. function replaceCoreJS2EntryPlugin (_, _ref) {
  77942. var include = _ref.include,
  77943. exclude = _ref.exclude,
  77944. polyfillTargets = _ref.polyfillTargets,
  77945. regenerator = _ref.regenerator,
  77946. debug = _ref.debug;
  77947. var polyfills = filterItems(corejs2BuiltIns$2, include, exclude, polyfillTargets, getPlatformSpecificDefaultFor(polyfillTargets));
  77948. var isPolyfillImport = {
  77949. ImportDeclaration: function ImportDeclaration(path) {
  77950. if (isPolyfillSource(getImportSource(path))) {
  77951. this.replaceBySeparateModulesImport(path);
  77952. }
  77953. },
  77954. Program: function Program(path) {
  77955. var _this = this;
  77956. path.get("body").forEach(function (bodyPath) {
  77957. if (isPolyfillSource(getRequireSource(bodyPath))) {
  77958. _this.replaceBySeparateModulesImport(bodyPath);
  77959. }
  77960. });
  77961. }
  77962. };
  77963. return {
  77964. name: "corejs2-entry",
  77965. visitor: isPolyfillImport,
  77966. pre: function pre() {
  77967. this.importPolyfillIncluded = false;
  77968. this.replaceBySeparateModulesImport = function (path) {
  77969. this.importPolyfillIncluded = true;
  77970. if (regenerator) {
  77971. createImport(path, "regenerator-runtime");
  77972. }
  77973. var modules = Array.from(polyfills).reverse();
  77974. for (var _iterator = modules, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  77975. var _ref2;
  77976. if (_isArray) {
  77977. if (_i >= _iterator.length) break;
  77978. _ref2 = _iterator[_i++];
  77979. } else {
  77980. _i = _iterator.next();
  77981. if (_i.done) break;
  77982. _ref2 = _i.value;
  77983. }
  77984. var module = _ref2;
  77985. createImport(path, module);
  77986. }
  77987. path.remove();
  77988. };
  77989. },
  77990. post: function post() {
  77991. if (debug) {
  77992. logEntryPolyfills("@babel/polyfill", this.importPolyfillIncluded, polyfills, this.file.opts.filename, polyfillTargets, corejs2BuiltIns$2);
  77993. }
  77994. }
  77995. };
  77996. }
  77997. var corejsEntries = {
  77998. "core-js": [
  77999. "es.symbol",
  78000. "es.symbol.description",
  78001. "es.symbol.async-iterator",
  78002. "es.symbol.has-instance",
  78003. "es.symbol.is-concat-spreadable",
  78004. "es.symbol.iterator",
  78005. "es.symbol.match",
  78006. "es.symbol.match-all",
  78007. "es.symbol.replace",
  78008. "es.symbol.search",
  78009. "es.symbol.species",
  78010. "es.symbol.split",
  78011. "es.symbol.to-primitive",
  78012. "es.symbol.to-string-tag",
  78013. "es.symbol.unscopables",
  78014. "es.array.concat",
  78015. "es.array.copy-within",
  78016. "es.array.every",
  78017. "es.array.fill",
  78018. "es.array.filter",
  78019. "es.array.find",
  78020. "es.array.find-index",
  78021. "es.array.flat",
  78022. "es.array.flat-map",
  78023. "es.array.for-each",
  78024. "es.array.from",
  78025. "es.array.includes",
  78026. "es.array.index-of",
  78027. "es.array.is-array",
  78028. "es.array.iterator",
  78029. "es.array.join",
  78030. "es.array.last-index-of",
  78031. "es.array.map",
  78032. "es.array.of",
  78033. "es.array.reduce",
  78034. "es.array.reduce-right",
  78035. "es.array.reverse",
  78036. "es.array.slice",
  78037. "es.array.some",
  78038. "es.array.sort",
  78039. "es.array.species",
  78040. "es.array.splice",
  78041. "es.array.unscopables.flat",
  78042. "es.array.unscopables.flat-map",
  78043. "es.array-buffer.constructor",
  78044. "es.array-buffer.is-view",
  78045. "es.array-buffer.slice",
  78046. "es.data-view",
  78047. "es.date.now",
  78048. "es.date.to-iso-string",
  78049. "es.date.to-json",
  78050. "es.date.to-primitive",
  78051. "es.date.to-string",
  78052. "es.function.bind",
  78053. "es.function.has-instance",
  78054. "es.function.name",
  78055. "es.global-this",
  78056. "es.json.stringify",
  78057. "es.json.to-string-tag",
  78058. "es.map",
  78059. "es.math.acosh",
  78060. "es.math.asinh",
  78061. "es.math.atanh",
  78062. "es.math.cbrt",
  78063. "es.math.clz32",
  78064. "es.math.cosh",
  78065. "es.math.expm1",
  78066. "es.math.fround",
  78067. "es.math.hypot",
  78068. "es.math.imul",
  78069. "es.math.log10",
  78070. "es.math.log1p",
  78071. "es.math.log2",
  78072. "es.math.sign",
  78073. "es.math.sinh",
  78074. "es.math.tanh",
  78075. "es.math.to-string-tag",
  78076. "es.math.trunc",
  78077. "es.number.constructor",
  78078. "es.number.epsilon",
  78079. "es.number.is-finite",
  78080. "es.number.is-integer",
  78081. "es.number.is-nan",
  78082. "es.number.is-safe-integer",
  78083. "es.number.max-safe-integer",
  78084. "es.number.min-safe-integer",
  78085. "es.number.parse-float",
  78086. "es.number.parse-int",
  78087. "es.number.to-fixed",
  78088. "es.number.to-precision",
  78089. "es.object.assign",
  78090. "es.object.create",
  78091. "es.object.define-getter",
  78092. "es.object.define-properties",
  78093. "es.object.define-property",
  78094. "es.object.define-setter",
  78095. "es.object.entries",
  78096. "es.object.freeze",
  78097. "es.object.from-entries",
  78098. "es.object.get-own-property-descriptor",
  78099. "es.object.get-own-property-descriptors",
  78100. "es.object.get-own-property-names",
  78101. "es.object.get-prototype-of",
  78102. "es.object.is",
  78103. "es.object.is-extensible",
  78104. "es.object.is-frozen",
  78105. "es.object.is-sealed",
  78106. "es.object.keys",
  78107. "es.object.lookup-getter",
  78108. "es.object.lookup-setter",
  78109. "es.object.prevent-extensions",
  78110. "es.object.seal",
  78111. "es.object.set-prototype-of",
  78112. "es.object.to-string",
  78113. "es.object.values",
  78114. "es.parse-float",
  78115. "es.parse-int",
  78116. "es.promise",
  78117. "es.promise.all-settled",
  78118. "es.promise.finally",
  78119. "es.reflect.apply",
  78120. "es.reflect.construct",
  78121. "es.reflect.define-property",
  78122. "es.reflect.delete-property",
  78123. "es.reflect.get",
  78124. "es.reflect.get-own-property-descriptor",
  78125. "es.reflect.get-prototype-of",
  78126. "es.reflect.has",
  78127. "es.reflect.is-extensible",
  78128. "es.reflect.own-keys",
  78129. "es.reflect.prevent-extensions",
  78130. "es.reflect.set",
  78131. "es.reflect.set-prototype-of",
  78132. "es.regexp.constructor",
  78133. "es.regexp.exec",
  78134. "es.regexp.flags",
  78135. "es.regexp.sticky",
  78136. "es.regexp.test",
  78137. "es.regexp.to-string",
  78138. "es.set",
  78139. "es.string.code-point-at",
  78140. "es.string.ends-with",
  78141. "es.string.from-code-point",
  78142. "es.string.includes",
  78143. "es.string.iterator",
  78144. "es.string.match",
  78145. "es.string.match-all",
  78146. "es.string.pad-end",
  78147. "es.string.pad-start",
  78148. "es.string.raw",
  78149. "es.string.repeat",
  78150. "es.string.replace",
  78151. "es.string.search",
  78152. "es.string.split",
  78153. "es.string.starts-with",
  78154. "es.string.trim",
  78155. "es.string.trim-end",
  78156. "es.string.trim-start",
  78157. "es.string.anchor",
  78158. "es.string.big",
  78159. "es.string.blink",
  78160. "es.string.bold",
  78161. "es.string.fixed",
  78162. "es.string.fontcolor",
  78163. "es.string.fontsize",
  78164. "es.string.italics",
  78165. "es.string.link",
  78166. "es.string.small",
  78167. "es.string.strike",
  78168. "es.string.sub",
  78169. "es.string.sup",
  78170. "es.typed-array.float32-array",
  78171. "es.typed-array.float64-array",
  78172. "es.typed-array.int8-array",
  78173. "es.typed-array.int16-array",
  78174. "es.typed-array.int32-array",
  78175. "es.typed-array.uint8-array",
  78176. "es.typed-array.uint8-clamped-array",
  78177. "es.typed-array.uint16-array",
  78178. "es.typed-array.uint32-array",
  78179. "es.typed-array.copy-within",
  78180. "es.typed-array.every",
  78181. "es.typed-array.fill",
  78182. "es.typed-array.filter",
  78183. "es.typed-array.find",
  78184. "es.typed-array.find-index",
  78185. "es.typed-array.for-each",
  78186. "es.typed-array.from",
  78187. "es.typed-array.includes",
  78188. "es.typed-array.index-of",
  78189. "es.typed-array.iterator",
  78190. "es.typed-array.join",
  78191. "es.typed-array.last-index-of",
  78192. "es.typed-array.map",
  78193. "es.typed-array.of",
  78194. "es.typed-array.reduce",
  78195. "es.typed-array.reduce-right",
  78196. "es.typed-array.reverse",
  78197. "es.typed-array.set",
  78198. "es.typed-array.slice",
  78199. "es.typed-array.some",
  78200. "es.typed-array.sort",
  78201. "es.typed-array.subarray",
  78202. "es.typed-array.to-locale-string",
  78203. "es.typed-array.to-string",
  78204. "es.weak-map",
  78205. "es.weak-set",
  78206. "esnext.aggregate-error",
  78207. "esnext.array.is-template-object",
  78208. "esnext.array.last-index",
  78209. "esnext.array.last-item",
  78210. "esnext.async-iterator.constructor",
  78211. "esnext.async-iterator.as-indexed-pairs",
  78212. "esnext.async-iterator.drop",
  78213. "esnext.async-iterator.every",
  78214. "esnext.async-iterator.filter",
  78215. "esnext.async-iterator.find",
  78216. "esnext.async-iterator.flat-map",
  78217. "esnext.async-iterator.for-each",
  78218. "esnext.async-iterator.from",
  78219. "esnext.async-iterator.map",
  78220. "esnext.async-iterator.reduce",
  78221. "esnext.async-iterator.some",
  78222. "esnext.async-iterator.take",
  78223. "esnext.async-iterator.to-array",
  78224. "esnext.composite-key",
  78225. "esnext.composite-symbol",
  78226. "esnext.global-this",
  78227. "esnext.iterator.constructor",
  78228. "esnext.iterator.as-indexed-pairs",
  78229. "esnext.iterator.drop",
  78230. "esnext.iterator.every",
  78231. "esnext.iterator.filter",
  78232. "esnext.iterator.find",
  78233. "esnext.iterator.flat-map",
  78234. "esnext.iterator.for-each",
  78235. "esnext.iterator.from",
  78236. "esnext.iterator.map",
  78237. "esnext.iterator.reduce",
  78238. "esnext.iterator.some",
  78239. "esnext.iterator.take",
  78240. "esnext.iterator.to-array",
  78241. "esnext.map.delete-all",
  78242. "esnext.map.every",
  78243. "esnext.map.filter",
  78244. "esnext.map.find",
  78245. "esnext.map.find-key",
  78246. "esnext.map.from",
  78247. "esnext.map.group-by",
  78248. "esnext.map.includes",
  78249. "esnext.map.key-by",
  78250. "esnext.map.key-of",
  78251. "esnext.map.map-keys",
  78252. "esnext.map.map-values",
  78253. "esnext.map.merge",
  78254. "esnext.map.of",
  78255. "esnext.map.reduce",
  78256. "esnext.map.some",
  78257. "esnext.map.update",
  78258. "esnext.map.update-or-insert",
  78259. "esnext.map.upsert",
  78260. "esnext.math.clamp",
  78261. "esnext.math.deg-per-rad",
  78262. "esnext.math.degrees",
  78263. "esnext.math.fscale",
  78264. "esnext.math.iaddh",
  78265. "esnext.math.imulh",
  78266. "esnext.math.isubh",
  78267. "esnext.math.rad-per-deg",
  78268. "esnext.math.radians",
  78269. "esnext.math.scale",
  78270. "esnext.math.seeded-prng",
  78271. "esnext.math.signbit",
  78272. "esnext.math.umulh",
  78273. "esnext.number.from-string",
  78274. "esnext.object.iterate-entries",
  78275. "esnext.object.iterate-keys",
  78276. "esnext.object.iterate-values",
  78277. "esnext.observable",
  78278. "esnext.promise.all-settled",
  78279. "esnext.promise.any",
  78280. "esnext.promise.try",
  78281. "esnext.reflect.define-metadata",
  78282. "esnext.reflect.delete-metadata",
  78283. "esnext.reflect.get-metadata",
  78284. "esnext.reflect.get-metadata-keys",
  78285. "esnext.reflect.get-own-metadata",
  78286. "esnext.reflect.get-own-metadata-keys",
  78287. "esnext.reflect.has-metadata",
  78288. "esnext.reflect.has-own-metadata",
  78289. "esnext.reflect.metadata",
  78290. "esnext.set.add-all",
  78291. "esnext.set.delete-all",
  78292. "esnext.set.difference",
  78293. "esnext.set.every",
  78294. "esnext.set.filter",
  78295. "esnext.set.find",
  78296. "esnext.set.from",
  78297. "esnext.set.intersection",
  78298. "esnext.set.is-disjoint-from",
  78299. "esnext.set.is-subset-of",
  78300. "esnext.set.is-superset-of",
  78301. "esnext.set.join",
  78302. "esnext.set.map",
  78303. "esnext.set.of",
  78304. "esnext.set.reduce",
  78305. "esnext.set.some",
  78306. "esnext.set.symmetric-difference",
  78307. "esnext.set.union",
  78308. "esnext.string.at",
  78309. "esnext.string.code-points",
  78310. "esnext.string.match-all",
  78311. "esnext.string.replace-all",
  78312. "esnext.symbol.async-dispose",
  78313. "esnext.symbol.dispose",
  78314. "esnext.symbol.observable",
  78315. "esnext.symbol.pattern-match",
  78316. "esnext.symbol.replace-all",
  78317. "esnext.weak-map.delete-all",
  78318. "esnext.weak-map.from",
  78319. "esnext.weak-map.of",
  78320. "esnext.weak-map.upsert",
  78321. "esnext.weak-set.add-all",
  78322. "esnext.weak-set.delete-all",
  78323. "esnext.weak-set.from",
  78324. "esnext.weak-set.of",
  78325. "web.dom-collections.for-each",
  78326. "web.dom-collections.iterator",
  78327. "web.immediate",
  78328. "web.queue-microtask",
  78329. "web.timers",
  78330. "web.url",
  78331. "web.url.to-json",
  78332. "web.url-search-params"
  78333. ],
  78334. "core-js/es": [
  78335. "es.symbol",
  78336. "es.symbol.description",
  78337. "es.symbol.async-iterator",
  78338. "es.symbol.has-instance",
  78339. "es.symbol.is-concat-spreadable",
  78340. "es.symbol.iterator",
  78341. "es.symbol.match",
  78342. "es.symbol.match-all",
  78343. "es.symbol.replace",
  78344. "es.symbol.search",
  78345. "es.symbol.species",
  78346. "es.symbol.split",
  78347. "es.symbol.to-primitive",
  78348. "es.symbol.to-string-tag",
  78349. "es.symbol.unscopables",
  78350. "es.array.concat",
  78351. "es.array.copy-within",
  78352. "es.array.every",
  78353. "es.array.fill",
  78354. "es.array.filter",
  78355. "es.array.find",
  78356. "es.array.find-index",
  78357. "es.array.flat",
  78358. "es.array.flat-map",
  78359. "es.array.for-each",
  78360. "es.array.from",
  78361. "es.array.includes",
  78362. "es.array.index-of",
  78363. "es.array.is-array",
  78364. "es.array.iterator",
  78365. "es.array.join",
  78366. "es.array.last-index-of",
  78367. "es.array.map",
  78368. "es.array.of",
  78369. "es.array.reduce",
  78370. "es.array.reduce-right",
  78371. "es.array.reverse",
  78372. "es.array.slice",
  78373. "es.array.some",
  78374. "es.array.sort",
  78375. "es.array.species",
  78376. "es.array.splice",
  78377. "es.array.unscopables.flat",
  78378. "es.array.unscopables.flat-map",
  78379. "es.array-buffer.constructor",
  78380. "es.array-buffer.is-view",
  78381. "es.array-buffer.slice",
  78382. "es.data-view",
  78383. "es.date.now",
  78384. "es.date.to-iso-string",
  78385. "es.date.to-json",
  78386. "es.date.to-primitive",
  78387. "es.date.to-string",
  78388. "es.function.bind",
  78389. "es.function.has-instance",
  78390. "es.function.name",
  78391. "es.global-this",
  78392. "es.json.stringify",
  78393. "es.json.to-string-tag",
  78394. "es.map",
  78395. "es.math.acosh",
  78396. "es.math.asinh",
  78397. "es.math.atanh",
  78398. "es.math.cbrt",
  78399. "es.math.clz32",
  78400. "es.math.cosh",
  78401. "es.math.expm1",
  78402. "es.math.fround",
  78403. "es.math.hypot",
  78404. "es.math.imul",
  78405. "es.math.log10",
  78406. "es.math.log1p",
  78407. "es.math.log2",
  78408. "es.math.sign",
  78409. "es.math.sinh",
  78410. "es.math.tanh",
  78411. "es.math.to-string-tag",
  78412. "es.math.trunc",
  78413. "es.number.constructor",
  78414. "es.number.epsilon",
  78415. "es.number.is-finite",
  78416. "es.number.is-integer",
  78417. "es.number.is-nan",
  78418. "es.number.is-safe-integer",
  78419. "es.number.max-safe-integer",
  78420. "es.number.min-safe-integer",
  78421. "es.number.parse-float",
  78422. "es.number.parse-int",
  78423. "es.number.to-fixed",
  78424. "es.number.to-precision",
  78425. "es.object.assign",
  78426. "es.object.create",
  78427. "es.object.define-getter",
  78428. "es.object.define-properties",
  78429. "es.object.define-property",
  78430. "es.object.define-setter",
  78431. "es.object.entries",
  78432. "es.object.freeze",
  78433. "es.object.from-entries",
  78434. "es.object.get-own-property-descriptor",
  78435. "es.object.get-own-property-descriptors",
  78436. "es.object.get-own-property-names",
  78437. "es.object.get-prototype-of",
  78438. "es.object.is",
  78439. "es.object.is-extensible",
  78440. "es.object.is-frozen",
  78441. "es.object.is-sealed",
  78442. "es.object.keys",
  78443. "es.object.lookup-getter",
  78444. "es.object.lookup-setter",
  78445. "es.object.prevent-extensions",
  78446. "es.object.seal",
  78447. "es.object.set-prototype-of",
  78448. "es.object.to-string",
  78449. "es.object.values",
  78450. "es.parse-float",
  78451. "es.parse-int",
  78452. "es.promise",
  78453. "es.promise.all-settled",
  78454. "es.promise.finally",
  78455. "es.reflect.apply",
  78456. "es.reflect.construct",
  78457. "es.reflect.define-property",
  78458. "es.reflect.delete-property",
  78459. "es.reflect.get",
  78460. "es.reflect.get-own-property-descriptor",
  78461. "es.reflect.get-prototype-of",
  78462. "es.reflect.has",
  78463. "es.reflect.is-extensible",
  78464. "es.reflect.own-keys",
  78465. "es.reflect.prevent-extensions",
  78466. "es.reflect.set",
  78467. "es.reflect.set-prototype-of",
  78468. "es.regexp.constructor",
  78469. "es.regexp.exec",
  78470. "es.regexp.flags",
  78471. "es.regexp.sticky",
  78472. "es.regexp.test",
  78473. "es.regexp.to-string",
  78474. "es.set",
  78475. "es.string.code-point-at",
  78476. "es.string.ends-with",
  78477. "es.string.from-code-point",
  78478. "es.string.includes",
  78479. "es.string.iterator",
  78480. "es.string.match",
  78481. "es.string.match-all",
  78482. "es.string.pad-end",
  78483. "es.string.pad-start",
  78484. "es.string.raw",
  78485. "es.string.repeat",
  78486. "es.string.replace",
  78487. "es.string.search",
  78488. "es.string.split",
  78489. "es.string.starts-with",
  78490. "es.string.trim",
  78491. "es.string.trim-end",
  78492. "es.string.trim-start",
  78493. "es.string.anchor",
  78494. "es.string.big",
  78495. "es.string.blink",
  78496. "es.string.bold",
  78497. "es.string.fixed",
  78498. "es.string.fontcolor",
  78499. "es.string.fontsize",
  78500. "es.string.italics",
  78501. "es.string.link",
  78502. "es.string.small",
  78503. "es.string.strike",
  78504. "es.string.sub",
  78505. "es.string.sup",
  78506. "es.typed-array.float32-array",
  78507. "es.typed-array.float64-array",
  78508. "es.typed-array.int8-array",
  78509. "es.typed-array.int16-array",
  78510. "es.typed-array.int32-array",
  78511. "es.typed-array.uint8-array",
  78512. "es.typed-array.uint8-clamped-array",
  78513. "es.typed-array.uint16-array",
  78514. "es.typed-array.uint32-array",
  78515. "es.typed-array.copy-within",
  78516. "es.typed-array.every",
  78517. "es.typed-array.fill",
  78518. "es.typed-array.filter",
  78519. "es.typed-array.find",
  78520. "es.typed-array.find-index",
  78521. "es.typed-array.for-each",
  78522. "es.typed-array.from",
  78523. "es.typed-array.includes",
  78524. "es.typed-array.index-of",
  78525. "es.typed-array.iterator",
  78526. "es.typed-array.join",
  78527. "es.typed-array.last-index-of",
  78528. "es.typed-array.map",
  78529. "es.typed-array.of",
  78530. "es.typed-array.reduce",
  78531. "es.typed-array.reduce-right",
  78532. "es.typed-array.reverse",
  78533. "es.typed-array.set",
  78534. "es.typed-array.slice",
  78535. "es.typed-array.some",
  78536. "es.typed-array.sort",
  78537. "es.typed-array.subarray",
  78538. "es.typed-array.to-locale-string",
  78539. "es.typed-array.to-string",
  78540. "es.weak-map",
  78541. "es.weak-set"
  78542. ],
  78543. "core-js/es/array": [
  78544. "es.array.concat",
  78545. "es.array.copy-within",
  78546. "es.array.every",
  78547. "es.array.fill",
  78548. "es.array.filter",
  78549. "es.array.find",
  78550. "es.array.find-index",
  78551. "es.array.flat",
  78552. "es.array.flat-map",
  78553. "es.array.for-each",
  78554. "es.array.from",
  78555. "es.array.includes",
  78556. "es.array.index-of",
  78557. "es.array.is-array",
  78558. "es.array.iterator",
  78559. "es.array.join",
  78560. "es.array.last-index-of",
  78561. "es.array.map",
  78562. "es.array.of",
  78563. "es.array.reduce",
  78564. "es.array.reduce-right",
  78565. "es.array.reverse",
  78566. "es.array.slice",
  78567. "es.array.some",
  78568. "es.array.sort",
  78569. "es.array.species",
  78570. "es.array.splice",
  78571. "es.array.unscopables.flat",
  78572. "es.array.unscopables.flat-map",
  78573. "es.string.iterator"
  78574. ],
  78575. "core-js/es/array-buffer": [
  78576. "es.array-buffer.constructor",
  78577. "es.array-buffer.is-view",
  78578. "es.array-buffer.slice",
  78579. "es.object.to-string"
  78580. ],
  78581. "core-js/es/array-buffer/constructor": [
  78582. "es.array-buffer.constructor",
  78583. "es.object.to-string"
  78584. ],
  78585. "core-js/es/array-buffer/is-view": [
  78586. "es.array-buffer.is-view"
  78587. ],
  78588. "core-js/es/array-buffer/slice": [
  78589. "es.array-buffer.slice"
  78590. ],
  78591. "core-js/es/array/concat": [
  78592. "es.array.concat"
  78593. ],
  78594. "core-js/es/array/copy-within": [
  78595. "es.array.copy-within"
  78596. ],
  78597. "core-js/es/array/entries": [
  78598. "es.array.iterator"
  78599. ],
  78600. "core-js/es/array/every": [
  78601. "es.array.every"
  78602. ],
  78603. "core-js/es/array/fill": [
  78604. "es.array.fill"
  78605. ],
  78606. "core-js/es/array/filter": [
  78607. "es.array.filter"
  78608. ],
  78609. "core-js/es/array/find": [
  78610. "es.array.find"
  78611. ],
  78612. "core-js/es/array/find-index": [
  78613. "es.array.find-index"
  78614. ],
  78615. "core-js/es/array/flat": [
  78616. "es.array.flat",
  78617. "es.array.unscopables.flat"
  78618. ],
  78619. "core-js/es/array/flat-map": [
  78620. "es.array.flat-map",
  78621. "es.array.unscopables.flat-map"
  78622. ],
  78623. "core-js/es/array/for-each": [
  78624. "es.array.for-each"
  78625. ],
  78626. "core-js/es/array/from": [
  78627. "es.array.from",
  78628. "es.string.iterator"
  78629. ],
  78630. "core-js/es/array/includes": [
  78631. "es.array.includes"
  78632. ],
  78633. "core-js/es/array/index-of": [
  78634. "es.array.index-of"
  78635. ],
  78636. "core-js/es/array/is-array": [
  78637. "es.array.is-array"
  78638. ],
  78639. "core-js/es/array/iterator": [
  78640. "es.array.iterator"
  78641. ],
  78642. "core-js/es/array/join": [
  78643. "es.array.join"
  78644. ],
  78645. "core-js/es/array/keys": [
  78646. "es.array.iterator"
  78647. ],
  78648. "core-js/es/array/last-index-of": [
  78649. "es.array.last-index-of"
  78650. ],
  78651. "core-js/es/array/map": [
  78652. "es.array.map"
  78653. ],
  78654. "core-js/es/array/of": [
  78655. "es.array.of"
  78656. ],
  78657. "core-js/es/array/reduce": [
  78658. "es.array.reduce"
  78659. ],
  78660. "core-js/es/array/reduce-right": [
  78661. "es.array.reduce-right"
  78662. ],
  78663. "core-js/es/array/reverse": [
  78664. "es.array.reverse"
  78665. ],
  78666. "core-js/es/array/slice": [
  78667. "es.array.slice"
  78668. ],
  78669. "core-js/es/array/some": [
  78670. "es.array.some"
  78671. ],
  78672. "core-js/es/array/sort": [
  78673. "es.array.sort"
  78674. ],
  78675. "core-js/es/array/splice": [
  78676. "es.array.splice"
  78677. ],
  78678. "core-js/es/array/values": [
  78679. "es.array.iterator"
  78680. ],
  78681. "core-js/es/array/virtual": [
  78682. "es.array.concat",
  78683. "es.array.copy-within",
  78684. "es.array.every",
  78685. "es.array.fill",
  78686. "es.array.filter",
  78687. "es.array.find",
  78688. "es.array.find-index",
  78689. "es.array.flat",
  78690. "es.array.flat-map",
  78691. "es.array.for-each",
  78692. "es.array.includes",
  78693. "es.array.index-of",
  78694. "es.array.iterator",
  78695. "es.array.join",
  78696. "es.array.last-index-of",
  78697. "es.array.map",
  78698. "es.array.reduce",
  78699. "es.array.reduce-right",
  78700. "es.array.reverse",
  78701. "es.array.slice",
  78702. "es.array.some",
  78703. "es.array.sort",
  78704. "es.array.species",
  78705. "es.array.splice",
  78706. "es.array.unscopables.flat",
  78707. "es.array.unscopables.flat-map"
  78708. ],
  78709. "core-js/es/array/virtual/concat": [
  78710. "es.array.concat"
  78711. ],
  78712. "core-js/es/array/virtual/copy-within": [
  78713. "es.array.copy-within"
  78714. ],
  78715. "core-js/es/array/virtual/entries": [
  78716. "es.array.iterator"
  78717. ],
  78718. "core-js/es/array/virtual/every": [
  78719. "es.array.every"
  78720. ],
  78721. "core-js/es/array/virtual/fill": [
  78722. "es.array.fill"
  78723. ],
  78724. "core-js/es/array/virtual/filter": [
  78725. "es.array.filter"
  78726. ],
  78727. "core-js/es/array/virtual/find": [
  78728. "es.array.find"
  78729. ],
  78730. "core-js/es/array/virtual/find-index": [
  78731. "es.array.find-index"
  78732. ],
  78733. "core-js/es/array/virtual/flat": [
  78734. "es.array.flat",
  78735. "es.array.unscopables.flat"
  78736. ],
  78737. "core-js/es/array/virtual/flat-map": [
  78738. "es.array.flat-map",
  78739. "es.array.unscopables.flat-map"
  78740. ],
  78741. "core-js/es/array/virtual/for-each": [
  78742. "es.array.for-each"
  78743. ],
  78744. "core-js/es/array/virtual/includes": [
  78745. "es.array.includes"
  78746. ],
  78747. "core-js/es/array/virtual/index-of": [
  78748. "es.array.index-of"
  78749. ],
  78750. "core-js/es/array/virtual/iterator": [
  78751. "es.array.iterator"
  78752. ],
  78753. "core-js/es/array/virtual/join": [
  78754. "es.array.join"
  78755. ],
  78756. "core-js/es/array/virtual/keys": [
  78757. "es.array.iterator"
  78758. ],
  78759. "core-js/es/array/virtual/last-index-of": [
  78760. "es.array.last-index-of"
  78761. ],
  78762. "core-js/es/array/virtual/map": [
  78763. "es.array.map"
  78764. ],
  78765. "core-js/es/array/virtual/reduce": [
  78766. "es.array.reduce"
  78767. ],
  78768. "core-js/es/array/virtual/reduce-right": [
  78769. "es.array.reduce-right"
  78770. ],
  78771. "core-js/es/array/virtual/reverse": [
  78772. "es.array.reverse"
  78773. ],
  78774. "core-js/es/array/virtual/slice": [
  78775. "es.array.slice"
  78776. ],
  78777. "core-js/es/array/virtual/some": [
  78778. "es.array.some"
  78779. ],
  78780. "core-js/es/array/virtual/sort": [
  78781. "es.array.sort"
  78782. ],
  78783. "core-js/es/array/virtual/splice": [
  78784. "es.array.splice"
  78785. ],
  78786. "core-js/es/array/virtual/values": [
  78787. "es.array.iterator"
  78788. ],
  78789. "core-js/es/data-view": [
  78790. "es.data-view",
  78791. "es.object.to-string"
  78792. ],
  78793. "core-js/es/date": [
  78794. "es.date.now",
  78795. "es.date.to-iso-string",
  78796. "es.date.to-json",
  78797. "es.date.to-primitive",
  78798. "es.date.to-string"
  78799. ],
  78800. "core-js/es/date/now": [
  78801. "es.date.now"
  78802. ],
  78803. "core-js/es/date/to-iso-string": [
  78804. "es.date.to-iso-string",
  78805. "es.date.to-json"
  78806. ],
  78807. "core-js/es/date/to-json": [
  78808. "es.date.to-json"
  78809. ],
  78810. "core-js/es/date/to-primitive": [
  78811. "es.date.to-primitive"
  78812. ],
  78813. "core-js/es/date/to-string": [
  78814. "es.date.to-string"
  78815. ],
  78816. "core-js/es/function": [
  78817. "es.function.bind",
  78818. "es.function.has-instance",
  78819. "es.function.name"
  78820. ],
  78821. "core-js/es/function/bind": [
  78822. "es.function.bind"
  78823. ],
  78824. "core-js/es/function/has-instance": [
  78825. "es.function.has-instance"
  78826. ],
  78827. "core-js/es/function/name": [
  78828. "es.function.name"
  78829. ],
  78830. "core-js/es/function/virtual": [
  78831. "es.function.bind"
  78832. ],
  78833. "core-js/es/function/virtual/bind": [
  78834. "es.function.bind"
  78835. ],
  78836. "core-js/es/global-this": [
  78837. "es.global-this"
  78838. ],
  78839. "core-js/es/instance/bind": [
  78840. "es.function.bind"
  78841. ],
  78842. "core-js/es/instance/code-point-at": [
  78843. "es.string.code-point-at"
  78844. ],
  78845. "core-js/es/instance/concat": [
  78846. "es.array.concat"
  78847. ],
  78848. "core-js/es/instance/copy-within": [
  78849. "es.array.copy-within"
  78850. ],
  78851. "core-js/es/instance/ends-with": [
  78852. "es.string.ends-with"
  78853. ],
  78854. "core-js/es/instance/entries": [
  78855. "es.array.iterator"
  78856. ],
  78857. "core-js/es/instance/every": [
  78858. "es.array.every"
  78859. ],
  78860. "core-js/es/instance/fill": [
  78861. "es.array.fill"
  78862. ],
  78863. "core-js/es/instance/filter": [
  78864. "es.array.filter"
  78865. ],
  78866. "core-js/es/instance/find": [
  78867. "es.array.find"
  78868. ],
  78869. "core-js/es/instance/find-index": [
  78870. "es.array.find-index"
  78871. ],
  78872. "core-js/es/instance/flags": [
  78873. "es.regexp.flags"
  78874. ],
  78875. "core-js/es/instance/flat": [
  78876. "es.array.flat",
  78877. "es.array.unscopables.flat"
  78878. ],
  78879. "core-js/es/instance/flat-map": [
  78880. "es.array.flat-map",
  78881. "es.array.unscopables.flat-map"
  78882. ],
  78883. "core-js/es/instance/for-each": [
  78884. "es.array.for-each"
  78885. ],
  78886. "core-js/es/instance/includes": [
  78887. "es.array.includes",
  78888. "es.string.includes"
  78889. ],
  78890. "core-js/es/instance/index-of": [
  78891. "es.array.index-of"
  78892. ],
  78893. "core-js/es/instance/keys": [
  78894. "es.array.iterator"
  78895. ],
  78896. "core-js/es/instance/last-index-of": [
  78897. "es.array.last-index-of"
  78898. ],
  78899. "core-js/es/instance/map": [
  78900. "es.array.map"
  78901. ],
  78902. "core-js/es/instance/match-all": [
  78903. "es.string.match-all"
  78904. ],
  78905. "core-js/es/instance/pad-end": [
  78906. "es.string.pad-end"
  78907. ],
  78908. "core-js/es/instance/pad-start": [
  78909. "es.string.pad-start"
  78910. ],
  78911. "core-js/es/instance/reduce": [
  78912. "es.array.reduce"
  78913. ],
  78914. "core-js/es/instance/reduce-right": [
  78915. "es.array.reduce-right"
  78916. ],
  78917. "core-js/es/instance/repeat": [
  78918. "es.string.repeat"
  78919. ],
  78920. "core-js/es/instance/reverse": [
  78921. "es.array.reverse"
  78922. ],
  78923. "core-js/es/instance/slice": [
  78924. "es.array.slice"
  78925. ],
  78926. "core-js/es/instance/some": [
  78927. "es.array.some"
  78928. ],
  78929. "core-js/es/instance/sort": [
  78930. "es.array.sort"
  78931. ],
  78932. "core-js/es/instance/splice": [
  78933. "es.array.splice"
  78934. ],
  78935. "core-js/es/instance/starts-with": [
  78936. "es.string.starts-with"
  78937. ],
  78938. "core-js/es/instance/trim": [
  78939. "es.string.trim"
  78940. ],
  78941. "core-js/es/instance/trim-end": [
  78942. "es.string.trim-end"
  78943. ],
  78944. "core-js/es/instance/trim-left": [
  78945. "es.string.trim-start"
  78946. ],
  78947. "core-js/es/instance/trim-right": [
  78948. "es.string.trim-end"
  78949. ],
  78950. "core-js/es/instance/trim-start": [
  78951. "es.string.trim-start"
  78952. ],
  78953. "core-js/es/instance/values": [
  78954. "es.array.iterator"
  78955. ],
  78956. "core-js/es/json": [
  78957. "es.json.stringify",
  78958. "es.json.to-string-tag"
  78959. ],
  78960. "core-js/es/json/stringify": [
  78961. "es.json.stringify"
  78962. ],
  78963. "core-js/es/json/to-string-tag": [
  78964. "es.json.to-string-tag"
  78965. ],
  78966. "core-js/es/map": [
  78967. "es.map",
  78968. "es.object.to-string",
  78969. "es.string.iterator",
  78970. "web.dom-collections.iterator"
  78971. ],
  78972. "core-js/es/math": [
  78973. "es.math.acosh",
  78974. "es.math.asinh",
  78975. "es.math.atanh",
  78976. "es.math.cbrt",
  78977. "es.math.clz32",
  78978. "es.math.cosh",
  78979. "es.math.expm1",
  78980. "es.math.fround",
  78981. "es.math.hypot",
  78982. "es.math.imul",
  78983. "es.math.log10",
  78984. "es.math.log1p",
  78985. "es.math.log2",
  78986. "es.math.sign",
  78987. "es.math.sinh",
  78988. "es.math.tanh",
  78989. "es.math.to-string-tag",
  78990. "es.math.trunc"
  78991. ],
  78992. "core-js/es/math/acosh": [
  78993. "es.math.acosh"
  78994. ],
  78995. "core-js/es/math/asinh": [
  78996. "es.math.asinh"
  78997. ],
  78998. "core-js/es/math/atanh": [
  78999. "es.math.atanh"
  79000. ],
  79001. "core-js/es/math/cbrt": [
  79002. "es.math.cbrt"
  79003. ],
  79004. "core-js/es/math/clz32": [
  79005. "es.math.clz32"
  79006. ],
  79007. "core-js/es/math/cosh": [
  79008. "es.math.cosh"
  79009. ],
  79010. "core-js/es/math/expm1": [
  79011. "es.math.expm1"
  79012. ],
  79013. "core-js/es/math/fround": [
  79014. "es.math.fround"
  79015. ],
  79016. "core-js/es/math/hypot": [
  79017. "es.math.hypot"
  79018. ],
  79019. "core-js/es/math/imul": [
  79020. "es.math.imul"
  79021. ],
  79022. "core-js/es/math/log10": [
  79023. "es.math.log10"
  79024. ],
  79025. "core-js/es/math/log1p": [
  79026. "es.math.log1p"
  79027. ],
  79028. "core-js/es/math/log2": [
  79029. "es.math.log2"
  79030. ],
  79031. "core-js/es/math/sign": [
  79032. "es.math.sign"
  79033. ],
  79034. "core-js/es/math/sinh": [
  79035. "es.math.sinh"
  79036. ],
  79037. "core-js/es/math/tanh": [
  79038. "es.math.tanh"
  79039. ],
  79040. "core-js/es/math/to-string-tag": [
  79041. "es.math.to-string-tag"
  79042. ],
  79043. "core-js/es/math/trunc": [
  79044. "es.math.trunc"
  79045. ],
  79046. "core-js/es/number": [
  79047. "es.number.constructor",
  79048. "es.number.epsilon",
  79049. "es.number.is-finite",
  79050. "es.number.is-integer",
  79051. "es.number.is-nan",
  79052. "es.number.is-safe-integer",
  79053. "es.number.max-safe-integer",
  79054. "es.number.min-safe-integer",
  79055. "es.number.parse-float",
  79056. "es.number.parse-int",
  79057. "es.number.to-fixed",
  79058. "es.number.to-precision"
  79059. ],
  79060. "core-js/es/number/constructor": [
  79061. "es.number.constructor"
  79062. ],
  79063. "core-js/es/number/epsilon": [
  79064. "es.number.epsilon"
  79065. ],
  79066. "core-js/es/number/is-finite": [
  79067. "es.number.is-finite"
  79068. ],
  79069. "core-js/es/number/is-integer": [
  79070. "es.number.is-integer"
  79071. ],
  79072. "core-js/es/number/is-nan": [
  79073. "es.number.is-nan"
  79074. ],
  79075. "core-js/es/number/is-safe-integer": [
  79076. "es.number.is-safe-integer"
  79077. ],
  79078. "core-js/es/number/max-safe-integer": [
  79079. "es.number.max-safe-integer"
  79080. ],
  79081. "core-js/es/number/min-safe-integer": [
  79082. "es.number.min-safe-integer"
  79083. ],
  79084. "core-js/es/number/parse-float": [
  79085. "es.number.parse-float"
  79086. ],
  79087. "core-js/es/number/parse-int": [
  79088. "es.number.parse-int"
  79089. ],
  79090. "core-js/es/number/to-fixed": [
  79091. "es.number.to-fixed"
  79092. ],
  79093. "core-js/es/number/to-precision": [
  79094. "es.number.to-precision"
  79095. ],
  79096. "core-js/es/number/virtual": [
  79097. "es.number.to-fixed",
  79098. "es.number.to-precision"
  79099. ],
  79100. "core-js/es/number/virtual/to-fixed": [
  79101. "es.number.to-fixed"
  79102. ],
  79103. "core-js/es/number/virtual/to-precision": [
  79104. "es.number.to-precision"
  79105. ],
  79106. "core-js/es/object": [
  79107. "es.symbol",
  79108. "es.json.to-string-tag",
  79109. "es.math.to-string-tag",
  79110. "es.object.assign",
  79111. "es.object.create",
  79112. "es.object.define-getter",
  79113. "es.object.define-properties",
  79114. "es.object.define-property",
  79115. "es.object.define-setter",
  79116. "es.object.entries",
  79117. "es.object.freeze",
  79118. "es.object.from-entries",
  79119. "es.object.get-own-property-descriptor",
  79120. "es.object.get-own-property-descriptors",
  79121. "es.object.get-own-property-names",
  79122. "es.object.get-prototype-of",
  79123. "es.object.is",
  79124. "es.object.is-extensible",
  79125. "es.object.is-frozen",
  79126. "es.object.is-sealed",
  79127. "es.object.keys",
  79128. "es.object.lookup-getter",
  79129. "es.object.lookup-setter",
  79130. "es.object.prevent-extensions",
  79131. "es.object.seal",
  79132. "es.object.set-prototype-of",
  79133. "es.object.to-string",
  79134. "es.object.values"
  79135. ],
  79136. "core-js/es/object/assign": [
  79137. "es.object.assign"
  79138. ],
  79139. "core-js/es/object/create": [
  79140. "es.object.create"
  79141. ],
  79142. "core-js/es/object/define-getter": [
  79143. "es.object.define-getter"
  79144. ],
  79145. "core-js/es/object/define-properties": [
  79146. "es.object.define-properties"
  79147. ],
  79148. "core-js/es/object/define-property": [
  79149. "es.object.define-property"
  79150. ],
  79151. "core-js/es/object/define-setter": [
  79152. "es.object.define-setter"
  79153. ],
  79154. "core-js/es/object/entries": [
  79155. "es.object.entries"
  79156. ],
  79157. "core-js/es/object/freeze": [
  79158. "es.object.freeze"
  79159. ],
  79160. "core-js/es/object/from-entries": [
  79161. "es.array.iterator",
  79162. "es.object.from-entries"
  79163. ],
  79164. "core-js/es/object/get-own-property-descriptor": [
  79165. "es.object.get-own-property-descriptor"
  79166. ],
  79167. "core-js/es/object/get-own-property-descriptors": [
  79168. "es.object.get-own-property-descriptors"
  79169. ],
  79170. "core-js/es/object/get-own-property-names": [
  79171. "es.object.get-own-property-names"
  79172. ],
  79173. "core-js/es/object/get-own-property-symbols": [
  79174. "es.symbol"
  79175. ],
  79176. "core-js/es/object/get-prototype-of": [
  79177. "es.object.get-prototype-of"
  79178. ],
  79179. "core-js/es/object/is": [
  79180. "es.object.is"
  79181. ],
  79182. "core-js/es/object/is-extensible": [
  79183. "es.object.is-extensible"
  79184. ],
  79185. "core-js/es/object/is-frozen": [
  79186. "es.object.is-frozen"
  79187. ],
  79188. "core-js/es/object/is-sealed": [
  79189. "es.object.is-sealed"
  79190. ],
  79191. "core-js/es/object/keys": [
  79192. "es.object.keys"
  79193. ],
  79194. "core-js/es/object/lookup-getter": [
  79195. "es.object.lookup-setter"
  79196. ],
  79197. "core-js/es/object/lookup-setter": [
  79198. "es.object.lookup-setter"
  79199. ],
  79200. "core-js/es/object/prevent-extensions": [
  79201. "es.object.prevent-extensions"
  79202. ],
  79203. "core-js/es/object/seal": [
  79204. "es.object.seal"
  79205. ],
  79206. "core-js/es/object/set-prototype-of": [
  79207. "es.object.set-prototype-of"
  79208. ],
  79209. "core-js/es/object/to-string": [
  79210. "es.json.to-string-tag",
  79211. "es.math.to-string-tag",
  79212. "es.object.to-string"
  79213. ],
  79214. "core-js/es/object/values": [
  79215. "es.object.values"
  79216. ],
  79217. "core-js/es/parse-float": [
  79218. "es.parse-float"
  79219. ],
  79220. "core-js/es/parse-int": [
  79221. "es.parse-int"
  79222. ],
  79223. "core-js/es/promise": [
  79224. "es.object.to-string",
  79225. "es.promise",
  79226. "es.promise.all-settled",
  79227. "es.promise.finally",
  79228. "es.string.iterator",
  79229. "web.dom-collections.iterator"
  79230. ],
  79231. "core-js/es/promise/all-settled": [
  79232. "es.promise",
  79233. "es.promise.all-settled"
  79234. ],
  79235. "core-js/es/promise/finally": [
  79236. "es.promise",
  79237. "es.promise.finally"
  79238. ],
  79239. "core-js/es/reflect": [
  79240. "es.reflect.apply",
  79241. "es.reflect.construct",
  79242. "es.reflect.define-property",
  79243. "es.reflect.delete-property",
  79244. "es.reflect.get",
  79245. "es.reflect.get-own-property-descriptor",
  79246. "es.reflect.get-prototype-of",
  79247. "es.reflect.has",
  79248. "es.reflect.is-extensible",
  79249. "es.reflect.own-keys",
  79250. "es.reflect.prevent-extensions",
  79251. "es.reflect.set",
  79252. "es.reflect.set-prototype-of"
  79253. ],
  79254. "core-js/es/reflect/apply": [
  79255. "es.reflect.apply"
  79256. ],
  79257. "core-js/es/reflect/construct": [
  79258. "es.reflect.construct"
  79259. ],
  79260. "core-js/es/reflect/define-property": [
  79261. "es.reflect.define-property"
  79262. ],
  79263. "core-js/es/reflect/delete-property": [
  79264. "es.reflect.delete-property"
  79265. ],
  79266. "core-js/es/reflect/get": [
  79267. "es.reflect.get"
  79268. ],
  79269. "core-js/es/reflect/get-own-property-descriptor": [
  79270. "es.reflect.get-own-property-descriptor"
  79271. ],
  79272. "core-js/es/reflect/get-prototype-of": [
  79273. "es.reflect.get-prototype-of"
  79274. ],
  79275. "core-js/es/reflect/has": [
  79276. "es.reflect.has"
  79277. ],
  79278. "core-js/es/reflect/is-extensible": [
  79279. "es.reflect.is-extensible"
  79280. ],
  79281. "core-js/es/reflect/own-keys": [
  79282. "es.reflect.own-keys"
  79283. ],
  79284. "core-js/es/reflect/prevent-extensions": [
  79285. "es.reflect.prevent-extensions"
  79286. ],
  79287. "core-js/es/reflect/set": [
  79288. "es.reflect.set"
  79289. ],
  79290. "core-js/es/reflect/set-prototype-of": [
  79291. "es.reflect.set-prototype-of"
  79292. ],
  79293. "core-js/es/regexp": [
  79294. "es.regexp.constructor",
  79295. "es.regexp.exec",
  79296. "es.regexp.flags",
  79297. "es.regexp.sticky",
  79298. "es.regexp.test",
  79299. "es.regexp.to-string",
  79300. "es.string.match",
  79301. "es.string.replace",
  79302. "es.string.search",
  79303. "es.string.split"
  79304. ],
  79305. "core-js/es/regexp/constructor": [
  79306. "es.regexp.constructor"
  79307. ],
  79308. "core-js/es/regexp/flags": [
  79309. "es.regexp.flags"
  79310. ],
  79311. "core-js/es/regexp/match": [
  79312. "es.string.match"
  79313. ],
  79314. "core-js/es/regexp/replace": [
  79315. "es.string.replace"
  79316. ],
  79317. "core-js/es/regexp/search": [
  79318. "es.string.search"
  79319. ],
  79320. "core-js/es/regexp/split": [
  79321. "es.string.split"
  79322. ],
  79323. "core-js/es/regexp/sticky": [
  79324. "es.regexp.sticky"
  79325. ],
  79326. "core-js/es/regexp/test": [
  79327. "es.regexp.exec",
  79328. "es.regexp.test"
  79329. ],
  79330. "core-js/es/regexp/to-string": [
  79331. "es.regexp.to-string"
  79332. ],
  79333. "core-js/es/set": [
  79334. "es.object.to-string",
  79335. "es.set",
  79336. "es.string.iterator",
  79337. "web.dom-collections.iterator"
  79338. ],
  79339. "core-js/es/string": [
  79340. "es.regexp.exec",
  79341. "es.string.code-point-at",
  79342. "es.string.ends-with",
  79343. "es.string.from-code-point",
  79344. "es.string.includes",
  79345. "es.string.iterator",
  79346. "es.string.match",
  79347. "es.string.match-all",
  79348. "es.string.pad-end",
  79349. "es.string.pad-start",
  79350. "es.string.raw",
  79351. "es.string.repeat",
  79352. "es.string.replace",
  79353. "es.string.search",
  79354. "es.string.split",
  79355. "es.string.starts-with",
  79356. "es.string.trim",
  79357. "es.string.trim-end",
  79358. "es.string.trim-start",
  79359. "es.string.anchor",
  79360. "es.string.big",
  79361. "es.string.blink",
  79362. "es.string.bold",
  79363. "es.string.fixed",
  79364. "es.string.fontcolor",
  79365. "es.string.fontsize",
  79366. "es.string.italics",
  79367. "es.string.link",
  79368. "es.string.small",
  79369. "es.string.strike",
  79370. "es.string.sub",
  79371. "es.string.sup"
  79372. ],
  79373. "core-js/es/string/anchor": [
  79374. "es.string.anchor"
  79375. ],
  79376. "core-js/es/string/big": [
  79377. "es.string.big"
  79378. ],
  79379. "core-js/es/string/blink": [
  79380. "es.string.blink"
  79381. ],
  79382. "core-js/es/string/bold": [
  79383. "es.string.bold"
  79384. ],
  79385. "core-js/es/string/code-point-at": [
  79386. "es.string.code-point-at"
  79387. ],
  79388. "core-js/es/string/ends-with": [
  79389. "es.string.ends-with"
  79390. ],
  79391. "core-js/es/string/fixed": [
  79392. "es.string.fixed"
  79393. ],
  79394. "core-js/es/string/fontcolor": [
  79395. "es.string.fontcolor"
  79396. ],
  79397. "core-js/es/string/fontsize": [
  79398. "es.string.fontsize"
  79399. ],
  79400. "core-js/es/string/from-code-point": [
  79401. "es.string.from-code-point"
  79402. ],
  79403. "core-js/es/string/includes": [
  79404. "es.string.includes"
  79405. ],
  79406. "core-js/es/string/italics": [
  79407. "es.string.italics"
  79408. ],
  79409. "core-js/es/string/iterator": [
  79410. "es.string.iterator"
  79411. ],
  79412. "core-js/es/string/link": [
  79413. "es.string.link"
  79414. ],
  79415. "core-js/es/string/match": [
  79416. "es.regexp.exec",
  79417. "es.string.match"
  79418. ],
  79419. "core-js/es/string/match-all": [
  79420. "es.string.match-all"
  79421. ],
  79422. "core-js/es/string/pad-end": [
  79423. "es.string.pad-end"
  79424. ],
  79425. "core-js/es/string/pad-start": [
  79426. "es.string.pad-start"
  79427. ],
  79428. "core-js/es/string/raw": [
  79429. "es.string.raw"
  79430. ],
  79431. "core-js/es/string/repeat": [
  79432. "es.string.repeat"
  79433. ],
  79434. "core-js/es/string/replace": [
  79435. "es.regexp.exec",
  79436. "es.string.replace"
  79437. ],
  79438. "core-js/es/string/search": [
  79439. "es.regexp.exec",
  79440. "es.string.search"
  79441. ],
  79442. "core-js/es/string/small": [
  79443. "es.string.small"
  79444. ],
  79445. "core-js/es/string/split": [
  79446. "es.regexp.exec",
  79447. "es.string.split"
  79448. ],
  79449. "core-js/es/string/starts-with": [
  79450. "es.string.starts-with"
  79451. ],
  79452. "core-js/es/string/strike": [
  79453. "es.string.strike"
  79454. ],
  79455. "core-js/es/string/sub": [
  79456. "es.string.sub"
  79457. ],
  79458. "core-js/es/string/sup": [
  79459. "es.string.sup"
  79460. ],
  79461. "core-js/es/string/trim": [
  79462. "es.string.trim"
  79463. ],
  79464. "core-js/es/string/trim-end": [
  79465. "es.string.trim-end"
  79466. ],
  79467. "core-js/es/string/trim-left": [
  79468. "es.string.trim-start"
  79469. ],
  79470. "core-js/es/string/trim-right": [
  79471. "es.string.trim-end"
  79472. ],
  79473. "core-js/es/string/trim-start": [
  79474. "es.string.trim-start"
  79475. ],
  79476. "core-js/es/string/virtual": [
  79477. "es.string.code-point-at",
  79478. "es.string.ends-with",
  79479. "es.string.includes",
  79480. "es.string.iterator",
  79481. "es.string.match",
  79482. "es.string.match-all",
  79483. "es.string.pad-end",
  79484. "es.string.pad-start",
  79485. "es.string.repeat",
  79486. "es.string.replace",
  79487. "es.string.search",
  79488. "es.string.split",
  79489. "es.string.starts-with",
  79490. "es.string.trim",
  79491. "es.string.trim-end",
  79492. "es.string.trim-start",
  79493. "es.string.anchor",
  79494. "es.string.big",
  79495. "es.string.blink",
  79496. "es.string.bold",
  79497. "es.string.fixed",
  79498. "es.string.fontcolor",
  79499. "es.string.fontsize",
  79500. "es.string.italics",
  79501. "es.string.link",
  79502. "es.string.small",
  79503. "es.string.strike",
  79504. "es.string.sub",
  79505. "es.string.sup"
  79506. ],
  79507. "core-js/es/string/virtual/anchor": [
  79508. "es.string.anchor"
  79509. ],
  79510. "core-js/es/string/virtual/big": [
  79511. "es.string.big"
  79512. ],
  79513. "core-js/es/string/virtual/blink": [
  79514. "es.string.blink"
  79515. ],
  79516. "core-js/es/string/virtual/bold": [
  79517. "es.string.bold"
  79518. ],
  79519. "core-js/es/string/virtual/code-point-at": [
  79520. "es.string.code-point-at"
  79521. ],
  79522. "core-js/es/string/virtual/ends-with": [
  79523. "es.string.ends-with"
  79524. ],
  79525. "core-js/es/string/virtual/fixed": [
  79526. "es.string.fixed"
  79527. ],
  79528. "core-js/es/string/virtual/fontcolor": [
  79529. "es.string.fontcolor"
  79530. ],
  79531. "core-js/es/string/virtual/fontsize": [
  79532. "es.string.fontsize"
  79533. ],
  79534. "core-js/es/string/virtual/includes": [
  79535. "es.string.includes"
  79536. ],
  79537. "core-js/es/string/virtual/italics": [
  79538. "es.string.italics"
  79539. ],
  79540. "core-js/es/string/virtual/iterator": [
  79541. "es.string.iterator"
  79542. ],
  79543. "core-js/es/string/virtual/link": [
  79544. "es.string.link"
  79545. ],
  79546. "core-js/es/string/virtual/match-all": [
  79547. "es.string.match-all"
  79548. ],
  79549. "core-js/es/string/virtual/pad-end": [
  79550. "es.string.pad-end"
  79551. ],
  79552. "core-js/es/string/virtual/pad-start": [
  79553. "es.string.pad-start"
  79554. ],
  79555. "core-js/es/string/virtual/repeat": [
  79556. "es.string.repeat"
  79557. ],
  79558. "core-js/es/string/virtual/small": [
  79559. "es.string.small"
  79560. ],
  79561. "core-js/es/string/virtual/starts-with": [
  79562. "es.string.starts-with"
  79563. ],
  79564. "core-js/es/string/virtual/strike": [
  79565. "es.string.strike"
  79566. ],
  79567. "core-js/es/string/virtual/sub": [
  79568. "es.string.sub"
  79569. ],
  79570. "core-js/es/string/virtual/sup": [
  79571. "es.string.sup"
  79572. ],
  79573. "core-js/es/string/virtual/trim": [
  79574. "es.string.trim"
  79575. ],
  79576. "core-js/es/string/virtual/trim-end": [
  79577. "es.string.trim-end"
  79578. ],
  79579. "core-js/es/string/virtual/trim-left": [
  79580. "es.string.trim-start"
  79581. ],
  79582. "core-js/es/string/virtual/trim-right": [
  79583. "es.string.trim-end"
  79584. ],
  79585. "core-js/es/string/virtual/trim-start": [
  79586. "es.string.trim-start"
  79587. ],
  79588. "core-js/es/symbol": [
  79589. "es.symbol",
  79590. "es.symbol.description",
  79591. "es.symbol.async-iterator",
  79592. "es.symbol.has-instance",
  79593. "es.symbol.is-concat-spreadable",
  79594. "es.symbol.iterator",
  79595. "es.symbol.match",
  79596. "es.symbol.match-all",
  79597. "es.symbol.replace",
  79598. "es.symbol.search",
  79599. "es.symbol.species",
  79600. "es.symbol.split",
  79601. "es.symbol.to-primitive",
  79602. "es.symbol.to-string-tag",
  79603. "es.symbol.unscopables",
  79604. "es.array.concat",
  79605. "es.json.to-string-tag",
  79606. "es.math.to-string-tag",
  79607. "es.object.to-string"
  79608. ],
  79609. "core-js/es/symbol/async-iterator": [
  79610. "es.symbol.async-iterator"
  79611. ],
  79612. "core-js/es/symbol/description": [
  79613. "es.symbol.description"
  79614. ],
  79615. "core-js/es/symbol/for": [
  79616. "es.symbol"
  79617. ],
  79618. "core-js/es/symbol/has-instance": [
  79619. "es.symbol.has-instance",
  79620. "es.function.has-instance"
  79621. ],
  79622. "core-js/es/symbol/is-concat-spreadable": [
  79623. "es.symbol.is-concat-spreadable",
  79624. "es.array.concat"
  79625. ],
  79626. "core-js/es/symbol/iterator": [
  79627. "es.symbol.iterator",
  79628. "es.string.iterator",
  79629. "web.dom-collections.iterator"
  79630. ],
  79631. "core-js/es/symbol/key-for": [
  79632. "es.symbol"
  79633. ],
  79634. "core-js/es/symbol/match": [
  79635. "es.symbol.match",
  79636. "es.string.match"
  79637. ],
  79638. "core-js/es/symbol/match-all": [
  79639. "es.symbol.match-all",
  79640. "es.string.match-all"
  79641. ],
  79642. "core-js/es/symbol/replace": [
  79643. "es.symbol.replace",
  79644. "es.string.replace"
  79645. ],
  79646. "core-js/es/symbol/search": [
  79647. "es.symbol.search",
  79648. "es.string.search"
  79649. ],
  79650. "core-js/es/symbol/species": [
  79651. "es.symbol.species"
  79652. ],
  79653. "core-js/es/symbol/split": [
  79654. "es.symbol.split",
  79655. "es.string.split"
  79656. ],
  79657. "core-js/es/symbol/to-primitive": [
  79658. "es.symbol.to-primitive"
  79659. ],
  79660. "core-js/es/symbol/to-string-tag": [
  79661. "es.symbol.to-string-tag",
  79662. "es.json.to-string-tag",
  79663. "es.math.to-string-tag",
  79664. "es.object.to-string"
  79665. ],
  79666. "core-js/es/symbol/unscopables": [
  79667. "es.symbol.unscopables"
  79668. ],
  79669. "core-js/es/typed-array": [
  79670. "es.object.to-string",
  79671. "es.typed-array.float32-array",
  79672. "es.typed-array.float64-array",
  79673. "es.typed-array.int8-array",
  79674. "es.typed-array.int16-array",
  79675. "es.typed-array.int32-array",
  79676. "es.typed-array.uint8-array",
  79677. "es.typed-array.uint8-clamped-array",
  79678. "es.typed-array.uint16-array",
  79679. "es.typed-array.uint32-array",
  79680. "es.typed-array.copy-within",
  79681. "es.typed-array.every",
  79682. "es.typed-array.fill",
  79683. "es.typed-array.filter",
  79684. "es.typed-array.find",
  79685. "es.typed-array.find-index",
  79686. "es.typed-array.for-each",
  79687. "es.typed-array.from",
  79688. "es.typed-array.includes",
  79689. "es.typed-array.index-of",
  79690. "es.typed-array.iterator",
  79691. "es.typed-array.join",
  79692. "es.typed-array.last-index-of",
  79693. "es.typed-array.map",
  79694. "es.typed-array.of",
  79695. "es.typed-array.reduce",
  79696. "es.typed-array.reduce-right",
  79697. "es.typed-array.reverse",
  79698. "es.typed-array.set",
  79699. "es.typed-array.slice",
  79700. "es.typed-array.some",
  79701. "es.typed-array.sort",
  79702. "es.typed-array.subarray",
  79703. "es.typed-array.to-locale-string",
  79704. "es.typed-array.to-string"
  79705. ],
  79706. "core-js/es/typed-array/copy-within": [
  79707. "es.typed-array.copy-within"
  79708. ],
  79709. "core-js/es/typed-array/entries": [
  79710. "es.typed-array.iterator"
  79711. ],
  79712. "core-js/es/typed-array/every": [
  79713. "es.typed-array.every"
  79714. ],
  79715. "core-js/es/typed-array/fill": [
  79716. "es.typed-array.fill"
  79717. ],
  79718. "core-js/es/typed-array/filter": [
  79719. "es.typed-array.filter"
  79720. ],
  79721. "core-js/es/typed-array/find": [
  79722. "es.typed-array.find"
  79723. ],
  79724. "core-js/es/typed-array/find-index": [
  79725. "es.typed-array.find-index"
  79726. ],
  79727. "core-js/es/typed-array/float32-array": [
  79728. "es.object.to-string",
  79729. "es.typed-array.float32-array",
  79730. "es.typed-array.copy-within",
  79731. "es.typed-array.every",
  79732. "es.typed-array.fill",
  79733. "es.typed-array.filter",
  79734. "es.typed-array.find",
  79735. "es.typed-array.find-index",
  79736. "es.typed-array.for-each",
  79737. "es.typed-array.from",
  79738. "es.typed-array.includes",
  79739. "es.typed-array.index-of",
  79740. "es.typed-array.iterator",
  79741. "es.typed-array.join",
  79742. "es.typed-array.last-index-of",
  79743. "es.typed-array.map",
  79744. "es.typed-array.of",
  79745. "es.typed-array.reduce",
  79746. "es.typed-array.reduce-right",
  79747. "es.typed-array.reverse",
  79748. "es.typed-array.set",
  79749. "es.typed-array.slice",
  79750. "es.typed-array.some",
  79751. "es.typed-array.sort",
  79752. "es.typed-array.subarray",
  79753. "es.typed-array.to-locale-string",
  79754. "es.typed-array.to-string"
  79755. ],
  79756. "core-js/es/typed-array/float64-array": [
  79757. "es.object.to-string",
  79758. "es.typed-array.float64-array",
  79759. "es.typed-array.copy-within",
  79760. "es.typed-array.every",
  79761. "es.typed-array.fill",
  79762. "es.typed-array.filter",
  79763. "es.typed-array.find",
  79764. "es.typed-array.find-index",
  79765. "es.typed-array.for-each",
  79766. "es.typed-array.from",
  79767. "es.typed-array.includes",
  79768. "es.typed-array.index-of",
  79769. "es.typed-array.iterator",
  79770. "es.typed-array.join",
  79771. "es.typed-array.last-index-of",
  79772. "es.typed-array.map",
  79773. "es.typed-array.of",
  79774. "es.typed-array.reduce",
  79775. "es.typed-array.reduce-right",
  79776. "es.typed-array.reverse",
  79777. "es.typed-array.set",
  79778. "es.typed-array.slice",
  79779. "es.typed-array.some",
  79780. "es.typed-array.sort",
  79781. "es.typed-array.subarray",
  79782. "es.typed-array.to-locale-string",
  79783. "es.typed-array.to-string"
  79784. ],
  79785. "core-js/es/typed-array/for-each": [
  79786. "es.typed-array.for-each"
  79787. ],
  79788. "core-js/es/typed-array/from": [
  79789. "es.typed-array.from"
  79790. ],
  79791. "core-js/es/typed-array/includes": [
  79792. "es.typed-array.includes"
  79793. ],
  79794. "core-js/es/typed-array/index-of": [
  79795. "es.typed-array.index-of"
  79796. ],
  79797. "core-js/es/typed-array/int16-array": [
  79798. "es.object.to-string",
  79799. "es.typed-array.int16-array",
  79800. "es.typed-array.copy-within",
  79801. "es.typed-array.every",
  79802. "es.typed-array.fill",
  79803. "es.typed-array.filter",
  79804. "es.typed-array.find",
  79805. "es.typed-array.find-index",
  79806. "es.typed-array.for-each",
  79807. "es.typed-array.from",
  79808. "es.typed-array.includes",
  79809. "es.typed-array.index-of",
  79810. "es.typed-array.iterator",
  79811. "es.typed-array.join",
  79812. "es.typed-array.last-index-of",
  79813. "es.typed-array.map",
  79814. "es.typed-array.of",
  79815. "es.typed-array.reduce",
  79816. "es.typed-array.reduce-right",
  79817. "es.typed-array.reverse",
  79818. "es.typed-array.set",
  79819. "es.typed-array.slice",
  79820. "es.typed-array.some",
  79821. "es.typed-array.sort",
  79822. "es.typed-array.subarray",
  79823. "es.typed-array.to-locale-string",
  79824. "es.typed-array.to-string"
  79825. ],
  79826. "core-js/es/typed-array/int32-array": [
  79827. "es.object.to-string",
  79828. "es.typed-array.int32-array",
  79829. "es.typed-array.copy-within",
  79830. "es.typed-array.every",
  79831. "es.typed-array.fill",
  79832. "es.typed-array.filter",
  79833. "es.typed-array.find",
  79834. "es.typed-array.find-index",
  79835. "es.typed-array.for-each",
  79836. "es.typed-array.from",
  79837. "es.typed-array.includes",
  79838. "es.typed-array.index-of",
  79839. "es.typed-array.iterator",
  79840. "es.typed-array.join",
  79841. "es.typed-array.last-index-of",
  79842. "es.typed-array.map",
  79843. "es.typed-array.of",
  79844. "es.typed-array.reduce",
  79845. "es.typed-array.reduce-right",
  79846. "es.typed-array.reverse",
  79847. "es.typed-array.set",
  79848. "es.typed-array.slice",
  79849. "es.typed-array.some",
  79850. "es.typed-array.sort",
  79851. "es.typed-array.subarray",
  79852. "es.typed-array.to-locale-string",
  79853. "es.typed-array.to-string"
  79854. ],
  79855. "core-js/es/typed-array/int8-array": [
  79856. "es.object.to-string",
  79857. "es.typed-array.int8-array",
  79858. "es.typed-array.copy-within",
  79859. "es.typed-array.every",
  79860. "es.typed-array.fill",
  79861. "es.typed-array.filter",
  79862. "es.typed-array.find",
  79863. "es.typed-array.find-index",
  79864. "es.typed-array.for-each",
  79865. "es.typed-array.from",
  79866. "es.typed-array.includes",
  79867. "es.typed-array.index-of",
  79868. "es.typed-array.iterator",
  79869. "es.typed-array.join",
  79870. "es.typed-array.last-index-of",
  79871. "es.typed-array.map",
  79872. "es.typed-array.of",
  79873. "es.typed-array.reduce",
  79874. "es.typed-array.reduce-right",
  79875. "es.typed-array.reverse",
  79876. "es.typed-array.set",
  79877. "es.typed-array.slice",
  79878. "es.typed-array.some",
  79879. "es.typed-array.sort",
  79880. "es.typed-array.subarray",
  79881. "es.typed-array.to-locale-string",
  79882. "es.typed-array.to-string"
  79883. ],
  79884. "core-js/es/typed-array/iterator": [
  79885. "es.typed-array.iterator"
  79886. ],
  79887. "core-js/es/typed-array/join": [
  79888. "es.typed-array.join"
  79889. ],
  79890. "core-js/es/typed-array/keys": [
  79891. "es.typed-array.iterator"
  79892. ],
  79893. "core-js/es/typed-array/last-index-of": [
  79894. "es.typed-array.last-index-of"
  79895. ],
  79896. "core-js/es/typed-array/map": [
  79897. "es.typed-array.map"
  79898. ],
  79899. "core-js/es/typed-array/methods": [
  79900. "es.object.to-string",
  79901. "es.typed-array.copy-within",
  79902. "es.typed-array.every",
  79903. "es.typed-array.fill",
  79904. "es.typed-array.filter",
  79905. "es.typed-array.find",
  79906. "es.typed-array.find-index",
  79907. "es.typed-array.for-each",
  79908. "es.typed-array.from",
  79909. "es.typed-array.includes",
  79910. "es.typed-array.index-of",
  79911. "es.typed-array.iterator",
  79912. "es.typed-array.join",
  79913. "es.typed-array.last-index-of",
  79914. "es.typed-array.map",
  79915. "es.typed-array.of",
  79916. "es.typed-array.reduce",
  79917. "es.typed-array.reduce-right",
  79918. "es.typed-array.reverse",
  79919. "es.typed-array.set",
  79920. "es.typed-array.slice",
  79921. "es.typed-array.some",
  79922. "es.typed-array.sort",
  79923. "es.typed-array.subarray",
  79924. "es.typed-array.to-locale-string",
  79925. "es.typed-array.to-string"
  79926. ],
  79927. "core-js/es/typed-array/of": [
  79928. "es.typed-array.of"
  79929. ],
  79930. "core-js/es/typed-array/reduce": [
  79931. "es.typed-array.reduce"
  79932. ],
  79933. "core-js/es/typed-array/reduce-right": [
  79934. "es.typed-array.reduce-right"
  79935. ],
  79936. "core-js/es/typed-array/reverse": [
  79937. "es.typed-array.reverse"
  79938. ],
  79939. "core-js/es/typed-array/set": [
  79940. "es.typed-array.set"
  79941. ],
  79942. "core-js/es/typed-array/slice": [
  79943. "es.typed-array.slice"
  79944. ],
  79945. "core-js/es/typed-array/some": [
  79946. "es.typed-array.some"
  79947. ],
  79948. "core-js/es/typed-array/sort": [
  79949. "es.typed-array.sort"
  79950. ],
  79951. "core-js/es/typed-array/subarray": [
  79952. "es.typed-array.subarray"
  79953. ],
  79954. "core-js/es/typed-array/to-locale-string": [
  79955. "es.typed-array.to-locale-string"
  79956. ],
  79957. "core-js/es/typed-array/to-string": [
  79958. "es.typed-array.to-string"
  79959. ],
  79960. "core-js/es/typed-array/uint16-array": [
  79961. "es.object.to-string",
  79962. "es.typed-array.uint16-array",
  79963. "es.typed-array.copy-within",
  79964. "es.typed-array.every",
  79965. "es.typed-array.fill",
  79966. "es.typed-array.filter",
  79967. "es.typed-array.find",
  79968. "es.typed-array.find-index",
  79969. "es.typed-array.for-each",
  79970. "es.typed-array.from",
  79971. "es.typed-array.includes",
  79972. "es.typed-array.index-of",
  79973. "es.typed-array.iterator",
  79974. "es.typed-array.join",
  79975. "es.typed-array.last-index-of",
  79976. "es.typed-array.map",
  79977. "es.typed-array.of",
  79978. "es.typed-array.reduce",
  79979. "es.typed-array.reduce-right",
  79980. "es.typed-array.reverse",
  79981. "es.typed-array.set",
  79982. "es.typed-array.slice",
  79983. "es.typed-array.some",
  79984. "es.typed-array.sort",
  79985. "es.typed-array.subarray",
  79986. "es.typed-array.to-locale-string",
  79987. "es.typed-array.to-string"
  79988. ],
  79989. "core-js/es/typed-array/uint32-array": [
  79990. "es.object.to-string",
  79991. "es.typed-array.uint32-array",
  79992. "es.typed-array.copy-within",
  79993. "es.typed-array.every",
  79994. "es.typed-array.fill",
  79995. "es.typed-array.filter",
  79996. "es.typed-array.find",
  79997. "es.typed-array.find-index",
  79998. "es.typed-array.for-each",
  79999. "es.typed-array.from",
  80000. "es.typed-array.includes",
  80001. "es.typed-array.index-of",
  80002. "es.typed-array.iterator",
  80003. "es.typed-array.join",
  80004. "es.typed-array.last-index-of",
  80005. "es.typed-array.map",
  80006. "es.typed-array.of",
  80007. "es.typed-array.reduce",
  80008. "es.typed-array.reduce-right",
  80009. "es.typed-array.reverse",
  80010. "es.typed-array.set",
  80011. "es.typed-array.slice",
  80012. "es.typed-array.some",
  80013. "es.typed-array.sort",
  80014. "es.typed-array.subarray",
  80015. "es.typed-array.to-locale-string",
  80016. "es.typed-array.to-string"
  80017. ],
  80018. "core-js/es/typed-array/uint8-array": [
  80019. "es.object.to-string",
  80020. "es.typed-array.uint8-array",
  80021. "es.typed-array.copy-within",
  80022. "es.typed-array.every",
  80023. "es.typed-array.fill",
  80024. "es.typed-array.filter",
  80025. "es.typed-array.find",
  80026. "es.typed-array.find-index",
  80027. "es.typed-array.for-each",
  80028. "es.typed-array.from",
  80029. "es.typed-array.includes",
  80030. "es.typed-array.index-of",
  80031. "es.typed-array.iterator",
  80032. "es.typed-array.join",
  80033. "es.typed-array.last-index-of",
  80034. "es.typed-array.map",
  80035. "es.typed-array.of",
  80036. "es.typed-array.reduce",
  80037. "es.typed-array.reduce-right",
  80038. "es.typed-array.reverse",
  80039. "es.typed-array.set",
  80040. "es.typed-array.slice",
  80041. "es.typed-array.some",
  80042. "es.typed-array.sort",
  80043. "es.typed-array.subarray",
  80044. "es.typed-array.to-locale-string",
  80045. "es.typed-array.to-string"
  80046. ],
  80047. "core-js/es/typed-array/uint8-clamped-array": [
  80048. "es.object.to-string",
  80049. "es.typed-array.uint8-clamped-array",
  80050. "es.typed-array.copy-within",
  80051. "es.typed-array.every",
  80052. "es.typed-array.fill",
  80053. "es.typed-array.filter",
  80054. "es.typed-array.find",
  80055. "es.typed-array.find-index",
  80056. "es.typed-array.for-each",
  80057. "es.typed-array.from",
  80058. "es.typed-array.includes",
  80059. "es.typed-array.index-of",
  80060. "es.typed-array.iterator",
  80061. "es.typed-array.join",
  80062. "es.typed-array.last-index-of",
  80063. "es.typed-array.map",
  80064. "es.typed-array.of",
  80065. "es.typed-array.reduce",
  80066. "es.typed-array.reduce-right",
  80067. "es.typed-array.reverse",
  80068. "es.typed-array.set",
  80069. "es.typed-array.slice",
  80070. "es.typed-array.some",
  80071. "es.typed-array.sort",
  80072. "es.typed-array.subarray",
  80073. "es.typed-array.to-locale-string",
  80074. "es.typed-array.to-string"
  80075. ],
  80076. "core-js/es/typed-array/values": [
  80077. "es.typed-array.iterator"
  80078. ],
  80079. "core-js/es/weak-map": [
  80080. "es.object.to-string",
  80081. "es.weak-map",
  80082. "web.dom-collections.iterator"
  80083. ],
  80084. "core-js/es/weak-set": [
  80085. "es.object.to-string",
  80086. "es.weak-set",
  80087. "web.dom-collections.iterator"
  80088. ],
  80089. "core-js/features": [
  80090. "es.symbol",
  80091. "es.symbol.description",
  80092. "es.symbol.async-iterator",
  80093. "es.symbol.has-instance",
  80094. "es.symbol.is-concat-spreadable",
  80095. "es.symbol.iterator",
  80096. "es.symbol.match",
  80097. "es.symbol.match-all",
  80098. "es.symbol.replace",
  80099. "es.symbol.search",
  80100. "es.symbol.species",
  80101. "es.symbol.split",
  80102. "es.symbol.to-primitive",
  80103. "es.symbol.to-string-tag",
  80104. "es.symbol.unscopables",
  80105. "es.array.concat",
  80106. "es.array.copy-within",
  80107. "es.array.every",
  80108. "es.array.fill",
  80109. "es.array.filter",
  80110. "es.array.find",
  80111. "es.array.find-index",
  80112. "es.array.flat",
  80113. "es.array.flat-map",
  80114. "es.array.for-each",
  80115. "es.array.from",
  80116. "es.array.includes",
  80117. "es.array.index-of",
  80118. "es.array.is-array",
  80119. "es.array.iterator",
  80120. "es.array.join",
  80121. "es.array.last-index-of",
  80122. "es.array.map",
  80123. "es.array.of",
  80124. "es.array.reduce",
  80125. "es.array.reduce-right",
  80126. "es.array.reverse",
  80127. "es.array.slice",
  80128. "es.array.some",
  80129. "es.array.sort",
  80130. "es.array.species",
  80131. "es.array.splice",
  80132. "es.array.unscopables.flat",
  80133. "es.array.unscopables.flat-map",
  80134. "es.array-buffer.constructor",
  80135. "es.array-buffer.is-view",
  80136. "es.array-buffer.slice",
  80137. "es.data-view",
  80138. "es.date.now",
  80139. "es.date.to-iso-string",
  80140. "es.date.to-json",
  80141. "es.date.to-primitive",
  80142. "es.date.to-string",
  80143. "es.function.bind",
  80144. "es.function.has-instance",
  80145. "es.function.name",
  80146. "es.global-this",
  80147. "es.json.stringify",
  80148. "es.json.to-string-tag",
  80149. "es.map",
  80150. "es.math.acosh",
  80151. "es.math.asinh",
  80152. "es.math.atanh",
  80153. "es.math.cbrt",
  80154. "es.math.clz32",
  80155. "es.math.cosh",
  80156. "es.math.expm1",
  80157. "es.math.fround",
  80158. "es.math.hypot",
  80159. "es.math.imul",
  80160. "es.math.log10",
  80161. "es.math.log1p",
  80162. "es.math.log2",
  80163. "es.math.sign",
  80164. "es.math.sinh",
  80165. "es.math.tanh",
  80166. "es.math.to-string-tag",
  80167. "es.math.trunc",
  80168. "es.number.constructor",
  80169. "es.number.epsilon",
  80170. "es.number.is-finite",
  80171. "es.number.is-integer",
  80172. "es.number.is-nan",
  80173. "es.number.is-safe-integer",
  80174. "es.number.max-safe-integer",
  80175. "es.number.min-safe-integer",
  80176. "es.number.parse-float",
  80177. "es.number.parse-int",
  80178. "es.number.to-fixed",
  80179. "es.number.to-precision",
  80180. "es.object.assign",
  80181. "es.object.create",
  80182. "es.object.define-getter",
  80183. "es.object.define-properties",
  80184. "es.object.define-property",
  80185. "es.object.define-setter",
  80186. "es.object.entries",
  80187. "es.object.freeze",
  80188. "es.object.from-entries",
  80189. "es.object.get-own-property-descriptor",
  80190. "es.object.get-own-property-descriptors",
  80191. "es.object.get-own-property-names",
  80192. "es.object.get-prototype-of",
  80193. "es.object.is",
  80194. "es.object.is-extensible",
  80195. "es.object.is-frozen",
  80196. "es.object.is-sealed",
  80197. "es.object.keys",
  80198. "es.object.lookup-getter",
  80199. "es.object.lookup-setter",
  80200. "es.object.prevent-extensions",
  80201. "es.object.seal",
  80202. "es.object.set-prototype-of",
  80203. "es.object.to-string",
  80204. "es.object.values",
  80205. "es.parse-float",
  80206. "es.parse-int",
  80207. "es.promise",
  80208. "es.promise.all-settled",
  80209. "es.promise.finally",
  80210. "es.reflect.apply",
  80211. "es.reflect.construct",
  80212. "es.reflect.define-property",
  80213. "es.reflect.delete-property",
  80214. "es.reflect.get",
  80215. "es.reflect.get-own-property-descriptor",
  80216. "es.reflect.get-prototype-of",
  80217. "es.reflect.has",
  80218. "es.reflect.is-extensible",
  80219. "es.reflect.own-keys",
  80220. "es.reflect.prevent-extensions",
  80221. "es.reflect.set",
  80222. "es.reflect.set-prototype-of",
  80223. "es.regexp.constructor",
  80224. "es.regexp.exec",
  80225. "es.regexp.flags",
  80226. "es.regexp.sticky",
  80227. "es.regexp.test",
  80228. "es.regexp.to-string",
  80229. "es.set",
  80230. "es.string.code-point-at",
  80231. "es.string.ends-with",
  80232. "es.string.from-code-point",
  80233. "es.string.includes",
  80234. "es.string.iterator",
  80235. "es.string.match",
  80236. "es.string.match-all",
  80237. "es.string.pad-end",
  80238. "es.string.pad-start",
  80239. "es.string.raw",
  80240. "es.string.repeat",
  80241. "es.string.replace",
  80242. "es.string.search",
  80243. "es.string.split",
  80244. "es.string.starts-with",
  80245. "es.string.trim",
  80246. "es.string.trim-end",
  80247. "es.string.trim-start",
  80248. "es.string.anchor",
  80249. "es.string.big",
  80250. "es.string.blink",
  80251. "es.string.bold",
  80252. "es.string.fixed",
  80253. "es.string.fontcolor",
  80254. "es.string.fontsize",
  80255. "es.string.italics",
  80256. "es.string.link",
  80257. "es.string.small",
  80258. "es.string.strike",
  80259. "es.string.sub",
  80260. "es.string.sup",
  80261. "es.typed-array.float32-array",
  80262. "es.typed-array.float64-array",
  80263. "es.typed-array.int8-array",
  80264. "es.typed-array.int16-array",
  80265. "es.typed-array.int32-array",
  80266. "es.typed-array.uint8-array",
  80267. "es.typed-array.uint8-clamped-array",
  80268. "es.typed-array.uint16-array",
  80269. "es.typed-array.uint32-array",
  80270. "es.typed-array.copy-within",
  80271. "es.typed-array.every",
  80272. "es.typed-array.fill",
  80273. "es.typed-array.filter",
  80274. "es.typed-array.find",
  80275. "es.typed-array.find-index",
  80276. "es.typed-array.for-each",
  80277. "es.typed-array.from",
  80278. "es.typed-array.includes",
  80279. "es.typed-array.index-of",
  80280. "es.typed-array.iterator",
  80281. "es.typed-array.join",
  80282. "es.typed-array.last-index-of",
  80283. "es.typed-array.map",
  80284. "es.typed-array.of",
  80285. "es.typed-array.reduce",
  80286. "es.typed-array.reduce-right",
  80287. "es.typed-array.reverse",
  80288. "es.typed-array.set",
  80289. "es.typed-array.slice",
  80290. "es.typed-array.some",
  80291. "es.typed-array.sort",
  80292. "es.typed-array.subarray",
  80293. "es.typed-array.to-locale-string",
  80294. "es.typed-array.to-string",
  80295. "es.weak-map",
  80296. "es.weak-set",
  80297. "esnext.aggregate-error",
  80298. "esnext.array.is-template-object",
  80299. "esnext.array.last-index",
  80300. "esnext.array.last-item",
  80301. "esnext.async-iterator.constructor",
  80302. "esnext.async-iterator.as-indexed-pairs",
  80303. "esnext.async-iterator.drop",
  80304. "esnext.async-iterator.every",
  80305. "esnext.async-iterator.filter",
  80306. "esnext.async-iterator.find",
  80307. "esnext.async-iterator.flat-map",
  80308. "esnext.async-iterator.for-each",
  80309. "esnext.async-iterator.from",
  80310. "esnext.async-iterator.map",
  80311. "esnext.async-iterator.reduce",
  80312. "esnext.async-iterator.some",
  80313. "esnext.async-iterator.take",
  80314. "esnext.async-iterator.to-array",
  80315. "esnext.composite-key",
  80316. "esnext.composite-symbol",
  80317. "esnext.global-this",
  80318. "esnext.iterator.constructor",
  80319. "esnext.iterator.as-indexed-pairs",
  80320. "esnext.iterator.drop",
  80321. "esnext.iterator.every",
  80322. "esnext.iterator.filter",
  80323. "esnext.iterator.find",
  80324. "esnext.iterator.flat-map",
  80325. "esnext.iterator.for-each",
  80326. "esnext.iterator.from",
  80327. "esnext.iterator.map",
  80328. "esnext.iterator.reduce",
  80329. "esnext.iterator.some",
  80330. "esnext.iterator.take",
  80331. "esnext.iterator.to-array",
  80332. "esnext.map.delete-all",
  80333. "esnext.map.every",
  80334. "esnext.map.filter",
  80335. "esnext.map.find",
  80336. "esnext.map.find-key",
  80337. "esnext.map.from",
  80338. "esnext.map.group-by",
  80339. "esnext.map.includes",
  80340. "esnext.map.key-by",
  80341. "esnext.map.key-of",
  80342. "esnext.map.map-keys",
  80343. "esnext.map.map-values",
  80344. "esnext.map.merge",
  80345. "esnext.map.of",
  80346. "esnext.map.reduce",
  80347. "esnext.map.some",
  80348. "esnext.map.update",
  80349. "esnext.map.update-or-insert",
  80350. "esnext.map.upsert",
  80351. "esnext.math.clamp",
  80352. "esnext.math.deg-per-rad",
  80353. "esnext.math.degrees",
  80354. "esnext.math.fscale",
  80355. "esnext.math.iaddh",
  80356. "esnext.math.imulh",
  80357. "esnext.math.isubh",
  80358. "esnext.math.rad-per-deg",
  80359. "esnext.math.radians",
  80360. "esnext.math.scale",
  80361. "esnext.math.seeded-prng",
  80362. "esnext.math.signbit",
  80363. "esnext.math.umulh",
  80364. "esnext.number.from-string",
  80365. "esnext.object.iterate-entries",
  80366. "esnext.object.iterate-keys",
  80367. "esnext.object.iterate-values",
  80368. "esnext.observable",
  80369. "esnext.promise.all-settled",
  80370. "esnext.promise.any",
  80371. "esnext.promise.try",
  80372. "esnext.reflect.define-metadata",
  80373. "esnext.reflect.delete-metadata",
  80374. "esnext.reflect.get-metadata",
  80375. "esnext.reflect.get-metadata-keys",
  80376. "esnext.reflect.get-own-metadata",
  80377. "esnext.reflect.get-own-metadata-keys",
  80378. "esnext.reflect.has-metadata",
  80379. "esnext.reflect.has-own-metadata",
  80380. "esnext.reflect.metadata",
  80381. "esnext.set.add-all",
  80382. "esnext.set.delete-all",
  80383. "esnext.set.difference",
  80384. "esnext.set.every",
  80385. "esnext.set.filter",
  80386. "esnext.set.find",
  80387. "esnext.set.from",
  80388. "esnext.set.intersection",
  80389. "esnext.set.is-disjoint-from",
  80390. "esnext.set.is-subset-of",
  80391. "esnext.set.is-superset-of",
  80392. "esnext.set.join",
  80393. "esnext.set.map",
  80394. "esnext.set.of",
  80395. "esnext.set.reduce",
  80396. "esnext.set.some",
  80397. "esnext.set.symmetric-difference",
  80398. "esnext.set.union",
  80399. "esnext.string.at",
  80400. "esnext.string.code-points",
  80401. "esnext.string.match-all",
  80402. "esnext.string.replace-all",
  80403. "esnext.symbol.async-dispose",
  80404. "esnext.symbol.dispose",
  80405. "esnext.symbol.observable",
  80406. "esnext.symbol.pattern-match",
  80407. "esnext.symbol.replace-all",
  80408. "esnext.weak-map.delete-all",
  80409. "esnext.weak-map.from",
  80410. "esnext.weak-map.of",
  80411. "esnext.weak-map.upsert",
  80412. "esnext.weak-set.add-all",
  80413. "esnext.weak-set.delete-all",
  80414. "esnext.weak-set.from",
  80415. "esnext.weak-set.of",
  80416. "web.dom-collections.for-each",
  80417. "web.dom-collections.iterator",
  80418. "web.immediate",
  80419. "web.queue-microtask",
  80420. "web.timers",
  80421. "web.url",
  80422. "web.url.to-json",
  80423. "web.url-search-params"
  80424. ],
  80425. "core-js/features/aggregate-error": [
  80426. "es.string.iterator",
  80427. "esnext.aggregate-error",
  80428. "web.dom-collections.iterator"
  80429. ],
  80430. "core-js/features/array": [
  80431. "es.array.concat",
  80432. "es.array.copy-within",
  80433. "es.array.every",
  80434. "es.array.fill",
  80435. "es.array.filter",
  80436. "es.array.find",
  80437. "es.array.find-index",
  80438. "es.array.flat",
  80439. "es.array.flat-map",
  80440. "es.array.for-each",
  80441. "es.array.from",
  80442. "es.array.includes",
  80443. "es.array.index-of",
  80444. "es.array.is-array",
  80445. "es.array.iterator",
  80446. "es.array.join",
  80447. "es.array.last-index-of",
  80448. "es.array.map",
  80449. "es.array.of",
  80450. "es.array.reduce",
  80451. "es.array.reduce-right",
  80452. "es.array.reverse",
  80453. "es.array.slice",
  80454. "es.array.some",
  80455. "es.array.sort",
  80456. "es.array.species",
  80457. "es.array.splice",
  80458. "es.array.unscopables.flat",
  80459. "es.array.unscopables.flat-map",
  80460. "es.string.iterator",
  80461. "esnext.array.is-template-object",
  80462. "esnext.array.last-index",
  80463. "esnext.array.last-item"
  80464. ],
  80465. "core-js/features/array-buffer": [
  80466. "es.array-buffer.constructor",
  80467. "es.array-buffer.is-view",
  80468. "es.array-buffer.slice",
  80469. "es.object.to-string"
  80470. ],
  80471. "core-js/features/array-buffer/constructor": [
  80472. "es.array-buffer.constructor",
  80473. "es.object.to-string"
  80474. ],
  80475. "core-js/features/array-buffer/is-view": [
  80476. "es.array-buffer.is-view"
  80477. ],
  80478. "core-js/features/array-buffer/slice": [
  80479. "es.array-buffer.slice"
  80480. ],
  80481. "core-js/features/array/concat": [
  80482. "es.array.concat"
  80483. ],
  80484. "core-js/features/array/copy-within": [
  80485. "es.array.copy-within"
  80486. ],
  80487. "core-js/features/array/entries": [
  80488. "es.array.iterator"
  80489. ],
  80490. "core-js/features/array/every": [
  80491. "es.array.every"
  80492. ],
  80493. "core-js/features/array/fill": [
  80494. "es.array.fill"
  80495. ],
  80496. "core-js/features/array/filter": [
  80497. "es.array.filter"
  80498. ],
  80499. "core-js/features/array/find": [
  80500. "es.array.find"
  80501. ],
  80502. "core-js/features/array/find-index": [
  80503. "es.array.find-index"
  80504. ],
  80505. "core-js/features/array/flat": [
  80506. "es.array.flat",
  80507. "es.array.unscopables.flat"
  80508. ],
  80509. "core-js/features/array/flat-map": [
  80510. "es.array.flat-map",
  80511. "es.array.unscopables.flat-map"
  80512. ],
  80513. "core-js/features/array/for-each": [
  80514. "es.array.for-each"
  80515. ],
  80516. "core-js/features/array/from": [
  80517. "es.array.from",
  80518. "es.string.iterator"
  80519. ],
  80520. "core-js/features/array/includes": [
  80521. "es.array.includes"
  80522. ],
  80523. "core-js/features/array/index-of": [
  80524. "es.array.index-of"
  80525. ],
  80526. "core-js/features/array/is-array": [
  80527. "es.array.is-array"
  80528. ],
  80529. "core-js/features/array/is-template-object": [
  80530. "esnext.array.is-template-object"
  80531. ],
  80532. "core-js/features/array/iterator": [
  80533. "es.array.iterator"
  80534. ],
  80535. "core-js/features/array/join": [
  80536. "es.array.join"
  80537. ],
  80538. "core-js/features/array/keys": [
  80539. "es.array.iterator"
  80540. ],
  80541. "core-js/features/array/last-index": [
  80542. "esnext.array.last-index"
  80543. ],
  80544. "core-js/features/array/last-index-of": [
  80545. "es.array.last-index-of"
  80546. ],
  80547. "core-js/features/array/last-item": [
  80548. "esnext.array.last-item"
  80549. ],
  80550. "core-js/features/array/map": [
  80551. "es.array.map"
  80552. ],
  80553. "core-js/features/array/of": [
  80554. "es.array.of"
  80555. ],
  80556. "core-js/features/array/reduce": [
  80557. "es.array.reduce"
  80558. ],
  80559. "core-js/features/array/reduce-right": [
  80560. "es.array.reduce-right"
  80561. ],
  80562. "core-js/features/array/reverse": [
  80563. "es.array.reverse"
  80564. ],
  80565. "core-js/features/array/slice": [
  80566. "es.array.slice"
  80567. ],
  80568. "core-js/features/array/some": [
  80569. "es.array.some"
  80570. ],
  80571. "core-js/features/array/sort": [
  80572. "es.array.sort"
  80573. ],
  80574. "core-js/features/array/splice": [
  80575. "es.array.splice"
  80576. ],
  80577. "core-js/features/array/values": [
  80578. "es.array.iterator"
  80579. ],
  80580. "core-js/features/array/virtual": [
  80581. "es.array.concat",
  80582. "es.array.copy-within",
  80583. "es.array.every",
  80584. "es.array.fill",
  80585. "es.array.filter",
  80586. "es.array.find",
  80587. "es.array.find-index",
  80588. "es.array.flat",
  80589. "es.array.flat-map",
  80590. "es.array.for-each",
  80591. "es.array.includes",
  80592. "es.array.index-of",
  80593. "es.array.iterator",
  80594. "es.array.join",
  80595. "es.array.last-index-of",
  80596. "es.array.map",
  80597. "es.array.reduce",
  80598. "es.array.reduce-right",
  80599. "es.array.reverse",
  80600. "es.array.slice",
  80601. "es.array.some",
  80602. "es.array.sort",
  80603. "es.array.species",
  80604. "es.array.splice",
  80605. "es.array.unscopables.flat",
  80606. "es.array.unscopables.flat-map"
  80607. ],
  80608. "core-js/features/array/virtual/concat": [
  80609. "es.array.concat"
  80610. ],
  80611. "core-js/features/array/virtual/copy-within": [
  80612. "es.array.copy-within"
  80613. ],
  80614. "core-js/features/array/virtual/entries": [
  80615. "es.array.iterator"
  80616. ],
  80617. "core-js/features/array/virtual/every": [
  80618. "es.array.every"
  80619. ],
  80620. "core-js/features/array/virtual/fill": [
  80621. "es.array.fill"
  80622. ],
  80623. "core-js/features/array/virtual/filter": [
  80624. "es.array.filter"
  80625. ],
  80626. "core-js/features/array/virtual/find": [
  80627. "es.array.find"
  80628. ],
  80629. "core-js/features/array/virtual/find-index": [
  80630. "es.array.find-index"
  80631. ],
  80632. "core-js/features/array/virtual/flat": [
  80633. "es.array.flat",
  80634. "es.array.unscopables.flat"
  80635. ],
  80636. "core-js/features/array/virtual/flat-map": [
  80637. "es.array.flat-map",
  80638. "es.array.unscopables.flat-map"
  80639. ],
  80640. "core-js/features/array/virtual/for-each": [
  80641. "es.array.for-each"
  80642. ],
  80643. "core-js/features/array/virtual/includes": [
  80644. "es.array.includes"
  80645. ],
  80646. "core-js/features/array/virtual/index-of": [
  80647. "es.array.index-of"
  80648. ],
  80649. "core-js/features/array/virtual/iterator": [
  80650. "es.array.iterator"
  80651. ],
  80652. "core-js/features/array/virtual/join": [
  80653. "es.array.join"
  80654. ],
  80655. "core-js/features/array/virtual/keys": [
  80656. "es.array.iterator"
  80657. ],
  80658. "core-js/features/array/virtual/last-index-of": [
  80659. "es.array.last-index-of"
  80660. ],
  80661. "core-js/features/array/virtual/map": [
  80662. "es.array.map"
  80663. ],
  80664. "core-js/features/array/virtual/reduce": [
  80665. "es.array.reduce"
  80666. ],
  80667. "core-js/features/array/virtual/reduce-right": [
  80668. "es.array.reduce-right"
  80669. ],
  80670. "core-js/features/array/virtual/reverse": [
  80671. "es.array.reverse"
  80672. ],
  80673. "core-js/features/array/virtual/slice": [
  80674. "es.array.slice"
  80675. ],
  80676. "core-js/features/array/virtual/some": [
  80677. "es.array.some"
  80678. ],
  80679. "core-js/features/array/virtual/sort": [
  80680. "es.array.sort"
  80681. ],
  80682. "core-js/features/array/virtual/splice": [
  80683. "es.array.splice"
  80684. ],
  80685. "core-js/features/array/virtual/values": [
  80686. "es.array.iterator"
  80687. ],
  80688. "core-js/features/async-iterator": [
  80689. "es.object.to-string",
  80690. "es.promise",
  80691. "es.string.iterator",
  80692. "esnext.async-iterator.constructor",
  80693. "esnext.async-iterator.as-indexed-pairs",
  80694. "esnext.async-iterator.drop",
  80695. "esnext.async-iterator.every",
  80696. "esnext.async-iterator.filter",
  80697. "esnext.async-iterator.find",
  80698. "esnext.async-iterator.flat-map",
  80699. "esnext.async-iterator.for-each",
  80700. "esnext.async-iterator.from",
  80701. "esnext.async-iterator.map",
  80702. "esnext.async-iterator.reduce",
  80703. "esnext.async-iterator.some",
  80704. "esnext.async-iterator.take",
  80705. "esnext.async-iterator.to-array",
  80706. "web.dom-collections.iterator"
  80707. ],
  80708. "core-js/features/async-iterator/as-indexed-pairs": [
  80709. "es.object.to-string",
  80710. "es.promise",
  80711. "es.string.iterator",
  80712. "esnext.async-iterator.constructor",
  80713. "esnext.async-iterator.as-indexed-pairs",
  80714. "web.dom-collections.iterator"
  80715. ],
  80716. "core-js/features/async-iterator/drop": [
  80717. "es.object.to-string",
  80718. "es.promise",
  80719. "es.string.iterator",
  80720. "esnext.async-iterator.constructor",
  80721. "esnext.async-iterator.drop",
  80722. "web.dom-collections.iterator"
  80723. ],
  80724. "core-js/features/async-iterator/every": [
  80725. "es.object.to-string",
  80726. "es.promise",
  80727. "es.string.iterator",
  80728. "esnext.async-iterator.constructor",
  80729. "esnext.async-iterator.every",
  80730. "web.dom-collections.iterator"
  80731. ],
  80732. "core-js/features/async-iterator/filter": [
  80733. "es.object.to-string",
  80734. "es.promise",
  80735. "es.string.iterator",
  80736. "esnext.async-iterator.constructor",
  80737. "esnext.async-iterator.filter",
  80738. "web.dom-collections.iterator"
  80739. ],
  80740. "core-js/features/async-iterator/find": [
  80741. "es.object.to-string",
  80742. "es.promise",
  80743. "es.string.iterator",
  80744. "esnext.async-iterator.constructor",
  80745. "esnext.async-iterator.find",
  80746. "web.dom-collections.iterator"
  80747. ],
  80748. "core-js/features/async-iterator/flat-map": [
  80749. "es.object.to-string",
  80750. "es.promise",
  80751. "es.string.iterator",
  80752. "esnext.async-iterator.constructor",
  80753. "esnext.async-iterator.flat-map",
  80754. "web.dom-collections.iterator"
  80755. ],
  80756. "core-js/features/async-iterator/for-each": [
  80757. "es.object.to-string",
  80758. "es.promise",
  80759. "es.string.iterator",
  80760. "esnext.async-iterator.constructor",
  80761. "esnext.async-iterator.for-each",
  80762. "web.dom-collections.iterator"
  80763. ],
  80764. "core-js/features/async-iterator/from": [
  80765. "es.object.to-string",
  80766. "es.promise",
  80767. "es.string.iterator",
  80768. "esnext.async-iterator.constructor",
  80769. "esnext.async-iterator.from",
  80770. "web.dom-collections.iterator"
  80771. ],
  80772. "core-js/features/async-iterator/map": [
  80773. "es.object.to-string",
  80774. "es.promise",
  80775. "es.string.iterator",
  80776. "esnext.async-iterator.constructor",
  80777. "esnext.async-iterator.map",
  80778. "web.dom-collections.iterator"
  80779. ],
  80780. "core-js/features/async-iterator/reduce": [
  80781. "es.object.to-string",
  80782. "es.promise",
  80783. "es.string.iterator",
  80784. "esnext.async-iterator.constructor",
  80785. "esnext.async-iterator.reduce",
  80786. "web.dom-collections.iterator"
  80787. ],
  80788. "core-js/features/async-iterator/some": [
  80789. "es.object.to-string",
  80790. "es.promise",
  80791. "es.string.iterator",
  80792. "esnext.async-iterator.constructor",
  80793. "esnext.async-iterator.some",
  80794. "web.dom-collections.iterator"
  80795. ],
  80796. "core-js/features/async-iterator/take": [
  80797. "es.object.to-string",
  80798. "es.promise",
  80799. "es.string.iterator",
  80800. "esnext.async-iterator.constructor",
  80801. "esnext.async-iterator.take",
  80802. "web.dom-collections.iterator"
  80803. ],
  80804. "core-js/features/async-iterator/to-array": [
  80805. "es.object.to-string",
  80806. "es.promise",
  80807. "es.string.iterator",
  80808. "esnext.async-iterator.constructor",
  80809. "esnext.async-iterator.to-array",
  80810. "web.dom-collections.iterator"
  80811. ],
  80812. "core-js/features/clear-immediate": [
  80813. "web.immediate"
  80814. ],
  80815. "core-js/features/composite-key": [
  80816. "esnext.composite-key"
  80817. ],
  80818. "core-js/features/composite-symbol": [
  80819. "es.symbol",
  80820. "esnext.composite-symbol"
  80821. ],
  80822. "core-js/features/data-view": [
  80823. "es.data-view",
  80824. "es.object.to-string"
  80825. ],
  80826. "core-js/features/date": [
  80827. "es.date.now",
  80828. "es.date.to-iso-string",
  80829. "es.date.to-json",
  80830. "es.date.to-primitive",
  80831. "es.date.to-string"
  80832. ],
  80833. "core-js/features/date/now": [
  80834. "es.date.now"
  80835. ],
  80836. "core-js/features/date/to-iso-string": [
  80837. "es.date.to-iso-string",
  80838. "es.date.to-json"
  80839. ],
  80840. "core-js/features/date/to-json": [
  80841. "es.date.to-json"
  80842. ],
  80843. "core-js/features/date/to-primitive": [
  80844. "es.date.to-primitive"
  80845. ],
  80846. "core-js/features/date/to-string": [
  80847. "es.date.to-string"
  80848. ],
  80849. "core-js/features/dom-collections": [
  80850. "es.array.iterator",
  80851. "web.dom-collections.for-each",
  80852. "web.dom-collections.iterator"
  80853. ],
  80854. "core-js/features/dom-collections/for-each": [
  80855. "web.dom-collections.for-each"
  80856. ],
  80857. "core-js/features/dom-collections/iterator": [
  80858. "web.dom-collections.iterator"
  80859. ],
  80860. "core-js/features/function": [
  80861. "es.function.bind",
  80862. "es.function.has-instance",
  80863. "es.function.name"
  80864. ],
  80865. "core-js/features/function/bind": [
  80866. "es.function.bind"
  80867. ],
  80868. "core-js/features/function/has-instance": [
  80869. "es.function.has-instance"
  80870. ],
  80871. "core-js/features/function/name": [
  80872. "es.function.name"
  80873. ],
  80874. "core-js/features/function/virtual": [
  80875. "es.function.bind"
  80876. ],
  80877. "core-js/features/function/virtual/bind": [
  80878. "es.function.bind"
  80879. ],
  80880. "core-js/features/get-iterator": [
  80881. "es.string.iterator",
  80882. "web.dom-collections.iterator"
  80883. ],
  80884. "core-js/features/get-iterator-method": [
  80885. "es.string.iterator",
  80886. "web.dom-collections.iterator"
  80887. ],
  80888. "core-js/features/global-this": [
  80889. "es.global-this",
  80890. "esnext.global-this"
  80891. ],
  80892. "core-js/features/instance/at": [
  80893. "esnext.string.at"
  80894. ],
  80895. "core-js/features/instance/bind": [
  80896. "es.function.bind"
  80897. ],
  80898. "core-js/features/instance/code-point-at": [
  80899. "es.string.code-point-at"
  80900. ],
  80901. "core-js/features/instance/code-points": [
  80902. "esnext.string.code-points"
  80903. ],
  80904. "core-js/features/instance/concat": [
  80905. "es.array.concat"
  80906. ],
  80907. "core-js/features/instance/copy-within": [
  80908. "es.array.copy-within"
  80909. ],
  80910. "core-js/features/instance/ends-with": [
  80911. "es.string.ends-with"
  80912. ],
  80913. "core-js/features/instance/entries": [
  80914. "es.array.iterator",
  80915. "web.dom-collections.iterator"
  80916. ],
  80917. "core-js/features/instance/every": [
  80918. "es.array.every"
  80919. ],
  80920. "core-js/features/instance/fill": [
  80921. "es.array.fill"
  80922. ],
  80923. "core-js/features/instance/filter": [
  80924. "es.array.filter"
  80925. ],
  80926. "core-js/features/instance/find": [
  80927. "es.array.find"
  80928. ],
  80929. "core-js/features/instance/find-index": [
  80930. "es.array.find-index"
  80931. ],
  80932. "core-js/features/instance/flags": [
  80933. "es.regexp.flags"
  80934. ],
  80935. "core-js/features/instance/flat": [
  80936. "es.array.flat",
  80937. "es.array.unscopables.flat"
  80938. ],
  80939. "core-js/features/instance/flat-map": [
  80940. "es.array.flat-map",
  80941. "es.array.unscopables.flat-map"
  80942. ],
  80943. "core-js/features/instance/for-each": [
  80944. "es.array.for-each",
  80945. "web.dom-collections.iterator"
  80946. ],
  80947. "core-js/features/instance/includes": [
  80948. "es.array.includes",
  80949. "es.string.includes"
  80950. ],
  80951. "core-js/features/instance/index-of": [
  80952. "es.array.index-of"
  80953. ],
  80954. "core-js/features/instance/keys": [
  80955. "es.array.iterator",
  80956. "web.dom-collections.iterator"
  80957. ],
  80958. "core-js/features/instance/last-index-of": [
  80959. "es.array.last-index-of"
  80960. ],
  80961. "core-js/features/instance/map": [
  80962. "es.array.map"
  80963. ],
  80964. "core-js/features/instance/match-all": [
  80965. "es.string.match-all",
  80966. "esnext.string.match-all"
  80967. ],
  80968. "core-js/features/instance/pad-end": [
  80969. "es.string.pad-end"
  80970. ],
  80971. "core-js/features/instance/pad-start": [
  80972. "es.string.pad-start"
  80973. ],
  80974. "core-js/features/instance/reduce": [
  80975. "es.array.reduce"
  80976. ],
  80977. "core-js/features/instance/reduce-right": [
  80978. "es.array.reduce-right"
  80979. ],
  80980. "core-js/features/instance/repeat": [
  80981. "es.string.repeat"
  80982. ],
  80983. "core-js/features/instance/replace-all": [
  80984. "esnext.string.replace-all"
  80985. ],
  80986. "core-js/features/instance/reverse": [
  80987. "es.array.reverse"
  80988. ],
  80989. "core-js/features/instance/slice": [
  80990. "es.array.slice"
  80991. ],
  80992. "core-js/features/instance/some": [
  80993. "es.array.some"
  80994. ],
  80995. "core-js/features/instance/sort": [
  80996. "es.array.sort"
  80997. ],
  80998. "core-js/features/instance/splice": [
  80999. "es.array.splice"
  81000. ],
  81001. "core-js/features/instance/starts-with": [
  81002. "es.string.starts-with"
  81003. ],
  81004. "core-js/features/instance/trim": [
  81005. "es.string.trim"
  81006. ],
  81007. "core-js/features/instance/trim-end": [
  81008. "es.string.trim-end"
  81009. ],
  81010. "core-js/features/instance/trim-left": [
  81011. "es.string.trim-start"
  81012. ],
  81013. "core-js/features/instance/trim-right": [
  81014. "es.string.trim-end"
  81015. ],
  81016. "core-js/features/instance/trim-start": [
  81017. "es.string.trim-start"
  81018. ],
  81019. "core-js/features/instance/values": [
  81020. "es.array.iterator",
  81021. "web.dom-collections.iterator"
  81022. ],
  81023. "core-js/features/is-iterable": [
  81024. "es.string.iterator",
  81025. "web.dom-collections.iterator"
  81026. ],
  81027. "core-js/features/iterator": [
  81028. "es.object.to-string",
  81029. "es.string.iterator",
  81030. "esnext.iterator.constructor",
  81031. "esnext.iterator.as-indexed-pairs",
  81032. "esnext.iterator.drop",
  81033. "esnext.iterator.every",
  81034. "esnext.iterator.filter",
  81035. "esnext.iterator.find",
  81036. "esnext.iterator.flat-map",
  81037. "esnext.iterator.for-each",
  81038. "esnext.iterator.from",
  81039. "esnext.iterator.map",
  81040. "esnext.iterator.reduce",
  81041. "esnext.iterator.some",
  81042. "esnext.iterator.take",
  81043. "esnext.iterator.to-array",
  81044. "web.dom-collections.iterator"
  81045. ],
  81046. "core-js/features/iterator/as-indexed-pairs": [
  81047. "es.object.to-string",
  81048. "es.string.iterator",
  81049. "esnext.iterator.constructor",
  81050. "esnext.iterator.as-indexed-pairs",
  81051. "web.dom-collections.iterator"
  81052. ],
  81053. "core-js/features/iterator/drop": [
  81054. "es.object.to-string",
  81055. "es.string.iterator",
  81056. "esnext.iterator.constructor",
  81057. "esnext.iterator.drop",
  81058. "web.dom-collections.iterator"
  81059. ],
  81060. "core-js/features/iterator/every": [
  81061. "es.object.to-string",
  81062. "es.string.iterator",
  81063. "esnext.iterator.constructor",
  81064. "esnext.iterator.every",
  81065. "web.dom-collections.iterator"
  81066. ],
  81067. "core-js/features/iterator/filter": [
  81068. "es.object.to-string",
  81069. "es.string.iterator",
  81070. "esnext.iterator.constructor",
  81071. "esnext.iterator.filter",
  81072. "web.dom-collections.iterator"
  81073. ],
  81074. "core-js/features/iterator/find": [
  81075. "es.object.to-string",
  81076. "es.string.iterator",
  81077. "esnext.iterator.constructor",
  81078. "esnext.iterator.find",
  81079. "web.dom-collections.iterator"
  81080. ],
  81081. "core-js/features/iterator/flat-map": [
  81082. "es.object.to-string",
  81083. "es.string.iterator",
  81084. "esnext.iterator.constructor",
  81085. "esnext.iterator.flat-map",
  81086. "web.dom-collections.iterator"
  81087. ],
  81088. "core-js/features/iterator/for-each": [
  81089. "es.object.to-string",
  81090. "es.string.iterator",
  81091. "esnext.iterator.constructor",
  81092. "esnext.iterator.for-each",
  81093. "web.dom-collections.iterator"
  81094. ],
  81095. "core-js/features/iterator/from": [
  81096. "es.object.to-string",
  81097. "es.string.iterator",
  81098. "esnext.iterator.constructor",
  81099. "esnext.iterator.from",
  81100. "web.dom-collections.iterator"
  81101. ],
  81102. "core-js/features/iterator/map": [
  81103. "es.object.to-string",
  81104. "es.string.iterator",
  81105. "esnext.iterator.constructor",
  81106. "esnext.iterator.map",
  81107. "web.dom-collections.iterator"
  81108. ],
  81109. "core-js/features/iterator/reduce": [
  81110. "es.object.to-string",
  81111. "es.string.iterator",
  81112. "esnext.iterator.constructor",
  81113. "esnext.iterator.reduce",
  81114. "web.dom-collections.iterator"
  81115. ],
  81116. "core-js/features/iterator/some": [
  81117. "es.object.to-string",
  81118. "es.string.iterator",
  81119. "esnext.iterator.constructor",
  81120. "esnext.iterator.some",
  81121. "web.dom-collections.iterator"
  81122. ],
  81123. "core-js/features/iterator/take": [
  81124. "es.object.to-string",
  81125. "es.string.iterator",
  81126. "esnext.iterator.constructor",
  81127. "esnext.iterator.take",
  81128. "web.dom-collections.iterator"
  81129. ],
  81130. "core-js/features/iterator/to-array": [
  81131. "es.object.to-string",
  81132. "es.string.iterator",
  81133. "esnext.iterator.constructor",
  81134. "esnext.iterator.to-array",
  81135. "web.dom-collections.iterator"
  81136. ],
  81137. "core-js/features/json": [
  81138. "es.json.stringify",
  81139. "es.json.to-string-tag"
  81140. ],
  81141. "core-js/features/json/stringify": [
  81142. "es.json.stringify"
  81143. ],
  81144. "core-js/features/json/to-string-tag": [
  81145. "es.json.to-string-tag"
  81146. ],
  81147. "core-js/features/map": [
  81148. "es.map",
  81149. "es.object.to-string",
  81150. "es.string.iterator",
  81151. "esnext.map.delete-all",
  81152. "esnext.map.every",
  81153. "esnext.map.filter",
  81154. "esnext.map.find",
  81155. "esnext.map.find-key",
  81156. "esnext.map.from",
  81157. "esnext.map.group-by",
  81158. "esnext.map.includes",
  81159. "esnext.map.key-by",
  81160. "esnext.map.key-of",
  81161. "esnext.map.map-keys",
  81162. "esnext.map.map-values",
  81163. "esnext.map.merge",
  81164. "esnext.map.of",
  81165. "esnext.map.reduce",
  81166. "esnext.map.some",
  81167. "esnext.map.update",
  81168. "esnext.map.update-or-insert",
  81169. "esnext.map.upsert",
  81170. "web.dom-collections.iterator"
  81171. ],
  81172. "core-js/features/map/delete-all": [
  81173. "es.map",
  81174. "esnext.map.delete-all"
  81175. ],
  81176. "core-js/features/map/every": [
  81177. "es.map",
  81178. "esnext.map.every"
  81179. ],
  81180. "core-js/features/map/filter": [
  81181. "es.map",
  81182. "esnext.map.filter"
  81183. ],
  81184. "core-js/features/map/find": [
  81185. "es.map",
  81186. "esnext.map.find"
  81187. ],
  81188. "core-js/features/map/find-key": [
  81189. "es.map",
  81190. "esnext.map.find-key"
  81191. ],
  81192. "core-js/features/map/from": [
  81193. "es.map",
  81194. "es.string.iterator",
  81195. "esnext.map.from",
  81196. "web.dom-collections.iterator"
  81197. ],
  81198. "core-js/features/map/group-by": [
  81199. "es.map",
  81200. "esnext.map.group-by"
  81201. ],
  81202. "core-js/features/map/includes": [
  81203. "es.map",
  81204. "esnext.map.includes"
  81205. ],
  81206. "core-js/features/map/key-by": [
  81207. "es.map",
  81208. "esnext.map.key-by"
  81209. ],
  81210. "core-js/features/map/key-of": [
  81211. "es.map",
  81212. "esnext.map.key-of"
  81213. ],
  81214. "core-js/features/map/map-keys": [
  81215. "es.map",
  81216. "esnext.map.map-keys"
  81217. ],
  81218. "core-js/features/map/map-values": [
  81219. "es.map",
  81220. "esnext.map.map-values"
  81221. ],
  81222. "core-js/features/map/merge": [
  81223. "es.map",
  81224. "esnext.map.merge"
  81225. ],
  81226. "core-js/features/map/of": [
  81227. "es.map",
  81228. "es.string.iterator",
  81229. "esnext.map.of",
  81230. "web.dom-collections.iterator"
  81231. ],
  81232. "core-js/features/map/reduce": [
  81233. "es.map",
  81234. "esnext.map.reduce"
  81235. ],
  81236. "core-js/features/map/some": [
  81237. "es.map",
  81238. "esnext.map.some"
  81239. ],
  81240. "core-js/features/map/update": [
  81241. "es.map",
  81242. "esnext.map.update"
  81243. ],
  81244. "core-js/features/map/update-or-insert": [
  81245. "es.map",
  81246. "esnext.map.update-or-insert"
  81247. ],
  81248. "core-js/features/map/upsert": [
  81249. "es.map",
  81250. "esnext.map.upsert"
  81251. ],
  81252. "core-js/features/math": [
  81253. "es.math.acosh",
  81254. "es.math.asinh",
  81255. "es.math.atanh",
  81256. "es.math.cbrt",
  81257. "es.math.clz32",
  81258. "es.math.cosh",
  81259. "es.math.expm1",
  81260. "es.math.fround",
  81261. "es.math.hypot",
  81262. "es.math.imul",
  81263. "es.math.log10",
  81264. "es.math.log1p",
  81265. "es.math.log2",
  81266. "es.math.sign",
  81267. "es.math.sinh",
  81268. "es.math.tanh",
  81269. "es.math.to-string-tag",
  81270. "es.math.trunc",
  81271. "esnext.math.clamp",
  81272. "esnext.math.deg-per-rad",
  81273. "esnext.math.degrees",
  81274. "esnext.math.fscale",
  81275. "esnext.math.iaddh",
  81276. "esnext.math.imulh",
  81277. "esnext.math.isubh",
  81278. "esnext.math.rad-per-deg",
  81279. "esnext.math.radians",
  81280. "esnext.math.scale",
  81281. "esnext.math.seeded-prng",
  81282. "esnext.math.signbit",
  81283. "esnext.math.umulh"
  81284. ],
  81285. "core-js/features/math/acosh": [
  81286. "es.math.acosh"
  81287. ],
  81288. "core-js/features/math/asinh": [
  81289. "es.math.asinh"
  81290. ],
  81291. "core-js/features/math/atanh": [
  81292. "es.math.atanh"
  81293. ],
  81294. "core-js/features/math/cbrt": [
  81295. "es.math.cbrt"
  81296. ],
  81297. "core-js/features/math/clamp": [
  81298. "esnext.math.clamp"
  81299. ],
  81300. "core-js/features/math/clz32": [
  81301. "es.math.clz32"
  81302. ],
  81303. "core-js/features/math/cosh": [
  81304. "es.math.cosh"
  81305. ],
  81306. "core-js/features/math/deg-per-rad": [
  81307. "esnext.math.deg-per-rad"
  81308. ],
  81309. "core-js/features/math/degrees": [
  81310. "esnext.math.degrees"
  81311. ],
  81312. "core-js/features/math/expm1": [
  81313. "es.math.expm1"
  81314. ],
  81315. "core-js/features/math/fround": [
  81316. "es.math.fround"
  81317. ],
  81318. "core-js/features/math/fscale": [
  81319. "esnext.math.fscale"
  81320. ],
  81321. "core-js/features/math/hypot": [
  81322. "es.math.hypot"
  81323. ],
  81324. "core-js/features/math/iaddh": [
  81325. "esnext.math.iaddh"
  81326. ],
  81327. "core-js/features/math/imul": [
  81328. "es.math.imul"
  81329. ],
  81330. "core-js/features/math/imulh": [
  81331. "esnext.math.imulh"
  81332. ],
  81333. "core-js/features/math/isubh": [
  81334. "esnext.math.isubh"
  81335. ],
  81336. "core-js/features/math/log10": [
  81337. "es.math.log10"
  81338. ],
  81339. "core-js/features/math/log1p": [
  81340. "es.math.log1p"
  81341. ],
  81342. "core-js/features/math/log2": [
  81343. "es.math.log2"
  81344. ],
  81345. "core-js/features/math/rad-per-deg": [
  81346. "esnext.math.rad-per-deg"
  81347. ],
  81348. "core-js/features/math/radians": [
  81349. "esnext.math.radians"
  81350. ],
  81351. "core-js/features/math/scale": [
  81352. "esnext.math.scale"
  81353. ],
  81354. "core-js/features/math/seeded-prng": [
  81355. "esnext.math.seeded-prng"
  81356. ],
  81357. "core-js/features/math/sign": [
  81358. "es.math.sign"
  81359. ],
  81360. "core-js/features/math/signbit": [
  81361. "esnext.math.signbit"
  81362. ],
  81363. "core-js/features/math/sinh": [
  81364. "es.math.sinh"
  81365. ],
  81366. "core-js/features/math/tanh": [
  81367. "es.math.tanh"
  81368. ],
  81369. "core-js/features/math/to-string-tag": [
  81370. "es.math.to-string-tag"
  81371. ],
  81372. "core-js/features/math/trunc": [
  81373. "es.math.trunc"
  81374. ],
  81375. "core-js/features/math/umulh": [
  81376. "esnext.math.umulh"
  81377. ],
  81378. "core-js/features/number": [
  81379. "es.number.constructor",
  81380. "es.number.epsilon",
  81381. "es.number.is-finite",
  81382. "es.number.is-integer",
  81383. "es.number.is-nan",
  81384. "es.number.is-safe-integer",
  81385. "es.number.max-safe-integer",
  81386. "es.number.min-safe-integer",
  81387. "es.number.parse-float",
  81388. "es.number.parse-int",
  81389. "es.number.to-fixed",
  81390. "es.number.to-precision",
  81391. "esnext.number.from-string"
  81392. ],
  81393. "core-js/features/number/constructor": [
  81394. "es.number.constructor"
  81395. ],
  81396. "core-js/features/number/epsilon": [
  81397. "es.number.epsilon"
  81398. ],
  81399. "core-js/features/number/from-string": [
  81400. "esnext.number.from-string"
  81401. ],
  81402. "core-js/features/number/is-finite": [
  81403. "es.number.is-finite"
  81404. ],
  81405. "core-js/features/number/is-integer": [
  81406. "es.number.is-integer"
  81407. ],
  81408. "core-js/features/number/is-nan": [
  81409. "es.number.is-nan"
  81410. ],
  81411. "core-js/features/number/is-safe-integer": [
  81412. "es.number.is-safe-integer"
  81413. ],
  81414. "core-js/features/number/max-safe-integer": [
  81415. "es.number.max-safe-integer"
  81416. ],
  81417. "core-js/features/number/min-safe-integer": [
  81418. "es.number.min-safe-integer"
  81419. ],
  81420. "core-js/features/number/parse-float": [
  81421. "es.number.parse-float"
  81422. ],
  81423. "core-js/features/number/parse-int": [
  81424. "es.number.parse-int"
  81425. ],
  81426. "core-js/features/number/to-fixed": [
  81427. "es.number.to-fixed"
  81428. ],
  81429. "core-js/features/number/to-precision": [
  81430. "es.number.to-precision"
  81431. ],
  81432. "core-js/features/number/virtual": [
  81433. "es.number.to-fixed",
  81434. "es.number.to-precision"
  81435. ],
  81436. "core-js/features/number/virtual/to-fixed": [
  81437. "es.number.to-fixed"
  81438. ],
  81439. "core-js/features/number/virtual/to-precision": [
  81440. "es.number.to-precision"
  81441. ],
  81442. "core-js/features/object": [
  81443. "es.symbol",
  81444. "es.json.to-string-tag",
  81445. "es.math.to-string-tag",
  81446. "es.object.assign",
  81447. "es.object.create",
  81448. "es.object.define-getter",
  81449. "es.object.define-properties",
  81450. "es.object.define-property",
  81451. "es.object.define-setter",
  81452. "es.object.entries",
  81453. "es.object.freeze",
  81454. "es.object.from-entries",
  81455. "es.object.get-own-property-descriptor",
  81456. "es.object.get-own-property-descriptors",
  81457. "es.object.get-own-property-names",
  81458. "es.object.get-prototype-of",
  81459. "es.object.is",
  81460. "es.object.is-extensible",
  81461. "es.object.is-frozen",
  81462. "es.object.is-sealed",
  81463. "es.object.keys",
  81464. "es.object.lookup-getter",
  81465. "es.object.lookup-setter",
  81466. "es.object.prevent-extensions",
  81467. "es.object.seal",
  81468. "es.object.set-prototype-of",
  81469. "es.object.to-string",
  81470. "es.object.values",
  81471. "esnext.object.iterate-entries",
  81472. "esnext.object.iterate-keys",
  81473. "esnext.object.iterate-values"
  81474. ],
  81475. "core-js/features/object/assign": [
  81476. "es.object.assign"
  81477. ],
  81478. "core-js/features/object/create": [
  81479. "es.object.create"
  81480. ],
  81481. "core-js/features/object/define-getter": [
  81482. "es.object.define-getter"
  81483. ],
  81484. "core-js/features/object/define-properties": [
  81485. "es.object.define-properties"
  81486. ],
  81487. "core-js/features/object/define-property": [
  81488. "es.object.define-property"
  81489. ],
  81490. "core-js/features/object/define-setter": [
  81491. "es.object.define-setter"
  81492. ],
  81493. "core-js/features/object/entries": [
  81494. "es.object.entries"
  81495. ],
  81496. "core-js/features/object/freeze": [
  81497. "es.object.freeze"
  81498. ],
  81499. "core-js/features/object/from-entries": [
  81500. "es.array.iterator",
  81501. "es.object.from-entries"
  81502. ],
  81503. "core-js/features/object/get-own-property-descriptor": [
  81504. "es.object.get-own-property-descriptor"
  81505. ],
  81506. "core-js/features/object/get-own-property-descriptors": [
  81507. "es.object.get-own-property-descriptors"
  81508. ],
  81509. "core-js/features/object/get-own-property-names": [
  81510. "es.object.get-own-property-names"
  81511. ],
  81512. "core-js/features/object/get-own-property-symbols": [
  81513. "es.symbol"
  81514. ],
  81515. "core-js/features/object/get-prototype-of": [
  81516. "es.object.get-prototype-of"
  81517. ],
  81518. "core-js/features/object/is": [
  81519. "es.object.is"
  81520. ],
  81521. "core-js/features/object/is-extensible": [
  81522. "es.object.is-extensible"
  81523. ],
  81524. "core-js/features/object/is-frozen": [
  81525. "es.object.is-frozen"
  81526. ],
  81527. "core-js/features/object/is-sealed": [
  81528. "es.object.is-sealed"
  81529. ],
  81530. "core-js/features/object/iterate-entries": [
  81531. "esnext.object.iterate-entries"
  81532. ],
  81533. "core-js/features/object/iterate-keys": [
  81534. "esnext.object.iterate-keys"
  81535. ],
  81536. "core-js/features/object/iterate-values": [
  81537. "esnext.object.iterate-values"
  81538. ],
  81539. "core-js/features/object/keys": [
  81540. "es.object.keys"
  81541. ],
  81542. "core-js/features/object/lookup-getter": [
  81543. "es.object.lookup-setter"
  81544. ],
  81545. "core-js/features/object/lookup-setter": [
  81546. "es.object.lookup-setter"
  81547. ],
  81548. "core-js/features/object/prevent-extensions": [
  81549. "es.object.prevent-extensions"
  81550. ],
  81551. "core-js/features/object/seal": [
  81552. "es.object.seal"
  81553. ],
  81554. "core-js/features/object/set-prototype-of": [
  81555. "es.object.set-prototype-of"
  81556. ],
  81557. "core-js/features/object/to-string": [
  81558. "es.json.to-string-tag",
  81559. "es.math.to-string-tag",
  81560. "es.object.to-string"
  81561. ],
  81562. "core-js/features/object/values": [
  81563. "es.object.values"
  81564. ],
  81565. "core-js/features/observable": [
  81566. "es.object.to-string",
  81567. "es.string.iterator",
  81568. "esnext.observable",
  81569. "esnext.symbol.observable",
  81570. "web.dom-collections.iterator"
  81571. ],
  81572. "core-js/features/parse-float": [
  81573. "es.parse-float"
  81574. ],
  81575. "core-js/features/parse-int": [
  81576. "es.parse-int"
  81577. ],
  81578. "core-js/features/promise": [
  81579. "es.object.to-string",
  81580. "es.promise",
  81581. "es.promise.all-settled",
  81582. "es.promise.finally",
  81583. "es.string.iterator",
  81584. "esnext.aggregate-error",
  81585. "esnext.promise.all-settled",
  81586. "esnext.promise.any",
  81587. "esnext.promise.try",
  81588. "web.dom-collections.iterator"
  81589. ],
  81590. "core-js/features/promise/all-settled": [
  81591. "es.promise",
  81592. "es.promise.all-settled",
  81593. "esnext.promise.all-settled"
  81594. ],
  81595. "core-js/features/promise/any": [
  81596. "es.promise",
  81597. "esnext.aggregate-error",
  81598. "esnext.promise.any"
  81599. ],
  81600. "core-js/features/promise/finally": [
  81601. "es.promise",
  81602. "es.promise.finally"
  81603. ],
  81604. "core-js/features/promise/try": [
  81605. "es.promise",
  81606. "esnext.promise.try"
  81607. ],
  81608. "core-js/features/queue-microtask": [
  81609. "web.queue-microtask"
  81610. ],
  81611. "core-js/features/reflect": [
  81612. "es.reflect.apply",
  81613. "es.reflect.construct",
  81614. "es.reflect.define-property",
  81615. "es.reflect.delete-property",
  81616. "es.reflect.get",
  81617. "es.reflect.get-own-property-descriptor",
  81618. "es.reflect.get-prototype-of",
  81619. "es.reflect.has",
  81620. "es.reflect.is-extensible",
  81621. "es.reflect.own-keys",
  81622. "es.reflect.prevent-extensions",
  81623. "es.reflect.set",
  81624. "es.reflect.set-prototype-of",
  81625. "esnext.reflect.define-metadata",
  81626. "esnext.reflect.delete-metadata",
  81627. "esnext.reflect.get-metadata",
  81628. "esnext.reflect.get-metadata-keys",
  81629. "esnext.reflect.get-own-metadata",
  81630. "esnext.reflect.get-own-metadata-keys",
  81631. "esnext.reflect.has-metadata",
  81632. "esnext.reflect.has-own-metadata",
  81633. "esnext.reflect.metadata"
  81634. ],
  81635. "core-js/features/reflect/apply": [
  81636. "es.reflect.apply"
  81637. ],
  81638. "core-js/features/reflect/construct": [
  81639. "es.reflect.construct"
  81640. ],
  81641. "core-js/features/reflect/define-metadata": [
  81642. "esnext.reflect.define-metadata"
  81643. ],
  81644. "core-js/features/reflect/define-property": [
  81645. "es.reflect.define-property"
  81646. ],
  81647. "core-js/features/reflect/delete-metadata": [
  81648. "esnext.reflect.delete-metadata"
  81649. ],
  81650. "core-js/features/reflect/delete-property": [
  81651. "es.reflect.delete-property"
  81652. ],
  81653. "core-js/features/reflect/get": [
  81654. "es.reflect.get"
  81655. ],
  81656. "core-js/features/reflect/get-metadata": [
  81657. "esnext.reflect.get-metadata"
  81658. ],
  81659. "core-js/features/reflect/get-metadata-keys": [
  81660. "esnext.reflect.get-metadata-keys"
  81661. ],
  81662. "core-js/features/reflect/get-own-metadata": [
  81663. "esnext.reflect.get-own-metadata"
  81664. ],
  81665. "core-js/features/reflect/get-own-metadata-keys": [
  81666. "esnext.reflect.get-own-metadata-keys"
  81667. ],
  81668. "core-js/features/reflect/get-own-property-descriptor": [
  81669. "es.reflect.get-own-property-descriptor"
  81670. ],
  81671. "core-js/features/reflect/get-prototype-of": [
  81672. "es.reflect.get-prototype-of"
  81673. ],
  81674. "core-js/features/reflect/has": [
  81675. "es.reflect.has"
  81676. ],
  81677. "core-js/features/reflect/has-metadata": [
  81678. "esnext.reflect.has-metadata"
  81679. ],
  81680. "core-js/features/reflect/has-own-metadata": [
  81681. "esnext.reflect.has-own-metadata"
  81682. ],
  81683. "core-js/features/reflect/is-extensible": [
  81684. "es.reflect.is-extensible"
  81685. ],
  81686. "core-js/features/reflect/metadata": [
  81687. "esnext.reflect.metadata"
  81688. ],
  81689. "core-js/features/reflect/own-keys": [
  81690. "es.reflect.own-keys"
  81691. ],
  81692. "core-js/features/reflect/prevent-extensions": [
  81693. "es.reflect.prevent-extensions"
  81694. ],
  81695. "core-js/features/reflect/set": [
  81696. "es.reflect.set"
  81697. ],
  81698. "core-js/features/reflect/set-prototype-of": [
  81699. "es.reflect.set-prototype-of"
  81700. ],
  81701. "core-js/features/regexp": [
  81702. "es.regexp.constructor",
  81703. "es.regexp.exec",
  81704. "es.regexp.flags",
  81705. "es.regexp.sticky",
  81706. "es.regexp.test",
  81707. "es.regexp.to-string",
  81708. "es.string.match",
  81709. "es.string.replace",
  81710. "es.string.search",
  81711. "es.string.split"
  81712. ],
  81713. "core-js/features/regexp/constructor": [
  81714. "es.regexp.constructor"
  81715. ],
  81716. "core-js/features/regexp/flags": [
  81717. "es.regexp.flags"
  81718. ],
  81719. "core-js/features/regexp/match": [
  81720. "es.string.match"
  81721. ],
  81722. "core-js/features/regexp/replace": [
  81723. "es.string.replace"
  81724. ],
  81725. "core-js/features/regexp/search": [
  81726. "es.string.search"
  81727. ],
  81728. "core-js/features/regexp/split": [
  81729. "es.string.split"
  81730. ],
  81731. "core-js/features/regexp/sticky": [
  81732. "es.regexp.sticky"
  81733. ],
  81734. "core-js/features/regexp/test": [
  81735. "es.regexp.exec",
  81736. "es.regexp.test"
  81737. ],
  81738. "core-js/features/regexp/to-string": [
  81739. "es.regexp.to-string"
  81740. ],
  81741. "core-js/features/set": [
  81742. "es.object.to-string",
  81743. "es.set",
  81744. "es.string.iterator",
  81745. "esnext.set.add-all",
  81746. "esnext.set.delete-all",
  81747. "esnext.set.difference",
  81748. "esnext.set.every",
  81749. "esnext.set.filter",
  81750. "esnext.set.find",
  81751. "esnext.set.from",
  81752. "esnext.set.intersection",
  81753. "esnext.set.is-disjoint-from",
  81754. "esnext.set.is-subset-of",
  81755. "esnext.set.is-superset-of",
  81756. "esnext.set.join",
  81757. "esnext.set.map",
  81758. "esnext.set.of",
  81759. "esnext.set.reduce",
  81760. "esnext.set.some",
  81761. "esnext.set.symmetric-difference",
  81762. "esnext.set.union",
  81763. "web.dom-collections.iterator"
  81764. ],
  81765. "core-js/features/set-immediate": [
  81766. "web.immediate"
  81767. ],
  81768. "core-js/features/set-interval": [
  81769. "web.timers"
  81770. ],
  81771. "core-js/features/set-timeout": [
  81772. "web.timers"
  81773. ],
  81774. "core-js/features/set/add-all": [
  81775. "es.set",
  81776. "esnext.set.add-all"
  81777. ],
  81778. "core-js/features/set/delete-all": [
  81779. "es.set",
  81780. "esnext.set.delete-all"
  81781. ],
  81782. "core-js/features/set/difference": [
  81783. "es.set",
  81784. "es.string.iterator",
  81785. "esnext.set.difference",
  81786. "web.dom-collections.iterator"
  81787. ],
  81788. "core-js/features/set/every": [
  81789. "es.set",
  81790. "esnext.set.every"
  81791. ],
  81792. "core-js/features/set/filter": [
  81793. "es.set",
  81794. "esnext.set.filter"
  81795. ],
  81796. "core-js/features/set/find": [
  81797. "es.set",
  81798. "esnext.set.find"
  81799. ],
  81800. "core-js/features/set/from": [
  81801. "es.set",
  81802. "es.string.iterator",
  81803. "esnext.set.from",
  81804. "web.dom-collections.iterator"
  81805. ],
  81806. "core-js/features/set/intersection": [
  81807. "es.set",
  81808. "esnext.set.intersection"
  81809. ],
  81810. "core-js/features/set/is-disjoint-from": [
  81811. "es.set",
  81812. "esnext.set.is-disjoint-from"
  81813. ],
  81814. "core-js/features/set/is-subset-of": [
  81815. "es.set",
  81816. "es.string.iterator",
  81817. "esnext.set.is-subset-of",
  81818. "web.dom-collections.iterator"
  81819. ],
  81820. "core-js/features/set/is-superset-of": [
  81821. "es.set",
  81822. "esnext.set.is-superset-of"
  81823. ],
  81824. "core-js/features/set/join": [
  81825. "es.set",
  81826. "esnext.set.join"
  81827. ],
  81828. "core-js/features/set/map": [
  81829. "es.set",
  81830. "esnext.set.map"
  81831. ],
  81832. "core-js/features/set/of": [
  81833. "es.set",
  81834. "es.string.iterator",
  81835. "esnext.set.of",
  81836. "web.dom-collections.iterator"
  81837. ],
  81838. "core-js/features/set/reduce": [
  81839. "es.set",
  81840. "esnext.set.reduce"
  81841. ],
  81842. "core-js/features/set/some": [
  81843. "es.set",
  81844. "esnext.set.some"
  81845. ],
  81846. "core-js/features/set/symmetric-difference": [
  81847. "es.set",
  81848. "es.string.iterator",
  81849. "esnext.set.symmetric-difference",
  81850. "web.dom-collections.iterator"
  81851. ],
  81852. "core-js/features/set/union": [
  81853. "es.set",
  81854. "es.string.iterator",
  81855. "esnext.set.union",
  81856. "web.dom-collections.iterator"
  81857. ],
  81858. "core-js/features/string": [
  81859. "es.regexp.exec",
  81860. "es.string.code-point-at",
  81861. "es.string.ends-with",
  81862. "es.string.from-code-point",
  81863. "es.string.includes",
  81864. "es.string.iterator",
  81865. "es.string.match",
  81866. "es.string.match-all",
  81867. "es.string.pad-end",
  81868. "es.string.pad-start",
  81869. "es.string.raw",
  81870. "es.string.repeat",
  81871. "es.string.replace",
  81872. "es.string.search",
  81873. "es.string.split",
  81874. "es.string.starts-with",
  81875. "es.string.trim",
  81876. "es.string.trim-end",
  81877. "es.string.trim-start",
  81878. "es.string.anchor",
  81879. "es.string.big",
  81880. "es.string.blink",
  81881. "es.string.bold",
  81882. "es.string.fixed",
  81883. "es.string.fontcolor",
  81884. "es.string.fontsize",
  81885. "es.string.italics",
  81886. "es.string.link",
  81887. "es.string.small",
  81888. "es.string.strike",
  81889. "es.string.sub",
  81890. "es.string.sup",
  81891. "esnext.string.at",
  81892. "esnext.string.code-points",
  81893. "esnext.string.match-all",
  81894. "esnext.string.replace-all"
  81895. ],
  81896. "core-js/features/string/anchor": [
  81897. "es.string.anchor"
  81898. ],
  81899. "core-js/features/string/at": [
  81900. "esnext.string.at"
  81901. ],
  81902. "core-js/features/string/big": [
  81903. "es.string.big"
  81904. ],
  81905. "core-js/features/string/blink": [
  81906. "es.string.blink"
  81907. ],
  81908. "core-js/features/string/bold": [
  81909. "es.string.bold"
  81910. ],
  81911. "core-js/features/string/code-point-at": [
  81912. "es.string.code-point-at"
  81913. ],
  81914. "core-js/features/string/code-points": [
  81915. "esnext.string.code-points"
  81916. ],
  81917. "core-js/features/string/ends-with": [
  81918. "es.string.ends-with"
  81919. ],
  81920. "core-js/features/string/fixed": [
  81921. "es.string.fixed"
  81922. ],
  81923. "core-js/features/string/fontcolor": [
  81924. "es.string.fontcolor"
  81925. ],
  81926. "core-js/features/string/fontsize": [
  81927. "es.string.fontsize"
  81928. ],
  81929. "core-js/features/string/from-code-point": [
  81930. "es.string.from-code-point"
  81931. ],
  81932. "core-js/features/string/includes": [
  81933. "es.string.includes"
  81934. ],
  81935. "core-js/features/string/italics": [
  81936. "es.string.italics"
  81937. ],
  81938. "core-js/features/string/iterator": [
  81939. "es.string.iterator"
  81940. ],
  81941. "core-js/features/string/link": [
  81942. "es.string.link"
  81943. ],
  81944. "core-js/features/string/match": [
  81945. "es.regexp.exec",
  81946. "es.string.match"
  81947. ],
  81948. "core-js/features/string/match-all": [
  81949. "es.string.match-all",
  81950. "esnext.string.match-all"
  81951. ],
  81952. "core-js/features/string/pad-end": [
  81953. "es.string.pad-end"
  81954. ],
  81955. "core-js/features/string/pad-start": [
  81956. "es.string.pad-start"
  81957. ],
  81958. "core-js/features/string/raw": [
  81959. "es.string.raw"
  81960. ],
  81961. "core-js/features/string/repeat": [
  81962. "es.string.repeat"
  81963. ],
  81964. "core-js/features/string/replace": [
  81965. "es.regexp.exec",
  81966. "es.string.replace"
  81967. ],
  81968. "core-js/features/string/replace-all": [
  81969. "esnext.string.replace-all"
  81970. ],
  81971. "core-js/features/string/search": [
  81972. "es.regexp.exec",
  81973. "es.string.search"
  81974. ],
  81975. "core-js/features/string/small": [
  81976. "es.string.small"
  81977. ],
  81978. "core-js/features/string/split": [
  81979. "es.regexp.exec",
  81980. "es.string.split"
  81981. ],
  81982. "core-js/features/string/starts-with": [
  81983. "es.string.starts-with"
  81984. ],
  81985. "core-js/features/string/strike": [
  81986. "es.string.strike"
  81987. ],
  81988. "core-js/features/string/sub": [
  81989. "es.string.sub"
  81990. ],
  81991. "core-js/features/string/sup": [
  81992. "es.string.sup"
  81993. ],
  81994. "core-js/features/string/trim": [
  81995. "es.string.trim"
  81996. ],
  81997. "core-js/features/string/trim-end": [
  81998. "es.string.trim-end"
  81999. ],
  82000. "core-js/features/string/trim-left": [
  82001. "es.string.trim-start"
  82002. ],
  82003. "core-js/features/string/trim-right": [
  82004. "es.string.trim-end"
  82005. ],
  82006. "core-js/features/string/trim-start": [
  82007. "es.string.trim-start"
  82008. ],
  82009. "core-js/features/string/virtual": [
  82010. "es.string.code-point-at",
  82011. "es.string.ends-with",
  82012. "es.string.includes",
  82013. "es.string.iterator",
  82014. "es.string.match",
  82015. "es.string.match-all",
  82016. "es.string.pad-end",
  82017. "es.string.pad-start",
  82018. "es.string.repeat",
  82019. "es.string.replace",
  82020. "es.string.search",
  82021. "es.string.split",
  82022. "es.string.starts-with",
  82023. "es.string.trim",
  82024. "es.string.trim-end",
  82025. "es.string.trim-start",
  82026. "es.string.anchor",
  82027. "es.string.big",
  82028. "es.string.blink",
  82029. "es.string.bold",
  82030. "es.string.fixed",
  82031. "es.string.fontcolor",
  82032. "es.string.fontsize",
  82033. "es.string.italics",
  82034. "es.string.link",
  82035. "es.string.small",
  82036. "es.string.strike",
  82037. "es.string.sub",
  82038. "es.string.sup",
  82039. "esnext.string.at",
  82040. "esnext.string.code-points",
  82041. "esnext.string.match-all",
  82042. "esnext.string.replace-all"
  82043. ],
  82044. "core-js/features/string/virtual/anchor": [
  82045. "es.string.anchor"
  82046. ],
  82047. "core-js/features/string/virtual/at": [
  82048. "esnext.string.at"
  82049. ],
  82050. "core-js/features/string/virtual/big": [
  82051. "es.string.big"
  82052. ],
  82053. "core-js/features/string/virtual/blink": [
  82054. "es.string.blink"
  82055. ],
  82056. "core-js/features/string/virtual/bold": [
  82057. "es.string.bold"
  82058. ],
  82059. "core-js/features/string/virtual/code-point-at": [
  82060. "es.string.code-point-at"
  82061. ],
  82062. "core-js/features/string/virtual/code-points": [
  82063. "esnext.string.code-points"
  82064. ],
  82065. "core-js/features/string/virtual/ends-with": [
  82066. "es.string.ends-with"
  82067. ],
  82068. "core-js/features/string/virtual/fixed": [
  82069. "es.string.fixed"
  82070. ],
  82071. "core-js/features/string/virtual/fontcolor": [
  82072. "es.string.fontcolor"
  82073. ],
  82074. "core-js/features/string/virtual/fontsize": [
  82075. "es.string.fontsize"
  82076. ],
  82077. "core-js/features/string/virtual/includes": [
  82078. "es.string.includes"
  82079. ],
  82080. "core-js/features/string/virtual/italics": [
  82081. "es.string.italics"
  82082. ],
  82083. "core-js/features/string/virtual/iterator": [
  82084. "es.string.iterator"
  82085. ],
  82086. "core-js/features/string/virtual/link": [
  82087. "es.string.link"
  82088. ],
  82089. "core-js/features/string/virtual/match-all": [
  82090. "es.string.match-all",
  82091. "esnext.string.match-all"
  82092. ],
  82093. "core-js/features/string/virtual/pad-end": [
  82094. "es.string.pad-end"
  82095. ],
  82096. "core-js/features/string/virtual/pad-start": [
  82097. "es.string.pad-start"
  82098. ],
  82099. "core-js/features/string/virtual/repeat": [
  82100. "es.string.repeat"
  82101. ],
  82102. "core-js/features/string/virtual/replace-all": [
  82103. "esnext.string.replace-all"
  82104. ],
  82105. "core-js/features/string/virtual/small": [
  82106. "es.string.small"
  82107. ],
  82108. "core-js/features/string/virtual/starts-with": [
  82109. "es.string.starts-with"
  82110. ],
  82111. "core-js/features/string/virtual/strike": [
  82112. "es.string.strike"
  82113. ],
  82114. "core-js/features/string/virtual/sub": [
  82115. "es.string.sub"
  82116. ],
  82117. "core-js/features/string/virtual/sup": [
  82118. "es.string.sup"
  82119. ],
  82120. "core-js/features/string/virtual/trim": [
  82121. "es.string.trim"
  82122. ],
  82123. "core-js/features/string/virtual/trim-end": [
  82124. "es.string.trim-end"
  82125. ],
  82126. "core-js/features/string/virtual/trim-left": [
  82127. "es.string.trim-start"
  82128. ],
  82129. "core-js/features/string/virtual/trim-right": [
  82130. "es.string.trim-end"
  82131. ],
  82132. "core-js/features/string/virtual/trim-start": [
  82133. "es.string.trim-start"
  82134. ],
  82135. "core-js/features/symbol": [
  82136. "es.symbol",
  82137. "es.symbol.description",
  82138. "es.symbol.async-iterator",
  82139. "es.symbol.has-instance",
  82140. "es.symbol.is-concat-spreadable",
  82141. "es.symbol.iterator",
  82142. "es.symbol.match",
  82143. "es.symbol.match-all",
  82144. "es.symbol.replace",
  82145. "es.symbol.search",
  82146. "es.symbol.species",
  82147. "es.symbol.split",
  82148. "es.symbol.to-primitive",
  82149. "es.symbol.to-string-tag",
  82150. "es.symbol.unscopables",
  82151. "es.array.concat",
  82152. "es.json.to-string-tag",
  82153. "es.math.to-string-tag",
  82154. "es.object.to-string",
  82155. "esnext.symbol.async-dispose",
  82156. "esnext.symbol.dispose",
  82157. "esnext.symbol.observable",
  82158. "esnext.symbol.pattern-match",
  82159. "esnext.symbol.replace-all"
  82160. ],
  82161. "core-js/features/symbol/async-dispose": [
  82162. "esnext.symbol.async-dispose"
  82163. ],
  82164. "core-js/features/symbol/async-iterator": [
  82165. "es.symbol.async-iterator"
  82166. ],
  82167. "core-js/features/symbol/description": [
  82168. "es.symbol.description"
  82169. ],
  82170. "core-js/features/symbol/dispose": [
  82171. "esnext.symbol.dispose"
  82172. ],
  82173. "core-js/features/symbol/for": [
  82174. "es.symbol"
  82175. ],
  82176. "core-js/features/symbol/has-instance": [
  82177. "es.symbol.has-instance",
  82178. "es.function.has-instance"
  82179. ],
  82180. "core-js/features/symbol/is-concat-spreadable": [
  82181. "es.symbol.is-concat-spreadable",
  82182. "es.array.concat"
  82183. ],
  82184. "core-js/features/symbol/iterator": [
  82185. "es.symbol.iterator",
  82186. "es.string.iterator",
  82187. "web.dom-collections.iterator"
  82188. ],
  82189. "core-js/features/symbol/key-for": [
  82190. "es.symbol"
  82191. ],
  82192. "core-js/features/symbol/match": [
  82193. "es.symbol.match",
  82194. "es.string.match"
  82195. ],
  82196. "core-js/features/symbol/match-all": [
  82197. "es.symbol.match-all",
  82198. "es.string.match-all"
  82199. ],
  82200. "core-js/features/symbol/observable": [
  82201. "esnext.symbol.observable"
  82202. ],
  82203. "core-js/features/symbol/pattern-match": [
  82204. "esnext.symbol.pattern-match"
  82205. ],
  82206. "core-js/features/symbol/replace": [
  82207. "es.symbol.replace",
  82208. "es.string.replace"
  82209. ],
  82210. "core-js/features/symbol/replace-all": [
  82211. "esnext.symbol.replace-all"
  82212. ],
  82213. "core-js/features/symbol/search": [
  82214. "es.symbol.search",
  82215. "es.string.search"
  82216. ],
  82217. "core-js/features/symbol/species": [
  82218. "es.symbol.species"
  82219. ],
  82220. "core-js/features/symbol/split": [
  82221. "es.symbol.split",
  82222. "es.string.split"
  82223. ],
  82224. "core-js/features/symbol/to-primitive": [
  82225. "es.symbol.to-primitive"
  82226. ],
  82227. "core-js/features/symbol/to-string-tag": [
  82228. "es.symbol.to-string-tag",
  82229. "es.json.to-string-tag",
  82230. "es.math.to-string-tag",
  82231. "es.object.to-string"
  82232. ],
  82233. "core-js/features/symbol/unscopables": [
  82234. "es.symbol.unscopables"
  82235. ],
  82236. "core-js/features/typed-array": [
  82237. "es.object.to-string",
  82238. "es.typed-array.float32-array",
  82239. "es.typed-array.float64-array",
  82240. "es.typed-array.int8-array",
  82241. "es.typed-array.int16-array",
  82242. "es.typed-array.int32-array",
  82243. "es.typed-array.uint8-array",
  82244. "es.typed-array.uint8-clamped-array",
  82245. "es.typed-array.uint16-array",
  82246. "es.typed-array.uint32-array",
  82247. "es.typed-array.copy-within",
  82248. "es.typed-array.every",
  82249. "es.typed-array.fill",
  82250. "es.typed-array.filter",
  82251. "es.typed-array.find",
  82252. "es.typed-array.find-index",
  82253. "es.typed-array.for-each",
  82254. "es.typed-array.from",
  82255. "es.typed-array.includes",
  82256. "es.typed-array.index-of",
  82257. "es.typed-array.iterator",
  82258. "es.typed-array.join",
  82259. "es.typed-array.last-index-of",
  82260. "es.typed-array.map",
  82261. "es.typed-array.of",
  82262. "es.typed-array.reduce",
  82263. "es.typed-array.reduce-right",
  82264. "es.typed-array.reverse",
  82265. "es.typed-array.set",
  82266. "es.typed-array.slice",
  82267. "es.typed-array.some",
  82268. "es.typed-array.sort",
  82269. "es.typed-array.subarray",
  82270. "es.typed-array.to-locale-string",
  82271. "es.typed-array.to-string"
  82272. ],
  82273. "core-js/features/typed-array/copy-within": [
  82274. "es.typed-array.copy-within"
  82275. ],
  82276. "core-js/features/typed-array/entries": [
  82277. "es.typed-array.iterator"
  82278. ],
  82279. "core-js/features/typed-array/every": [
  82280. "es.typed-array.every"
  82281. ],
  82282. "core-js/features/typed-array/fill": [
  82283. "es.typed-array.fill"
  82284. ],
  82285. "core-js/features/typed-array/filter": [
  82286. "es.typed-array.filter"
  82287. ],
  82288. "core-js/features/typed-array/find": [
  82289. "es.typed-array.find"
  82290. ],
  82291. "core-js/features/typed-array/find-index": [
  82292. "es.typed-array.find-index"
  82293. ],
  82294. "core-js/features/typed-array/float32-array": [
  82295. "es.object.to-string",
  82296. "es.typed-array.float32-array",
  82297. "es.typed-array.copy-within",
  82298. "es.typed-array.every",
  82299. "es.typed-array.fill",
  82300. "es.typed-array.filter",
  82301. "es.typed-array.find",
  82302. "es.typed-array.find-index",
  82303. "es.typed-array.for-each",
  82304. "es.typed-array.from",
  82305. "es.typed-array.includes",
  82306. "es.typed-array.index-of",
  82307. "es.typed-array.iterator",
  82308. "es.typed-array.join",
  82309. "es.typed-array.last-index-of",
  82310. "es.typed-array.map",
  82311. "es.typed-array.of",
  82312. "es.typed-array.reduce",
  82313. "es.typed-array.reduce-right",
  82314. "es.typed-array.reverse",
  82315. "es.typed-array.set",
  82316. "es.typed-array.slice",
  82317. "es.typed-array.some",
  82318. "es.typed-array.sort",
  82319. "es.typed-array.subarray",
  82320. "es.typed-array.to-locale-string",
  82321. "es.typed-array.to-string"
  82322. ],
  82323. "core-js/features/typed-array/float64-array": [
  82324. "es.object.to-string",
  82325. "es.typed-array.float64-array",
  82326. "es.typed-array.copy-within",
  82327. "es.typed-array.every",
  82328. "es.typed-array.fill",
  82329. "es.typed-array.filter",
  82330. "es.typed-array.find",
  82331. "es.typed-array.find-index",
  82332. "es.typed-array.for-each",
  82333. "es.typed-array.from",
  82334. "es.typed-array.includes",
  82335. "es.typed-array.index-of",
  82336. "es.typed-array.iterator",
  82337. "es.typed-array.join",
  82338. "es.typed-array.last-index-of",
  82339. "es.typed-array.map",
  82340. "es.typed-array.of",
  82341. "es.typed-array.reduce",
  82342. "es.typed-array.reduce-right",
  82343. "es.typed-array.reverse",
  82344. "es.typed-array.set",
  82345. "es.typed-array.slice",
  82346. "es.typed-array.some",
  82347. "es.typed-array.sort",
  82348. "es.typed-array.subarray",
  82349. "es.typed-array.to-locale-string",
  82350. "es.typed-array.to-string"
  82351. ],
  82352. "core-js/features/typed-array/for-each": [
  82353. "es.typed-array.for-each"
  82354. ],
  82355. "core-js/features/typed-array/from": [
  82356. "es.typed-array.from"
  82357. ],
  82358. "core-js/features/typed-array/includes": [
  82359. "es.typed-array.includes"
  82360. ],
  82361. "core-js/features/typed-array/index-of": [
  82362. "es.typed-array.index-of"
  82363. ],
  82364. "core-js/features/typed-array/int16-array": [
  82365. "es.object.to-string",
  82366. "es.typed-array.int16-array",
  82367. "es.typed-array.copy-within",
  82368. "es.typed-array.every",
  82369. "es.typed-array.fill",
  82370. "es.typed-array.filter",
  82371. "es.typed-array.find",
  82372. "es.typed-array.find-index",
  82373. "es.typed-array.for-each",
  82374. "es.typed-array.from",
  82375. "es.typed-array.includes",
  82376. "es.typed-array.index-of",
  82377. "es.typed-array.iterator",
  82378. "es.typed-array.join",
  82379. "es.typed-array.last-index-of",
  82380. "es.typed-array.map",
  82381. "es.typed-array.of",
  82382. "es.typed-array.reduce",
  82383. "es.typed-array.reduce-right",
  82384. "es.typed-array.reverse",
  82385. "es.typed-array.set",
  82386. "es.typed-array.slice",
  82387. "es.typed-array.some",
  82388. "es.typed-array.sort",
  82389. "es.typed-array.subarray",
  82390. "es.typed-array.to-locale-string",
  82391. "es.typed-array.to-string"
  82392. ],
  82393. "core-js/features/typed-array/int32-array": [
  82394. "es.object.to-string",
  82395. "es.typed-array.int32-array",
  82396. "es.typed-array.copy-within",
  82397. "es.typed-array.every",
  82398. "es.typed-array.fill",
  82399. "es.typed-array.filter",
  82400. "es.typed-array.find",
  82401. "es.typed-array.find-index",
  82402. "es.typed-array.for-each",
  82403. "es.typed-array.from",
  82404. "es.typed-array.includes",
  82405. "es.typed-array.index-of",
  82406. "es.typed-array.iterator",
  82407. "es.typed-array.join",
  82408. "es.typed-array.last-index-of",
  82409. "es.typed-array.map",
  82410. "es.typed-array.of",
  82411. "es.typed-array.reduce",
  82412. "es.typed-array.reduce-right",
  82413. "es.typed-array.reverse",
  82414. "es.typed-array.set",
  82415. "es.typed-array.slice",
  82416. "es.typed-array.some",
  82417. "es.typed-array.sort",
  82418. "es.typed-array.subarray",
  82419. "es.typed-array.to-locale-string",
  82420. "es.typed-array.to-string"
  82421. ],
  82422. "core-js/features/typed-array/int8-array": [
  82423. "es.object.to-string",
  82424. "es.typed-array.int8-array",
  82425. "es.typed-array.copy-within",
  82426. "es.typed-array.every",
  82427. "es.typed-array.fill",
  82428. "es.typed-array.filter",
  82429. "es.typed-array.find",
  82430. "es.typed-array.find-index",
  82431. "es.typed-array.for-each",
  82432. "es.typed-array.from",
  82433. "es.typed-array.includes",
  82434. "es.typed-array.index-of",
  82435. "es.typed-array.iterator",
  82436. "es.typed-array.join",
  82437. "es.typed-array.last-index-of",
  82438. "es.typed-array.map",
  82439. "es.typed-array.of",
  82440. "es.typed-array.reduce",
  82441. "es.typed-array.reduce-right",
  82442. "es.typed-array.reverse",
  82443. "es.typed-array.set",
  82444. "es.typed-array.slice",
  82445. "es.typed-array.some",
  82446. "es.typed-array.sort",
  82447. "es.typed-array.subarray",
  82448. "es.typed-array.to-locale-string",
  82449. "es.typed-array.to-string"
  82450. ],
  82451. "core-js/features/typed-array/iterator": [
  82452. "es.typed-array.iterator"
  82453. ],
  82454. "core-js/features/typed-array/join": [
  82455. "es.typed-array.join"
  82456. ],
  82457. "core-js/features/typed-array/keys": [
  82458. "es.typed-array.iterator"
  82459. ],
  82460. "core-js/features/typed-array/last-index-of": [
  82461. "es.typed-array.last-index-of"
  82462. ],
  82463. "core-js/features/typed-array/map": [
  82464. "es.typed-array.map"
  82465. ],
  82466. "core-js/features/typed-array/of": [
  82467. "es.typed-array.of"
  82468. ],
  82469. "core-js/features/typed-array/reduce": [
  82470. "es.typed-array.reduce"
  82471. ],
  82472. "core-js/features/typed-array/reduce-right": [
  82473. "es.typed-array.reduce-right"
  82474. ],
  82475. "core-js/features/typed-array/reverse": [
  82476. "es.typed-array.reverse"
  82477. ],
  82478. "core-js/features/typed-array/set": [
  82479. "es.typed-array.set"
  82480. ],
  82481. "core-js/features/typed-array/slice": [
  82482. "es.typed-array.slice"
  82483. ],
  82484. "core-js/features/typed-array/some": [
  82485. "es.typed-array.some"
  82486. ],
  82487. "core-js/features/typed-array/sort": [
  82488. "es.typed-array.sort"
  82489. ],
  82490. "core-js/features/typed-array/subarray": [
  82491. "es.typed-array.subarray"
  82492. ],
  82493. "core-js/features/typed-array/to-locale-string": [
  82494. "es.typed-array.to-locale-string"
  82495. ],
  82496. "core-js/features/typed-array/to-string": [
  82497. "es.typed-array.to-string"
  82498. ],
  82499. "core-js/features/typed-array/uint16-array": [
  82500. "es.object.to-string",
  82501. "es.typed-array.uint16-array",
  82502. "es.typed-array.copy-within",
  82503. "es.typed-array.every",
  82504. "es.typed-array.fill",
  82505. "es.typed-array.filter",
  82506. "es.typed-array.find",
  82507. "es.typed-array.find-index",
  82508. "es.typed-array.for-each",
  82509. "es.typed-array.from",
  82510. "es.typed-array.includes",
  82511. "es.typed-array.index-of",
  82512. "es.typed-array.iterator",
  82513. "es.typed-array.join",
  82514. "es.typed-array.last-index-of",
  82515. "es.typed-array.map",
  82516. "es.typed-array.of",
  82517. "es.typed-array.reduce",
  82518. "es.typed-array.reduce-right",
  82519. "es.typed-array.reverse",
  82520. "es.typed-array.set",
  82521. "es.typed-array.slice",
  82522. "es.typed-array.some",
  82523. "es.typed-array.sort",
  82524. "es.typed-array.subarray",
  82525. "es.typed-array.to-locale-string",
  82526. "es.typed-array.to-string"
  82527. ],
  82528. "core-js/features/typed-array/uint32-array": [
  82529. "es.object.to-string",
  82530. "es.typed-array.uint32-array",
  82531. "es.typed-array.copy-within",
  82532. "es.typed-array.every",
  82533. "es.typed-array.fill",
  82534. "es.typed-array.filter",
  82535. "es.typed-array.find",
  82536. "es.typed-array.find-index",
  82537. "es.typed-array.for-each",
  82538. "es.typed-array.from",
  82539. "es.typed-array.includes",
  82540. "es.typed-array.index-of",
  82541. "es.typed-array.iterator",
  82542. "es.typed-array.join",
  82543. "es.typed-array.last-index-of",
  82544. "es.typed-array.map",
  82545. "es.typed-array.of",
  82546. "es.typed-array.reduce",
  82547. "es.typed-array.reduce-right",
  82548. "es.typed-array.reverse",
  82549. "es.typed-array.set",
  82550. "es.typed-array.slice",
  82551. "es.typed-array.some",
  82552. "es.typed-array.sort",
  82553. "es.typed-array.subarray",
  82554. "es.typed-array.to-locale-string",
  82555. "es.typed-array.to-string"
  82556. ],
  82557. "core-js/features/typed-array/uint8-array": [
  82558. "es.object.to-string",
  82559. "es.typed-array.uint8-array",
  82560. "es.typed-array.copy-within",
  82561. "es.typed-array.every",
  82562. "es.typed-array.fill",
  82563. "es.typed-array.filter",
  82564. "es.typed-array.find",
  82565. "es.typed-array.find-index",
  82566. "es.typed-array.for-each",
  82567. "es.typed-array.from",
  82568. "es.typed-array.includes",
  82569. "es.typed-array.index-of",
  82570. "es.typed-array.iterator",
  82571. "es.typed-array.join",
  82572. "es.typed-array.last-index-of",
  82573. "es.typed-array.map",
  82574. "es.typed-array.of",
  82575. "es.typed-array.reduce",
  82576. "es.typed-array.reduce-right",
  82577. "es.typed-array.reverse",
  82578. "es.typed-array.set",
  82579. "es.typed-array.slice",
  82580. "es.typed-array.some",
  82581. "es.typed-array.sort",
  82582. "es.typed-array.subarray",
  82583. "es.typed-array.to-locale-string",
  82584. "es.typed-array.to-string"
  82585. ],
  82586. "core-js/features/typed-array/uint8-clamped-array": [
  82587. "es.object.to-string",
  82588. "es.typed-array.uint8-clamped-array",
  82589. "es.typed-array.copy-within",
  82590. "es.typed-array.every",
  82591. "es.typed-array.fill",
  82592. "es.typed-array.filter",
  82593. "es.typed-array.find",
  82594. "es.typed-array.find-index",
  82595. "es.typed-array.for-each",
  82596. "es.typed-array.from",
  82597. "es.typed-array.includes",
  82598. "es.typed-array.index-of",
  82599. "es.typed-array.iterator",
  82600. "es.typed-array.join",
  82601. "es.typed-array.last-index-of",
  82602. "es.typed-array.map",
  82603. "es.typed-array.of",
  82604. "es.typed-array.reduce",
  82605. "es.typed-array.reduce-right",
  82606. "es.typed-array.reverse",
  82607. "es.typed-array.set",
  82608. "es.typed-array.slice",
  82609. "es.typed-array.some",
  82610. "es.typed-array.sort",
  82611. "es.typed-array.subarray",
  82612. "es.typed-array.to-locale-string",
  82613. "es.typed-array.to-string"
  82614. ],
  82615. "core-js/features/typed-array/values": [
  82616. "es.typed-array.iterator"
  82617. ],
  82618. "core-js/features/url": [
  82619. "web.url",
  82620. "web.url.to-json",
  82621. "web.url-search-params"
  82622. ],
  82623. "core-js/features/url-search-params": [
  82624. "web.url-search-params"
  82625. ],
  82626. "core-js/features/url/to-json": [
  82627. "web.url.to-json"
  82628. ],
  82629. "core-js/features/weak-map": [
  82630. "es.object.to-string",
  82631. "es.weak-map",
  82632. "esnext.weak-map.delete-all",
  82633. "esnext.weak-map.from",
  82634. "esnext.weak-map.of",
  82635. "esnext.weak-map.upsert",
  82636. "web.dom-collections.iterator"
  82637. ],
  82638. "core-js/features/weak-map/delete-all": [
  82639. "es.weak-map",
  82640. "esnext.weak-map.delete-all"
  82641. ],
  82642. "core-js/features/weak-map/from": [
  82643. "es.string.iterator",
  82644. "es.weak-map",
  82645. "esnext.weak-map.from",
  82646. "web.dom-collections.iterator"
  82647. ],
  82648. "core-js/features/weak-map/of": [
  82649. "es.string.iterator",
  82650. "es.weak-map",
  82651. "esnext.weak-map.of",
  82652. "web.dom-collections.iterator"
  82653. ],
  82654. "core-js/features/weak-map/upsert": [
  82655. "es.weak-map",
  82656. "esnext.weak-map.upsert"
  82657. ],
  82658. "core-js/features/weak-set": [
  82659. "es.object.to-string",
  82660. "es.weak-set",
  82661. "esnext.weak-set.add-all",
  82662. "esnext.weak-set.delete-all",
  82663. "esnext.weak-set.from",
  82664. "esnext.weak-set.of",
  82665. "web.dom-collections.iterator"
  82666. ],
  82667. "core-js/features/weak-set/add-all": [
  82668. "es.weak-set",
  82669. "esnext.weak-set.add-all"
  82670. ],
  82671. "core-js/features/weak-set/delete-all": [
  82672. "es.weak-set",
  82673. "esnext.weak-set.delete-all"
  82674. ],
  82675. "core-js/features/weak-set/from": [
  82676. "es.string.iterator",
  82677. "es.weak-set",
  82678. "esnext.weak-set.from",
  82679. "web.dom-collections.iterator"
  82680. ],
  82681. "core-js/features/weak-set/of": [
  82682. "es.string.iterator",
  82683. "es.weak-set",
  82684. "esnext.weak-set.of",
  82685. "web.dom-collections.iterator"
  82686. ],
  82687. "core-js/modules/es.array-buffer.constructor": [
  82688. "es.array-buffer.constructor"
  82689. ],
  82690. "core-js/modules/es.array-buffer.is-view": [
  82691. "es.array-buffer.is-view"
  82692. ],
  82693. "core-js/modules/es.array-buffer.slice": [
  82694. "es.array-buffer.slice"
  82695. ],
  82696. "core-js/modules/es.array.concat": [
  82697. "es.array.concat"
  82698. ],
  82699. "core-js/modules/es.array.copy-within": [
  82700. "es.array.copy-within"
  82701. ],
  82702. "core-js/modules/es.array.every": [
  82703. "es.array.every"
  82704. ],
  82705. "core-js/modules/es.array.fill": [
  82706. "es.array.fill"
  82707. ],
  82708. "core-js/modules/es.array.filter": [
  82709. "es.array.filter"
  82710. ],
  82711. "core-js/modules/es.array.find": [
  82712. "es.array.find"
  82713. ],
  82714. "core-js/modules/es.array.find-index": [
  82715. "es.array.find-index"
  82716. ],
  82717. "core-js/modules/es.array.flat": [
  82718. "es.array.flat"
  82719. ],
  82720. "core-js/modules/es.array.flat-map": [
  82721. "es.array.flat-map"
  82722. ],
  82723. "core-js/modules/es.array.for-each": [
  82724. "es.array.for-each"
  82725. ],
  82726. "core-js/modules/es.array.from": [
  82727. "es.array.from"
  82728. ],
  82729. "core-js/modules/es.array.includes": [
  82730. "es.array.includes"
  82731. ],
  82732. "core-js/modules/es.array.index-of": [
  82733. "es.array.index-of"
  82734. ],
  82735. "core-js/modules/es.array.is-array": [
  82736. "es.array.is-array"
  82737. ],
  82738. "core-js/modules/es.array.iterator": [
  82739. "es.array.iterator"
  82740. ],
  82741. "core-js/modules/es.array.join": [
  82742. "es.array.join"
  82743. ],
  82744. "core-js/modules/es.array.last-index-of": [
  82745. "es.array.last-index-of"
  82746. ],
  82747. "core-js/modules/es.array.map": [
  82748. "es.array.map"
  82749. ],
  82750. "core-js/modules/es.array.of": [
  82751. "es.array.of"
  82752. ],
  82753. "core-js/modules/es.array.reduce": [
  82754. "es.array.reduce"
  82755. ],
  82756. "core-js/modules/es.array.reduce-right": [
  82757. "es.array.reduce-right"
  82758. ],
  82759. "core-js/modules/es.array.reverse": [
  82760. "es.array.reverse"
  82761. ],
  82762. "core-js/modules/es.array.slice": [
  82763. "es.array.slice"
  82764. ],
  82765. "core-js/modules/es.array.some": [
  82766. "es.array.some"
  82767. ],
  82768. "core-js/modules/es.array.sort": [
  82769. "es.array.sort"
  82770. ],
  82771. "core-js/modules/es.array.species": [
  82772. "es.array.species"
  82773. ],
  82774. "core-js/modules/es.array.splice": [
  82775. "es.array.splice"
  82776. ],
  82777. "core-js/modules/es.array.unscopables.flat": [
  82778. "es.array.unscopables.flat"
  82779. ],
  82780. "core-js/modules/es.array.unscopables.flat-map": [
  82781. "es.array.unscopables.flat-map"
  82782. ],
  82783. "core-js/modules/es.data-view": [
  82784. "es.data-view"
  82785. ],
  82786. "core-js/modules/es.date.now": [
  82787. "es.date.now"
  82788. ],
  82789. "core-js/modules/es.date.to-iso-string": [
  82790. "es.date.to-iso-string"
  82791. ],
  82792. "core-js/modules/es.date.to-json": [
  82793. "es.date.to-json"
  82794. ],
  82795. "core-js/modules/es.date.to-primitive": [
  82796. "es.date.to-primitive"
  82797. ],
  82798. "core-js/modules/es.date.to-string": [
  82799. "es.date.to-string"
  82800. ],
  82801. "core-js/modules/es.function.bind": [
  82802. "es.function.bind"
  82803. ],
  82804. "core-js/modules/es.function.has-instance": [
  82805. "es.function.has-instance"
  82806. ],
  82807. "core-js/modules/es.function.name": [
  82808. "es.function.name"
  82809. ],
  82810. "core-js/modules/es.global-this": [
  82811. "es.global-this"
  82812. ],
  82813. "core-js/modules/es.json.stringify": [
  82814. "es.json.stringify"
  82815. ],
  82816. "core-js/modules/es.json.to-string-tag": [
  82817. "es.json.to-string-tag"
  82818. ],
  82819. "core-js/modules/es.map": [
  82820. "es.map"
  82821. ],
  82822. "core-js/modules/es.math.acosh": [
  82823. "es.math.acosh"
  82824. ],
  82825. "core-js/modules/es.math.asinh": [
  82826. "es.math.asinh"
  82827. ],
  82828. "core-js/modules/es.math.atanh": [
  82829. "es.math.atanh"
  82830. ],
  82831. "core-js/modules/es.math.cbrt": [
  82832. "es.math.cbrt"
  82833. ],
  82834. "core-js/modules/es.math.clz32": [
  82835. "es.math.clz32"
  82836. ],
  82837. "core-js/modules/es.math.cosh": [
  82838. "es.math.cosh"
  82839. ],
  82840. "core-js/modules/es.math.expm1": [
  82841. "es.math.expm1"
  82842. ],
  82843. "core-js/modules/es.math.fround": [
  82844. "es.math.fround"
  82845. ],
  82846. "core-js/modules/es.math.hypot": [
  82847. "es.math.hypot"
  82848. ],
  82849. "core-js/modules/es.math.imul": [
  82850. "es.math.imul"
  82851. ],
  82852. "core-js/modules/es.math.log10": [
  82853. "es.math.log10"
  82854. ],
  82855. "core-js/modules/es.math.log1p": [
  82856. "es.math.log1p"
  82857. ],
  82858. "core-js/modules/es.math.log2": [
  82859. "es.math.log2"
  82860. ],
  82861. "core-js/modules/es.math.sign": [
  82862. "es.math.sign"
  82863. ],
  82864. "core-js/modules/es.math.sinh": [
  82865. "es.math.sinh"
  82866. ],
  82867. "core-js/modules/es.math.tanh": [
  82868. "es.math.tanh"
  82869. ],
  82870. "core-js/modules/es.math.to-string-tag": [
  82871. "es.math.to-string-tag"
  82872. ],
  82873. "core-js/modules/es.math.trunc": [
  82874. "es.math.trunc"
  82875. ],
  82876. "core-js/modules/es.number.constructor": [
  82877. "es.number.constructor"
  82878. ],
  82879. "core-js/modules/es.number.epsilon": [
  82880. "es.number.epsilon"
  82881. ],
  82882. "core-js/modules/es.number.is-finite": [
  82883. "es.number.is-finite"
  82884. ],
  82885. "core-js/modules/es.number.is-integer": [
  82886. "es.number.is-integer"
  82887. ],
  82888. "core-js/modules/es.number.is-nan": [
  82889. "es.number.is-nan"
  82890. ],
  82891. "core-js/modules/es.number.is-safe-integer": [
  82892. "es.number.is-safe-integer"
  82893. ],
  82894. "core-js/modules/es.number.max-safe-integer": [
  82895. "es.number.max-safe-integer"
  82896. ],
  82897. "core-js/modules/es.number.min-safe-integer": [
  82898. "es.number.min-safe-integer"
  82899. ],
  82900. "core-js/modules/es.number.parse-float": [
  82901. "es.number.parse-float"
  82902. ],
  82903. "core-js/modules/es.number.parse-int": [
  82904. "es.number.parse-int"
  82905. ],
  82906. "core-js/modules/es.number.to-fixed": [
  82907. "es.number.to-fixed"
  82908. ],
  82909. "core-js/modules/es.number.to-precision": [
  82910. "es.number.to-precision"
  82911. ],
  82912. "core-js/modules/es.object.assign": [
  82913. "es.object.assign"
  82914. ],
  82915. "core-js/modules/es.object.create": [
  82916. "es.object.create"
  82917. ],
  82918. "core-js/modules/es.object.define-getter": [
  82919. "es.object.define-getter"
  82920. ],
  82921. "core-js/modules/es.object.define-properties": [
  82922. "es.object.define-properties"
  82923. ],
  82924. "core-js/modules/es.object.define-property": [
  82925. "es.object.define-property"
  82926. ],
  82927. "core-js/modules/es.object.define-setter": [
  82928. "es.object.define-setter"
  82929. ],
  82930. "core-js/modules/es.object.entries": [
  82931. "es.object.entries"
  82932. ],
  82933. "core-js/modules/es.object.freeze": [
  82934. "es.object.freeze"
  82935. ],
  82936. "core-js/modules/es.object.from-entries": [
  82937. "es.object.from-entries"
  82938. ],
  82939. "core-js/modules/es.object.get-own-property-descriptor": [
  82940. "es.object.get-own-property-descriptor"
  82941. ],
  82942. "core-js/modules/es.object.get-own-property-descriptors": [
  82943. "es.object.get-own-property-descriptors"
  82944. ],
  82945. "core-js/modules/es.object.get-own-property-names": [
  82946. "es.object.get-own-property-names"
  82947. ],
  82948. "core-js/modules/es.object.get-prototype-of": [
  82949. "es.object.get-prototype-of"
  82950. ],
  82951. "core-js/modules/es.object.is": [
  82952. "es.object.is"
  82953. ],
  82954. "core-js/modules/es.object.is-extensible": [
  82955. "es.object.is-extensible"
  82956. ],
  82957. "core-js/modules/es.object.is-frozen": [
  82958. "es.object.is-frozen"
  82959. ],
  82960. "core-js/modules/es.object.is-sealed": [
  82961. "es.object.is-sealed"
  82962. ],
  82963. "core-js/modules/es.object.keys": [
  82964. "es.object.keys"
  82965. ],
  82966. "core-js/modules/es.object.lookup-getter": [
  82967. "es.object.lookup-getter"
  82968. ],
  82969. "core-js/modules/es.object.lookup-setter": [
  82970. "es.object.lookup-setter"
  82971. ],
  82972. "core-js/modules/es.object.prevent-extensions": [
  82973. "es.object.prevent-extensions"
  82974. ],
  82975. "core-js/modules/es.object.seal": [
  82976. "es.object.seal"
  82977. ],
  82978. "core-js/modules/es.object.set-prototype-of": [
  82979. "es.object.set-prototype-of"
  82980. ],
  82981. "core-js/modules/es.object.to-string": [
  82982. "es.object.to-string"
  82983. ],
  82984. "core-js/modules/es.object.values": [
  82985. "es.object.values"
  82986. ],
  82987. "core-js/modules/es.parse-float": [
  82988. "es.parse-float"
  82989. ],
  82990. "core-js/modules/es.parse-int": [
  82991. "es.parse-int"
  82992. ],
  82993. "core-js/modules/es.promise": [
  82994. "es.promise"
  82995. ],
  82996. "core-js/modules/es.promise.all-settled": [
  82997. "es.promise.all-settled"
  82998. ],
  82999. "core-js/modules/es.promise.finally": [
  83000. "es.promise.finally"
  83001. ],
  83002. "core-js/modules/es.reflect.apply": [
  83003. "es.reflect.apply"
  83004. ],
  83005. "core-js/modules/es.reflect.construct": [
  83006. "es.reflect.construct"
  83007. ],
  83008. "core-js/modules/es.reflect.define-property": [
  83009. "es.reflect.define-property"
  83010. ],
  83011. "core-js/modules/es.reflect.delete-property": [
  83012. "es.reflect.delete-property"
  83013. ],
  83014. "core-js/modules/es.reflect.get": [
  83015. "es.reflect.get"
  83016. ],
  83017. "core-js/modules/es.reflect.get-own-property-descriptor": [
  83018. "es.reflect.get-own-property-descriptor"
  83019. ],
  83020. "core-js/modules/es.reflect.get-prototype-of": [
  83021. "es.reflect.get-prototype-of"
  83022. ],
  83023. "core-js/modules/es.reflect.has": [
  83024. "es.reflect.has"
  83025. ],
  83026. "core-js/modules/es.reflect.is-extensible": [
  83027. "es.reflect.is-extensible"
  83028. ],
  83029. "core-js/modules/es.reflect.own-keys": [
  83030. "es.reflect.own-keys"
  83031. ],
  83032. "core-js/modules/es.reflect.prevent-extensions": [
  83033. "es.reflect.prevent-extensions"
  83034. ],
  83035. "core-js/modules/es.reflect.set": [
  83036. "es.reflect.set"
  83037. ],
  83038. "core-js/modules/es.reflect.set-prototype-of": [
  83039. "es.reflect.set-prototype-of"
  83040. ],
  83041. "core-js/modules/es.regexp.constructor": [
  83042. "es.regexp.constructor"
  83043. ],
  83044. "core-js/modules/es.regexp.exec": [
  83045. "es.regexp.exec"
  83046. ],
  83047. "core-js/modules/es.regexp.flags": [
  83048. "es.regexp.flags"
  83049. ],
  83050. "core-js/modules/es.regexp.sticky": [
  83051. "es.regexp.sticky"
  83052. ],
  83053. "core-js/modules/es.regexp.test": [
  83054. "es.regexp.test"
  83055. ],
  83056. "core-js/modules/es.regexp.to-string": [
  83057. "es.regexp.to-string"
  83058. ],
  83059. "core-js/modules/es.set": [
  83060. "es.set"
  83061. ],
  83062. "core-js/modules/es.string.anchor": [
  83063. "es.string.anchor"
  83064. ],
  83065. "core-js/modules/es.string.big": [
  83066. "es.string.big"
  83067. ],
  83068. "core-js/modules/es.string.blink": [
  83069. "es.string.blink"
  83070. ],
  83071. "core-js/modules/es.string.bold": [
  83072. "es.string.bold"
  83073. ],
  83074. "core-js/modules/es.string.code-point-at": [
  83075. "es.string.code-point-at"
  83076. ],
  83077. "core-js/modules/es.string.ends-with": [
  83078. "es.string.ends-with"
  83079. ],
  83080. "core-js/modules/es.string.fixed": [
  83081. "es.string.fixed"
  83082. ],
  83083. "core-js/modules/es.string.fontcolor": [
  83084. "es.string.fontcolor"
  83085. ],
  83086. "core-js/modules/es.string.fontsize": [
  83087. "es.string.fontsize"
  83088. ],
  83089. "core-js/modules/es.string.from-code-point": [
  83090. "es.string.from-code-point"
  83091. ],
  83092. "core-js/modules/es.string.includes": [
  83093. "es.string.includes"
  83094. ],
  83095. "core-js/modules/es.string.italics": [
  83096. "es.string.italics"
  83097. ],
  83098. "core-js/modules/es.string.iterator": [
  83099. "es.string.iterator"
  83100. ],
  83101. "core-js/modules/es.string.link": [
  83102. "es.string.link"
  83103. ],
  83104. "core-js/modules/es.string.match": [
  83105. "es.string.match"
  83106. ],
  83107. "core-js/modules/es.string.match-all": [
  83108. "es.string.match-all"
  83109. ],
  83110. "core-js/modules/es.string.pad-end": [
  83111. "es.string.pad-end"
  83112. ],
  83113. "core-js/modules/es.string.pad-start": [
  83114. "es.string.pad-start"
  83115. ],
  83116. "core-js/modules/es.string.raw": [
  83117. "es.string.raw"
  83118. ],
  83119. "core-js/modules/es.string.repeat": [
  83120. "es.string.repeat"
  83121. ],
  83122. "core-js/modules/es.string.replace": [
  83123. "es.string.replace"
  83124. ],
  83125. "core-js/modules/es.string.search": [
  83126. "es.string.search"
  83127. ],
  83128. "core-js/modules/es.string.small": [
  83129. "es.string.small"
  83130. ],
  83131. "core-js/modules/es.string.split": [
  83132. "es.string.split"
  83133. ],
  83134. "core-js/modules/es.string.starts-with": [
  83135. "es.string.starts-with"
  83136. ],
  83137. "core-js/modules/es.string.strike": [
  83138. "es.string.strike"
  83139. ],
  83140. "core-js/modules/es.string.sub": [
  83141. "es.string.sub"
  83142. ],
  83143. "core-js/modules/es.string.sup": [
  83144. "es.string.sup"
  83145. ],
  83146. "core-js/modules/es.string.trim": [
  83147. "es.string.trim"
  83148. ],
  83149. "core-js/modules/es.string.trim-end": [
  83150. "es.string.trim-end"
  83151. ],
  83152. "core-js/modules/es.string.trim-start": [
  83153. "es.string.trim-start"
  83154. ],
  83155. "core-js/modules/es.symbol": [
  83156. "es.symbol"
  83157. ],
  83158. "core-js/modules/es.symbol.async-iterator": [
  83159. "es.symbol.async-iterator"
  83160. ],
  83161. "core-js/modules/es.symbol.description": [
  83162. "es.symbol.description"
  83163. ],
  83164. "core-js/modules/es.symbol.has-instance": [
  83165. "es.symbol.has-instance"
  83166. ],
  83167. "core-js/modules/es.symbol.is-concat-spreadable": [
  83168. "es.symbol.is-concat-spreadable"
  83169. ],
  83170. "core-js/modules/es.symbol.iterator": [
  83171. "es.symbol.iterator"
  83172. ],
  83173. "core-js/modules/es.symbol.match": [
  83174. "es.symbol.match"
  83175. ],
  83176. "core-js/modules/es.symbol.match-all": [
  83177. "es.symbol.match-all"
  83178. ],
  83179. "core-js/modules/es.symbol.replace": [
  83180. "es.symbol.replace"
  83181. ],
  83182. "core-js/modules/es.symbol.search": [
  83183. "es.symbol.search"
  83184. ],
  83185. "core-js/modules/es.symbol.species": [
  83186. "es.symbol.species"
  83187. ],
  83188. "core-js/modules/es.symbol.split": [
  83189. "es.symbol.split"
  83190. ],
  83191. "core-js/modules/es.symbol.to-primitive": [
  83192. "es.symbol.to-primitive"
  83193. ],
  83194. "core-js/modules/es.symbol.to-string-tag": [
  83195. "es.symbol.to-string-tag"
  83196. ],
  83197. "core-js/modules/es.symbol.unscopables": [
  83198. "es.symbol.unscopables"
  83199. ],
  83200. "core-js/modules/es.typed-array.copy-within": [
  83201. "es.typed-array.copy-within"
  83202. ],
  83203. "core-js/modules/es.typed-array.every": [
  83204. "es.typed-array.every"
  83205. ],
  83206. "core-js/modules/es.typed-array.fill": [
  83207. "es.typed-array.fill"
  83208. ],
  83209. "core-js/modules/es.typed-array.filter": [
  83210. "es.typed-array.filter"
  83211. ],
  83212. "core-js/modules/es.typed-array.find": [
  83213. "es.typed-array.find"
  83214. ],
  83215. "core-js/modules/es.typed-array.find-index": [
  83216. "es.typed-array.find-index"
  83217. ],
  83218. "core-js/modules/es.typed-array.float32-array": [
  83219. "es.typed-array.float32-array"
  83220. ],
  83221. "core-js/modules/es.typed-array.float64-array": [
  83222. "es.typed-array.float64-array"
  83223. ],
  83224. "core-js/modules/es.typed-array.for-each": [
  83225. "es.typed-array.for-each"
  83226. ],
  83227. "core-js/modules/es.typed-array.from": [
  83228. "es.typed-array.from"
  83229. ],
  83230. "core-js/modules/es.typed-array.includes": [
  83231. "es.typed-array.includes"
  83232. ],
  83233. "core-js/modules/es.typed-array.index-of": [
  83234. "es.typed-array.index-of"
  83235. ],
  83236. "core-js/modules/es.typed-array.int16-array": [
  83237. "es.typed-array.int16-array"
  83238. ],
  83239. "core-js/modules/es.typed-array.int32-array": [
  83240. "es.typed-array.int32-array"
  83241. ],
  83242. "core-js/modules/es.typed-array.int8-array": [
  83243. "es.typed-array.int8-array"
  83244. ],
  83245. "core-js/modules/es.typed-array.iterator": [
  83246. "es.typed-array.iterator"
  83247. ],
  83248. "core-js/modules/es.typed-array.join": [
  83249. "es.typed-array.join"
  83250. ],
  83251. "core-js/modules/es.typed-array.last-index-of": [
  83252. "es.typed-array.last-index-of"
  83253. ],
  83254. "core-js/modules/es.typed-array.map": [
  83255. "es.typed-array.map"
  83256. ],
  83257. "core-js/modules/es.typed-array.of": [
  83258. "es.typed-array.of"
  83259. ],
  83260. "core-js/modules/es.typed-array.reduce": [
  83261. "es.typed-array.reduce"
  83262. ],
  83263. "core-js/modules/es.typed-array.reduce-right": [
  83264. "es.typed-array.reduce-right"
  83265. ],
  83266. "core-js/modules/es.typed-array.reverse": [
  83267. "es.typed-array.reverse"
  83268. ],
  83269. "core-js/modules/es.typed-array.set": [
  83270. "es.typed-array.set"
  83271. ],
  83272. "core-js/modules/es.typed-array.slice": [
  83273. "es.typed-array.slice"
  83274. ],
  83275. "core-js/modules/es.typed-array.some": [
  83276. "es.typed-array.some"
  83277. ],
  83278. "core-js/modules/es.typed-array.sort": [
  83279. "es.typed-array.sort"
  83280. ],
  83281. "core-js/modules/es.typed-array.subarray": [
  83282. "es.typed-array.subarray"
  83283. ],
  83284. "core-js/modules/es.typed-array.to-locale-string": [
  83285. "es.typed-array.to-locale-string"
  83286. ],
  83287. "core-js/modules/es.typed-array.to-string": [
  83288. "es.typed-array.to-string"
  83289. ],
  83290. "core-js/modules/es.typed-array.uint16-array": [
  83291. "es.typed-array.uint16-array"
  83292. ],
  83293. "core-js/modules/es.typed-array.uint32-array": [
  83294. "es.typed-array.uint32-array"
  83295. ],
  83296. "core-js/modules/es.typed-array.uint8-array": [
  83297. "es.typed-array.uint8-array"
  83298. ],
  83299. "core-js/modules/es.typed-array.uint8-clamped-array": [
  83300. "es.typed-array.uint8-clamped-array"
  83301. ],
  83302. "core-js/modules/es.weak-map": [
  83303. "es.weak-map"
  83304. ],
  83305. "core-js/modules/es.weak-set": [
  83306. "es.weak-set"
  83307. ],
  83308. "core-js/modules/esnext.aggregate-error": [
  83309. "esnext.aggregate-error"
  83310. ],
  83311. "core-js/modules/esnext.array.is-template-object": [
  83312. "esnext.array.is-template-object"
  83313. ],
  83314. "core-js/modules/esnext.array.last-index": [
  83315. "esnext.array.last-index"
  83316. ],
  83317. "core-js/modules/esnext.array.last-item": [
  83318. "esnext.array.last-item"
  83319. ],
  83320. "core-js/modules/esnext.async-iterator.as-indexed-pairs": [
  83321. "esnext.async-iterator.as-indexed-pairs"
  83322. ],
  83323. "core-js/modules/esnext.async-iterator.constructor": [
  83324. "esnext.async-iterator.constructor"
  83325. ],
  83326. "core-js/modules/esnext.async-iterator.drop": [
  83327. "esnext.async-iterator.drop"
  83328. ],
  83329. "core-js/modules/esnext.async-iterator.every": [
  83330. "esnext.async-iterator.every"
  83331. ],
  83332. "core-js/modules/esnext.async-iterator.filter": [
  83333. "esnext.async-iterator.filter"
  83334. ],
  83335. "core-js/modules/esnext.async-iterator.find": [
  83336. "esnext.async-iterator.find"
  83337. ],
  83338. "core-js/modules/esnext.async-iterator.flat-map": [
  83339. "esnext.async-iterator.flat-map"
  83340. ],
  83341. "core-js/modules/esnext.async-iterator.for-each": [
  83342. "esnext.async-iterator.for-each"
  83343. ],
  83344. "core-js/modules/esnext.async-iterator.from": [
  83345. "esnext.async-iterator.from"
  83346. ],
  83347. "core-js/modules/esnext.async-iterator.map": [
  83348. "esnext.async-iterator.map"
  83349. ],
  83350. "core-js/modules/esnext.async-iterator.reduce": [
  83351. "esnext.async-iterator.reduce"
  83352. ],
  83353. "core-js/modules/esnext.async-iterator.some": [
  83354. "esnext.async-iterator.some"
  83355. ],
  83356. "core-js/modules/esnext.async-iterator.take": [
  83357. "esnext.async-iterator.take"
  83358. ],
  83359. "core-js/modules/esnext.async-iterator.to-array": [
  83360. "esnext.async-iterator.to-array"
  83361. ],
  83362. "core-js/modules/esnext.composite-key": [
  83363. "esnext.composite-key"
  83364. ],
  83365. "core-js/modules/esnext.composite-symbol": [
  83366. "esnext.composite-symbol"
  83367. ],
  83368. "core-js/modules/esnext.global-this": [
  83369. "esnext.global-this"
  83370. ],
  83371. "core-js/modules/esnext.iterator.as-indexed-pairs": [
  83372. "esnext.iterator.as-indexed-pairs"
  83373. ],
  83374. "core-js/modules/esnext.iterator.constructor": [
  83375. "esnext.iterator.constructor"
  83376. ],
  83377. "core-js/modules/esnext.iterator.drop": [
  83378. "esnext.iterator.drop"
  83379. ],
  83380. "core-js/modules/esnext.iterator.every": [
  83381. "esnext.iterator.every"
  83382. ],
  83383. "core-js/modules/esnext.iterator.filter": [
  83384. "esnext.iterator.filter"
  83385. ],
  83386. "core-js/modules/esnext.iterator.find": [
  83387. "esnext.iterator.find"
  83388. ],
  83389. "core-js/modules/esnext.iterator.flat-map": [
  83390. "esnext.iterator.flat-map"
  83391. ],
  83392. "core-js/modules/esnext.iterator.for-each": [
  83393. "esnext.iterator.for-each"
  83394. ],
  83395. "core-js/modules/esnext.iterator.from": [
  83396. "esnext.iterator.from"
  83397. ],
  83398. "core-js/modules/esnext.iterator.map": [
  83399. "esnext.iterator.map"
  83400. ],
  83401. "core-js/modules/esnext.iterator.reduce": [
  83402. "esnext.iterator.reduce"
  83403. ],
  83404. "core-js/modules/esnext.iterator.some": [
  83405. "esnext.iterator.some"
  83406. ],
  83407. "core-js/modules/esnext.iterator.take": [
  83408. "esnext.iterator.take"
  83409. ],
  83410. "core-js/modules/esnext.iterator.to-array": [
  83411. "esnext.iterator.to-array"
  83412. ],
  83413. "core-js/modules/esnext.map.delete-all": [
  83414. "esnext.map.delete-all"
  83415. ],
  83416. "core-js/modules/esnext.map.every": [
  83417. "esnext.map.every"
  83418. ],
  83419. "core-js/modules/esnext.map.filter": [
  83420. "esnext.map.filter"
  83421. ],
  83422. "core-js/modules/esnext.map.find": [
  83423. "esnext.map.find"
  83424. ],
  83425. "core-js/modules/esnext.map.find-key": [
  83426. "esnext.map.find-key"
  83427. ],
  83428. "core-js/modules/esnext.map.from": [
  83429. "esnext.map.from"
  83430. ],
  83431. "core-js/modules/esnext.map.group-by": [
  83432. "esnext.map.group-by"
  83433. ],
  83434. "core-js/modules/esnext.map.includes": [
  83435. "esnext.map.includes"
  83436. ],
  83437. "core-js/modules/esnext.map.key-by": [
  83438. "esnext.map.key-by"
  83439. ],
  83440. "core-js/modules/esnext.map.key-of": [
  83441. "esnext.map.key-of"
  83442. ],
  83443. "core-js/modules/esnext.map.map-keys": [
  83444. "esnext.map.map-keys"
  83445. ],
  83446. "core-js/modules/esnext.map.map-values": [
  83447. "esnext.map.map-values"
  83448. ],
  83449. "core-js/modules/esnext.map.merge": [
  83450. "esnext.map.merge"
  83451. ],
  83452. "core-js/modules/esnext.map.of": [
  83453. "esnext.map.of"
  83454. ],
  83455. "core-js/modules/esnext.map.reduce": [
  83456. "esnext.map.reduce"
  83457. ],
  83458. "core-js/modules/esnext.map.some": [
  83459. "esnext.map.some"
  83460. ],
  83461. "core-js/modules/esnext.map.update": [
  83462. "esnext.map.update"
  83463. ],
  83464. "core-js/modules/esnext.map.update-or-insert": [
  83465. "esnext.map.update-or-insert"
  83466. ],
  83467. "core-js/modules/esnext.map.upsert": [
  83468. "esnext.map.upsert"
  83469. ],
  83470. "core-js/modules/esnext.math.clamp": [
  83471. "esnext.math.clamp"
  83472. ],
  83473. "core-js/modules/esnext.math.deg-per-rad": [
  83474. "esnext.math.deg-per-rad"
  83475. ],
  83476. "core-js/modules/esnext.math.degrees": [
  83477. "esnext.math.degrees"
  83478. ],
  83479. "core-js/modules/esnext.math.fscale": [
  83480. "esnext.math.fscale"
  83481. ],
  83482. "core-js/modules/esnext.math.iaddh": [
  83483. "esnext.math.iaddh"
  83484. ],
  83485. "core-js/modules/esnext.math.imulh": [
  83486. "esnext.math.imulh"
  83487. ],
  83488. "core-js/modules/esnext.math.isubh": [
  83489. "esnext.math.isubh"
  83490. ],
  83491. "core-js/modules/esnext.math.rad-per-deg": [
  83492. "esnext.math.rad-per-deg"
  83493. ],
  83494. "core-js/modules/esnext.math.radians": [
  83495. "esnext.math.radians"
  83496. ],
  83497. "core-js/modules/esnext.math.scale": [
  83498. "esnext.math.scale"
  83499. ],
  83500. "core-js/modules/esnext.math.seeded-prng": [
  83501. "esnext.math.seeded-prng"
  83502. ],
  83503. "core-js/modules/esnext.math.signbit": [
  83504. "esnext.math.signbit"
  83505. ],
  83506. "core-js/modules/esnext.math.umulh": [
  83507. "esnext.math.umulh"
  83508. ],
  83509. "core-js/modules/esnext.number.from-string": [
  83510. "esnext.number.from-string"
  83511. ],
  83512. "core-js/modules/esnext.object.iterate-entries": [
  83513. "esnext.object.iterate-entries"
  83514. ],
  83515. "core-js/modules/esnext.object.iterate-keys": [
  83516. "esnext.object.iterate-keys"
  83517. ],
  83518. "core-js/modules/esnext.object.iterate-values": [
  83519. "esnext.object.iterate-values"
  83520. ],
  83521. "core-js/modules/esnext.observable": [
  83522. "esnext.observable"
  83523. ],
  83524. "core-js/modules/esnext.promise.all-settled": [
  83525. "esnext.promise.all-settled"
  83526. ],
  83527. "core-js/modules/esnext.promise.any": [
  83528. "esnext.promise.any"
  83529. ],
  83530. "core-js/modules/esnext.promise.try": [
  83531. "esnext.promise.try"
  83532. ],
  83533. "core-js/modules/esnext.reflect.define-metadata": [
  83534. "esnext.reflect.define-metadata"
  83535. ],
  83536. "core-js/modules/esnext.reflect.delete-metadata": [
  83537. "esnext.reflect.delete-metadata"
  83538. ],
  83539. "core-js/modules/esnext.reflect.get-metadata": [
  83540. "esnext.reflect.get-metadata"
  83541. ],
  83542. "core-js/modules/esnext.reflect.get-metadata-keys": [
  83543. "esnext.reflect.get-metadata-keys"
  83544. ],
  83545. "core-js/modules/esnext.reflect.get-own-metadata": [
  83546. "esnext.reflect.get-own-metadata"
  83547. ],
  83548. "core-js/modules/esnext.reflect.get-own-metadata-keys": [
  83549. "esnext.reflect.get-own-metadata-keys"
  83550. ],
  83551. "core-js/modules/esnext.reflect.has-metadata": [
  83552. "esnext.reflect.has-metadata"
  83553. ],
  83554. "core-js/modules/esnext.reflect.has-own-metadata": [
  83555. "esnext.reflect.has-own-metadata"
  83556. ],
  83557. "core-js/modules/esnext.reflect.metadata": [
  83558. "esnext.reflect.metadata"
  83559. ],
  83560. "core-js/modules/esnext.set.add-all": [
  83561. "esnext.set.add-all"
  83562. ],
  83563. "core-js/modules/esnext.set.delete-all": [
  83564. "esnext.set.delete-all"
  83565. ],
  83566. "core-js/modules/esnext.set.difference": [
  83567. "esnext.set.difference"
  83568. ],
  83569. "core-js/modules/esnext.set.every": [
  83570. "esnext.set.every"
  83571. ],
  83572. "core-js/modules/esnext.set.filter": [
  83573. "esnext.set.filter"
  83574. ],
  83575. "core-js/modules/esnext.set.find": [
  83576. "esnext.set.find"
  83577. ],
  83578. "core-js/modules/esnext.set.from": [
  83579. "esnext.set.from"
  83580. ],
  83581. "core-js/modules/esnext.set.intersection": [
  83582. "esnext.set.intersection"
  83583. ],
  83584. "core-js/modules/esnext.set.is-disjoint-from": [
  83585. "esnext.set.is-disjoint-from"
  83586. ],
  83587. "core-js/modules/esnext.set.is-subset-of": [
  83588. "esnext.set.is-subset-of"
  83589. ],
  83590. "core-js/modules/esnext.set.is-superset-of": [
  83591. "esnext.set.is-superset-of"
  83592. ],
  83593. "core-js/modules/esnext.set.join": [
  83594. "esnext.set.join"
  83595. ],
  83596. "core-js/modules/esnext.set.map": [
  83597. "esnext.set.map"
  83598. ],
  83599. "core-js/modules/esnext.set.of": [
  83600. "esnext.set.of"
  83601. ],
  83602. "core-js/modules/esnext.set.reduce": [
  83603. "esnext.set.reduce"
  83604. ],
  83605. "core-js/modules/esnext.set.some": [
  83606. "esnext.set.some"
  83607. ],
  83608. "core-js/modules/esnext.set.symmetric-difference": [
  83609. "esnext.set.symmetric-difference"
  83610. ],
  83611. "core-js/modules/esnext.set.union": [
  83612. "esnext.set.union"
  83613. ],
  83614. "core-js/modules/esnext.string.at": [
  83615. "esnext.string.at"
  83616. ],
  83617. "core-js/modules/esnext.string.code-points": [
  83618. "esnext.string.code-points"
  83619. ],
  83620. "core-js/modules/esnext.string.match-all": [
  83621. "esnext.string.match-all"
  83622. ],
  83623. "core-js/modules/esnext.string.replace-all": [
  83624. "esnext.string.replace-all"
  83625. ],
  83626. "core-js/modules/esnext.symbol.async-dispose": [
  83627. "esnext.symbol.async-dispose"
  83628. ],
  83629. "core-js/modules/esnext.symbol.dispose": [
  83630. "esnext.symbol.dispose"
  83631. ],
  83632. "core-js/modules/esnext.symbol.observable": [
  83633. "esnext.symbol.observable"
  83634. ],
  83635. "core-js/modules/esnext.symbol.pattern-match": [
  83636. "esnext.symbol.pattern-match"
  83637. ],
  83638. "core-js/modules/esnext.symbol.replace-all": [
  83639. "esnext.symbol.replace-all"
  83640. ],
  83641. "core-js/modules/esnext.weak-map.delete-all": [
  83642. "esnext.weak-map.delete-all"
  83643. ],
  83644. "core-js/modules/esnext.weak-map.from": [
  83645. "esnext.weak-map.from"
  83646. ],
  83647. "core-js/modules/esnext.weak-map.of": [
  83648. "esnext.weak-map.of"
  83649. ],
  83650. "core-js/modules/esnext.weak-map.upsert": [
  83651. "esnext.weak-map.upsert"
  83652. ],
  83653. "core-js/modules/esnext.weak-set.add-all": [
  83654. "esnext.weak-set.add-all"
  83655. ],
  83656. "core-js/modules/esnext.weak-set.delete-all": [
  83657. "esnext.weak-set.delete-all"
  83658. ],
  83659. "core-js/modules/esnext.weak-set.from": [
  83660. "esnext.weak-set.from"
  83661. ],
  83662. "core-js/modules/esnext.weak-set.of": [
  83663. "esnext.weak-set.of"
  83664. ],
  83665. "core-js/modules/web.dom-collections.for-each": [
  83666. "web.dom-collections.for-each"
  83667. ],
  83668. "core-js/modules/web.dom-collections.iterator": [
  83669. "web.dom-collections.iterator"
  83670. ],
  83671. "core-js/modules/web.immediate": [
  83672. "web.immediate"
  83673. ],
  83674. "core-js/modules/web.queue-microtask": [
  83675. "web.queue-microtask"
  83676. ],
  83677. "core-js/modules/web.timers": [
  83678. "web.timers"
  83679. ],
  83680. "core-js/modules/web.url": [
  83681. "web.url"
  83682. ],
  83683. "core-js/modules/web.url-search-params": [
  83684. "web.url-search-params"
  83685. ],
  83686. "core-js/modules/web.url.to-json": [
  83687. "web.url.to-json"
  83688. ],
  83689. "core-js/proposals": [
  83690. "esnext.aggregate-error",
  83691. "esnext.array.is-template-object",
  83692. "esnext.array.last-index",
  83693. "esnext.array.last-item",
  83694. "esnext.async-iterator.constructor",
  83695. "esnext.async-iterator.as-indexed-pairs",
  83696. "esnext.async-iterator.drop",
  83697. "esnext.async-iterator.every",
  83698. "esnext.async-iterator.filter",
  83699. "esnext.async-iterator.find",
  83700. "esnext.async-iterator.flat-map",
  83701. "esnext.async-iterator.for-each",
  83702. "esnext.async-iterator.from",
  83703. "esnext.async-iterator.map",
  83704. "esnext.async-iterator.reduce",
  83705. "esnext.async-iterator.some",
  83706. "esnext.async-iterator.take",
  83707. "esnext.async-iterator.to-array",
  83708. "esnext.composite-key",
  83709. "esnext.composite-symbol",
  83710. "esnext.global-this",
  83711. "esnext.iterator.constructor",
  83712. "esnext.iterator.as-indexed-pairs",
  83713. "esnext.iterator.drop",
  83714. "esnext.iterator.every",
  83715. "esnext.iterator.filter",
  83716. "esnext.iterator.find",
  83717. "esnext.iterator.flat-map",
  83718. "esnext.iterator.for-each",
  83719. "esnext.iterator.from",
  83720. "esnext.iterator.map",
  83721. "esnext.iterator.reduce",
  83722. "esnext.iterator.some",
  83723. "esnext.iterator.take",
  83724. "esnext.iterator.to-array",
  83725. "esnext.map.delete-all",
  83726. "esnext.map.every",
  83727. "esnext.map.filter",
  83728. "esnext.map.find",
  83729. "esnext.map.find-key",
  83730. "esnext.map.from",
  83731. "esnext.map.group-by",
  83732. "esnext.map.includes",
  83733. "esnext.map.key-by",
  83734. "esnext.map.key-of",
  83735. "esnext.map.map-keys",
  83736. "esnext.map.map-values",
  83737. "esnext.map.merge",
  83738. "esnext.map.of",
  83739. "esnext.map.reduce",
  83740. "esnext.map.some",
  83741. "esnext.map.update",
  83742. "esnext.map.update-or-insert",
  83743. "esnext.map.upsert",
  83744. "esnext.math.clamp",
  83745. "esnext.math.deg-per-rad",
  83746. "esnext.math.degrees",
  83747. "esnext.math.fscale",
  83748. "esnext.math.iaddh",
  83749. "esnext.math.imulh",
  83750. "esnext.math.isubh",
  83751. "esnext.math.rad-per-deg",
  83752. "esnext.math.radians",
  83753. "esnext.math.scale",
  83754. "esnext.math.seeded-prng",
  83755. "esnext.math.signbit",
  83756. "esnext.math.umulh",
  83757. "esnext.number.from-string",
  83758. "esnext.object.iterate-entries",
  83759. "esnext.object.iterate-keys",
  83760. "esnext.object.iterate-values",
  83761. "esnext.observable",
  83762. "esnext.promise.all-settled",
  83763. "esnext.promise.any",
  83764. "esnext.promise.try",
  83765. "esnext.reflect.define-metadata",
  83766. "esnext.reflect.delete-metadata",
  83767. "esnext.reflect.get-metadata",
  83768. "esnext.reflect.get-metadata-keys",
  83769. "esnext.reflect.get-own-metadata",
  83770. "esnext.reflect.get-own-metadata-keys",
  83771. "esnext.reflect.has-metadata",
  83772. "esnext.reflect.has-own-metadata",
  83773. "esnext.reflect.metadata",
  83774. "esnext.set.add-all",
  83775. "esnext.set.delete-all",
  83776. "esnext.set.difference",
  83777. "esnext.set.every",
  83778. "esnext.set.filter",
  83779. "esnext.set.find",
  83780. "esnext.set.from",
  83781. "esnext.set.intersection",
  83782. "esnext.set.is-disjoint-from",
  83783. "esnext.set.is-subset-of",
  83784. "esnext.set.is-superset-of",
  83785. "esnext.set.join",
  83786. "esnext.set.map",
  83787. "esnext.set.of",
  83788. "esnext.set.reduce",
  83789. "esnext.set.some",
  83790. "esnext.set.symmetric-difference",
  83791. "esnext.set.union",
  83792. "esnext.string.at",
  83793. "esnext.string.code-points",
  83794. "esnext.string.match-all",
  83795. "esnext.string.replace-all",
  83796. "esnext.symbol.async-dispose",
  83797. "esnext.symbol.dispose",
  83798. "esnext.symbol.observable",
  83799. "esnext.symbol.pattern-match",
  83800. "esnext.symbol.replace-all",
  83801. "esnext.weak-map.delete-all",
  83802. "esnext.weak-map.from",
  83803. "esnext.weak-map.of",
  83804. "esnext.weak-map.upsert",
  83805. "esnext.weak-set.add-all",
  83806. "esnext.weak-set.delete-all",
  83807. "esnext.weak-set.from",
  83808. "esnext.weak-set.of",
  83809. "web.url",
  83810. "web.url.to-json",
  83811. "web.url-search-params"
  83812. ],
  83813. "core-js/proposals/array-is-template-object": [
  83814. "esnext.array.is-template-object"
  83815. ],
  83816. "core-js/proposals/array-last": [
  83817. "esnext.array.last-index",
  83818. "esnext.array.last-item"
  83819. ],
  83820. "core-js/proposals/collection-methods": [
  83821. "esnext.map.delete-all",
  83822. "esnext.map.every",
  83823. "esnext.map.filter",
  83824. "esnext.map.find",
  83825. "esnext.map.find-key",
  83826. "esnext.map.group-by",
  83827. "esnext.map.includes",
  83828. "esnext.map.key-by",
  83829. "esnext.map.key-of",
  83830. "esnext.map.map-keys",
  83831. "esnext.map.map-values",
  83832. "esnext.map.merge",
  83833. "esnext.map.reduce",
  83834. "esnext.map.some",
  83835. "esnext.map.update",
  83836. "esnext.set.add-all",
  83837. "esnext.set.delete-all",
  83838. "esnext.set.every",
  83839. "esnext.set.filter",
  83840. "esnext.set.find",
  83841. "esnext.set.join",
  83842. "esnext.set.map",
  83843. "esnext.set.reduce",
  83844. "esnext.set.some",
  83845. "esnext.weak-map.delete-all",
  83846. "esnext.weak-set.add-all",
  83847. "esnext.weak-set.delete-all"
  83848. ],
  83849. "core-js/proposals/collection-of-from": [
  83850. "esnext.map.from",
  83851. "esnext.map.of",
  83852. "esnext.set.from",
  83853. "esnext.set.of",
  83854. "esnext.weak-map.from",
  83855. "esnext.weak-map.of",
  83856. "esnext.weak-set.from",
  83857. "esnext.weak-set.of"
  83858. ],
  83859. "core-js/proposals/efficient-64-bit-arithmetic": [
  83860. "esnext.math.iaddh",
  83861. "esnext.math.imulh",
  83862. "esnext.math.isubh",
  83863. "esnext.math.umulh"
  83864. ],
  83865. "core-js/proposals/global-this": [
  83866. "esnext.global-this"
  83867. ],
  83868. "core-js/proposals/iterator-helpers": [
  83869. "esnext.async-iterator.constructor",
  83870. "esnext.async-iterator.as-indexed-pairs",
  83871. "esnext.async-iterator.drop",
  83872. "esnext.async-iterator.every",
  83873. "esnext.async-iterator.filter",
  83874. "esnext.async-iterator.find",
  83875. "esnext.async-iterator.flat-map",
  83876. "esnext.async-iterator.for-each",
  83877. "esnext.async-iterator.from",
  83878. "esnext.async-iterator.map",
  83879. "esnext.async-iterator.reduce",
  83880. "esnext.async-iterator.some",
  83881. "esnext.async-iterator.take",
  83882. "esnext.async-iterator.to-array",
  83883. "esnext.iterator.constructor",
  83884. "esnext.iterator.as-indexed-pairs",
  83885. "esnext.iterator.drop",
  83886. "esnext.iterator.every",
  83887. "esnext.iterator.filter",
  83888. "esnext.iterator.find",
  83889. "esnext.iterator.flat-map",
  83890. "esnext.iterator.for-each",
  83891. "esnext.iterator.from",
  83892. "esnext.iterator.map",
  83893. "esnext.iterator.reduce",
  83894. "esnext.iterator.some",
  83895. "esnext.iterator.take",
  83896. "esnext.iterator.to-array"
  83897. ],
  83898. "core-js/proposals/keys-composition": [
  83899. "esnext.composite-key",
  83900. "esnext.composite-symbol"
  83901. ],
  83902. "core-js/proposals/map-update-or-insert": [
  83903. "esnext.map.update-or-insert",
  83904. "esnext.map.upsert",
  83905. "esnext.weak-map.upsert"
  83906. ],
  83907. "core-js/proposals/map-upsert": [
  83908. "esnext.map.update-or-insert",
  83909. "esnext.map.upsert",
  83910. "esnext.weak-map.upsert"
  83911. ],
  83912. "core-js/proposals/math-extensions": [
  83913. "esnext.math.clamp",
  83914. "esnext.math.deg-per-rad",
  83915. "esnext.math.degrees",
  83916. "esnext.math.fscale",
  83917. "esnext.math.rad-per-deg",
  83918. "esnext.math.radians",
  83919. "esnext.math.scale"
  83920. ],
  83921. "core-js/proposals/math-signbit": [
  83922. "esnext.math.signbit"
  83923. ],
  83924. "core-js/proposals/number-from-string": [
  83925. "esnext.number.from-string"
  83926. ],
  83927. "core-js/proposals/object-iteration": [
  83928. "esnext.object.iterate-entries",
  83929. "esnext.object.iterate-keys",
  83930. "esnext.object.iterate-values"
  83931. ],
  83932. "core-js/proposals/observable": [
  83933. "esnext.observable",
  83934. "esnext.symbol.observable"
  83935. ],
  83936. "core-js/proposals/pattern-matching": [
  83937. "esnext.symbol.pattern-match"
  83938. ],
  83939. "core-js/proposals/promise-all-settled": [
  83940. "esnext.promise.all-settled"
  83941. ],
  83942. "core-js/proposals/promise-any": [
  83943. "esnext.aggregate-error",
  83944. "esnext.promise.any"
  83945. ],
  83946. "core-js/proposals/promise-try": [
  83947. "esnext.promise.try"
  83948. ],
  83949. "core-js/proposals/reflect-metadata": [
  83950. "esnext.reflect.define-metadata",
  83951. "esnext.reflect.delete-metadata",
  83952. "esnext.reflect.get-metadata",
  83953. "esnext.reflect.get-metadata-keys",
  83954. "esnext.reflect.get-own-metadata",
  83955. "esnext.reflect.get-own-metadata-keys",
  83956. "esnext.reflect.has-metadata",
  83957. "esnext.reflect.has-own-metadata",
  83958. "esnext.reflect.metadata"
  83959. ],
  83960. "core-js/proposals/seeded-random": [
  83961. "esnext.math.seeded-prng"
  83962. ],
  83963. "core-js/proposals/set-methods": [
  83964. "esnext.set.difference",
  83965. "esnext.set.intersection",
  83966. "esnext.set.is-disjoint-from",
  83967. "esnext.set.is-subset-of",
  83968. "esnext.set.is-superset-of",
  83969. "esnext.set.symmetric-difference",
  83970. "esnext.set.union"
  83971. ],
  83972. "core-js/proposals/string-at": [
  83973. "esnext.string.at"
  83974. ],
  83975. "core-js/proposals/string-code-points": [
  83976. "esnext.string.code-points"
  83977. ],
  83978. "core-js/proposals/string-match-all": [
  83979. "esnext.string.match-all"
  83980. ],
  83981. "core-js/proposals/string-replace-all": [
  83982. "esnext.string.replace-all",
  83983. "esnext.symbol.replace-all"
  83984. ],
  83985. "core-js/proposals/url": [
  83986. "web.url",
  83987. "web.url.to-json",
  83988. "web.url-search-params"
  83989. ],
  83990. "core-js/proposals/using-statement": [
  83991. "esnext.symbol.async-dispose",
  83992. "esnext.symbol.dispose"
  83993. ],
  83994. "core-js/stable": [
  83995. "es.symbol",
  83996. "es.symbol.description",
  83997. "es.symbol.async-iterator",
  83998. "es.symbol.has-instance",
  83999. "es.symbol.is-concat-spreadable",
  84000. "es.symbol.iterator",
  84001. "es.symbol.match",
  84002. "es.symbol.match-all",
  84003. "es.symbol.replace",
  84004. "es.symbol.search",
  84005. "es.symbol.species",
  84006. "es.symbol.split",
  84007. "es.symbol.to-primitive",
  84008. "es.symbol.to-string-tag",
  84009. "es.symbol.unscopables",
  84010. "es.array.concat",
  84011. "es.array.copy-within",
  84012. "es.array.every",
  84013. "es.array.fill",
  84014. "es.array.filter",
  84015. "es.array.find",
  84016. "es.array.find-index",
  84017. "es.array.flat",
  84018. "es.array.flat-map",
  84019. "es.array.for-each",
  84020. "es.array.from",
  84021. "es.array.includes",
  84022. "es.array.index-of",
  84023. "es.array.is-array",
  84024. "es.array.iterator",
  84025. "es.array.join",
  84026. "es.array.last-index-of",
  84027. "es.array.map",
  84028. "es.array.of",
  84029. "es.array.reduce",
  84030. "es.array.reduce-right",
  84031. "es.array.reverse",
  84032. "es.array.slice",
  84033. "es.array.some",
  84034. "es.array.sort",
  84035. "es.array.species",
  84036. "es.array.splice",
  84037. "es.array.unscopables.flat",
  84038. "es.array.unscopables.flat-map",
  84039. "es.array-buffer.constructor",
  84040. "es.array-buffer.is-view",
  84041. "es.array-buffer.slice",
  84042. "es.data-view",
  84043. "es.date.now",
  84044. "es.date.to-iso-string",
  84045. "es.date.to-json",
  84046. "es.date.to-primitive",
  84047. "es.date.to-string",
  84048. "es.function.bind",
  84049. "es.function.has-instance",
  84050. "es.function.name",
  84051. "es.global-this",
  84052. "es.json.stringify",
  84053. "es.json.to-string-tag",
  84054. "es.map",
  84055. "es.math.acosh",
  84056. "es.math.asinh",
  84057. "es.math.atanh",
  84058. "es.math.cbrt",
  84059. "es.math.clz32",
  84060. "es.math.cosh",
  84061. "es.math.expm1",
  84062. "es.math.fround",
  84063. "es.math.hypot",
  84064. "es.math.imul",
  84065. "es.math.log10",
  84066. "es.math.log1p",
  84067. "es.math.log2",
  84068. "es.math.sign",
  84069. "es.math.sinh",
  84070. "es.math.tanh",
  84071. "es.math.to-string-tag",
  84072. "es.math.trunc",
  84073. "es.number.constructor",
  84074. "es.number.epsilon",
  84075. "es.number.is-finite",
  84076. "es.number.is-integer",
  84077. "es.number.is-nan",
  84078. "es.number.is-safe-integer",
  84079. "es.number.max-safe-integer",
  84080. "es.number.min-safe-integer",
  84081. "es.number.parse-float",
  84082. "es.number.parse-int",
  84083. "es.number.to-fixed",
  84084. "es.number.to-precision",
  84085. "es.object.assign",
  84086. "es.object.create",
  84087. "es.object.define-getter",
  84088. "es.object.define-properties",
  84089. "es.object.define-property",
  84090. "es.object.define-setter",
  84091. "es.object.entries",
  84092. "es.object.freeze",
  84093. "es.object.from-entries",
  84094. "es.object.get-own-property-descriptor",
  84095. "es.object.get-own-property-descriptors",
  84096. "es.object.get-own-property-names",
  84097. "es.object.get-prototype-of",
  84098. "es.object.is",
  84099. "es.object.is-extensible",
  84100. "es.object.is-frozen",
  84101. "es.object.is-sealed",
  84102. "es.object.keys",
  84103. "es.object.lookup-getter",
  84104. "es.object.lookup-setter",
  84105. "es.object.prevent-extensions",
  84106. "es.object.seal",
  84107. "es.object.set-prototype-of",
  84108. "es.object.to-string",
  84109. "es.object.values",
  84110. "es.parse-float",
  84111. "es.parse-int",
  84112. "es.promise",
  84113. "es.promise.all-settled",
  84114. "es.promise.finally",
  84115. "es.reflect.apply",
  84116. "es.reflect.construct",
  84117. "es.reflect.define-property",
  84118. "es.reflect.delete-property",
  84119. "es.reflect.get",
  84120. "es.reflect.get-own-property-descriptor",
  84121. "es.reflect.get-prototype-of",
  84122. "es.reflect.has",
  84123. "es.reflect.is-extensible",
  84124. "es.reflect.own-keys",
  84125. "es.reflect.prevent-extensions",
  84126. "es.reflect.set",
  84127. "es.reflect.set-prototype-of",
  84128. "es.regexp.constructor",
  84129. "es.regexp.exec",
  84130. "es.regexp.flags",
  84131. "es.regexp.sticky",
  84132. "es.regexp.test",
  84133. "es.regexp.to-string",
  84134. "es.set",
  84135. "es.string.code-point-at",
  84136. "es.string.ends-with",
  84137. "es.string.from-code-point",
  84138. "es.string.includes",
  84139. "es.string.iterator",
  84140. "es.string.match",
  84141. "es.string.match-all",
  84142. "es.string.pad-end",
  84143. "es.string.pad-start",
  84144. "es.string.raw",
  84145. "es.string.repeat",
  84146. "es.string.replace",
  84147. "es.string.search",
  84148. "es.string.split",
  84149. "es.string.starts-with",
  84150. "es.string.trim",
  84151. "es.string.trim-end",
  84152. "es.string.trim-start",
  84153. "es.string.anchor",
  84154. "es.string.big",
  84155. "es.string.blink",
  84156. "es.string.bold",
  84157. "es.string.fixed",
  84158. "es.string.fontcolor",
  84159. "es.string.fontsize",
  84160. "es.string.italics",
  84161. "es.string.link",
  84162. "es.string.small",
  84163. "es.string.strike",
  84164. "es.string.sub",
  84165. "es.string.sup",
  84166. "es.typed-array.float32-array",
  84167. "es.typed-array.float64-array",
  84168. "es.typed-array.int8-array",
  84169. "es.typed-array.int16-array",
  84170. "es.typed-array.int32-array",
  84171. "es.typed-array.uint8-array",
  84172. "es.typed-array.uint8-clamped-array",
  84173. "es.typed-array.uint16-array",
  84174. "es.typed-array.uint32-array",
  84175. "es.typed-array.copy-within",
  84176. "es.typed-array.every",
  84177. "es.typed-array.fill",
  84178. "es.typed-array.filter",
  84179. "es.typed-array.find",
  84180. "es.typed-array.find-index",
  84181. "es.typed-array.for-each",
  84182. "es.typed-array.from",
  84183. "es.typed-array.includes",
  84184. "es.typed-array.index-of",
  84185. "es.typed-array.iterator",
  84186. "es.typed-array.join",
  84187. "es.typed-array.last-index-of",
  84188. "es.typed-array.map",
  84189. "es.typed-array.of",
  84190. "es.typed-array.reduce",
  84191. "es.typed-array.reduce-right",
  84192. "es.typed-array.reverse",
  84193. "es.typed-array.set",
  84194. "es.typed-array.slice",
  84195. "es.typed-array.some",
  84196. "es.typed-array.sort",
  84197. "es.typed-array.subarray",
  84198. "es.typed-array.to-locale-string",
  84199. "es.typed-array.to-string",
  84200. "es.weak-map",
  84201. "es.weak-set",
  84202. "web.dom-collections.for-each",
  84203. "web.dom-collections.iterator",
  84204. "web.immediate",
  84205. "web.queue-microtask",
  84206. "web.timers",
  84207. "web.url",
  84208. "web.url.to-json",
  84209. "web.url-search-params"
  84210. ],
  84211. "core-js/stable/array": [
  84212. "es.array.concat",
  84213. "es.array.copy-within",
  84214. "es.array.every",
  84215. "es.array.fill",
  84216. "es.array.filter",
  84217. "es.array.find",
  84218. "es.array.find-index",
  84219. "es.array.flat",
  84220. "es.array.flat-map",
  84221. "es.array.for-each",
  84222. "es.array.from",
  84223. "es.array.includes",
  84224. "es.array.index-of",
  84225. "es.array.is-array",
  84226. "es.array.iterator",
  84227. "es.array.join",
  84228. "es.array.last-index-of",
  84229. "es.array.map",
  84230. "es.array.of",
  84231. "es.array.reduce",
  84232. "es.array.reduce-right",
  84233. "es.array.reverse",
  84234. "es.array.slice",
  84235. "es.array.some",
  84236. "es.array.sort",
  84237. "es.array.species",
  84238. "es.array.splice",
  84239. "es.array.unscopables.flat",
  84240. "es.array.unscopables.flat-map",
  84241. "es.string.iterator"
  84242. ],
  84243. "core-js/stable/array-buffer": [
  84244. "es.array-buffer.constructor",
  84245. "es.array-buffer.is-view",
  84246. "es.array-buffer.slice",
  84247. "es.object.to-string"
  84248. ],
  84249. "core-js/stable/array-buffer/constructor": [
  84250. "es.array-buffer.constructor",
  84251. "es.object.to-string"
  84252. ],
  84253. "core-js/stable/array-buffer/is-view": [
  84254. "es.array-buffer.is-view"
  84255. ],
  84256. "core-js/stable/array-buffer/slice": [
  84257. "es.array-buffer.slice"
  84258. ],
  84259. "core-js/stable/array/concat": [
  84260. "es.array.concat"
  84261. ],
  84262. "core-js/stable/array/copy-within": [
  84263. "es.array.copy-within"
  84264. ],
  84265. "core-js/stable/array/entries": [
  84266. "es.array.iterator"
  84267. ],
  84268. "core-js/stable/array/every": [
  84269. "es.array.every"
  84270. ],
  84271. "core-js/stable/array/fill": [
  84272. "es.array.fill"
  84273. ],
  84274. "core-js/stable/array/filter": [
  84275. "es.array.filter"
  84276. ],
  84277. "core-js/stable/array/find": [
  84278. "es.array.find"
  84279. ],
  84280. "core-js/stable/array/find-index": [
  84281. "es.array.find-index"
  84282. ],
  84283. "core-js/stable/array/flat": [
  84284. "es.array.flat",
  84285. "es.array.unscopables.flat"
  84286. ],
  84287. "core-js/stable/array/flat-map": [
  84288. "es.array.flat-map",
  84289. "es.array.unscopables.flat-map"
  84290. ],
  84291. "core-js/stable/array/for-each": [
  84292. "es.array.for-each"
  84293. ],
  84294. "core-js/stable/array/from": [
  84295. "es.array.from",
  84296. "es.string.iterator"
  84297. ],
  84298. "core-js/stable/array/includes": [
  84299. "es.array.includes"
  84300. ],
  84301. "core-js/stable/array/index-of": [
  84302. "es.array.index-of"
  84303. ],
  84304. "core-js/stable/array/is-array": [
  84305. "es.array.is-array"
  84306. ],
  84307. "core-js/stable/array/iterator": [
  84308. "es.array.iterator"
  84309. ],
  84310. "core-js/stable/array/join": [
  84311. "es.array.join"
  84312. ],
  84313. "core-js/stable/array/keys": [
  84314. "es.array.iterator"
  84315. ],
  84316. "core-js/stable/array/last-index-of": [
  84317. "es.array.last-index-of"
  84318. ],
  84319. "core-js/stable/array/map": [
  84320. "es.array.map"
  84321. ],
  84322. "core-js/stable/array/of": [
  84323. "es.array.of"
  84324. ],
  84325. "core-js/stable/array/reduce": [
  84326. "es.array.reduce"
  84327. ],
  84328. "core-js/stable/array/reduce-right": [
  84329. "es.array.reduce-right"
  84330. ],
  84331. "core-js/stable/array/reverse": [
  84332. "es.array.reverse"
  84333. ],
  84334. "core-js/stable/array/slice": [
  84335. "es.array.slice"
  84336. ],
  84337. "core-js/stable/array/some": [
  84338. "es.array.some"
  84339. ],
  84340. "core-js/stable/array/sort": [
  84341. "es.array.sort"
  84342. ],
  84343. "core-js/stable/array/splice": [
  84344. "es.array.splice"
  84345. ],
  84346. "core-js/stable/array/values": [
  84347. "es.array.iterator"
  84348. ],
  84349. "core-js/stable/array/virtual": [
  84350. "es.array.concat",
  84351. "es.array.copy-within",
  84352. "es.array.every",
  84353. "es.array.fill",
  84354. "es.array.filter",
  84355. "es.array.find",
  84356. "es.array.find-index",
  84357. "es.array.flat",
  84358. "es.array.flat-map",
  84359. "es.array.for-each",
  84360. "es.array.includes",
  84361. "es.array.index-of",
  84362. "es.array.iterator",
  84363. "es.array.join",
  84364. "es.array.last-index-of",
  84365. "es.array.map",
  84366. "es.array.reduce",
  84367. "es.array.reduce-right",
  84368. "es.array.reverse",
  84369. "es.array.slice",
  84370. "es.array.some",
  84371. "es.array.sort",
  84372. "es.array.species",
  84373. "es.array.splice",
  84374. "es.array.unscopables.flat",
  84375. "es.array.unscopables.flat-map"
  84376. ],
  84377. "core-js/stable/array/virtual/concat": [
  84378. "es.array.concat"
  84379. ],
  84380. "core-js/stable/array/virtual/copy-within": [
  84381. "es.array.copy-within"
  84382. ],
  84383. "core-js/stable/array/virtual/entries": [
  84384. "es.array.iterator"
  84385. ],
  84386. "core-js/stable/array/virtual/every": [
  84387. "es.array.every"
  84388. ],
  84389. "core-js/stable/array/virtual/fill": [
  84390. "es.array.fill"
  84391. ],
  84392. "core-js/stable/array/virtual/filter": [
  84393. "es.array.filter"
  84394. ],
  84395. "core-js/stable/array/virtual/find": [
  84396. "es.array.find"
  84397. ],
  84398. "core-js/stable/array/virtual/find-index": [
  84399. "es.array.find-index"
  84400. ],
  84401. "core-js/stable/array/virtual/flat": [
  84402. "es.array.flat",
  84403. "es.array.unscopables.flat"
  84404. ],
  84405. "core-js/stable/array/virtual/flat-map": [
  84406. "es.array.flat-map",
  84407. "es.array.unscopables.flat-map"
  84408. ],
  84409. "core-js/stable/array/virtual/for-each": [
  84410. "es.array.for-each"
  84411. ],
  84412. "core-js/stable/array/virtual/includes": [
  84413. "es.array.includes"
  84414. ],
  84415. "core-js/stable/array/virtual/index-of": [
  84416. "es.array.index-of"
  84417. ],
  84418. "core-js/stable/array/virtual/iterator": [
  84419. "es.array.iterator"
  84420. ],
  84421. "core-js/stable/array/virtual/join": [
  84422. "es.array.join"
  84423. ],
  84424. "core-js/stable/array/virtual/keys": [
  84425. "es.array.iterator"
  84426. ],
  84427. "core-js/stable/array/virtual/last-index-of": [
  84428. "es.array.last-index-of"
  84429. ],
  84430. "core-js/stable/array/virtual/map": [
  84431. "es.array.map"
  84432. ],
  84433. "core-js/stable/array/virtual/reduce": [
  84434. "es.array.reduce"
  84435. ],
  84436. "core-js/stable/array/virtual/reduce-right": [
  84437. "es.array.reduce-right"
  84438. ],
  84439. "core-js/stable/array/virtual/reverse": [
  84440. "es.array.reverse"
  84441. ],
  84442. "core-js/stable/array/virtual/slice": [
  84443. "es.array.slice"
  84444. ],
  84445. "core-js/stable/array/virtual/some": [
  84446. "es.array.some"
  84447. ],
  84448. "core-js/stable/array/virtual/sort": [
  84449. "es.array.sort"
  84450. ],
  84451. "core-js/stable/array/virtual/splice": [
  84452. "es.array.splice"
  84453. ],
  84454. "core-js/stable/array/virtual/values": [
  84455. "es.array.iterator"
  84456. ],
  84457. "core-js/stable/clear-immediate": [
  84458. "web.immediate"
  84459. ],
  84460. "core-js/stable/data-view": [
  84461. "es.data-view",
  84462. "es.object.to-string"
  84463. ],
  84464. "core-js/stable/date": [
  84465. "es.date.now",
  84466. "es.date.to-iso-string",
  84467. "es.date.to-json",
  84468. "es.date.to-primitive",
  84469. "es.date.to-string"
  84470. ],
  84471. "core-js/stable/date/now": [
  84472. "es.date.now"
  84473. ],
  84474. "core-js/stable/date/to-iso-string": [
  84475. "es.date.to-iso-string",
  84476. "es.date.to-json"
  84477. ],
  84478. "core-js/stable/date/to-json": [
  84479. "es.date.to-json"
  84480. ],
  84481. "core-js/stable/date/to-primitive": [
  84482. "es.date.to-primitive"
  84483. ],
  84484. "core-js/stable/date/to-string": [
  84485. "es.date.to-string"
  84486. ],
  84487. "core-js/stable/dom-collections": [
  84488. "es.array.iterator",
  84489. "web.dom-collections.for-each",
  84490. "web.dom-collections.iterator"
  84491. ],
  84492. "core-js/stable/dom-collections/for-each": [
  84493. "web.dom-collections.for-each"
  84494. ],
  84495. "core-js/stable/dom-collections/iterator": [
  84496. "web.dom-collections.iterator"
  84497. ],
  84498. "core-js/stable/function": [
  84499. "es.function.bind",
  84500. "es.function.has-instance",
  84501. "es.function.name"
  84502. ],
  84503. "core-js/stable/function/bind": [
  84504. "es.function.bind"
  84505. ],
  84506. "core-js/stable/function/has-instance": [
  84507. "es.function.has-instance"
  84508. ],
  84509. "core-js/stable/function/name": [
  84510. "es.function.name"
  84511. ],
  84512. "core-js/stable/function/virtual": [
  84513. "es.function.bind"
  84514. ],
  84515. "core-js/stable/function/virtual/bind": [
  84516. "es.function.bind"
  84517. ],
  84518. "core-js/stable/global-this": [
  84519. "es.global-this"
  84520. ],
  84521. "core-js/stable/instance/bind": [
  84522. "es.function.bind"
  84523. ],
  84524. "core-js/stable/instance/code-point-at": [
  84525. "es.string.code-point-at"
  84526. ],
  84527. "core-js/stable/instance/concat": [
  84528. "es.array.concat"
  84529. ],
  84530. "core-js/stable/instance/copy-within": [
  84531. "es.array.copy-within"
  84532. ],
  84533. "core-js/stable/instance/ends-with": [
  84534. "es.string.ends-with"
  84535. ],
  84536. "core-js/stable/instance/entries": [
  84537. "es.array.iterator",
  84538. "web.dom-collections.iterator"
  84539. ],
  84540. "core-js/stable/instance/every": [
  84541. "es.array.every"
  84542. ],
  84543. "core-js/stable/instance/fill": [
  84544. "es.array.fill"
  84545. ],
  84546. "core-js/stable/instance/filter": [
  84547. "es.array.filter"
  84548. ],
  84549. "core-js/stable/instance/find": [
  84550. "es.array.find"
  84551. ],
  84552. "core-js/stable/instance/find-index": [
  84553. "es.array.find-index"
  84554. ],
  84555. "core-js/stable/instance/flags": [
  84556. "es.regexp.flags"
  84557. ],
  84558. "core-js/stable/instance/flat": [
  84559. "es.array.flat",
  84560. "es.array.unscopables.flat"
  84561. ],
  84562. "core-js/stable/instance/flat-map": [
  84563. "es.array.flat-map",
  84564. "es.array.unscopables.flat-map"
  84565. ],
  84566. "core-js/stable/instance/for-each": [
  84567. "es.array.for-each",
  84568. "web.dom-collections.iterator"
  84569. ],
  84570. "core-js/stable/instance/includes": [
  84571. "es.array.includes",
  84572. "es.string.includes"
  84573. ],
  84574. "core-js/stable/instance/index-of": [
  84575. "es.array.index-of"
  84576. ],
  84577. "core-js/stable/instance/keys": [
  84578. "es.array.iterator",
  84579. "web.dom-collections.iterator"
  84580. ],
  84581. "core-js/stable/instance/last-index-of": [
  84582. "es.array.last-index-of"
  84583. ],
  84584. "core-js/stable/instance/map": [
  84585. "es.array.map"
  84586. ],
  84587. "core-js/stable/instance/match-all": [
  84588. "es.string.match-all"
  84589. ],
  84590. "core-js/stable/instance/pad-end": [
  84591. "es.string.pad-end"
  84592. ],
  84593. "core-js/stable/instance/pad-start": [
  84594. "es.string.pad-start"
  84595. ],
  84596. "core-js/stable/instance/reduce": [
  84597. "es.array.reduce"
  84598. ],
  84599. "core-js/stable/instance/reduce-right": [
  84600. "es.array.reduce-right"
  84601. ],
  84602. "core-js/stable/instance/repeat": [
  84603. "es.string.repeat"
  84604. ],
  84605. "core-js/stable/instance/reverse": [
  84606. "es.array.reverse"
  84607. ],
  84608. "core-js/stable/instance/slice": [
  84609. "es.array.slice"
  84610. ],
  84611. "core-js/stable/instance/some": [
  84612. "es.array.some"
  84613. ],
  84614. "core-js/stable/instance/sort": [
  84615. "es.array.sort"
  84616. ],
  84617. "core-js/stable/instance/splice": [
  84618. "es.array.splice"
  84619. ],
  84620. "core-js/stable/instance/starts-with": [
  84621. "es.string.starts-with"
  84622. ],
  84623. "core-js/stable/instance/trim": [
  84624. "es.string.trim"
  84625. ],
  84626. "core-js/stable/instance/trim-end": [
  84627. "es.string.trim-end"
  84628. ],
  84629. "core-js/stable/instance/trim-left": [
  84630. "es.string.trim-start"
  84631. ],
  84632. "core-js/stable/instance/trim-right": [
  84633. "es.string.trim-end"
  84634. ],
  84635. "core-js/stable/instance/trim-start": [
  84636. "es.string.trim-start"
  84637. ],
  84638. "core-js/stable/instance/values": [
  84639. "es.array.iterator",
  84640. "web.dom-collections.iterator"
  84641. ],
  84642. "core-js/stable/json": [
  84643. "es.json.stringify",
  84644. "es.json.to-string-tag"
  84645. ],
  84646. "core-js/stable/json/stringify": [
  84647. "es.json.stringify"
  84648. ],
  84649. "core-js/stable/json/to-string-tag": [
  84650. "es.json.to-string-tag"
  84651. ],
  84652. "core-js/stable/map": [
  84653. "es.map",
  84654. "es.object.to-string",
  84655. "es.string.iterator",
  84656. "web.dom-collections.iterator"
  84657. ],
  84658. "core-js/stable/math": [
  84659. "es.math.acosh",
  84660. "es.math.asinh",
  84661. "es.math.atanh",
  84662. "es.math.cbrt",
  84663. "es.math.clz32",
  84664. "es.math.cosh",
  84665. "es.math.expm1",
  84666. "es.math.fround",
  84667. "es.math.hypot",
  84668. "es.math.imul",
  84669. "es.math.log10",
  84670. "es.math.log1p",
  84671. "es.math.log2",
  84672. "es.math.sign",
  84673. "es.math.sinh",
  84674. "es.math.tanh",
  84675. "es.math.to-string-tag",
  84676. "es.math.trunc"
  84677. ],
  84678. "core-js/stable/math/acosh": [
  84679. "es.math.acosh"
  84680. ],
  84681. "core-js/stable/math/asinh": [
  84682. "es.math.asinh"
  84683. ],
  84684. "core-js/stable/math/atanh": [
  84685. "es.math.atanh"
  84686. ],
  84687. "core-js/stable/math/cbrt": [
  84688. "es.math.cbrt"
  84689. ],
  84690. "core-js/stable/math/clz32": [
  84691. "es.math.clz32"
  84692. ],
  84693. "core-js/stable/math/cosh": [
  84694. "es.math.cosh"
  84695. ],
  84696. "core-js/stable/math/expm1": [
  84697. "es.math.expm1"
  84698. ],
  84699. "core-js/stable/math/fround": [
  84700. "es.math.fround"
  84701. ],
  84702. "core-js/stable/math/hypot": [
  84703. "es.math.hypot"
  84704. ],
  84705. "core-js/stable/math/imul": [
  84706. "es.math.imul"
  84707. ],
  84708. "core-js/stable/math/log10": [
  84709. "es.math.log10"
  84710. ],
  84711. "core-js/stable/math/log1p": [
  84712. "es.math.log1p"
  84713. ],
  84714. "core-js/stable/math/log2": [
  84715. "es.math.log2"
  84716. ],
  84717. "core-js/stable/math/sign": [
  84718. "es.math.sign"
  84719. ],
  84720. "core-js/stable/math/sinh": [
  84721. "es.math.sinh"
  84722. ],
  84723. "core-js/stable/math/tanh": [
  84724. "es.math.tanh"
  84725. ],
  84726. "core-js/stable/math/to-string-tag": [
  84727. "es.math.to-string-tag"
  84728. ],
  84729. "core-js/stable/math/trunc": [
  84730. "es.math.trunc"
  84731. ],
  84732. "core-js/stable/number": [
  84733. "es.number.constructor",
  84734. "es.number.epsilon",
  84735. "es.number.is-finite",
  84736. "es.number.is-integer",
  84737. "es.number.is-nan",
  84738. "es.number.is-safe-integer",
  84739. "es.number.max-safe-integer",
  84740. "es.number.min-safe-integer",
  84741. "es.number.parse-float",
  84742. "es.number.parse-int",
  84743. "es.number.to-fixed",
  84744. "es.number.to-precision"
  84745. ],
  84746. "core-js/stable/number/constructor": [
  84747. "es.number.constructor"
  84748. ],
  84749. "core-js/stable/number/epsilon": [
  84750. "es.number.epsilon"
  84751. ],
  84752. "core-js/stable/number/is-finite": [
  84753. "es.number.is-finite"
  84754. ],
  84755. "core-js/stable/number/is-integer": [
  84756. "es.number.is-integer"
  84757. ],
  84758. "core-js/stable/number/is-nan": [
  84759. "es.number.is-nan"
  84760. ],
  84761. "core-js/stable/number/is-safe-integer": [
  84762. "es.number.is-safe-integer"
  84763. ],
  84764. "core-js/stable/number/max-safe-integer": [
  84765. "es.number.max-safe-integer"
  84766. ],
  84767. "core-js/stable/number/min-safe-integer": [
  84768. "es.number.min-safe-integer"
  84769. ],
  84770. "core-js/stable/number/parse-float": [
  84771. "es.number.parse-float"
  84772. ],
  84773. "core-js/stable/number/parse-int": [
  84774. "es.number.parse-int"
  84775. ],
  84776. "core-js/stable/number/to-fixed": [
  84777. "es.number.to-fixed"
  84778. ],
  84779. "core-js/stable/number/to-precision": [
  84780. "es.number.to-precision"
  84781. ],
  84782. "core-js/stable/number/virtual": [
  84783. "es.number.to-fixed",
  84784. "es.number.to-precision"
  84785. ],
  84786. "core-js/stable/number/virtual/to-fixed": [
  84787. "es.number.to-fixed"
  84788. ],
  84789. "core-js/stable/number/virtual/to-precision": [
  84790. "es.number.to-precision"
  84791. ],
  84792. "core-js/stable/object": [
  84793. "es.symbol",
  84794. "es.json.to-string-tag",
  84795. "es.math.to-string-tag",
  84796. "es.object.assign",
  84797. "es.object.create",
  84798. "es.object.define-getter",
  84799. "es.object.define-properties",
  84800. "es.object.define-property",
  84801. "es.object.define-setter",
  84802. "es.object.entries",
  84803. "es.object.freeze",
  84804. "es.object.from-entries",
  84805. "es.object.get-own-property-descriptor",
  84806. "es.object.get-own-property-descriptors",
  84807. "es.object.get-own-property-names",
  84808. "es.object.get-prototype-of",
  84809. "es.object.is",
  84810. "es.object.is-extensible",
  84811. "es.object.is-frozen",
  84812. "es.object.is-sealed",
  84813. "es.object.keys",
  84814. "es.object.lookup-getter",
  84815. "es.object.lookup-setter",
  84816. "es.object.prevent-extensions",
  84817. "es.object.seal",
  84818. "es.object.set-prototype-of",
  84819. "es.object.to-string",
  84820. "es.object.values"
  84821. ],
  84822. "core-js/stable/object/assign": [
  84823. "es.object.assign"
  84824. ],
  84825. "core-js/stable/object/create": [
  84826. "es.object.create"
  84827. ],
  84828. "core-js/stable/object/define-getter": [
  84829. "es.object.define-getter"
  84830. ],
  84831. "core-js/stable/object/define-properties": [
  84832. "es.object.define-properties"
  84833. ],
  84834. "core-js/stable/object/define-property": [
  84835. "es.object.define-property"
  84836. ],
  84837. "core-js/stable/object/define-setter": [
  84838. "es.object.define-setter"
  84839. ],
  84840. "core-js/stable/object/entries": [
  84841. "es.object.entries"
  84842. ],
  84843. "core-js/stable/object/freeze": [
  84844. "es.object.freeze"
  84845. ],
  84846. "core-js/stable/object/from-entries": [
  84847. "es.array.iterator",
  84848. "es.object.from-entries"
  84849. ],
  84850. "core-js/stable/object/get-own-property-descriptor": [
  84851. "es.object.get-own-property-descriptor"
  84852. ],
  84853. "core-js/stable/object/get-own-property-descriptors": [
  84854. "es.object.get-own-property-descriptors"
  84855. ],
  84856. "core-js/stable/object/get-own-property-names": [
  84857. "es.object.get-own-property-names"
  84858. ],
  84859. "core-js/stable/object/get-own-property-symbols": [
  84860. "es.symbol"
  84861. ],
  84862. "core-js/stable/object/get-prototype-of": [
  84863. "es.object.get-prototype-of"
  84864. ],
  84865. "core-js/stable/object/is": [
  84866. "es.object.is"
  84867. ],
  84868. "core-js/stable/object/is-extensible": [
  84869. "es.object.is-extensible"
  84870. ],
  84871. "core-js/stable/object/is-frozen": [
  84872. "es.object.is-frozen"
  84873. ],
  84874. "core-js/stable/object/is-sealed": [
  84875. "es.object.is-sealed"
  84876. ],
  84877. "core-js/stable/object/keys": [
  84878. "es.object.keys"
  84879. ],
  84880. "core-js/stable/object/lookup-getter": [
  84881. "es.object.lookup-setter"
  84882. ],
  84883. "core-js/stable/object/lookup-setter": [
  84884. "es.object.lookup-setter"
  84885. ],
  84886. "core-js/stable/object/prevent-extensions": [
  84887. "es.object.prevent-extensions"
  84888. ],
  84889. "core-js/stable/object/seal": [
  84890. "es.object.seal"
  84891. ],
  84892. "core-js/stable/object/set-prototype-of": [
  84893. "es.object.set-prototype-of"
  84894. ],
  84895. "core-js/stable/object/to-string": [
  84896. "es.json.to-string-tag",
  84897. "es.math.to-string-tag",
  84898. "es.object.to-string"
  84899. ],
  84900. "core-js/stable/object/values": [
  84901. "es.object.values"
  84902. ],
  84903. "core-js/stable/parse-float": [
  84904. "es.parse-float"
  84905. ],
  84906. "core-js/stable/parse-int": [
  84907. "es.parse-int"
  84908. ],
  84909. "core-js/stable/promise": [
  84910. "es.object.to-string",
  84911. "es.promise",
  84912. "es.promise.all-settled",
  84913. "es.promise.finally",
  84914. "es.string.iterator",
  84915. "web.dom-collections.iterator"
  84916. ],
  84917. "core-js/stable/promise/all-settled": [
  84918. "es.promise",
  84919. "es.promise.all-settled"
  84920. ],
  84921. "core-js/stable/promise/finally": [
  84922. "es.promise",
  84923. "es.promise.finally"
  84924. ],
  84925. "core-js/stable/queue-microtask": [
  84926. "web.queue-microtask"
  84927. ],
  84928. "core-js/stable/reflect": [
  84929. "es.reflect.apply",
  84930. "es.reflect.construct",
  84931. "es.reflect.define-property",
  84932. "es.reflect.delete-property",
  84933. "es.reflect.get",
  84934. "es.reflect.get-own-property-descriptor",
  84935. "es.reflect.get-prototype-of",
  84936. "es.reflect.has",
  84937. "es.reflect.is-extensible",
  84938. "es.reflect.own-keys",
  84939. "es.reflect.prevent-extensions",
  84940. "es.reflect.set",
  84941. "es.reflect.set-prototype-of"
  84942. ],
  84943. "core-js/stable/reflect/apply": [
  84944. "es.reflect.apply"
  84945. ],
  84946. "core-js/stable/reflect/construct": [
  84947. "es.reflect.construct"
  84948. ],
  84949. "core-js/stable/reflect/define-property": [
  84950. "es.reflect.define-property"
  84951. ],
  84952. "core-js/stable/reflect/delete-property": [
  84953. "es.reflect.delete-property"
  84954. ],
  84955. "core-js/stable/reflect/get": [
  84956. "es.reflect.get"
  84957. ],
  84958. "core-js/stable/reflect/get-own-property-descriptor": [
  84959. "es.reflect.get-own-property-descriptor"
  84960. ],
  84961. "core-js/stable/reflect/get-prototype-of": [
  84962. "es.reflect.get-prototype-of"
  84963. ],
  84964. "core-js/stable/reflect/has": [
  84965. "es.reflect.has"
  84966. ],
  84967. "core-js/stable/reflect/is-extensible": [
  84968. "es.reflect.is-extensible"
  84969. ],
  84970. "core-js/stable/reflect/own-keys": [
  84971. "es.reflect.own-keys"
  84972. ],
  84973. "core-js/stable/reflect/prevent-extensions": [
  84974. "es.reflect.prevent-extensions"
  84975. ],
  84976. "core-js/stable/reflect/set": [
  84977. "es.reflect.set"
  84978. ],
  84979. "core-js/stable/reflect/set-prototype-of": [
  84980. "es.reflect.set-prototype-of"
  84981. ],
  84982. "core-js/stable/regexp": [
  84983. "es.regexp.constructor",
  84984. "es.regexp.exec",
  84985. "es.regexp.flags",
  84986. "es.regexp.sticky",
  84987. "es.regexp.test",
  84988. "es.regexp.to-string",
  84989. "es.string.match",
  84990. "es.string.replace",
  84991. "es.string.search",
  84992. "es.string.split"
  84993. ],
  84994. "core-js/stable/regexp/constructor": [
  84995. "es.regexp.constructor"
  84996. ],
  84997. "core-js/stable/regexp/flags": [
  84998. "es.regexp.flags"
  84999. ],
  85000. "core-js/stable/regexp/match": [
  85001. "es.string.match"
  85002. ],
  85003. "core-js/stable/regexp/replace": [
  85004. "es.string.replace"
  85005. ],
  85006. "core-js/stable/regexp/search": [
  85007. "es.string.search"
  85008. ],
  85009. "core-js/stable/regexp/split": [
  85010. "es.string.split"
  85011. ],
  85012. "core-js/stable/regexp/sticky": [
  85013. "es.regexp.sticky"
  85014. ],
  85015. "core-js/stable/regexp/test": [
  85016. "es.regexp.exec",
  85017. "es.regexp.test"
  85018. ],
  85019. "core-js/stable/regexp/to-string": [
  85020. "es.regexp.to-string"
  85021. ],
  85022. "core-js/stable/set": [
  85023. "es.object.to-string",
  85024. "es.set",
  85025. "es.string.iterator",
  85026. "web.dom-collections.iterator"
  85027. ],
  85028. "core-js/stable/set-immediate": [
  85029. "web.immediate"
  85030. ],
  85031. "core-js/stable/set-interval": [
  85032. "web.timers"
  85033. ],
  85034. "core-js/stable/set-timeout": [
  85035. "web.timers"
  85036. ],
  85037. "core-js/stable/string": [
  85038. "es.regexp.exec",
  85039. "es.string.code-point-at",
  85040. "es.string.ends-with",
  85041. "es.string.from-code-point",
  85042. "es.string.includes",
  85043. "es.string.iterator",
  85044. "es.string.match",
  85045. "es.string.match-all",
  85046. "es.string.pad-end",
  85047. "es.string.pad-start",
  85048. "es.string.raw",
  85049. "es.string.repeat",
  85050. "es.string.replace",
  85051. "es.string.search",
  85052. "es.string.split",
  85053. "es.string.starts-with",
  85054. "es.string.trim",
  85055. "es.string.trim-end",
  85056. "es.string.trim-start",
  85057. "es.string.anchor",
  85058. "es.string.big",
  85059. "es.string.blink",
  85060. "es.string.bold",
  85061. "es.string.fixed",
  85062. "es.string.fontcolor",
  85063. "es.string.fontsize",
  85064. "es.string.italics",
  85065. "es.string.link",
  85066. "es.string.small",
  85067. "es.string.strike",
  85068. "es.string.sub",
  85069. "es.string.sup"
  85070. ],
  85071. "core-js/stable/string/anchor": [
  85072. "es.string.anchor"
  85073. ],
  85074. "core-js/stable/string/big": [
  85075. "es.string.big"
  85076. ],
  85077. "core-js/stable/string/blink": [
  85078. "es.string.blink"
  85079. ],
  85080. "core-js/stable/string/bold": [
  85081. "es.string.bold"
  85082. ],
  85083. "core-js/stable/string/code-point-at": [
  85084. "es.string.code-point-at"
  85085. ],
  85086. "core-js/stable/string/ends-with": [
  85087. "es.string.ends-with"
  85088. ],
  85089. "core-js/stable/string/fixed": [
  85090. "es.string.fixed"
  85091. ],
  85092. "core-js/stable/string/fontcolor": [
  85093. "es.string.fontcolor"
  85094. ],
  85095. "core-js/stable/string/fontsize": [
  85096. "es.string.fontsize"
  85097. ],
  85098. "core-js/stable/string/from-code-point": [
  85099. "es.string.from-code-point"
  85100. ],
  85101. "core-js/stable/string/includes": [
  85102. "es.string.includes"
  85103. ],
  85104. "core-js/stable/string/italics": [
  85105. "es.string.italics"
  85106. ],
  85107. "core-js/stable/string/iterator": [
  85108. "es.string.iterator"
  85109. ],
  85110. "core-js/stable/string/link": [
  85111. "es.string.link"
  85112. ],
  85113. "core-js/stable/string/match": [
  85114. "es.regexp.exec",
  85115. "es.string.match"
  85116. ],
  85117. "core-js/stable/string/match-all": [
  85118. "es.string.match-all"
  85119. ],
  85120. "core-js/stable/string/pad-end": [
  85121. "es.string.pad-end"
  85122. ],
  85123. "core-js/stable/string/pad-start": [
  85124. "es.string.pad-start"
  85125. ],
  85126. "core-js/stable/string/raw": [
  85127. "es.string.raw"
  85128. ],
  85129. "core-js/stable/string/repeat": [
  85130. "es.string.repeat"
  85131. ],
  85132. "core-js/stable/string/replace": [
  85133. "es.regexp.exec",
  85134. "es.string.replace"
  85135. ],
  85136. "core-js/stable/string/search": [
  85137. "es.regexp.exec",
  85138. "es.string.search"
  85139. ],
  85140. "core-js/stable/string/small": [
  85141. "es.string.small"
  85142. ],
  85143. "core-js/stable/string/split": [
  85144. "es.regexp.exec",
  85145. "es.string.split"
  85146. ],
  85147. "core-js/stable/string/starts-with": [
  85148. "es.string.starts-with"
  85149. ],
  85150. "core-js/stable/string/strike": [
  85151. "es.string.strike"
  85152. ],
  85153. "core-js/stable/string/sub": [
  85154. "es.string.sub"
  85155. ],
  85156. "core-js/stable/string/sup": [
  85157. "es.string.sup"
  85158. ],
  85159. "core-js/stable/string/trim": [
  85160. "es.string.trim"
  85161. ],
  85162. "core-js/stable/string/trim-end": [
  85163. "es.string.trim-end"
  85164. ],
  85165. "core-js/stable/string/trim-left": [
  85166. "es.string.trim-start"
  85167. ],
  85168. "core-js/stable/string/trim-right": [
  85169. "es.string.trim-end"
  85170. ],
  85171. "core-js/stable/string/trim-start": [
  85172. "es.string.trim-start"
  85173. ],
  85174. "core-js/stable/string/virtual": [
  85175. "es.string.code-point-at",
  85176. "es.string.ends-with",
  85177. "es.string.includes",
  85178. "es.string.iterator",
  85179. "es.string.match",
  85180. "es.string.match-all",
  85181. "es.string.pad-end",
  85182. "es.string.pad-start",
  85183. "es.string.repeat",
  85184. "es.string.replace",
  85185. "es.string.search",
  85186. "es.string.split",
  85187. "es.string.starts-with",
  85188. "es.string.trim",
  85189. "es.string.trim-end",
  85190. "es.string.trim-start",
  85191. "es.string.anchor",
  85192. "es.string.big",
  85193. "es.string.blink",
  85194. "es.string.bold",
  85195. "es.string.fixed",
  85196. "es.string.fontcolor",
  85197. "es.string.fontsize",
  85198. "es.string.italics",
  85199. "es.string.link",
  85200. "es.string.small",
  85201. "es.string.strike",
  85202. "es.string.sub",
  85203. "es.string.sup"
  85204. ],
  85205. "core-js/stable/string/virtual/anchor": [
  85206. "es.string.anchor"
  85207. ],
  85208. "core-js/stable/string/virtual/big": [
  85209. "es.string.big"
  85210. ],
  85211. "core-js/stable/string/virtual/blink": [
  85212. "es.string.blink"
  85213. ],
  85214. "core-js/stable/string/virtual/bold": [
  85215. "es.string.bold"
  85216. ],
  85217. "core-js/stable/string/virtual/code-point-at": [
  85218. "es.string.code-point-at"
  85219. ],
  85220. "core-js/stable/string/virtual/ends-with": [
  85221. "es.string.ends-with"
  85222. ],
  85223. "core-js/stable/string/virtual/fixed": [
  85224. "es.string.fixed"
  85225. ],
  85226. "core-js/stable/string/virtual/fontcolor": [
  85227. "es.string.fontcolor"
  85228. ],
  85229. "core-js/stable/string/virtual/fontsize": [
  85230. "es.string.fontsize"
  85231. ],
  85232. "core-js/stable/string/virtual/includes": [
  85233. "es.string.includes"
  85234. ],
  85235. "core-js/stable/string/virtual/italics": [
  85236. "es.string.italics"
  85237. ],
  85238. "core-js/stable/string/virtual/iterator": [
  85239. "es.string.iterator"
  85240. ],
  85241. "core-js/stable/string/virtual/link": [
  85242. "es.string.link"
  85243. ],
  85244. "core-js/stable/string/virtual/match-all": [
  85245. "es.string.match-all"
  85246. ],
  85247. "core-js/stable/string/virtual/pad-end": [
  85248. "es.string.pad-end"
  85249. ],
  85250. "core-js/stable/string/virtual/pad-start": [
  85251. "es.string.pad-start"
  85252. ],
  85253. "core-js/stable/string/virtual/repeat": [
  85254. "es.string.repeat"
  85255. ],
  85256. "core-js/stable/string/virtual/small": [
  85257. "es.string.small"
  85258. ],
  85259. "core-js/stable/string/virtual/starts-with": [
  85260. "es.string.starts-with"
  85261. ],
  85262. "core-js/stable/string/virtual/strike": [
  85263. "es.string.strike"
  85264. ],
  85265. "core-js/stable/string/virtual/sub": [
  85266. "es.string.sub"
  85267. ],
  85268. "core-js/stable/string/virtual/sup": [
  85269. "es.string.sup"
  85270. ],
  85271. "core-js/stable/string/virtual/trim": [
  85272. "es.string.trim"
  85273. ],
  85274. "core-js/stable/string/virtual/trim-end": [
  85275. "es.string.trim-end"
  85276. ],
  85277. "core-js/stable/string/virtual/trim-left": [
  85278. "es.string.trim-start"
  85279. ],
  85280. "core-js/stable/string/virtual/trim-right": [
  85281. "es.string.trim-end"
  85282. ],
  85283. "core-js/stable/string/virtual/trim-start": [
  85284. "es.string.trim-start"
  85285. ],
  85286. "core-js/stable/symbol": [
  85287. "es.symbol",
  85288. "es.symbol.description",
  85289. "es.symbol.async-iterator",
  85290. "es.symbol.has-instance",
  85291. "es.symbol.is-concat-spreadable",
  85292. "es.symbol.iterator",
  85293. "es.symbol.match",
  85294. "es.symbol.match-all",
  85295. "es.symbol.replace",
  85296. "es.symbol.search",
  85297. "es.symbol.species",
  85298. "es.symbol.split",
  85299. "es.symbol.to-primitive",
  85300. "es.symbol.to-string-tag",
  85301. "es.symbol.unscopables",
  85302. "es.array.concat",
  85303. "es.json.to-string-tag",
  85304. "es.math.to-string-tag",
  85305. "es.object.to-string"
  85306. ],
  85307. "core-js/stable/symbol/async-iterator": [
  85308. "es.symbol.async-iterator"
  85309. ],
  85310. "core-js/stable/symbol/description": [
  85311. "es.symbol.description"
  85312. ],
  85313. "core-js/stable/symbol/for": [
  85314. "es.symbol"
  85315. ],
  85316. "core-js/stable/symbol/has-instance": [
  85317. "es.symbol.has-instance",
  85318. "es.function.has-instance"
  85319. ],
  85320. "core-js/stable/symbol/is-concat-spreadable": [
  85321. "es.symbol.is-concat-spreadable",
  85322. "es.array.concat"
  85323. ],
  85324. "core-js/stable/symbol/iterator": [
  85325. "es.symbol.iterator",
  85326. "es.string.iterator",
  85327. "web.dom-collections.iterator"
  85328. ],
  85329. "core-js/stable/symbol/key-for": [
  85330. "es.symbol"
  85331. ],
  85332. "core-js/stable/symbol/match": [
  85333. "es.symbol.match",
  85334. "es.string.match"
  85335. ],
  85336. "core-js/stable/symbol/match-all": [
  85337. "es.symbol.match-all",
  85338. "es.string.match-all"
  85339. ],
  85340. "core-js/stable/symbol/replace": [
  85341. "es.symbol.replace",
  85342. "es.string.replace"
  85343. ],
  85344. "core-js/stable/symbol/search": [
  85345. "es.symbol.search",
  85346. "es.string.search"
  85347. ],
  85348. "core-js/stable/symbol/species": [
  85349. "es.symbol.species"
  85350. ],
  85351. "core-js/stable/symbol/split": [
  85352. "es.symbol.split",
  85353. "es.string.split"
  85354. ],
  85355. "core-js/stable/symbol/to-primitive": [
  85356. "es.symbol.to-primitive"
  85357. ],
  85358. "core-js/stable/symbol/to-string-tag": [
  85359. "es.symbol.to-string-tag",
  85360. "es.json.to-string-tag",
  85361. "es.math.to-string-tag",
  85362. "es.object.to-string"
  85363. ],
  85364. "core-js/stable/symbol/unscopables": [
  85365. "es.symbol.unscopables"
  85366. ],
  85367. "core-js/stable/typed-array": [
  85368. "es.object.to-string",
  85369. "es.typed-array.float32-array",
  85370. "es.typed-array.float64-array",
  85371. "es.typed-array.int8-array",
  85372. "es.typed-array.int16-array",
  85373. "es.typed-array.int32-array",
  85374. "es.typed-array.uint8-array",
  85375. "es.typed-array.uint8-clamped-array",
  85376. "es.typed-array.uint16-array",
  85377. "es.typed-array.uint32-array",
  85378. "es.typed-array.copy-within",
  85379. "es.typed-array.every",
  85380. "es.typed-array.fill",
  85381. "es.typed-array.filter",
  85382. "es.typed-array.find",
  85383. "es.typed-array.find-index",
  85384. "es.typed-array.for-each",
  85385. "es.typed-array.from",
  85386. "es.typed-array.includes",
  85387. "es.typed-array.index-of",
  85388. "es.typed-array.iterator",
  85389. "es.typed-array.join",
  85390. "es.typed-array.last-index-of",
  85391. "es.typed-array.map",
  85392. "es.typed-array.of",
  85393. "es.typed-array.reduce",
  85394. "es.typed-array.reduce-right",
  85395. "es.typed-array.reverse",
  85396. "es.typed-array.set",
  85397. "es.typed-array.slice",
  85398. "es.typed-array.some",
  85399. "es.typed-array.sort",
  85400. "es.typed-array.subarray",
  85401. "es.typed-array.to-locale-string",
  85402. "es.typed-array.to-string"
  85403. ],
  85404. "core-js/stable/typed-array/copy-within": [
  85405. "es.typed-array.copy-within"
  85406. ],
  85407. "core-js/stable/typed-array/entries": [
  85408. "es.typed-array.iterator"
  85409. ],
  85410. "core-js/stable/typed-array/every": [
  85411. "es.typed-array.every"
  85412. ],
  85413. "core-js/stable/typed-array/fill": [
  85414. "es.typed-array.fill"
  85415. ],
  85416. "core-js/stable/typed-array/filter": [
  85417. "es.typed-array.filter"
  85418. ],
  85419. "core-js/stable/typed-array/find": [
  85420. "es.typed-array.find"
  85421. ],
  85422. "core-js/stable/typed-array/find-index": [
  85423. "es.typed-array.find-index"
  85424. ],
  85425. "core-js/stable/typed-array/float32-array": [
  85426. "es.object.to-string",
  85427. "es.typed-array.float32-array",
  85428. "es.typed-array.copy-within",
  85429. "es.typed-array.every",
  85430. "es.typed-array.fill",
  85431. "es.typed-array.filter",
  85432. "es.typed-array.find",
  85433. "es.typed-array.find-index",
  85434. "es.typed-array.for-each",
  85435. "es.typed-array.from",
  85436. "es.typed-array.includes",
  85437. "es.typed-array.index-of",
  85438. "es.typed-array.iterator",
  85439. "es.typed-array.join",
  85440. "es.typed-array.last-index-of",
  85441. "es.typed-array.map",
  85442. "es.typed-array.of",
  85443. "es.typed-array.reduce",
  85444. "es.typed-array.reduce-right",
  85445. "es.typed-array.reverse",
  85446. "es.typed-array.set",
  85447. "es.typed-array.slice",
  85448. "es.typed-array.some",
  85449. "es.typed-array.sort",
  85450. "es.typed-array.subarray",
  85451. "es.typed-array.to-locale-string",
  85452. "es.typed-array.to-string"
  85453. ],
  85454. "core-js/stable/typed-array/float64-array": [
  85455. "es.object.to-string",
  85456. "es.typed-array.float64-array",
  85457. "es.typed-array.copy-within",
  85458. "es.typed-array.every",
  85459. "es.typed-array.fill",
  85460. "es.typed-array.filter",
  85461. "es.typed-array.find",
  85462. "es.typed-array.find-index",
  85463. "es.typed-array.for-each",
  85464. "es.typed-array.from",
  85465. "es.typed-array.includes",
  85466. "es.typed-array.index-of",
  85467. "es.typed-array.iterator",
  85468. "es.typed-array.join",
  85469. "es.typed-array.last-index-of",
  85470. "es.typed-array.map",
  85471. "es.typed-array.of",
  85472. "es.typed-array.reduce",
  85473. "es.typed-array.reduce-right",
  85474. "es.typed-array.reverse",
  85475. "es.typed-array.set",
  85476. "es.typed-array.slice",
  85477. "es.typed-array.some",
  85478. "es.typed-array.sort",
  85479. "es.typed-array.subarray",
  85480. "es.typed-array.to-locale-string",
  85481. "es.typed-array.to-string"
  85482. ],
  85483. "core-js/stable/typed-array/for-each": [
  85484. "es.typed-array.for-each"
  85485. ],
  85486. "core-js/stable/typed-array/from": [
  85487. "es.typed-array.from"
  85488. ],
  85489. "core-js/stable/typed-array/includes": [
  85490. "es.typed-array.includes"
  85491. ],
  85492. "core-js/stable/typed-array/index-of": [
  85493. "es.typed-array.index-of"
  85494. ],
  85495. "core-js/stable/typed-array/int16-array": [
  85496. "es.object.to-string",
  85497. "es.typed-array.int16-array",
  85498. "es.typed-array.copy-within",
  85499. "es.typed-array.every",
  85500. "es.typed-array.fill",
  85501. "es.typed-array.filter",
  85502. "es.typed-array.find",
  85503. "es.typed-array.find-index",
  85504. "es.typed-array.for-each",
  85505. "es.typed-array.from",
  85506. "es.typed-array.includes",
  85507. "es.typed-array.index-of",
  85508. "es.typed-array.iterator",
  85509. "es.typed-array.join",
  85510. "es.typed-array.last-index-of",
  85511. "es.typed-array.map",
  85512. "es.typed-array.of",
  85513. "es.typed-array.reduce",
  85514. "es.typed-array.reduce-right",
  85515. "es.typed-array.reverse",
  85516. "es.typed-array.set",
  85517. "es.typed-array.slice",
  85518. "es.typed-array.some",
  85519. "es.typed-array.sort",
  85520. "es.typed-array.subarray",
  85521. "es.typed-array.to-locale-string",
  85522. "es.typed-array.to-string"
  85523. ],
  85524. "core-js/stable/typed-array/int32-array": [
  85525. "es.object.to-string",
  85526. "es.typed-array.int32-array",
  85527. "es.typed-array.copy-within",
  85528. "es.typed-array.every",
  85529. "es.typed-array.fill",
  85530. "es.typed-array.filter",
  85531. "es.typed-array.find",
  85532. "es.typed-array.find-index",
  85533. "es.typed-array.for-each",
  85534. "es.typed-array.from",
  85535. "es.typed-array.includes",
  85536. "es.typed-array.index-of",
  85537. "es.typed-array.iterator",
  85538. "es.typed-array.join",
  85539. "es.typed-array.last-index-of",
  85540. "es.typed-array.map",
  85541. "es.typed-array.of",
  85542. "es.typed-array.reduce",
  85543. "es.typed-array.reduce-right",
  85544. "es.typed-array.reverse",
  85545. "es.typed-array.set",
  85546. "es.typed-array.slice",
  85547. "es.typed-array.some",
  85548. "es.typed-array.sort",
  85549. "es.typed-array.subarray",
  85550. "es.typed-array.to-locale-string",
  85551. "es.typed-array.to-string"
  85552. ],
  85553. "core-js/stable/typed-array/int8-array": [
  85554. "es.object.to-string",
  85555. "es.typed-array.int8-array",
  85556. "es.typed-array.copy-within",
  85557. "es.typed-array.every",
  85558. "es.typed-array.fill",
  85559. "es.typed-array.filter",
  85560. "es.typed-array.find",
  85561. "es.typed-array.find-index",
  85562. "es.typed-array.for-each",
  85563. "es.typed-array.from",
  85564. "es.typed-array.includes",
  85565. "es.typed-array.index-of",
  85566. "es.typed-array.iterator",
  85567. "es.typed-array.join",
  85568. "es.typed-array.last-index-of",
  85569. "es.typed-array.map",
  85570. "es.typed-array.of",
  85571. "es.typed-array.reduce",
  85572. "es.typed-array.reduce-right",
  85573. "es.typed-array.reverse",
  85574. "es.typed-array.set",
  85575. "es.typed-array.slice",
  85576. "es.typed-array.some",
  85577. "es.typed-array.sort",
  85578. "es.typed-array.subarray",
  85579. "es.typed-array.to-locale-string",
  85580. "es.typed-array.to-string"
  85581. ],
  85582. "core-js/stable/typed-array/iterator": [
  85583. "es.typed-array.iterator"
  85584. ],
  85585. "core-js/stable/typed-array/join": [
  85586. "es.typed-array.join"
  85587. ],
  85588. "core-js/stable/typed-array/keys": [
  85589. "es.typed-array.iterator"
  85590. ],
  85591. "core-js/stable/typed-array/last-index-of": [
  85592. "es.typed-array.last-index-of"
  85593. ],
  85594. "core-js/stable/typed-array/map": [
  85595. "es.typed-array.map"
  85596. ],
  85597. "core-js/stable/typed-array/of": [
  85598. "es.typed-array.of"
  85599. ],
  85600. "core-js/stable/typed-array/reduce": [
  85601. "es.typed-array.reduce"
  85602. ],
  85603. "core-js/stable/typed-array/reduce-right": [
  85604. "es.typed-array.reduce-right"
  85605. ],
  85606. "core-js/stable/typed-array/reverse": [
  85607. "es.typed-array.reverse"
  85608. ],
  85609. "core-js/stable/typed-array/set": [
  85610. "es.typed-array.set"
  85611. ],
  85612. "core-js/stable/typed-array/slice": [
  85613. "es.typed-array.slice"
  85614. ],
  85615. "core-js/stable/typed-array/some": [
  85616. "es.typed-array.some"
  85617. ],
  85618. "core-js/stable/typed-array/sort": [
  85619. "es.typed-array.sort"
  85620. ],
  85621. "core-js/stable/typed-array/subarray": [
  85622. "es.typed-array.subarray"
  85623. ],
  85624. "core-js/stable/typed-array/to-locale-string": [
  85625. "es.typed-array.to-locale-string"
  85626. ],
  85627. "core-js/stable/typed-array/to-string": [
  85628. "es.typed-array.to-string"
  85629. ],
  85630. "core-js/stable/typed-array/uint16-array": [
  85631. "es.object.to-string",
  85632. "es.typed-array.uint16-array",
  85633. "es.typed-array.copy-within",
  85634. "es.typed-array.every",
  85635. "es.typed-array.fill",
  85636. "es.typed-array.filter",
  85637. "es.typed-array.find",
  85638. "es.typed-array.find-index",
  85639. "es.typed-array.for-each",
  85640. "es.typed-array.from",
  85641. "es.typed-array.includes",
  85642. "es.typed-array.index-of",
  85643. "es.typed-array.iterator",
  85644. "es.typed-array.join",
  85645. "es.typed-array.last-index-of",
  85646. "es.typed-array.map",
  85647. "es.typed-array.of",
  85648. "es.typed-array.reduce",
  85649. "es.typed-array.reduce-right",
  85650. "es.typed-array.reverse",
  85651. "es.typed-array.set",
  85652. "es.typed-array.slice",
  85653. "es.typed-array.some",
  85654. "es.typed-array.sort",
  85655. "es.typed-array.subarray",
  85656. "es.typed-array.to-locale-string",
  85657. "es.typed-array.to-string"
  85658. ],
  85659. "core-js/stable/typed-array/uint32-array": [
  85660. "es.object.to-string",
  85661. "es.typed-array.uint32-array",
  85662. "es.typed-array.copy-within",
  85663. "es.typed-array.every",
  85664. "es.typed-array.fill",
  85665. "es.typed-array.filter",
  85666. "es.typed-array.find",
  85667. "es.typed-array.find-index",
  85668. "es.typed-array.for-each",
  85669. "es.typed-array.from",
  85670. "es.typed-array.includes",
  85671. "es.typed-array.index-of",
  85672. "es.typed-array.iterator",
  85673. "es.typed-array.join",
  85674. "es.typed-array.last-index-of",
  85675. "es.typed-array.map",
  85676. "es.typed-array.of",
  85677. "es.typed-array.reduce",
  85678. "es.typed-array.reduce-right",
  85679. "es.typed-array.reverse",
  85680. "es.typed-array.set",
  85681. "es.typed-array.slice",
  85682. "es.typed-array.some",
  85683. "es.typed-array.sort",
  85684. "es.typed-array.subarray",
  85685. "es.typed-array.to-locale-string",
  85686. "es.typed-array.to-string"
  85687. ],
  85688. "core-js/stable/typed-array/uint8-array": [
  85689. "es.object.to-string",
  85690. "es.typed-array.uint8-array",
  85691. "es.typed-array.copy-within",
  85692. "es.typed-array.every",
  85693. "es.typed-array.fill",
  85694. "es.typed-array.filter",
  85695. "es.typed-array.find",
  85696. "es.typed-array.find-index",
  85697. "es.typed-array.for-each",
  85698. "es.typed-array.from",
  85699. "es.typed-array.includes",
  85700. "es.typed-array.index-of",
  85701. "es.typed-array.iterator",
  85702. "es.typed-array.join",
  85703. "es.typed-array.last-index-of",
  85704. "es.typed-array.map",
  85705. "es.typed-array.of",
  85706. "es.typed-array.reduce",
  85707. "es.typed-array.reduce-right",
  85708. "es.typed-array.reverse",
  85709. "es.typed-array.set",
  85710. "es.typed-array.slice",
  85711. "es.typed-array.some",
  85712. "es.typed-array.sort",
  85713. "es.typed-array.subarray",
  85714. "es.typed-array.to-locale-string",
  85715. "es.typed-array.to-string"
  85716. ],
  85717. "core-js/stable/typed-array/uint8-clamped-array": [
  85718. "es.object.to-string",
  85719. "es.typed-array.uint8-clamped-array",
  85720. "es.typed-array.copy-within",
  85721. "es.typed-array.every",
  85722. "es.typed-array.fill",
  85723. "es.typed-array.filter",
  85724. "es.typed-array.find",
  85725. "es.typed-array.find-index",
  85726. "es.typed-array.for-each",
  85727. "es.typed-array.from",
  85728. "es.typed-array.includes",
  85729. "es.typed-array.index-of",
  85730. "es.typed-array.iterator",
  85731. "es.typed-array.join",
  85732. "es.typed-array.last-index-of",
  85733. "es.typed-array.map",
  85734. "es.typed-array.of",
  85735. "es.typed-array.reduce",
  85736. "es.typed-array.reduce-right",
  85737. "es.typed-array.reverse",
  85738. "es.typed-array.set",
  85739. "es.typed-array.slice",
  85740. "es.typed-array.some",
  85741. "es.typed-array.sort",
  85742. "es.typed-array.subarray",
  85743. "es.typed-array.to-locale-string",
  85744. "es.typed-array.to-string"
  85745. ],
  85746. "core-js/stable/typed-array/values": [
  85747. "es.typed-array.iterator"
  85748. ],
  85749. "core-js/stable/url": [
  85750. "web.url",
  85751. "web.url.to-json",
  85752. "web.url-search-params"
  85753. ],
  85754. "core-js/stable/url-search-params": [
  85755. "web.url-search-params"
  85756. ],
  85757. "core-js/stable/url/to-json": [
  85758. "web.url.to-json"
  85759. ],
  85760. "core-js/stable/weak-map": [
  85761. "es.object.to-string",
  85762. "es.weak-map",
  85763. "web.dom-collections.iterator"
  85764. ],
  85765. "core-js/stable/weak-set": [
  85766. "es.object.to-string",
  85767. "es.weak-set",
  85768. "web.dom-collections.iterator"
  85769. ],
  85770. "core-js/stage": [
  85771. "esnext.aggregate-error",
  85772. "esnext.array.is-template-object",
  85773. "esnext.array.last-index",
  85774. "esnext.array.last-item",
  85775. "esnext.async-iterator.constructor",
  85776. "esnext.async-iterator.as-indexed-pairs",
  85777. "esnext.async-iterator.drop",
  85778. "esnext.async-iterator.every",
  85779. "esnext.async-iterator.filter",
  85780. "esnext.async-iterator.find",
  85781. "esnext.async-iterator.flat-map",
  85782. "esnext.async-iterator.for-each",
  85783. "esnext.async-iterator.from",
  85784. "esnext.async-iterator.map",
  85785. "esnext.async-iterator.reduce",
  85786. "esnext.async-iterator.some",
  85787. "esnext.async-iterator.take",
  85788. "esnext.async-iterator.to-array",
  85789. "esnext.composite-key",
  85790. "esnext.composite-symbol",
  85791. "esnext.global-this",
  85792. "esnext.iterator.constructor",
  85793. "esnext.iterator.as-indexed-pairs",
  85794. "esnext.iterator.drop",
  85795. "esnext.iterator.every",
  85796. "esnext.iterator.filter",
  85797. "esnext.iterator.find",
  85798. "esnext.iterator.flat-map",
  85799. "esnext.iterator.for-each",
  85800. "esnext.iterator.from",
  85801. "esnext.iterator.map",
  85802. "esnext.iterator.reduce",
  85803. "esnext.iterator.some",
  85804. "esnext.iterator.take",
  85805. "esnext.iterator.to-array",
  85806. "esnext.map.delete-all",
  85807. "esnext.map.every",
  85808. "esnext.map.filter",
  85809. "esnext.map.find",
  85810. "esnext.map.find-key",
  85811. "esnext.map.from",
  85812. "esnext.map.group-by",
  85813. "esnext.map.includes",
  85814. "esnext.map.key-by",
  85815. "esnext.map.key-of",
  85816. "esnext.map.map-keys",
  85817. "esnext.map.map-values",
  85818. "esnext.map.merge",
  85819. "esnext.map.of",
  85820. "esnext.map.reduce",
  85821. "esnext.map.some",
  85822. "esnext.map.update",
  85823. "esnext.map.update-or-insert",
  85824. "esnext.map.upsert",
  85825. "esnext.math.clamp",
  85826. "esnext.math.deg-per-rad",
  85827. "esnext.math.degrees",
  85828. "esnext.math.fscale",
  85829. "esnext.math.iaddh",
  85830. "esnext.math.imulh",
  85831. "esnext.math.isubh",
  85832. "esnext.math.rad-per-deg",
  85833. "esnext.math.radians",
  85834. "esnext.math.scale",
  85835. "esnext.math.seeded-prng",
  85836. "esnext.math.signbit",
  85837. "esnext.math.umulh",
  85838. "esnext.number.from-string",
  85839. "esnext.object.iterate-entries",
  85840. "esnext.object.iterate-keys",
  85841. "esnext.object.iterate-values",
  85842. "esnext.observable",
  85843. "esnext.promise.all-settled",
  85844. "esnext.promise.any",
  85845. "esnext.promise.try",
  85846. "esnext.reflect.define-metadata",
  85847. "esnext.reflect.delete-metadata",
  85848. "esnext.reflect.get-metadata",
  85849. "esnext.reflect.get-metadata-keys",
  85850. "esnext.reflect.get-own-metadata",
  85851. "esnext.reflect.get-own-metadata-keys",
  85852. "esnext.reflect.has-metadata",
  85853. "esnext.reflect.has-own-metadata",
  85854. "esnext.reflect.metadata",
  85855. "esnext.set.add-all",
  85856. "esnext.set.delete-all",
  85857. "esnext.set.difference",
  85858. "esnext.set.every",
  85859. "esnext.set.filter",
  85860. "esnext.set.find",
  85861. "esnext.set.from",
  85862. "esnext.set.intersection",
  85863. "esnext.set.is-disjoint-from",
  85864. "esnext.set.is-subset-of",
  85865. "esnext.set.is-superset-of",
  85866. "esnext.set.join",
  85867. "esnext.set.map",
  85868. "esnext.set.of",
  85869. "esnext.set.reduce",
  85870. "esnext.set.some",
  85871. "esnext.set.symmetric-difference",
  85872. "esnext.set.union",
  85873. "esnext.string.at",
  85874. "esnext.string.code-points",
  85875. "esnext.string.match-all",
  85876. "esnext.string.replace-all",
  85877. "esnext.symbol.async-dispose",
  85878. "esnext.symbol.dispose",
  85879. "esnext.symbol.observable",
  85880. "esnext.symbol.pattern-match",
  85881. "esnext.symbol.replace-all",
  85882. "esnext.weak-map.delete-all",
  85883. "esnext.weak-map.from",
  85884. "esnext.weak-map.of",
  85885. "esnext.weak-map.upsert",
  85886. "esnext.weak-set.add-all",
  85887. "esnext.weak-set.delete-all",
  85888. "esnext.weak-set.from",
  85889. "esnext.weak-set.of",
  85890. "web.url",
  85891. "web.url.to-json",
  85892. "web.url-search-params"
  85893. ],
  85894. "core-js/stage/0": [
  85895. "esnext.aggregate-error",
  85896. "esnext.array.is-template-object",
  85897. "esnext.array.last-index",
  85898. "esnext.array.last-item",
  85899. "esnext.async-iterator.constructor",
  85900. "esnext.async-iterator.as-indexed-pairs",
  85901. "esnext.async-iterator.drop",
  85902. "esnext.async-iterator.every",
  85903. "esnext.async-iterator.filter",
  85904. "esnext.async-iterator.find",
  85905. "esnext.async-iterator.flat-map",
  85906. "esnext.async-iterator.for-each",
  85907. "esnext.async-iterator.from",
  85908. "esnext.async-iterator.map",
  85909. "esnext.async-iterator.reduce",
  85910. "esnext.async-iterator.some",
  85911. "esnext.async-iterator.take",
  85912. "esnext.async-iterator.to-array",
  85913. "esnext.composite-key",
  85914. "esnext.composite-symbol",
  85915. "esnext.global-this",
  85916. "esnext.iterator.constructor",
  85917. "esnext.iterator.as-indexed-pairs",
  85918. "esnext.iterator.drop",
  85919. "esnext.iterator.every",
  85920. "esnext.iterator.filter",
  85921. "esnext.iterator.find",
  85922. "esnext.iterator.flat-map",
  85923. "esnext.iterator.for-each",
  85924. "esnext.iterator.from",
  85925. "esnext.iterator.map",
  85926. "esnext.iterator.reduce",
  85927. "esnext.iterator.some",
  85928. "esnext.iterator.take",
  85929. "esnext.iterator.to-array",
  85930. "esnext.map.delete-all",
  85931. "esnext.map.every",
  85932. "esnext.map.filter",
  85933. "esnext.map.find",
  85934. "esnext.map.find-key",
  85935. "esnext.map.from",
  85936. "esnext.map.group-by",
  85937. "esnext.map.includes",
  85938. "esnext.map.key-by",
  85939. "esnext.map.key-of",
  85940. "esnext.map.map-keys",
  85941. "esnext.map.map-values",
  85942. "esnext.map.merge",
  85943. "esnext.map.of",
  85944. "esnext.map.reduce",
  85945. "esnext.map.some",
  85946. "esnext.map.update",
  85947. "esnext.map.update-or-insert",
  85948. "esnext.map.upsert",
  85949. "esnext.math.clamp",
  85950. "esnext.math.deg-per-rad",
  85951. "esnext.math.degrees",
  85952. "esnext.math.fscale",
  85953. "esnext.math.iaddh",
  85954. "esnext.math.imulh",
  85955. "esnext.math.isubh",
  85956. "esnext.math.rad-per-deg",
  85957. "esnext.math.radians",
  85958. "esnext.math.scale",
  85959. "esnext.math.seeded-prng",
  85960. "esnext.math.signbit",
  85961. "esnext.math.umulh",
  85962. "esnext.number.from-string",
  85963. "esnext.object.iterate-entries",
  85964. "esnext.object.iterate-keys",
  85965. "esnext.object.iterate-values",
  85966. "esnext.observable",
  85967. "esnext.promise.all-settled",
  85968. "esnext.promise.any",
  85969. "esnext.promise.try",
  85970. "esnext.set.add-all",
  85971. "esnext.set.delete-all",
  85972. "esnext.set.difference",
  85973. "esnext.set.every",
  85974. "esnext.set.filter",
  85975. "esnext.set.find",
  85976. "esnext.set.from",
  85977. "esnext.set.intersection",
  85978. "esnext.set.is-disjoint-from",
  85979. "esnext.set.is-subset-of",
  85980. "esnext.set.is-superset-of",
  85981. "esnext.set.join",
  85982. "esnext.set.map",
  85983. "esnext.set.of",
  85984. "esnext.set.reduce",
  85985. "esnext.set.some",
  85986. "esnext.set.symmetric-difference",
  85987. "esnext.set.union",
  85988. "esnext.string.at",
  85989. "esnext.string.code-points",
  85990. "esnext.string.match-all",
  85991. "esnext.string.replace-all",
  85992. "esnext.symbol.async-dispose",
  85993. "esnext.symbol.dispose",
  85994. "esnext.symbol.observable",
  85995. "esnext.symbol.pattern-match",
  85996. "esnext.symbol.replace-all",
  85997. "esnext.weak-map.delete-all",
  85998. "esnext.weak-map.from",
  85999. "esnext.weak-map.of",
  86000. "esnext.weak-map.upsert",
  86001. "esnext.weak-set.add-all",
  86002. "esnext.weak-set.delete-all",
  86003. "esnext.weak-set.from",
  86004. "esnext.weak-set.of",
  86005. "web.url",
  86006. "web.url.to-json",
  86007. "web.url-search-params"
  86008. ],
  86009. "core-js/stage/1": [
  86010. "esnext.aggregate-error",
  86011. "esnext.array.is-template-object",
  86012. "esnext.array.last-index",
  86013. "esnext.array.last-item",
  86014. "esnext.async-iterator.constructor",
  86015. "esnext.async-iterator.as-indexed-pairs",
  86016. "esnext.async-iterator.drop",
  86017. "esnext.async-iterator.every",
  86018. "esnext.async-iterator.filter",
  86019. "esnext.async-iterator.find",
  86020. "esnext.async-iterator.flat-map",
  86021. "esnext.async-iterator.for-each",
  86022. "esnext.async-iterator.from",
  86023. "esnext.async-iterator.map",
  86024. "esnext.async-iterator.reduce",
  86025. "esnext.async-iterator.some",
  86026. "esnext.async-iterator.take",
  86027. "esnext.async-iterator.to-array",
  86028. "esnext.composite-key",
  86029. "esnext.composite-symbol",
  86030. "esnext.global-this",
  86031. "esnext.iterator.constructor",
  86032. "esnext.iterator.as-indexed-pairs",
  86033. "esnext.iterator.drop",
  86034. "esnext.iterator.every",
  86035. "esnext.iterator.filter",
  86036. "esnext.iterator.find",
  86037. "esnext.iterator.flat-map",
  86038. "esnext.iterator.for-each",
  86039. "esnext.iterator.from",
  86040. "esnext.iterator.map",
  86041. "esnext.iterator.reduce",
  86042. "esnext.iterator.some",
  86043. "esnext.iterator.take",
  86044. "esnext.iterator.to-array",
  86045. "esnext.map.delete-all",
  86046. "esnext.map.every",
  86047. "esnext.map.filter",
  86048. "esnext.map.find",
  86049. "esnext.map.find-key",
  86050. "esnext.map.from",
  86051. "esnext.map.group-by",
  86052. "esnext.map.includes",
  86053. "esnext.map.key-by",
  86054. "esnext.map.key-of",
  86055. "esnext.map.map-keys",
  86056. "esnext.map.map-values",
  86057. "esnext.map.merge",
  86058. "esnext.map.of",
  86059. "esnext.map.reduce",
  86060. "esnext.map.some",
  86061. "esnext.map.update",
  86062. "esnext.map.update-or-insert",
  86063. "esnext.map.upsert",
  86064. "esnext.math.clamp",
  86065. "esnext.math.deg-per-rad",
  86066. "esnext.math.degrees",
  86067. "esnext.math.fscale",
  86068. "esnext.math.rad-per-deg",
  86069. "esnext.math.radians",
  86070. "esnext.math.scale",
  86071. "esnext.math.seeded-prng",
  86072. "esnext.math.signbit",
  86073. "esnext.number.from-string",
  86074. "esnext.object.iterate-entries",
  86075. "esnext.object.iterate-keys",
  86076. "esnext.object.iterate-values",
  86077. "esnext.observable",
  86078. "esnext.promise.all-settled",
  86079. "esnext.promise.any",
  86080. "esnext.promise.try",
  86081. "esnext.set.add-all",
  86082. "esnext.set.delete-all",
  86083. "esnext.set.difference",
  86084. "esnext.set.every",
  86085. "esnext.set.filter",
  86086. "esnext.set.find",
  86087. "esnext.set.from",
  86088. "esnext.set.intersection",
  86089. "esnext.set.is-disjoint-from",
  86090. "esnext.set.is-subset-of",
  86091. "esnext.set.is-superset-of",
  86092. "esnext.set.join",
  86093. "esnext.set.map",
  86094. "esnext.set.of",
  86095. "esnext.set.reduce",
  86096. "esnext.set.some",
  86097. "esnext.set.symmetric-difference",
  86098. "esnext.set.union",
  86099. "esnext.string.code-points",
  86100. "esnext.string.match-all",
  86101. "esnext.string.replace-all",
  86102. "esnext.symbol.async-dispose",
  86103. "esnext.symbol.dispose",
  86104. "esnext.symbol.observable",
  86105. "esnext.symbol.pattern-match",
  86106. "esnext.symbol.replace-all",
  86107. "esnext.weak-map.delete-all",
  86108. "esnext.weak-map.from",
  86109. "esnext.weak-map.of",
  86110. "esnext.weak-map.upsert",
  86111. "esnext.weak-set.add-all",
  86112. "esnext.weak-set.delete-all",
  86113. "esnext.weak-set.from",
  86114. "esnext.weak-set.of"
  86115. ],
  86116. "core-js/stage/2": [
  86117. "esnext.aggregate-error",
  86118. "esnext.array.is-template-object",
  86119. "esnext.async-iterator.constructor",
  86120. "esnext.async-iterator.as-indexed-pairs",
  86121. "esnext.async-iterator.drop",
  86122. "esnext.async-iterator.every",
  86123. "esnext.async-iterator.filter",
  86124. "esnext.async-iterator.find",
  86125. "esnext.async-iterator.flat-map",
  86126. "esnext.async-iterator.for-each",
  86127. "esnext.async-iterator.from",
  86128. "esnext.async-iterator.map",
  86129. "esnext.async-iterator.reduce",
  86130. "esnext.async-iterator.some",
  86131. "esnext.async-iterator.take",
  86132. "esnext.async-iterator.to-array",
  86133. "esnext.global-this",
  86134. "esnext.iterator.constructor",
  86135. "esnext.iterator.as-indexed-pairs",
  86136. "esnext.iterator.drop",
  86137. "esnext.iterator.every",
  86138. "esnext.iterator.filter",
  86139. "esnext.iterator.find",
  86140. "esnext.iterator.flat-map",
  86141. "esnext.iterator.for-each",
  86142. "esnext.iterator.from",
  86143. "esnext.iterator.map",
  86144. "esnext.iterator.reduce",
  86145. "esnext.iterator.some",
  86146. "esnext.iterator.take",
  86147. "esnext.iterator.to-array",
  86148. "esnext.map.update-or-insert",
  86149. "esnext.map.upsert",
  86150. "esnext.promise.all-settled",
  86151. "esnext.promise.any",
  86152. "esnext.set.difference",
  86153. "esnext.set.intersection",
  86154. "esnext.set.is-disjoint-from",
  86155. "esnext.set.is-subset-of",
  86156. "esnext.set.is-superset-of",
  86157. "esnext.set.symmetric-difference",
  86158. "esnext.set.union",
  86159. "esnext.string.match-all",
  86160. "esnext.string.replace-all",
  86161. "esnext.symbol.async-dispose",
  86162. "esnext.symbol.dispose",
  86163. "esnext.symbol.replace-all",
  86164. "esnext.weak-map.upsert"
  86165. ],
  86166. "core-js/stage/3": [
  86167. "esnext.aggregate-error",
  86168. "esnext.global-this",
  86169. "esnext.promise.all-settled",
  86170. "esnext.promise.any",
  86171. "esnext.string.match-all",
  86172. "esnext.string.replace-all",
  86173. "esnext.symbol.replace-all"
  86174. ],
  86175. "core-js/stage/4": [
  86176. "esnext.global-this",
  86177. "esnext.promise.all-settled",
  86178. "esnext.string.match-all"
  86179. ],
  86180. "core-js/stage/pre": [
  86181. "esnext.aggregate-error",
  86182. "esnext.array.is-template-object",
  86183. "esnext.array.last-index",
  86184. "esnext.array.last-item",
  86185. "esnext.async-iterator.constructor",
  86186. "esnext.async-iterator.as-indexed-pairs",
  86187. "esnext.async-iterator.drop",
  86188. "esnext.async-iterator.every",
  86189. "esnext.async-iterator.filter",
  86190. "esnext.async-iterator.find",
  86191. "esnext.async-iterator.flat-map",
  86192. "esnext.async-iterator.for-each",
  86193. "esnext.async-iterator.from",
  86194. "esnext.async-iterator.map",
  86195. "esnext.async-iterator.reduce",
  86196. "esnext.async-iterator.some",
  86197. "esnext.async-iterator.take",
  86198. "esnext.async-iterator.to-array",
  86199. "esnext.composite-key",
  86200. "esnext.composite-symbol",
  86201. "esnext.global-this",
  86202. "esnext.iterator.constructor",
  86203. "esnext.iterator.as-indexed-pairs",
  86204. "esnext.iterator.drop",
  86205. "esnext.iterator.every",
  86206. "esnext.iterator.filter",
  86207. "esnext.iterator.find",
  86208. "esnext.iterator.flat-map",
  86209. "esnext.iterator.for-each",
  86210. "esnext.iterator.from",
  86211. "esnext.iterator.map",
  86212. "esnext.iterator.reduce",
  86213. "esnext.iterator.some",
  86214. "esnext.iterator.take",
  86215. "esnext.iterator.to-array",
  86216. "esnext.map.delete-all",
  86217. "esnext.map.every",
  86218. "esnext.map.filter",
  86219. "esnext.map.find",
  86220. "esnext.map.find-key",
  86221. "esnext.map.from",
  86222. "esnext.map.group-by",
  86223. "esnext.map.includes",
  86224. "esnext.map.key-by",
  86225. "esnext.map.key-of",
  86226. "esnext.map.map-keys",
  86227. "esnext.map.map-values",
  86228. "esnext.map.merge",
  86229. "esnext.map.of",
  86230. "esnext.map.reduce",
  86231. "esnext.map.some",
  86232. "esnext.map.update",
  86233. "esnext.map.update-or-insert",
  86234. "esnext.map.upsert",
  86235. "esnext.math.clamp",
  86236. "esnext.math.deg-per-rad",
  86237. "esnext.math.degrees",
  86238. "esnext.math.fscale",
  86239. "esnext.math.iaddh",
  86240. "esnext.math.imulh",
  86241. "esnext.math.isubh",
  86242. "esnext.math.rad-per-deg",
  86243. "esnext.math.radians",
  86244. "esnext.math.scale",
  86245. "esnext.math.seeded-prng",
  86246. "esnext.math.signbit",
  86247. "esnext.math.umulh",
  86248. "esnext.number.from-string",
  86249. "esnext.object.iterate-entries",
  86250. "esnext.object.iterate-keys",
  86251. "esnext.object.iterate-values",
  86252. "esnext.observable",
  86253. "esnext.promise.all-settled",
  86254. "esnext.promise.any",
  86255. "esnext.promise.try",
  86256. "esnext.reflect.define-metadata",
  86257. "esnext.reflect.delete-metadata",
  86258. "esnext.reflect.get-metadata",
  86259. "esnext.reflect.get-metadata-keys",
  86260. "esnext.reflect.get-own-metadata",
  86261. "esnext.reflect.get-own-metadata-keys",
  86262. "esnext.reflect.has-metadata",
  86263. "esnext.reflect.has-own-metadata",
  86264. "esnext.reflect.metadata",
  86265. "esnext.set.add-all",
  86266. "esnext.set.delete-all",
  86267. "esnext.set.difference",
  86268. "esnext.set.every",
  86269. "esnext.set.filter",
  86270. "esnext.set.find",
  86271. "esnext.set.from",
  86272. "esnext.set.intersection",
  86273. "esnext.set.is-disjoint-from",
  86274. "esnext.set.is-subset-of",
  86275. "esnext.set.is-superset-of",
  86276. "esnext.set.join",
  86277. "esnext.set.map",
  86278. "esnext.set.of",
  86279. "esnext.set.reduce",
  86280. "esnext.set.some",
  86281. "esnext.set.symmetric-difference",
  86282. "esnext.set.union",
  86283. "esnext.string.at",
  86284. "esnext.string.code-points",
  86285. "esnext.string.match-all",
  86286. "esnext.string.replace-all",
  86287. "esnext.symbol.async-dispose",
  86288. "esnext.symbol.dispose",
  86289. "esnext.symbol.observable",
  86290. "esnext.symbol.pattern-match",
  86291. "esnext.symbol.replace-all",
  86292. "esnext.weak-map.delete-all",
  86293. "esnext.weak-map.from",
  86294. "esnext.weak-map.of",
  86295. "esnext.weak-map.upsert",
  86296. "esnext.weak-set.add-all",
  86297. "esnext.weak-set.delete-all",
  86298. "esnext.weak-set.from",
  86299. "esnext.weak-set.of",
  86300. "web.url",
  86301. "web.url.to-json",
  86302. "web.url-search-params"
  86303. ],
  86304. "core-js/web": [
  86305. "web.dom-collections.for-each",
  86306. "web.dom-collections.iterator",
  86307. "web.immediate",
  86308. "web.queue-microtask",
  86309. "web.timers",
  86310. "web.url",
  86311. "web.url.to-json",
  86312. "web.url-search-params"
  86313. ],
  86314. "core-js/web/dom-collections": [
  86315. "web.dom-collections.for-each",
  86316. "web.dom-collections.iterator"
  86317. ],
  86318. "core-js/web/immediate": [
  86319. "web.immediate"
  86320. ],
  86321. "core-js/web/queue-microtask": [
  86322. "web.queue-microtask"
  86323. ],
  86324. "core-js/web/timers": [
  86325. "web.timers"
  86326. ],
  86327. "core-js/web/url": [
  86328. "web.url",
  86329. "web.url.to-json",
  86330. "web.url-search-params"
  86331. ],
  86332. "core-js/web/url-search-params": [
  86333. "web.url-search-params"
  86334. ]
  86335. };
  86336. function isBabelPolyfillSource(source) {
  86337. return source === "@babel/polyfill" || source === "babel-polyfill";
  86338. }
  86339. function isCoreJSSource(source) {
  86340. if (typeof source === "string") {
  86341. source = source.replace(/\\/g, "/").replace(/(\/(index)?)?(\.js)?$/i, "").toLowerCase();
  86342. }
  86343. return has$6(corejsEntries, source) && corejsEntries[source];
  86344. }
  86345. var BABEL_POLYFILL_DEPRECATION = "\n `@babel/polyfill` is deprecated. Please, use required parts of `core-js`\n and `regenerator-runtime/runtime` separately";
  86346. function replaceCoreJS3EntryPlugin (_, _ref) {
  86347. var corejs = _ref.corejs,
  86348. include = _ref.include,
  86349. exclude = _ref.exclude,
  86350. polyfillTargets = _ref.polyfillTargets,
  86351. debug = _ref.debug;
  86352. var polyfills = filterItems(corejs3Polyfills, include, exclude, polyfillTargets, null);
  86353. var available = new Set(getModulesListForTargetVersion(corejs.version));
  86354. function shouldReplace(source, modules) {
  86355. if (!modules) return false;
  86356. if (modules.length === 1 && polyfills.has(modules[0]) && available.has(modules[0]) && getModulePath(modules[0]) === source) {
  86357. return false;
  86358. }
  86359. return true;
  86360. }
  86361. var isPolyfillImport = {
  86362. ImportDeclaration: function ImportDeclaration(path) {
  86363. var source = getImportSource(path);
  86364. if (!source) return;
  86365. if (isBabelPolyfillSource(source)) {
  86366. console.warn(BABEL_POLYFILL_DEPRECATION);
  86367. } else {
  86368. var modules = isCoreJSSource(source);
  86369. if (shouldReplace(source, modules)) {
  86370. this.replaceBySeparateModulesImport(path, modules);
  86371. }
  86372. }
  86373. },
  86374. Program: {
  86375. enter: function enter(path) {
  86376. var _this = this;
  86377. path.get("body").forEach(function (bodyPath) {
  86378. var source = getRequireSource(bodyPath);
  86379. if (!source) return;
  86380. if (isBabelPolyfillSource(source)) {
  86381. console.warn(BABEL_POLYFILL_DEPRECATION);
  86382. } else {
  86383. var modules = isCoreJSSource(source);
  86384. if (shouldReplace(source, modules)) {
  86385. _this.replaceBySeparateModulesImport(bodyPath, modules);
  86386. }
  86387. }
  86388. });
  86389. },
  86390. exit: function exit(path) {
  86391. var _this2 = this;
  86392. var filtered = intersection(polyfills, this.polyfillsSet, available);
  86393. var reversed = Array.from(filtered).reverse();
  86394. for (var _iterator = reversed, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
  86395. var _ref2;
  86396. if (_isArray) {
  86397. if (_i >= _iterator.length) break;
  86398. _ref2 = _iterator[_i++];
  86399. } else {
  86400. _i = _iterator.next();
  86401. if (_i.done) break;
  86402. _ref2 = _i.value;
  86403. }
  86404. var module = _ref2;
  86405. if (!this.injectedPolyfills.has(module)) {
  86406. createImport(path, module);
  86407. }
  86408. }
  86409. filtered.forEach(function (module) {
  86410. return _this2.injectedPolyfills.add(module);
  86411. });
  86412. }
  86413. }
  86414. };
  86415. return {
  86416. name: "corejs3-entry",
  86417. visitor: isPolyfillImport,
  86418. pre: function pre() {
  86419. this.injectedPolyfills = new Set();
  86420. this.polyfillsSet = new Set();
  86421. this.replaceBySeparateModulesImport = function (path, modules) {
  86422. for (var _iterator2 = modules, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
  86423. var _ref3;
  86424. if (_isArray2) {
  86425. if (_i2 >= _iterator2.length) break;
  86426. _ref3 = _iterator2[_i2++];
  86427. } else {
  86428. _i2 = _iterator2.next();
  86429. if (_i2.done) break;
  86430. _ref3 = _i2.value;
  86431. }
  86432. var module = _ref3;
  86433. this.polyfillsSet.add(module);
  86434. }
  86435. path.remove();
  86436. };
  86437. },
  86438. post: function post() {
  86439. if (debug) {
  86440. logEntryPolyfills("core-js", this.injectedPolyfills.size > 0, this.injectedPolyfills, this.file.opts.filename, polyfillTargets, corejs3Polyfills);
  86441. }
  86442. }
  86443. };
  86444. }
  86445. function isRegeneratorSource(source) {
  86446. return source === "regenerator-runtime/runtime";
  86447. }
  86448. function removeRegeneratorEntryPlugin () {
  86449. var visitor = {
  86450. ImportDeclaration: function ImportDeclaration(path) {
  86451. if (isRegeneratorSource(getImportSource(path))) {
  86452. this.regeneratorImportExcluded = true;
  86453. path.remove();
  86454. }
  86455. },
  86456. Program: function Program(path) {
  86457. var _this = this;
  86458. path.get("body").forEach(function (bodyPath) {
  86459. if (isRegeneratorSource(getRequireSource(bodyPath))) {
  86460. _this.regeneratorImportExcluded = true;
  86461. bodyPath.remove();
  86462. }
  86463. });
  86464. }
  86465. };
  86466. return {
  86467. name: "regenerator-entry",
  86468. visitor: visitor,
  86469. pre: function pre() {
  86470. this.regeneratorImportExcluded = false;
  86471. },
  86472. post: function post() {
  86473. if (this.opts.debug && this.regeneratorImportExcluded) {
  86474. var filename = this.file.opts.filename;
  86475. if (process.env.BABEL_ENV === "test") {
  86476. filename = filename.replace(/\\/g, "/");
  86477. }
  86478. console.log("\n[" + filename + "] Based on your targets, regenerator-runtime import excluded.");
  86479. }
  86480. }
  86481. };
  86482. }
  86483. var lib$c = createCommonjsModule(function (module, exports) {
  86484. Object.defineProperty(exports, "__esModule", {
  86485. value: true
  86486. });
  86487. exports["default"] = void 0;
  86488. var _default = (0, _helperPluginUtils.declare)(function (api) {
  86489. api.assertVersion(7);
  86490. return {
  86491. name: "syntax-async-generators",
  86492. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  86493. parserOpts.plugins.push("asyncGenerators");
  86494. }
  86495. };
  86496. });
  86497. exports["default"] = _default;
  86498. });
  86499. var syntaxAsyncGenerators$2 = unwrapExports(lib$c);
  86500. var lib$d = createCommonjsModule(function (module, exports) {
  86501. Object.defineProperty(exports, "__esModule", {
  86502. value: true
  86503. });
  86504. exports["default"] = void 0;
  86505. var _default = (0, _helperPluginUtils.declare)(function (api) {
  86506. api.assertVersion(7);
  86507. return {
  86508. name: "syntax-dynamic-import",
  86509. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  86510. parserOpts.plugins.push("dynamicImport");
  86511. }
  86512. };
  86513. });
  86514. exports["default"] = _default;
  86515. });
  86516. var syntaxDynamicImport$2 = unwrapExports(lib$d);
  86517. var lib$e = createCommonjsModule(function (module, exports) {
  86518. Object.defineProperty(exports, "__esModule", {
  86519. value: true
  86520. });
  86521. exports["default"] = void 0;
  86522. var _default = (0, _helperPluginUtils.declare)(function (api) {
  86523. api.assertVersion(7);
  86524. return {
  86525. name: "syntax-json-strings",
  86526. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  86527. parserOpts.plugins.push("jsonStrings");
  86528. }
  86529. };
  86530. });
  86531. exports["default"] = _default;
  86532. });
  86533. var syntaxJsonStrings$1 = unwrapExports(lib$e);
  86534. var lib$f = createCommonjsModule(function (module, exports) {
  86535. Object.defineProperty(exports, "__esModule", {
  86536. value: true
  86537. });
  86538. exports["default"] = void 0;
  86539. var _default = (0, _helperPluginUtils.declare)(function (api) {
  86540. api.assertVersion(7);
  86541. return {
  86542. name: "syntax-nullish-coalescing-operator",
  86543. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  86544. parserOpts.plugins.push("nullishCoalescingOperator");
  86545. }
  86546. };
  86547. });
  86548. exports["default"] = _default;
  86549. });
  86550. var syntaxNullishCoalescingOperator$1 = unwrapExports(lib$f);
  86551. var lib$g = createCommonjsModule(function (module, exports) {
  86552. Object.defineProperty(exports, "__esModule", {
  86553. value: true
  86554. });
  86555. exports["default"] = void 0;
  86556. var _default = (0, _helperPluginUtils.declare)(function (api) {
  86557. api.assertVersion(7);
  86558. return {
  86559. name: "syntax-object-rest-spread",
  86560. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  86561. parserOpts.plugins.push("objectRestSpread");
  86562. }
  86563. };
  86564. });
  86565. exports["default"] = _default;
  86566. });
  86567. var syntaxObjectRestSpread$2 = unwrapExports(lib$g);
  86568. var lib$h = createCommonjsModule(function (module, exports) {
  86569. Object.defineProperty(exports, "__esModule", {
  86570. value: true
  86571. });
  86572. exports["default"] = void 0;
  86573. var _default = (0, _helperPluginUtils.declare)(function (api) {
  86574. api.assertVersion(7);
  86575. return {
  86576. name: "syntax-optional-catch-binding",
  86577. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  86578. parserOpts.plugins.push("optionalCatchBinding");
  86579. }
  86580. };
  86581. });
  86582. exports["default"] = _default;
  86583. });
  86584. var syntaxOptionalCatchBinding$2 = unwrapExports(lib$h);
  86585. var lib$i = createCommonjsModule(function (module, exports) {
  86586. Object.defineProperty(exports, "__esModule", {
  86587. value: true
  86588. });
  86589. exports["default"] = void 0;
  86590. var _default = (0, _helperPluginUtils.declare)(function (api) {
  86591. api.assertVersion(7);
  86592. return {
  86593. name: "syntax-optional-chaining",
  86594. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  86595. parserOpts.plugins.push("optionalChaining");
  86596. }
  86597. };
  86598. });
  86599. exports["default"] = _default;
  86600. });
  86601. var syntaxOptionalChaining$1 = unwrapExports(lib$i);
  86602. var availablePlugins = {
  86603. "proposal-async-generator-functions": proposalAsyncGeneratorFunctions,
  86604. "proposal-dynamic-import": proposalDynamicImport,
  86605. "proposal-json-strings": proposalJsonStrings,
  86606. "proposal-nullish-coalescing-operator": proposalNullishCoalescingOperator,
  86607. "proposal-object-rest-spread": proposalObjectRestSpread,
  86608. "proposal-optional-catch-binding": proposalOptionalCatchBinding,
  86609. "proposal-optional-chaining": proposalOptionalChaining,
  86610. "proposal-unicode-property-regex": proposalUnicodePropertyRegex,
  86611. "syntax-async-generators": syntaxAsyncGenerators$2,
  86612. "syntax-dynamic-import": syntaxDynamicImport$2,
  86613. "syntax-json-strings": syntaxJsonStrings$1,
  86614. "syntax-nullish-coalescing-operator": syntaxNullishCoalescingOperator$1,
  86615. "syntax-object-rest-spread": syntaxObjectRestSpread$2,
  86616. "syntax-optional-catch-binding": syntaxOptionalCatchBinding$2,
  86617. "syntax-optional-chaining": syntaxOptionalChaining$1,
  86618. "syntax-top-level-await": syntaxTopLevelAwait,
  86619. "transform-arrow-functions": transformArrowFunctions,
  86620. "transform-async-to-generator": transformAsyncToGenerator,
  86621. "transform-block-scoped-functions": transformBlockScopedFunctions,
  86622. "transform-block-scoping": transformBlockScoping,
  86623. "transform-classes": transformClasses,
  86624. "transform-computed-properties": transformComputedProperties,
  86625. "transform-destructuring": transformDestructuring,
  86626. "transform-dotall-regex": transformDotallRegex,
  86627. "transform-duplicate-keys": transformDuplicateKeys,
  86628. "transform-exponentiation-operator": transformExponentialOperator,
  86629. "transform-for-of": transformForOf,
  86630. "transform-function-name": transformFunctionName,
  86631. "transform-literals": transformLiterals,
  86632. "transform-member-expression-literals": transformMemberExpressionLiterals,
  86633. "transform-modules-amd": transformModulesAmd,
  86634. "transform-modules-commonjs": transformModulesCommonjs,
  86635. "transform-modules-systemjs": transformModulesSystemjs,
  86636. "transform-modules-umd": transformModulesUmd,
  86637. "transform-named-capturing-groups-regex": transformNamedCapturingGroupsRegex,
  86638. "transform-new-target": transformNewTarget,
  86639. "transform-object-super": transformObjectSuper,
  86640. "transform-parameters": transformParameters,
  86641. "transform-property-literals": transformPropertyLiterals,
  86642. "transform-regenerator": transformRegenerator,
  86643. "transform-reserved-words": transformReservedWords,
  86644. "transform-shorthand-properties": transformShorthandProperties,
  86645. "transform-spread": transformSpread,
  86646. "transform-sticky-regex": transformStickyRegex,
  86647. "transform-template-literals": transformTemplateLiterals,
  86648. "transform-typeof-symbol": transformTypeofSymbol,
  86649. "transform-unicode-regex": transformUnicodeRegex
  86650. };
  86651. var pluginListWithoutProposals = filterStageFromList(plugins$2, shippedProposals_2);
  86652. var getPlugin = function getPlugin(pluginName) {
  86653. var plugin = availablePlugins[pluginName];
  86654. if (!plugin) {
  86655. throw new Error("Could not find plugin \"" + pluginName + "\". Ensure there is an entry in ./available-plugins.js for it.");
  86656. }
  86657. return plugin;
  86658. };
  86659. var transformIncludesAndExcludes = function transformIncludesAndExcludes(opts) {
  86660. return opts.reduce(function (result, opt) {
  86661. var target = opt.match(/^(es|es6|es7|esnext|web)\./) ? "builtIns" : "plugins";
  86662. result[target].add(opt);
  86663. return result;
  86664. }, {
  86665. all: opts,
  86666. plugins: new Set(),
  86667. builtIns: new Set()
  86668. });
  86669. };
  86670. var getModulesPluginNames = function getModulesPluginNames(_ref) {
  86671. var modules = _ref.modules,
  86672. transformations = _ref.transformations,
  86673. shouldTransformESM = _ref.shouldTransformESM,
  86674. shouldTransformDynamicImport = _ref.shouldTransformDynamicImport,
  86675. shouldParseTopLevelAwait = _ref.shouldParseTopLevelAwait;
  86676. var modulesPluginNames = [];
  86677. if (modules !== false && transformations[modules]) {
  86678. if (shouldTransformESM) {
  86679. modulesPluginNames.push(transformations[modules]);
  86680. }
  86681. if (shouldTransformDynamicImport && shouldTransformESM && modules !== "umd") {
  86682. modulesPluginNames.push("proposal-dynamic-import");
  86683. } else {
  86684. if (shouldTransformDynamicImport) {
  86685. console.warn("Dynamic import can only be supported when transforming ES modules" + " to AMD, CommonJS or SystemJS. Only the parser plugin will be enabled.");
  86686. }
  86687. modulesPluginNames.push("syntax-dynamic-import");
  86688. }
  86689. } else {
  86690. modulesPluginNames.push("syntax-dynamic-import");
  86691. }
  86692. if (shouldParseTopLevelAwait) {
  86693. modulesPluginNames.push("syntax-top-level-await");
  86694. }
  86695. return modulesPluginNames;
  86696. };
  86697. var getPolyfillPlugins = function getPolyfillPlugins(_ref2) {
  86698. var useBuiltIns = _ref2.useBuiltIns,
  86699. corejs = _ref2.corejs,
  86700. polyfillTargets = _ref2.polyfillTargets,
  86701. include = _ref2.include,
  86702. exclude = _ref2.exclude,
  86703. proposals = _ref2.proposals,
  86704. shippedProposals = _ref2.shippedProposals,
  86705. regenerator = _ref2.regenerator,
  86706. debug = _ref2.debug;
  86707. var polyfillPlugins = [];
  86708. if (useBuiltIns === "usage" || useBuiltIns === "entry") {
  86709. var pluginOptions = {
  86710. corejs: corejs,
  86711. polyfillTargets: polyfillTargets,
  86712. include: include,
  86713. exclude: exclude,
  86714. proposals: proposals,
  86715. shippedProposals: shippedProposals,
  86716. regenerator: regenerator,
  86717. debug: debug
  86718. };
  86719. if (corejs) {
  86720. if (useBuiltIns === "usage") {
  86721. if (corejs.major === 2) {
  86722. polyfillPlugins.push([addCoreJS2UsagePlugin, pluginOptions]);
  86723. } else {
  86724. polyfillPlugins.push([addCoreJS3UsagePlugin, pluginOptions]);
  86725. }
  86726. if (regenerator) {
  86727. polyfillPlugins.push([addRegeneratorUsagePlugin, pluginOptions]);
  86728. }
  86729. } else {
  86730. if (corejs.major === 2) {
  86731. polyfillPlugins.push([replaceCoreJS2EntryPlugin, pluginOptions]);
  86732. } else {
  86733. polyfillPlugins.push([replaceCoreJS3EntryPlugin, pluginOptions]);
  86734. if (!regenerator) {
  86735. polyfillPlugins.push([removeRegeneratorEntryPlugin, pluginOptions]);
  86736. }
  86737. }
  86738. }
  86739. }
  86740. }
  86741. return polyfillPlugins;
  86742. };
  86743. function supportsStaticESM$1(caller) {
  86744. return !!(caller && caller.supportsStaticESM);
  86745. }
  86746. function supportsDynamicImport(caller) {
  86747. return !!(caller && caller.supportsDynamicImport);
  86748. }
  86749. function supportsTopLevelAwait(caller) {
  86750. return !!(caller && caller.supportsTopLevelAwait);
  86751. }
  86752. var presetEnv = declare(function (api, opts) {
  86753. api.assertVersion(7);
  86754. var _normalizeOptions = normalizeOptions$4(opts),
  86755. configPath = _normalizeOptions.configPath,
  86756. debug = _normalizeOptions.debug,
  86757. optionsExclude = _normalizeOptions.exclude,
  86758. forceAllTransforms = _normalizeOptions.forceAllTransforms,
  86759. ignoreBrowserslistConfig = _normalizeOptions.ignoreBrowserslistConfig,
  86760. optionsInclude = _normalizeOptions.include,
  86761. loose = _normalizeOptions.loose,
  86762. modules = _normalizeOptions.modules,
  86763. shippedProposals = _normalizeOptions.shippedProposals,
  86764. spec = _normalizeOptions.spec,
  86765. optionsTargets = _normalizeOptions.targets,
  86766. useBuiltIns = _normalizeOptions.useBuiltIns,
  86767. _normalizeOptions$cor = _normalizeOptions.corejs,
  86768. corejs = _normalizeOptions$cor.version,
  86769. proposals = _normalizeOptions$cor.proposals;
  86770. var hasUglifyTarget = false;
  86771. if (optionsTargets && optionsTargets.uglify) {
  86772. hasUglifyTarget = true;
  86773. delete optionsTargets.uglify;
  86774. console.log("");
  86775. console.log("The uglify target has been deprecated. Set the top level");
  86776. console.log("option `forceAllTransforms: true` instead.");
  86777. console.log("");
  86778. }
  86779. if (optionsTargets && optionsTargets.esmodules && optionsTargets.browsers) {
  86780. console.log("");
  86781. console.log("@babel/preset-env: esmodules and browsers targets have been specified together.");
  86782. console.log("`browsers` target, `" + optionsTargets.browsers + "` will be ignored.");
  86783. console.log("");
  86784. }
  86785. var targets = getTargets(optionsTargets, {
  86786. ignoreBrowserslistConfig: ignoreBrowserslistConfig,
  86787. configPath: configPath
  86788. });
  86789. var include = transformIncludesAndExcludes(optionsInclude);
  86790. var exclude = transformIncludesAndExcludes(optionsExclude);
  86791. var transformTargets = forceAllTransforms || hasUglifyTarget ? {} : targets;
  86792. var modulesPluginNames = getModulesPluginNames({
  86793. modules: modules,
  86794. transformations: moduleTransformations,
  86795. shouldTransformESM: modules !== "auto" || !api.caller || !api.caller(supportsStaticESM$1),
  86796. shouldTransformDynamicImport: modules !== "auto" || !api.caller || !api.caller(supportsDynamicImport),
  86797. shouldParseTopLevelAwait: !api.caller || api.caller(supportsTopLevelAwait)
  86798. });
  86799. var pluginNames = filterItems(shippedProposals ? plugins$2 : pluginListWithoutProposals, include.plugins, exclude.plugins, transformTargets, modulesPluginNames, getOptionSpecificExcludesFor({
  86800. loose: loose
  86801. }), shippedProposals_1);
  86802. removeUnnecessaryItems(pluginNames, overlappingPlugins$2);
  86803. var polyfillPlugins = getPolyfillPlugins({
  86804. useBuiltIns: useBuiltIns,
  86805. corejs: corejs,
  86806. polyfillTargets: targets,
  86807. include: include.builtIns,
  86808. exclude: exclude.builtIns,
  86809. proposals: proposals,
  86810. shippedProposals: shippedProposals,
  86811. regenerator: pluginNames.has("transform-regenerator"),
  86812. debug: debug
  86813. });
  86814. var pluginUseBuiltIns = useBuiltIns !== false;
  86815. var plugins = Array.from(pluginNames).map(function (pluginName) {
  86816. return [getPlugin(pluginName), {
  86817. spec: spec,
  86818. loose: loose,
  86819. useBuiltIns: pluginUseBuiltIns
  86820. }];
  86821. }).concat(polyfillPlugins);
  86822. if (debug) {
  86823. console.log("@babel/preset-env: `DEBUG` option");
  86824. console.log("\nUsing targets:");
  86825. console.log(JSON.stringify(prettifyTargets(targets), null, 2));
  86826. console.log("\nUsing modules transform: " + modules.toString());
  86827. console.log("\nUsing plugins:");
  86828. pluginNames.forEach(function (pluginName) {
  86829. logPluginOrPolyfill(pluginName, targets, plugins$2);
  86830. });
  86831. if (!useBuiltIns) {
  86832. console.log("\nUsing polyfills: No polyfills were added, since the `useBuiltIns` option was not set.");
  86833. } else {
  86834. console.log("\nUsing polyfills with `" + useBuiltIns + "` option:");
  86835. }
  86836. }
  86837. return {
  86838. plugins: plugins
  86839. };
  86840. });
  86841. var presetFlow = declare(function (api, _ref) {
  86842. var all = _ref.all;
  86843. api.assertVersion(7);
  86844. return {
  86845. plugins: [[transformFlowStripTypes, {
  86846. all: all
  86847. }]]
  86848. };
  86849. });
  86850. var presetReact = declare(function (api, opts) {
  86851. api.assertVersion(7);
  86852. var pragma = opts.pragma || "React.createElement";
  86853. var pragmaFrag = opts.pragmaFrag || "React.Fragment";
  86854. var throwIfNamespace = opts.throwIfNamespace === undefined ? true : !!opts.throwIfNamespace;
  86855. var development = !!opts.development;
  86856. var useBuiltIns = !!opts.useBuiltIns;
  86857. var useSpread = opts.useSpread;
  86858. if (typeof development !== "boolean") {
  86859. throw new Error("@babel/preset-react 'development' option must be a boolean.");
  86860. }
  86861. return {
  86862. plugins: [[transformReactJSX, {
  86863. pragma: pragma,
  86864. pragmaFrag: pragmaFrag,
  86865. throwIfNamespace: throwIfNamespace,
  86866. useBuiltIns: useBuiltIns,
  86867. useSpread: useSpread
  86868. }], transformReactDisplayName, development && transformReactJSXSource, development && transformReactJSXSelf].filter(Boolean)
  86869. };
  86870. });
  86871. var presetTypescript = declare(function (api, _ref) {
  86872. var jsxPragma = _ref.jsxPragma,
  86873. _ref$allExtensions = _ref.allExtensions,
  86874. allExtensions = _ref$allExtensions === void 0 ? false : _ref$allExtensions,
  86875. _ref$isTSX = _ref.isTSX,
  86876. isTSX = _ref$isTSX === void 0 ? false : _ref$isTSX,
  86877. allowNamespaces = _ref.allowNamespaces,
  86878. allowDeclareFields = _ref.allowDeclareFields;
  86879. api.assertVersion(7);
  86880. if (typeof allExtensions !== "boolean") {
  86881. throw new Error(".allExtensions must be a boolean, or undefined");
  86882. }
  86883. if (typeof isTSX !== "boolean") {
  86884. throw new Error(".isTSX must be a boolean, or undefined");
  86885. }
  86886. if (isTSX && !allExtensions) {
  86887. throw new Error("isTSX:true requires allExtensions:true");
  86888. }
  86889. var pluginOptions = function pluginOptions(isTSX) {
  86890. return {
  86891. jsxPragma: jsxPragma,
  86892. isTSX: isTSX,
  86893. allowNamespaces: allowNamespaces,
  86894. allowDeclareFields: allowDeclareFields
  86895. };
  86896. };
  86897. return {
  86898. overrides: allExtensions ? [{
  86899. plugins: [[transformTypeScript, pluginOptions(isTSX)]]
  86900. }] : [{
  86901. test: /\.ts$/,
  86902. plugins: [[transformTypeScript, pluginOptions(false)]]
  86903. }, {
  86904. test: /\.tsx$/,
  86905. plugins: [[transformTypeScript, pluginOptions(true)]]
  86906. }]
  86907. };
  86908. });
  86909. var scriptTypes = ["text/jsx", "text/babel"];
  86910. var headEl;
  86911. var inlineScriptCount = 0;
  86912. function transformCode(transformFn, script) {
  86913. var source;
  86914. if (script.url != null) {
  86915. source = script.url;
  86916. } else {
  86917. source = "Inline Babel script";
  86918. inlineScriptCount++;
  86919. if (inlineScriptCount > 1) {
  86920. source += " (" + inlineScriptCount + ")";
  86921. }
  86922. }
  86923. return transformFn(script.content, Object.assign({
  86924. filename: source
  86925. }, buildBabelOptions(script))).code;
  86926. }
  86927. function buildBabelOptions(script) {
  86928. return {
  86929. presets: script.presets || ["react", "es2015"],
  86930. plugins: script.plugins || ["proposal-class-properties", "proposal-object-rest-spread", "transform-flow-strip-types"],
  86931. sourceMaps: "inline"
  86932. };
  86933. }
  86934. function run$1(transformFn, script) {
  86935. var scriptEl = document.createElement("script");
  86936. scriptEl.text = transformCode(transformFn, script);
  86937. headEl.appendChild(scriptEl);
  86938. }
  86939. function load(url, successCallback, errorCallback) {
  86940. var xhr = new XMLHttpRequest();
  86941. xhr.open("GET", url, true);
  86942. if ("overrideMimeType" in xhr) {
  86943. xhr.overrideMimeType("text/plain");
  86944. }
  86945. xhr.onreadystatechange = function () {
  86946. if (xhr.readyState === 4) {
  86947. if (xhr.status === 0 || xhr.status === 200) {
  86948. successCallback(xhr.responseText);
  86949. } else {
  86950. errorCallback();
  86951. throw new Error("Could not load " + url);
  86952. }
  86953. }
  86954. };
  86955. return xhr.send(null);
  86956. }
  86957. function getPluginsOrPresetsFromScript(script, attributeName) {
  86958. var rawValue = script.getAttribute(attributeName);
  86959. if (rawValue === "") {
  86960. return [];
  86961. }
  86962. if (!rawValue) {
  86963. return null;
  86964. }
  86965. return rawValue.split(",").map(function (item) {
  86966. return item.trim();
  86967. });
  86968. }
  86969. function loadScripts(transformFn, scripts) {
  86970. var result = [];
  86971. var count = scripts.length;
  86972. function check() {
  86973. var script, i;
  86974. for (i = 0; i < count; i++) {
  86975. script = result[i];
  86976. if (script.loaded && !script.executed) {
  86977. script.executed = true;
  86978. run$1(transformFn, script);
  86979. } else if (!script.loaded && !script.error && !script.async) {
  86980. break;
  86981. }
  86982. }
  86983. }
  86984. scripts.forEach(function (script, i) {
  86985. var scriptData = {
  86986. async: script.hasAttribute("async"),
  86987. error: false,
  86988. executed: false,
  86989. plugins: getPluginsOrPresetsFromScript(script, "data-plugins"),
  86990. presets: getPluginsOrPresetsFromScript(script, "data-presets")
  86991. };
  86992. if (script.src) {
  86993. result[i] = Object.assign({}, scriptData, {
  86994. content: null,
  86995. loaded: false,
  86996. url: script.src
  86997. });
  86998. load(script.src, function (content) {
  86999. result[i].loaded = true;
  87000. result[i].content = content;
  87001. check();
  87002. }, function () {
  87003. result[i].error = true;
  87004. check();
  87005. });
  87006. } else {
  87007. result[i] = Object.assign({}, scriptData, {
  87008. content: script.innerHTML,
  87009. loaded: true,
  87010. url: script.getAttribute("data-module") || null
  87011. });
  87012. }
  87013. });
  87014. check();
  87015. }
  87016. function runScripts(transformFn, scripts) {
  87017. headEl = document.getElementsByTagName("head")[0];
  87018. if (!scripts) {
  87019. scripts = document.getElementsByTagName("script");
  87020. }
  87021. var jsxScripts = [];
  87022. for (var i = 0; i < scripts.length; i++) {
  87023. var script = scripts.item(i);
  87024. var type = script.type.split(";")[0];
  87025. if (scriptTypes.indexOf(type) !== -1) {
  87026. jsxScripts.push(script);
  87027. }
  87028. }
  87029. if (jsxScripts.length === 0) {
  87030. return;
  87031. }
  87032. console.warn("You are using the in-browser Babel transformer. Be sure to precompile " + "your scripts for production - https://babeljs.io/docs/setup/");
  87033. loadScripts(transformFn, jsxScripts);
  87034. }
  87035. var isArray$4 = Array.isArray || function (arg) {
  87036. return Object.prototype.toString.call(arg) === "[object Array]";
  87037. };
  87038. function loadBuiltin(builtinTable, name) {
  87039. if (isArray$4(name) && typeof name[0] === "string") {
  87040. if (Object.prototype.hasOwnProperty.call(builtinTable, name[0])) {
  87041. return [builtinTable[name[0]]].concat(name.slice(1));
  87042. }
  87043. return;
  87044. } else if (typeof name === "string") {
  87045. return builtinTable[name];
  87046. }
  87047. return name;
  87048. }
  87049. function processOptions(options) {
  87050. var presets = (options.presets || []).map(function (presetName) {
  87051. var preset = loadBuiltin(availablePresets, presetName);
  87052. if (preset) {
  87053. if (isArray$4(preset) && typeof preset[0] === "object" && Object.prototype.hasOwnProperty.call(preset[0], "buildPreset")) {
  87054. preset[0] = Object.assign({}, preset[0], {
  87055. buildPreset: preset[0].buildPreset
  87056. });
  87057. }
  87058. } else {
  87059. throw new Error("Invalid preset specified in Babel options: \"" + presetName + "\"");
  87060. }
  87061. return preset;
  87062. });
  87063. var plugins = (options.plugins || []).map(function (pluginName) {
  87064. var plugin = loadBuiltin(availablePlugins$1, pluginName);
  87065. if (!plugin) {
  87066. throw new Error("Invalid plugin specified in Babel options: \"" + pluginName + "\"");
  87067. }
  87068. return plugin;
  87069. });
  87070. return Object.assign({
  87071. babelrc: false
  87072. }, options, {
  87073. presets: presets,
  87074. plugins: plugins
  87075. });
  87076. }
  87077. function transform$1(code, options) {
  87078. return transform(code, processOptions(options));
  87079. }
  87080. function transformFromAst$1(ast, code, options) {
  87081. return transformFromAst(ast, code, processOptions(options));
  87082. }
  87083. var availablePlugins$1 = {};
  87084. var availablePresets = {};
  87085. var buildExternalHelpers = babelBuildExternalHelpers;
  87086. function registerPlugin(name, plugin) {
  87087. if (Object.prototype.hasOwnProperty.call(availablePlugins$1, name)) {
  87088. console.warn("A plugin named \"" + name + "\" is already registered, it will be overridden");
  87089. }
  87090. availablePlugins$1[name] = plugin;
  87091. }
  87092. function registerPlugins(newPlugins) {
  87093. Object.keys(newPlugins).forEach(function (name) {
  87094. return registerPlugin(name, newPlugins[name]);
  87095. });
  87096. }
  87097. function registerPreset(name, preset) {
  87098. if (Object.prototype.hasOwnProperty.call(availablePresets, name)) {
  87099. if (name === "env") {
  87100. console.warn("@babel/preset-env is now included in @babel/standalone, please remove @babel/preset-env-standalone");
  87101. } else {
  87102. console.warn("A preset named \"" + name + "\" is already registered, it will be overridden");
  87103. }
  87104. }
  87105. availablePresets[name] = preset;
  87106. }
  87107. function registerPresets(newPresets) {
  87108. Object.keys(newPresets).forEach(function (name) {
  87109. return registerPreset(name, newPresets[name]);
  87110. });
  87111. }
  87112. registerPlugins(all);
  87113. registerPresets({
  87114. env: presetEnv,
  87115. es2015: preset2015,
  87116. es2016: function es2016() {
  87117. return {
  87118. plugins: [availablePlugins$1["transform-exponentiation-operator"]]
  87119. };
  87120. },
  87121. es2017: function es2017() {
  87122. return {
  87123. plugins: [availablePlugins$1["transform-async-to-generator"]]
  87124. };
  87125. },
  87126. react: presetReact,
  87127. "stage-0": presetStage0,
  87128. "stage-1": presetStage1,
  87129. "stage-2": presetStage2,
  87130. "stage-3": presetStage3,
  87131. "es2015-loose": {
  87132. presets: [[preset2015, {
  87133. loose: true
  87134. }]]
  87135. },
  87136. "es2015-no-commonjs": {
  87137. presets: [[preset2015, {
  87138. modules: false
  87139. }]]
  87140. },
  87141. typescript: presetTypescript,
  87142. flow: presetFlow
  87143. });
  87144. var version$7 = "7.8.3";
  87145. function onDOMContentLoaded() {
  87146. transformScriptTags();
  87147. }
  87148. if (typeof window !== "undefined" && window && window.addEventListener) {
  87149. window.addEventListener("DOMContentLoaded", onDOMContentLoaded, false);
  87150. }
  87151. function transformScriptTags(scriptTags) {
  87152. runScripts(transform$1, scriptTags);
  87153. }
  87154. function disableScriptTags() {
  87155. window.removeEventListener("DOMContentLoaded", onDOMContentLoaded);
  87156. }
  87157. exports.availablePlugins = availablePlugins$1;
  87158. exports.availablePresets = availablePresets;
  87159. exports.buildExternalHelpers = buildExternalHelpers;
  87160. exports.disableScriptTags = disableScriptTags;
  87161. exports.registerPlugin = registerPlugin;
  87162. exports.registerPlugins = registerPlugins;
  87163. exports.registerPreset = registerPreset;
  87164. exports.registerPresets = registerPresets;
  87165. exports.transform = transform$1;
  87166. exports.transformFromAst = transformFromAst$1;
  87167. exports.transformScriptTags = transformScriptTags;
  87168. exports.version = version$7;
  87169. Object.defineProperty(exports, '__esModule', { value: true });
  87170. })));